function SetWindowSize(newwindow)
{
	newwindow.window.moveTo(0,0);
	if (screen.availWidth>1000)
	{
		newwindow.window.resizeTo(1020,740);
	}	
	else	
	{
		newwindow.window.resizeTo(796,572);
	}	
}

function openpage(sfilename,ntop,nleft,nheight,nwidth,argstring) {
	newwindow=window.open(sfilename,"","top="+ntop+",left="+nleft+",height="+nheight+",width="+nwidth+","+argstring);
	if (window.focus) {newwindow.focus()};
	if (Number(nheight)==0) {SetWindowSize(newwindow)}
}

function openpagename(sfilename,swindowname,ntop,nleft,nheight,nwidth,argstring) {
	newwindow=window.open(sfilename,swindowname,"top="+ntop+",left="+nleft+",height="+nheight+",width="+nwidth+","+argstring);
	if (window.focus) {newwindow.focus()}
}

function pop_under(url){
    newwindow=window.open(url,'promo','width=800,height=600,toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizeable=yes,copyhistory=no,left=25,top=25').blur();
	window.focus()
}

function MM_findObj(n, d) { //v3.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}

function MM_popupMsg(msg) { //v1.0
  alert(msg);
}

