pendingClear = "false";
clearTimer = "";

  function modelwin(url,mwidth,mheight)
	  {
	    mwidth = (mwidth || 860) + 50;
	    mheight = (mheight || 400) + 150;
        if (false && document.all&&window.print) //if ie5
          eval('window.showModalDialog(url,"","help:0;resizable:1;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px")')
        else
          eval('window.open(url,"","width='+mwidth+'px,height='+mheight+'px,resizable=1,scrollbars=1")')
      } 

/*if(document.images){
	homeOn= new Image();
	homeOn.src="images/home-on.gif";  
	homeOff= new Image();
	homeOff.src="images/home-off.gif";
	
	aboutOn= new Image();
	aboutOn.src="images/about-on.gif";  
	aboutOff= new Image();
	aboutOff.src="images/about-off.gif";
	
	technologyOn= new Image();
	technologyOn.src="images/technology-on.gif";  
	technologyOff= new Image();
	technologyOff.src="images/technology-off.gif";
	
	applicationsOn= new Image();
	applicationsOn.src="images/applications-on.gif";  
	applicationsOff= new Image();
	applicationsOff.src="images/applications-off.gif";
	
	productsOn= new Image();
	productsOn.src="images/products-on.gif";  
	productsOff= new Image();
	productsOff.src="images/products-off.gif";
	
	contactOn= new Image();
	contactOn.src="images/contact-on.gif";  
	contactOff= new Image();
	contactOff.src="images/contact-off.gif";
	
	pressOn= new Image();
	pressOn.src="images/press-on.gif";  
	pressOff= new Image();
	pressOff.src="images/press-off.gif";

}*/
		

function killMenu(menu) { 
	clearTimer = setTimeout("clearMenu('" + menu + "')",2000);
}


function showMenu(menu){
	if (document.getElementById){
		document.getElementById('byStyleMenu').style.visibility = "hidden";
		document.getElementById('bySizeMenu').style.visibility = "hidden";;
		document.getElementById(menu).style.visibility = 'visible';
		clearTimeout(clearTimer);
	} else {
		document.all.byStyleMenu.style.visibility = "hidden";
		document.all.bySizeMenu.style.visibility = "hidden";
		eval('document.all.' + menu).style.visibility = 'visible';
		clearTimeout(clearTimer);
	}
}

function clearMenu(menu){
	// turn off the last selected menu
	if(menu != 'HomeMenu'){
		if (document.getElementById){
			document.getElementById(menu).style.visibility = 'hidden';
		}else{
			eval('document.all.' + menu).style.visibility = 'hidden';
		}
	}
	/*if (document.getElementById){
		document.getElementById('HomeMenu').style.visibility = 'visible';
	}else{
		document.all.HomeMenu.style.visibility = 'visible';
	}*/
}


function waxOn(imgName,mode){
	if(document.images){
		if(document.all){
			document.all[imgName].src = eval(imgName+mode+'.src');
		}else{
			document[imgName].src = eval(imgName+mode+'.src');
		}
	}	
}


	xWidth=screen.width;
	yHeight=screen.height;
	xCenter = (xWidth/2)-(700/2);
	yCenter = (yHeight/2)-(500/2);

function popUp(url){
	var winName = "popup";
	myWin = window.open( url, winName,'width=700,height=500,left=' + xCenter + ',top=' + yCenter + ',directories=no,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no,resizable=yes');
}

