//===========================================================================//
function window_open(urlstr,w,h) {
  window.open(urlstr,"_blank","width="+w+",height="+h+",top="+((screen.availHeight/2)-(h/2))+",left="+((screen.availWidth/2)-(w/2))+",toolbars=no,menubar=no,scrollbars=yes,status=no,resizable=yes");
}
//===========================================================================//
function window_confirm_open(msg,urlstr,w,h) {
   if(confirm(msg)==true) {
	    window.open(urlstr,"_blank","width="+w+",height="+h+",top="+((screen.availHeight/2)-(h/2))+",left="+((screen.availWidth/2)-(w/2))+",toolbars=no,menubar=no,scrollbars=yes,status=no,resizable=yes");
		 return true;
   }
	 return false;
}
//===========================================================================//
function wopen(url,w,h) {
  w+=32;
  h+=30+32;
  x=((screen.availWidth/2)-(w/2));
  y=((screen.availHeight/2)-(h/2));
  window.open(url,"_blank",'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width='+w+',height='+h+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
}
//===========================================================================//
function gh_wopen(url,w,h) { //For gamehouse
  var madURL = url;
  var x, y, winStr;
  x=((screen.availWidth/2)-(w/2));
  y=((screen.availHeight/2)-(h/2));
  self.name="opener";
  winStr = "height="+h+",width="+w+",screenX="+x+",left="+x+",screenY="+y+",top="+y+",channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0";
  lilBaby = window.open(madURL, "_blank", winStr);
}
//===========================================================================//
function game_open(linkObj) {
  var sUrl=linkObj.href;
  var sSplit=sUrl.split("/");
  var sWinName="game"; //sSplit[3]; //Dashes don't work in IE?
  var sOptions='toolbar=0,resizable=1,scrollbars=1,left=0,top=0,width='+(screen.availWidth-10)+',height='+(screen.availHeight-30); // not iframe so show scrollbars
  var win=window.open(sUrl,sWinName,sOptions);
  if(win==null) window.location=sUrl;
  return false;
}

function game_return(linkObj) {
   if(linkObj.href.value==null) top.opener.location=linkObj.href;
   top.close();
   return false;
}
//===========================================================================//
