<!--
///////////////////////////////////
//	Javascript From Here on in 	//
//		Code by CH@OS[xionix]  //
////////////////////////////////


function message(inString)
{
	alert(inString);
}
/////////////////////////////////
//		JSCODE by chaos		//
////////////////////////////
//		Fx - Window Sizer()	////

////////////////////////////

function Spawn(Dest)
{

	var Nwidth=760, Nheight=460;
	var virtX=0, virtY=0;
	
	CenterPos = new Array;
	WinCenter = new Array;
	
	// alert(Dest);

	lctn = Dest;
			//INSTR	Find Screen Center	
	CenterPos = GetScrCenter();
			//INSTR Find Object Center
	WinCenter = GetWinCenter(Nwidth,Nheight);
			//INSTR Find the Left & Top Edge 
			//INSTR by Aligning the Centers of the Object & the Screen 
	virtX = CenterPos[0] - WinCenter[0];
	virtY = CenterPos[1] - WinCenter[1];
	

	//DEBUG alert("X= " + virtX+" Y= "+ virtY);
			//INSTR Compile the Instruction code for Javascript To Open the Window
			//		Feeding in the Values.
	ExeString = "tourWin = window.open('"+lctn+"','Tour','width=" + Nwidth + ",height="+ Nheight;
	ExeString += ",left=" + virtX + ",top="+ virtY+",resizeable=no,scrollbars=yes,location=no')"
			//INSTR Evaluate the String RETURN Executable Javascript Command
	eval(ExeString);

}
	//INSTR	Fx-	ret Array GetScrCenter(void);
function GetScrCenter()
{
	var High = 0;
	var Wide = 0;
	
	Wide = this.screen.width;
	High = this.screen.height;
	
	//DEBUG alert(" Width : " +  Wide + " ::: Hight : " + High );
	
	High = High/2;
	Wide = Wide/2;

	Center = new Array;
	
	Center[0] = Wide;
	Center[1] = High;



	return(Center);
}
	//INSTR Fx-	ret Array GetWinCenter(int Width,int Height);
function GetWinCenter(W,H)
{
	W = W/2;
	H = H/2;

	WinCenter = new Array;
	
	WinCenter[0] = W;
	WinCenter[1] = H;
	
	return(WinCenter);
}
//////////////////////////////////////////
/////////// END Window Sizer ////////////
//////////////////////////////////////////


