function preloadImage(imgSrc) {
	if(document.images) {
		imageDummy = new Image();
		imageDummy.src = imgSrc;
	}
}

function performMouseAction(theTD, mouseOver, imgName, imgSrc) {
	if(mouseOver) {
		theTD.style.cursor='hand';	
		theTD.className='menu_sub_mouseover';
	}
	else theTD.className='menu_sub';

	var theImg = document.getElementById(imgName);
	theImg.src = imgSrc;
}

function popUp(URL) {

day = new Date();

id = day.getTime();

eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=260');");

}

var windowW = 740 // wide
var windowH = 385 // high
// set the screen position where the popup should appear
var windowX = (screen.width/2)-(windowW/2);
var windowY = (screen.height/2)-(windowH/2);
// set the url of the page to show in the popup
var title =  ""
// set this to true if the popup should close
// upon leaving the launching page; else, false
var autoclose = true

s = "width="+windowW+",height="+windowH;
var beIE = document.all?true:false

function popup(urlPop,windowW,windowH){
  if (beIE){
    NFW = window.open("","popFrameless","+s")     
    NFW.blur()
    window.focus()       
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
    var frameString=""+
"<html>"+
"<head>"+
"<title>"+title+"</title>"+
"</head>"+
"<frameset rows='*,0' framespacing=0 border=0 frameborder=0>"+
"<frame name='top' src='"+urlPop+"' scrolling=auto>"+
"<frame name='bottom' src='about:blank' scrolling='no'>"+
"</frameset>"+
"</html>"
    NFW.document.open();
    NFW.document.write(frameString)
    NFW.document.close()
  } else {
    NFW=window.open(urlPop,"popFrameless","scrollbars,"+s)
    NFW.blur()
    window.focus() 
    NFW.resizeTo(windowW,windowH)
    NFW.moveTo(windowX,windowY)
  }   
  NFW.focus()   
  if (autoclose){
    window.onunload = function(){NFW.close()}
  }
}

