


function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}
function changeImages() {
	changeImagesArray(changeImages.arguments);
}







var preloadFlag = true;








function preloadImages() {
	if (document.images) {
		pre_bannermenu2_01 = newImage('images/bannermenu2_01.jpg');
		pre_bannermenu2_03 = newImage('images/ibannermenu2_02.jpg');
		pre_bannermenu2_03 = newImage('images/bannermenu2_03.jpg');
		preloadFlag = true;
	}
}

function showMainMenu(menuObj, x, y) {
    if (!document.all && document.getElementById) {
        window.FW_showMenu(menuObj, x, y);
    } else if (document.all) {
        y += 8; // silly IE
        window.FW_showMenu(menuObj, x, y);
    }
}






function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}
function changeImages() {
	changeImagesArray(changeImages.arguments);
}







var preloadFlag = true;








function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (var i=0; i<array.length; i+=2) {
			img = null; var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}
function changeImages() {
	changeImagesArray(changeImages.arguments);
}







function preloadImages() {
	if (document.images) {
		pre_iscotmtm2_01 = newImage('images/iscotmtm2_01.jpg');
		pre_iscotmtm2_02 = newImage('images/iscotmtm2_02.jpg');
		pre_iscotmtm2_03 = newImage('images/iscotmtm2_03.jpg');
		pre_iscotmtm2_04 = newImage('images/iscotmtm2_04.jpg');
		pre_iscotmtm2_05 = newImage('images/iscotmtm2_05.jpg');
		pre_iscotmtm2_06 = newImage('images/iscotmtm2_06.jpg');
		preloadFlag = true;
	}
}


var menuTimer;
var buttonMenus = new Array();
buttonMenus[0] = 'menuH';
buttonMenus[1] = 'menuWSS';
buttonMenus[2] = 'menuPIM';
buttonMenus[3] = 'menuBIM';
buttonMenus[4] = 'menuSF';
buttonMenus[5] = 'menuC';

function showMenu(menuId) {
    if (document.getElementById) {
        // clear the timeout because we're going to kill all the menus anyway
        window.clearTimeout(menuTimer);

        // first things first, hide all other menus
        for (var i = 0; i < buttonMenus.length; i++) {
            // only hide the other menus in the event the menu is already showing
            if (menuId != buttonMenus[i]) {
                reallyHideMenu(buttonMenus[i]);
            }
        }

        // now show this one
        var menu = document.getElementById(menuId);
        menu.style.position = "absolute";
        menu.style.display = "block";
        menu.style.visibility = "visible";
    }
}

function hideMenu(menuId) {
    if (document.getElementById) {
        menuTimer = window.setTimeout('reallyHideMenu("'+menuId+'")', 2000);
    }
}

function reallyHideMenu(menuId) {
    if (document.getElementById) {
        var menu = document.getElementById(menuId);
        menu.style.position = "absolute";
        menu.style.display = "none";
        menu.style.visibility = "hidden";
    }
}

// this function is called when a round button is rolled off, but the mouse is over the menu for that button.
// without this function, the menu would be killed in 2 secons.
function stopTheKillings(menuId) {
    if (document.getElementById) {
        window.clearTimeout(menuTimer);
    }
}



function changeStyle(title) {
    if (title.length > 0 && title != null) {
        if (document.styleSheets.length) {
            for (var y = 0; y < document.styleSheets.length; y++ ) {
                if (document.styleSheets[y].title == title) {
                    document.styleSheets[y].disabled = false;
                } else if (document.styleSheets[y].title.length > 0 && !document.styleSheets[y].isDisabled) {
                    document.styleSheets[y].disabled = true;
                }
            }
        }
    }
}

function checkStyle() {
    if (!document.all && document.getElementById) {
    } else if (document.all) {
        changeStyle('ie');
    } else {
        alert('Our web site may not display properly based on the browser you are using.');
    }
}

// adjustments needed for IE
window.onload = checkStyle();