

/* 
	hack to keep netscape happy (or at least quiet) when it encounters rollovers in divs
*/






// Preload the on states of the tabs for quicker response

image_windows = new Image();
image_windows.src = "http://img.techweb.com/design/IWK/nav/images/nav_windows_on.gif";

image_software = new Image();
image_software.src = "http://img.techweb.com/design/IWK/nav/images/nav_software_on.gif";

image_hardware = new Image();
image_hardware.src = "http://img.techweb.com/design/IWK/nav/images/nav_hardware_on.gif";

image_security = new Image();
image_security.src = "http://img.techweb.com/design/IWK/nav/images/nav_security_on.gif";

image_outsourcing = new Image();
image_outsourcing.src = "http://img.techweb.com/design/IWK/nav/images/nav_outsourcing_on.gif";

image_security = new Image();
image_security.src = "http://img.techweb.com/design/IWK/nav/images/nav_management_on.gif";

image_security = new Image();
image_security.src = "http://img.techweb.com/design/IWK/nav/images/nav_industries_on.gif";

// Pass in the random frequencies of the tabs

var windows_freq = 10; 
var software_freq = 20; 
var hadware_freq = 30; 
var security_freq = 40; 
var outsourcing_freq = 50; 
var management_freq = 60; 
var industries_freq = 70; 
var windows_freq = 100;


// Pass in the URL of the image which should appear on each tab

//var chicagologo = 'http://i.cmpnet.com/insurancetech/msvalue/logo_windows.gif';
//var nyclogo = 'http://i.cmpnet.com/insurancetech/msvalue/logo_security.gif';



// Random Equation which determines which tab to show
var randomColoredTab;
var randomColoredSeed = Math.ceil(100*Math.random(100));
if (randomColoredSeed <= windows_freq) {
randomColoredTab = 'windows';
} else if (randomColoredSeed <= software_freq) {
randomColoredTab = 'software';
} else if (randomColoredSeed <= hardware_freq) {
randomColoredTab = 'hardware';
} else if (randomColoredSeed <= security_freq) {
randomColoredTab = 'security';
} else if (randomColoredSeed <= outsourcing_freq) {
randomColoredTab = 'outsourcing';
} else if (randomColoredSeed <= management_freq) {
randomColoredTab = 'management';
} else if (randomColoredSeed <= industries_freq) {
randomColoredTab = 'industries';
} else {
randomColoredTab = 'windows';
}

// Function which actually swaps tabs
function changeColoredTab (tabname) {
document.getElementById('tab_windows').style.display = 'none';
document.getElementById('tab_software').style.display = 'none';
document.getElementById('tab_hardware').style.display = 'none';
document.getElementById('tab_security').style.display = 'none';
document.getElementById('tab_outsourcing').style.display = 'none';
document.getElementById('tab_management').style.display = 'none';
document.getElementById('tab_industries').style.display = 'none';
document.getElementById('tab_'+tabname).style.display = 'block';

document.getElementById('tabnav_windows').src = 'http://img.techweb.com/design/IWK/nav/images/nav_windows_off.gif';
document.getElementById('tabnav_software').src = 'http://img.techweb.com/design/IWK/nav/images/nav_software_off.gif';
document.getElementById('tabnav_hardware').src = 'http://img.techweb.com/design/IWK/nav/images/nav_hardware_off.gif';
document.getElementById('tabnav_security').src = 'http://img.techweb.com/design/IWK/nav/images/nav_security_off.gif';
document.getElementById('tabnav_outsourcing').src = 'http://img.techweb.com/design/IWK/nav/images/nav_outsourcing_off.gif';
document.getElementById('tabnav_management').src = 'http://img.techweb.com/design/IWK/nav/images/nav_management_off.gif';
document.getElementById('tabnav_industries').src = 'http://img.techweb.com/design/IWK/nav/images/nav_industries_off.gif';

document.getElementById('tabnav_'+tabname).src = 'http://img.techweb.com/design/IWK/nav/images/nav_'+tabname+'_on.gif';
//document.getElementById('logo_'+tabname).src = eval(tabname+'logo');
}
