function MM_preloadImages() { //v1.2
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    var preloadArray = new Array();
    for (var i=0; i<imgFiles.length; i++) {
      preloadArray[i] = new Image;
      preloadArray[i].src = imgFiles[i];
    }
  }
}

function MouseOver(imgName) {
	if(document.images) {
		if (imgName.src.indexOf("-on") ==-1){
			// get the image type
			suffixType = imgName.src.substring(imgName.src.lastIndexOf("."),imgName.src.length);
			// swap to new image
			if (imgName.src.indexOf("-over") == -1) {
				imgName.src = imgName.src.substring(0,(imgName.src.indexOf(suffixType))) + "-over" + suffixType;
			}
		}
	}
}

function MouseOut(imgName) {
	if(document.images) {
		// get the image type
		suffixType = imgName.src.substring(imgName.src.lastIndexOf("."),imgName.src.length);
		
		// swap image back to original
		if (imgName.src.indexOf("-over") != -1) {
			imgName.src = imgName.src.substring(0,(imgName.src.indexOf("-over"))) + suffixType;
		}
	}
}


function ResizeWindow(){
if (navigator.appName=="Microsoft Internet Explorer"){
winwidth=document.body.clientWidth;
winheight=document.body.clientHeight;} else
{
winwidth=window.innerWidth;
winheight=window.innerHeight;}

docleft=(winwidth-800)/2;
doctop=(winheight-542)/2;
if (docleft < 0) {docleft=0}
if (doctop < 0) {doctop=0}
if (navigator.appName=="Microsoft Internet Explorer"){
document.all.menu.style.left=docleft;
document.all.menu.style.top=doctop;
document.all.tbl.style.left=docleft;
document.all.tbl.style.top=doctop;
document.all.flash.style.left=docleft;
document.all.flash.style.top=doctop+93;}
else
{
var menu1=document.getElementById("menu");
menu1.style.left=docleft+"px";
menu1.style.top=doctop+"px";
document.getElementById("tbl").style.left=docleft+"px";
document.getElementById("tbl").style.top=doctop+"px";
document.getElementById("flash").style.left=docleft+"px";
document.getElementById("flash").style.top=(doctop+93)+"px";
}}

function fixmenu(obj){
//alert('hereiam '+obj)
  document.getElementById("logged_in_layer").style.display = "inline"
  document.getElementById("mydetails").src="/SupportTime.WebSite.Frames/images/sub-menu/mydetails.gif"
  document.getElementById("openi").src="/SupportTime.WebSite.Frames/images/sub-menu/open.gif"
  document.getElementById("myhome").src="/SupportTime.WebSite.Frames/images/sub-menu/home.gif"
  document.getElementById("newi").src="/SupportTime.WebSite.Frames/images/sub-menu/new.gif"
  document.getElementById("closedi").src="/SupportTime.WebSite.Frames/images/sub-menu/history.gif"
  document.getElementById("searchi").src="/SupportTime.WebSite.Frames/images/sub-menu/search.gif"
  document.getElementById("forumi").src="/SupportTime.WebSite.Frames/images/sub-menu/forum.gif"
  var currLOC = parent.rotator.document.location.pathname
  if (currLOC.match("/SupportTime.WebSite.Frames/Rotator/SidePanelRotator.aspx")){}
  else {
    parent.rotator.document.location = "/SupportTime.WebSite.Frames/Rotator/SidePanelRotator.aspx";
  }

  if (obj =="mydetails"){
	document.getElementById("mydetails").src="/SupportTime.WebSite.Frames/images/sub-menu/mydetails-on.gif"
 }
  if (obj =="myhome"){
	document.getElementById("myhome").src="/SupportTime.WebSite.Frames/images/sub-menu/home-on.gif"
 }
  if (obj =="openi"){
	document.getElementById("openi").src="/SupportTime.WebSite.Frames/images/sub-menu/open-on.gif"
 }
  if (obj =="closedi"){
	document.getElementById("closedi").src="/SupportTime.WebSite.Frames/images/sub-menu/history-on.gif"
 }
  if (obj =="newi"){
	document.getElementById("newi").src="/SupportTime.WebSite.Frames/images/sub-menu/new-on.gif"
 }
  if (obj =="searchi"){
	document.getElementById("searchi").src="/SupportTime.WebSite.Frames/images/sub-menu/search-on.gif"
 }
 if (obj =="forumi"){
	document.getElementById("forumi").src="/SupportTime.WebSite.Frames/images/sub-menu/forum-on.gif"
 }
 if (obj =="logouti"){
	document.getElementById("logged_in_layer").style.display = "none"
	parent.rotator.document.location ="/SupportTime.WebSite.Frames/side.htm"
 }
}

function showIMGON(imgName){

	imgPath=imgName.src.substring(0,imgName.src.lastIndexOf("/"))
	if (imgName.id.indexOf("home") ==-1){
		document.getElementById("myhome").src=imgPath+"/home.gif"
	}
	if (imgName.id.indexOf("mydetails") ==-1){
		document.getElementById("mydetails").src=imgPath+"/mydetails.gif"
	}
	if (imgName.id.indexOf("openi") ==-1){
		document.getElementById("openi").src=imgPath+"/open.gif"
	}
	if (imgName.id.indexOf("closedi") ==-1){
		document.getElementById("closedi").src=imgPath+"/history.gif"
	}
	if (imgName.id.indexOf("newi") ==-1){
		document.getElementById("newi").src=imgPath+"/new.gif"
	}
	if (imgName.id.indexOf("searchi") ==-1){
		document.getElementById("searchi").src=imgPath+"/search.gif"
	}
	if (imgName.id.indexOf("forumi") ==-1){
		document.getElementById("forumi").src=imgPath+"/forum.gif"
	}
	if (imgName.id.indexOf("logout") ==-1){
		document.getElementById("logout").src=imgPath+"/exit.gif"
	}
	if (imgName.src.indexOf("-on") ==-1){
		suffixType =imgName.src.substring(imgName.src.lastIndexOf("."),imgName.src.length);
		if (imgName.id=="myhome"){
			currimgName="/home-on"
		}
		else if (imgName.id=="mydetails"){
			currimgName="/mydetails-on"
		}
		else if (imgName.id=="openi"){
			currimgName="/open-on"
		}
		else if (imgName.id=="closedi"){
			currimgName="/history-on"
		}
		else if (imgName.id=="newi"){
			currimgName="/new-on"
		}
		else if (imgName.id=="search"){
			currimgName="/search-on"
		}
		else if (imgName.id=="forumi"){
			currimgName="/forum-on"
		}
		imgName.src=imgName.src.substring(0,(imgName.src.lastIndexOf("/"))) + currimgName + suffixType
		
	}
	
	
}
function OpenDemoWindow(theURL,width,height)
  {window.open(theURL,'demo','left=50,top=50,screenX=0,screenY=10,width='+width+',height='+height);}
 