// JavaScript Document

function doWin(myTitle,myUrl,myHeight,myWidth){
	// get screen available height
	// THIS BIT DETECTS THE AVAILABLE SCREEN SPACE AND ORIGINATES FROM http://www.quirksmode.org/viewport/compatibility.html
	
	var x,y,screenAvailableHeight;
	
	if (self.innerHeight) // all except Explorer
	{
		x = self.innerWidth;
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)// Explorer 6 Strict Mode
	{
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}

	if (myHeight=="undefined"){myHeight=y-100;}
	if (myWidth=="undefined"){myWidth=x-240;}
	
	// NOW SEND THE WINDOW
	myUrl=myUrl+'?TB_iframe=true&height='+myHeight+'&width='+myWidth;
	// Use this line instead for MODAL situations, (ie Login Forms)
	//myUrl=myUrl+'?TB_iframe=true&height='+myHeight+'&width='+myWidth+'&modal=true';
	return tb_show(myTitle,myUrl,false);
	}