/*******   javascript for popup windows.      *******/
function PopStoryThaiPR(URL)
	{						
		//alert(URL)
		WinCenter(URL, "StoryPRNews", 760, 500);
	}

function WinCenter(wfile, wname, ww, wh) 
	{
	var maxwidth, maxheight;
	var xpos, ypos;
	var winId = new Date();
	var objWin;
	
	maxwidth 	= screen.availWidth;
	maxheight	= screen.availHeight;
	xpos = maxwidth/2 - ww/2;
	ypos = (maxheight/2 - wh/2) - 20;
	
	return open(wfile, wname + winId.getTime(), "left=0,top=0,width=" + (screen.availWidth - 10).toString() + ",height=" + (screen.availHeight - 122).toString() + ",resizable=1,scrollbars=1,toolbar=Yes ,menubar=Yes, location=Yes");
	//return open(wfile, wname + winId.getTime(),"left="+xpos +",top="+ypos +",width="+ww +",height="+wh +",resizable=1,scrollbars=1,toolbar=Yes ,menubar=Yes, location=Yes");
	
	}

function WinCenterPopUp(wfile, wname, ww, wh) 
	{
	var maxwidth, maxheight;
	var xpos, ypos;
	var winId = new Date();
	
	maxwidth 	= screen.availWidth;
	maxheight	= screen.availHeight;
	xpos = maxwidth/2 - ww/2;
	ypos = (maxheight/2 - wh/2) - 20;
	return open(wfile, wname + winId.getTime(),"left="+xpos +",top="+ypos +",width="+ww +",height="+wh +",resizable=no,scrollbars=no,menubar=no, location=no");
	}
	
function setFocusLogin()
		{						
			window.location.hash='l' ;
		}