// JavaScript Document
btn_03 = new Image();
btn_03.src = "/icp-vortex/images/btn_03.gif";
btn_04 = new Image();
btn_04.src = "/icp-vortex/images/btn_04.gif";
btn_05 = new Image();
btn_05.src = "/icp-vortex/images/btn_05.gif";
btn_07 = new Image();
btn_07.src = "/icp-vortex/images/btn_07.gif";
btn_08 = new Image();
btn_08.src = "/icp-vortex/images/btn_08.gif";
btn_09 = new Image();
btn_09.src = "/icp-vortex/images/btn_09.gif";
btn_11 = new Image();
btn_11.src = "/icp-vortex/images/btn_11.gif";
btn_12 = new Image();
btn_12.src = "/icp-vortex/images/btn_12.gif";
btn_13 = new Image();
btn_13.src = "/icp-vortex/images/btn_13.gif";
btn_14 = new Image();
btn_14.src = "/icp-vortex/images/btn_14.gif";
btn_15 = new Image();
btn_15.src = "/icp-vortex/images/btn_15.gif";
btn_16 = new Image();
btn_16.src = "/icp-vortex/images/btn_16.gif";
btn_17 = new Image();
btn_17.src = "/icp-vortex/images/btn_17.gif";


function swapImage(imgDocID,imgObjName) {
	document.images[imgDocID].src = eval(imgObjName + ".src")
}

function setPopupPosition(){
	var menu = document.getElementById('menu4');
	var posXY = findPosXY(menu);
	var top = parseFloat(posXY.y) + menu.clientHeight;
	var textStyle = "left:"+posXY.x+"px;top:"+top+"px;";
	menu_popup = document.getElementById('popup1');
	setStyle(menu_popup, textStyle);
}
function showPopupMenu(id){
	//test_image = /btn_12/ig;
	//if(!test_image.test(document.Image24.src)){
	menu_popup = document.getElementById(id);
	var textStyle = "display:;";
	setStyle(menu_popup, textStyle);
}
function hidePopupMenu(id){
	menu_popup = document.getElementById(id);
	var textStyle = "display:none;";
	setStyle(menu_popup, textStyle);;
}

function findPosXY(obj)
{
	var XY={x:0, y:0};
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			XY.x += obj.offsetLeft;
			XY.y += obj.offsetTop;
			obj = obj.offsetParent;
		}
	}
	else if (obj.x){
		XY.x += obj.x;
		XY.y += obj.y;
	}
	return XY;
}

function setStyle(el, prop) {
	if (document.all) {
		var props = prop.split(';');
		for (var i = 0; i < props.length; i++) {
			var attrib = props[i].split(':');
			if(attrib[0] != '' && attrib[0] != 'undefined') eval("el.style."+attrib[0]+"='"+attrib[1]+"';");
		}
	}else{
			var cssText = el.style.cssText;
			var cssTexts = cssText.split(';');
			var props = prop.split(';');
			var strcssText = '';
			for (var i = 0; i < cssTexts.length; i++) {
				var cssTextattrib = cssTexts[i].split(':');
				var usecssTextattrib = 1;
				for (var j = 0; j < props.length; j++) {
					var attrib = props[j].split(':');
					if(attrib[0] == '' || attrib[0] == ' ' || attrib[0] == 'undefined'){
						continue;
					}else if(Trim(attrib[0]) == Trim(cssTextattrib[0])){
						usecssTextattrib = 0;
						break;
					}
				}
				if(usecssTextattrib == 1 && cssTextattrib[0] != '' && cssTextattrib[0] != ' ' && cssTextattrib[0] != 'undefined'){
					strcssText += cssTextattrib[0] + ':' + cssTextattrib[1] + ';';
				}
			}
			el.setAttribute("style", strcssText + prop);
	}
}
function Trim(text){
    return text.replace(/^\s*|\s*$/g,'');
}

function LTrim(text){
    return text.replace(/^\s*/g,'');
}

function RTrim(text){
    return text.replace(/\s*$/g,'');
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}