var i;
var imgList = new Array("home","products","solutions","practices","partners","company","contact");

var out = new Array();
for(i=0;i<imgList.length;i++) {
    out[imgList[i]] = new Image();
    out[imgList[i]].src = "/ui/images/m_"+imgList[i]+".gif";
}

var ovr = new Array();
for(i=0;i<imgList.length;i++) {
    ovr[imgList[i]] = new Image();
    ovr[imgList[i]].src = "/ui/images/m_"+imgList[i]+"_on.gif";
}


function iOver(img) {
	if(document.images) {
		var o = document[img];
		if(o.filters) { o.filters.blendTrans.apply(); }
		o.src = ovr[img].src;
		if(o.filters) { o.filters.blendTrans.play(); }
	}
}

function iOut(img) {
	if(document.images) {
		var o = document[img];
		if(o.filters) { o.filters.blendTrans.apply(); }
		o.src = out[img].src;
		if(o.filters) { o.filters.blendTrans.play(); }
	}
}

var popupWin;

function popWindow(url,width,height,toolbar,menubar,scrollbars,resizable,status) {

	//Close existing window
	try { popupWin.close();	} catch(e) {}

	var midX = (screen.width/2)-([width]/2);
	var midY = (screen.height/2)-([height]/2);
	var winAttrib = "width="+[width]+",height="+[height]+",toolbar="+[toolbar]+",menubar="+[menubar]+",scrollbars="+[scrollbars]+",resizable="+[resizable]+",status="+[status]+",top="+midX+",left="+midY+",screenX="+midX+",screenY="+midY;

	//Open new window
	popupWin = window.open(''+[url]+'','pop',''+winAttrib+'')
	try { setTimeOut("popupWin.focus();",250);} catch(e) {}
}


function popVideo(video) {

	//Close existing window
	try { popupWin.close();	} catch(e) {}

	var midX = (screen.width/2)-(500/2);
	var midY = (screen.height/2)-(380/2);
	var winAttrib = "width=500,height=380,toolbar=0,menubar=0,scrollbars=0,resizable=0,status=0,top="+midX+",left="+midY+",screenX="+midX+",screenY="+midY;

	//Open new window
	popupWin = window.open('/video/?f='+video+'','pop',''+winAttrib+'')
	try { setTimeOut("popupWin.focus();",250);} catch(e) {}
}

function playVideo(video) {
	popVideo(video);
}


function hideDiv(id) {
	var o = null;
	if(document.all) { o = document.all(id); }
	else if(document.getElementById) { o = document.getElementById(id); }

	if(o!=null && o.style) {
		o.style.display = "none";
	}
}

