// JavaScript Document
function OpenWin(FileToOpen,w,h){
      if (w=='' || w < 0 || w==null) w=500;
      if (h=='' || h < 0 || h==null) h=375;
	  if (h >= window.screen.availHeight) h = window.screen.availHeight-100;
	  if (w >= window.screen.availWidth) h = window.screen.availWidth-100;
  	  myWin=open(FileToOpen,"DisplayWidnow", "status=no,toolbar=no,menubar=no,Directories=no,resizable=no,ScrollBars=no,location=no,width="+w+",height="+h);
	  myWin.focus();	
}

function launchwin(winurl,winname,winfeatures)
{
	//This launches a new window and then
	//focuses it if window.focus() is supported.
	newwin = window.open(winurl,winname,winfeatures);
	if(parseInt(navigator.appVersion) >= 4)
	{
		//delay a bit here because IE4 encounters errors
		//when trying to focus a recently opened window
 		setTimeout('newwin.focus();',250);
	}
}

function flipVisibility(object) {
    if (document.layers && document.layers[object])
		{	if (document.layers[object].visibility == 'visible')
			{	document.layers[object].visibility = 'hidden';
			}
			else
			{	document.layers[object].visibility = 'visible';
			}
    }
		else if (document.all)
		{	if (document.all[object].style.visibility == 'visible')
				document.all[object].style.visibility = 'hidden';
			else
				document.all[object].style.visibility = 'visible';
		}
}

function hide(object) {
    if (document.layers && document.layers[object])
        document.layers[object].visibility = 'hidden';
    else if (document.all)
        document.all[object].style.visibility = 'hidden';
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

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];}}
}
