function popup_window(window_type, content, w, h, sport, title)
{

 // var action="https://www.chaiexpectations.com/chai/index.php?content=admin&usercode="+document.admin_form.usercode.value;
	
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);


var content="popup_window.inc.php?content="+content+"&window_type="+window_type+"&width="+w+"&height="+h+"&sport="+sport+"&title="+title;
w=w*1.05; h=h*1.05;
var day = new Date();
var id = day.getTime();
eval("page" + id + " = window.open(content, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+w+",height="+h+",left ="+left+",top = "+top+"');");

  return(true);
  }
  
var removed = new Array();
var removed_count=0;

function popUp(URL, w, h) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+ w +",height=" + h +",left = 200,top = 200');");
}

function SwapImage (buttonName, fileName)
  {
  if (buttonName=="works") {
	  document.getElementById("toolbar_sub").src="images/new_toolbar_sub.jpg";
  }
  if (buttonName=="toolbar_sub") {
	  document.getElementById("works").src="images/button_works_on.jpg";
  }
   document.getElementById(buttonName).src=fileName;
  }  

function SwapImageRestore (buttonName, fileName)
  {
  if (buttonName=="works") {
	  document.getElementById("toolbar_sub").src="images/new_toolbar_blank.jpg";
  }
  if (buttonName=="toolbar_sub") {
	  document.getElementById("works").src="images/button_works_off.jpg";
  }   
   document.getElementById(buttonName).src=fileName;
  }
	
  function jump(newpage){
   if (newpage.value != ""){
	  window.location=newpage.value;
   }
  }

