// JavaScript Document
var gGameWin=null;

function MM_openBrWindow(theURL,winName,features) { //v1.2
  window.open(theURL,winName,features);
  }
  
function myOpenWindow(winURL,winName,winFeatures,winObj) {
  var theWin; // this will hold our opened window
 
 //first check to see if the window already exists
 if (winObj!=null) {
   // the window has already been created, but did the user close it?
   // if so, then reopen it. Otherwise make it the active window.
   
   if (!winObj.closed) {
     winObj.focus();
	 return winObj;
	 }
	 
	 // otherwise fall through to the code below to re-open the window
	 
  }
  
  // if we get here, then the window hasn't been created yet, or it
  // was closed by the user.
  
  theWin = window.open(winURL,winName,winFeatures);
   
   theWin.focus();
   
  return theWin; 
}

//function openGameWin() {
//  gGameWin=myOpenWindow('http://www.pmtrk.com/?d=49','conq','width=848,height=640', gGameWin);
// }

function openGameWin() {
 gGameWin=myOpenWindow('http://www.conquerorgame.com/game.php','conq_game','width=972,height=756,resizable=no,toolbar=no,status=no,scrollbars=no', gGameWin);
  }

function openGameTestWin() {
  gGameWin=myOpenWindow('http://www.conquerorgame.com/game-betatest.php','conq_game','width=972,height=756', gGameWin);
  }

function openHelpWin() {
  MM_openBrWindow('http://www.conquerorgame.com/help.html','conq_main', 'width=645,height=640,toolbar=yes,status=yes,scrollbars=yes,resizable=yes');
  }

function openForumWin() {
  MM_openBrWindow("http://www.conquerorgame.com/forum/index.php?6", 'conq_main','toolbar=yes,status=yes,scrollbars=yes,resizable=yes');
  }
  
function openBugWin() {
  MM_openBrWindow("http://www.conquerorgame.com/forum/list.php?4", 'conq_main','toolbar=yes,status=yes,scrollbars=yes,resizable=yes');
  }

function contactMail() {
  MM_openBrWindow("mail"+"to:conta"+String.fromCharCode(64+3+32)+"t@conqueror"+"game.c"+"om"+"?subject=Conqueror", 'contact', 'width=16,height=16' );
  }

function openBlipWin() {
 openAuthorWin();
  }

function openAuthorWin() {
  MM_openBrWindow("http://www.juggleware.com", 'juggleware');
  }

function includeemail() {
		var f = document.PaypalForm;
		var name = "donations";
		var   at = "@";
		var  url = "conquerorgame.com";
		f.business.value = name + at + url;
		return true;
  }
  