
<!--	common scripts file

var isMinNS4 = 0;    // Netscape 4.0 or higher
var isMinIE4 = 0;		// Internet Explorer 4.0 or higher
var isMinIE5 = 0;		// Internet Explorer 5.0 or higher
var isNS6 = 0;			// Netscape 6.0

isMinNS4 = (document.layers) ? 1 : 0;
isMinIE4 = (document.all) ? 1 : 0;
isMinIE5 = (document.getElementById&&document.all) ? 1 : 0;
isNS6 = (document.getElementById&&!document.all) ? 1 : 0;

var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function hide(id)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all(id):d.layers(id);
	el.style.visibility="hidden";
	el.style.height='0';
}

function unhide(id)
{
	var el=d.getElementById?d.getElementById(id):d.all?d.all(id):d.layers(id);
	el.style.visibility="visible";
	el.style.height='auto';
}



function rnd(scale) {
var dd=new Date();
return((Math.round(Math.abs(Math.sin(dd.getTime()))*1000000000)%scale));
}
function GoUrl(url)
{
	window.location.href = url;
}

function OpenUrl(URL, frame)
{
 NW = window.open(URL, frame);
 if (NW)
 {
	 NW.blur();		// lose focus
	 NW.focus();	// get focus
 }
}

function printPopup(URL)
{
 PrintWin = window.open(URL, "PrintWin");
 // if (isMinIE4 || isMinNS4)
 {
	setTimeout("{PrintWin.print(); PrintWin.close();}",2000);		// print and close after 2 seconds
 }
}

function openW(URL, windowW, windowH, autoclose, fullscreen)
{
 features='left=1,top=1';
 if (fullscreen || windowH<0 || windowW<0)
 {
 	windowH = getScreenHeight();
 	windowW = getScreenWidth();
 }
 if (windowW > 0 && windowH > 0)
 	features +=',width='+windowW+',height='+windowH;
 features+=',location=0,menubar=0,resizable=1,status=0,scrollbars=0,toolbar=0';
 if (fullscreen && document.all)		// if internet explorer
 	features+=',fullscreen=1';
 KW = window.open(URL,"WebMeet", features);
 if (KW)
 {
//    KW.body.scroll=0;
	 KW.blur();		// lose focus
	 KW.focus();	// get focus
	 KW.resizeTo(windowW,windowH);
	 if (autoclose)
		window.onunload = function(){KW.close();}
 }
 else
 	window.location.href=URL ;
 
 return KW;
}



function getScreenWidth()
{
 	windowH = screen.height;
 	windowW = screen.width;
 	if (windowW > windowH*2)		// if a double wide screen
 		windowW /= 2;					// cut in half
	return windowW;
}

function getScreenHeight()
{
 	windowH = screen.height ;
	return windowH;
}



function jopup(url,h,w)
{
    TopPosition=(screen.height)?(screen.height-h)/2:100;
    LeftPosition=(screen.width)?(screen.width-w)/2:100;
    settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,resizable=yes,status=yes';

    if((!OpenWindow) || (OpenWindow.closed == true)) {
        var OpenWindow=window.open(url, "newwin", settings);
        OpenWindow.focus();
    }
    else {
        OpenWindow.location.href = url;
        OpenWindow.focus();
    }
}

function startpop(url,myname,w,h)
{
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',toolbar=yes,scrollbars=yes,directories=yes,location=yes,menubar=yes,resizable=yes,status=yes';

	if((!StartWindow) || (StartWindow.closed == true))
	{
		var StartWindow=window.open(url, "startwin", settings);
		StartWindow.focus();
	}
	else
	{
		OpenWindow.location.href = url;
		OpenWindow.focus();
	}
}

function popstart(mypage,myname,w,h)
{
	var win=null;
	var mainuserwindow;
	mainuserwindow = window;
	TopPosition=(screen.height)?(screen.height-h)/2:100;
	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',toolbar=yes,scrollbars=yes,directories=yes,location=yes,menubar=yes,resizable=yes,status=yes';
	win=window.open(mypage,myname,settings);
}



function helpW(URL, windowW, windowH )
{

 // features='left=1,top=1';
 features='left='+ eval( event.clientX + document.body.scrollLeft +10) +',top=' + eval( event.clientY - document.body.scrollTop + 70 ) ;

 features +=',width='+windowW+',height='+windowH;
 features+=',location=0,menubar=0,resizable=0,status=0,scrollbars=0,toolbar=0,title=0';
 KW = window.open(URL,"Help", features);
 if (KW)
 {
//       KW.body.scroll=0;
	 KW.blur();	
	 KW.focus();	
	 KW.resizeTo(windowW,windowH);
	 window.onunload = function(){KW.close();}
 }
 else
 	window.location.href=URL ;
 
 return KW;
}




function MoreInfo( ItemID )
{

 features='left=1,top=1';
 windowH = getScreenHeight() ;
 windowW = getScreenWidth();
 features +=',width='+windowW+',height='+windowH;
 features+=',location=0,menubar=0,resizable=1,status=1,scrollbars=1,toolbar=0,title=0';
 KW = window.open( "info.asp?" + ItemID ,"Details" , features);
 if (KW)
 {
//       KW.body.scroll=0;
	 KW.blur();	
	 KW.focus();	
	 KW.resizeTo(windowW,windowH);
	 window.onunload = function(){KW.close();}
 }
 else
 	window.location.href=URL ;
 
 return KW;
}




function BNInfo( ItemID )
{

 features='left=1,top=1';
 windowH = getScreenHeight() ;
 windowW = getScreenWidth();
 features +=',width='+windowW+',height='+windowH;
 features+=',location=0,menubar=0,resizable=1,status=1,scrollbars=1,toolbar=0,title=0';
 KW = window.open( "infoBN.asp?" + ItemID ,"Details" , features);
 if (KW)
 {
//       KW.body.scroll=0;
	 KW.blur();	
	 KW.focus();	
	 KW.resizeTo(windowW,windowH);
	 window.onunload = function(){KW.close();}
 }
 else
 	window.location.href=URL ;
 
 return KW;
}




function SS( SSname )
{

 features='left=1,top=1';
 windowH = getScreenHeight();
 windowW = getScreenWidth();
 features+=',width='+windowW+',height='+windowH;
 features+=',location=0,menubar=0,resizable=0,status=0,scrollbars=1,toolbar=0,title=0';
 KW = window.open( "LS.asp?" + SSname ,"LebScape" , features);
 if (KW)
 {
//       KW.body.scroll=0;
	 KW.blur();	
	 KW.focus();	
	 KW.resizeTo(windowW,windowH);
	 window.onunload = function(){KW.close();}
 }
 else
 	window.location.href=URL ;
 
 return KW;
}


function Radio( SSname )
{

 features='left=1,top=1';
 windowH = 294;
 windowW = 320;
 features+=',width='+windowW+',height='+windowH;
 features+=',location=0,menubar=0,resizable=0,status=0,scrollbars=1,toolbar=0,title=0';
 KW = window.open( "music/radio.asp?" + SSname ,"LebScapeMusic" , features);
 if (KW)
 {
//       KW.body.scroll=0;
	 KW.blur();	
	 KW.focus();	
	 KW.resizeTo(windowW,windowH);
 }
 else
 	window.location.href=URL ;
 
 return KW;
}


//-->
