function openwindowlink(url) {
  newwin = window.open(url, 'Game','scrollbars=0,resizable=1,height=475,width=600');
}

function openWindow(form, popName, widthVal, heightVal, resizeVal){
		//alert("form="+form+"\npopName="+popName+"\nwidthVal="+widthVal+"\nheightVal="+heightVal+"\nresizeVal="+resizeVal);
		var xx = null;
		// convert heightVal to integer to allow for addition of 50px for TopPosition
		heightVal = parseInt(heightVal);
		LeftPosition = (screen.width) ? (screen.width-widthVal)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-(heightVal+50))/2 : 0;
		if (LeftPosition < 0) {	LeftPosition = 0;}
		if (TopPosition < 0) {	TopPosition = 0;}
		windowprops = "left="+LeftPosition+",top="+TopPosition+",width="+widthVal+",height="+heightVal+",location=no,scrollbars=no,menubars=no,toolbars=no,resizable="+resizeVal+",fullscreen=no";
		xx = window.open("", popName, windowprops);
		form.target=popName;
		form.submit();
		xx.focus();
		return false;
	}
function submitForm(form){
		form.submit();
		return false;
	}

function popFreeGame(URL, popName){
		var xx = null;
		LeftPosition = (screen.width) ? (screen.width-600)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-525)/2 : 0;
		windowprops = "left="+LeftPosition+",top="+TopPosition+",height=475,width=600,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=no,fullscreen=no";
		xx = window.open(URL, popName, windowprops);
		xx.focus();
	}

function calcPrizeStrings75(){
  var prize ='';

  //IF THERE ARE TWO FIXED PRIZES THIS SHOULD RUN
  if (document.forms[0].prizeString[0]!=null && document.forms[0].prizeString[1]!=null) {
	for (x=0; x < 75;x++) {
	  prize = prize + document.forms[0].call[x].value;
	  if(x < 74) {
		prize = prize + ',';
	  }
	}
	document.forms[0].prizeString[0].value=prize;
	prize='';
	for (x=75; x < 150;x++) {
	  prize = prize + document.forms[0].call[x].value;
	  if(x < 149) {
		prize = prize + ',';
	  }
	}
	document.forms[0].prizeString[1].value=prize;
  }

  //IF THERE IS JUST ONE THEN RUN THIS
  if (document.forms[0].prizeString !='undefined') {
	  for (x=0; x < 75;x++) {
		prize = prize + document.forms[0].call[x].value;
		if(x < 74) {
		  prize = prize + ',';
		}
	  }
	  document.forms[0].prizeString.value=prize;
  }

}


function calcPrizeStrings90(){
  var prize ='';

  //IF THERE ARE MORE THAN ONE FIXED PRIZES THIS SHOULD RUN
  if (document.forms[0].prizeString[0]!=null && document.forms[0].prizeString[1]!=null) {
	for (x=0; x < 90;x++) {
	  prize = prize + document.forms[0].call[x].value;
	  if(x < 89) {
		prize = prize + ',';
	  }
	}
	document.forms[0].prizeString[0].value=prize;
	prize='';
	for (x=90; x < 180;x++) {
	  prize = prize + document.forms[0].call[x].value;
	  if(x < 179) {
		prize = prize + ',';
	  }
	}
	document.forms[0].prizeString[1].value=prize;
	//IF THE THIRD ONE EXISTS THEN SET THAT PRIZE STRING AS WELL
	if(document.forms[0].prizeString[2]!=null) {
	  prize='';
	  for (x=180; x < 270;x++) {
	   prize = prize + document.forms[0].call[x].value;
		if(x < 269) {
	  prize = prize + ',';
		}
	  }
	  document.forms[0].prizeString[2].value=prize;
	}

  }

  //IF THERE IS JUST ONE THEN RUN THIS
  if (document.forms[0].prizeString !='undefined') {
	  for (x=0; x < 75;x++) {
		prize = prize + document.forms[0].call[x].value;
		if(x < 74) {
		  prize = prize + ',';
		}
	  }
	  document.forms[0].prizeString.value=prize;
  }
}

//Oct 14, 2003
//simple utility for notification, not refined, included for prototyping
//jr
function openMessageWindow(msg, height, width) {
  newwin = window.open('', 'Message','scrollbars=0,resizable=1,height=' + height + ',width=' + width);
  newwin.document.write(msg);
  newwin.document.close();

}

function showMessage(msg) {
  alert(msg);

}

function trimAll(sString)
{
	while (sString.substring(0,1) == ' ')
	{
		sString = sString.substring(1, sString.length);
	}
	while (sString.substring(sString.length-1, sString.length) == ' ')
	{
	sString = sString.substring(0,sString.length-1);
	}
	return sString;
}

function startList() 
{ 
	
	//checking for browser version
	 var browser="";
	 var i;
	 var k;
	 if (navigator.userAgent.indexOf("MSIE") != -1) {
		 i = navigator.userAgent.indexOf("MSIE")+ 5;
		 browser = "MSIE" + navigator.userAgent.substring(i, i+5);
	 } else if (navigator.userAgent.indexOf("Mozilla") != -1) {
		 i = navigator.userAgent.indexOf("/") + 1;
		 browser = "Netscape" + navigator.userAgent.substring(i, i+4);
	 } else {
			 i = navigator.userAgent.indexOf("compatible;") + 12;
			 k = navigator.userAgent.substring(i).indexOf(";") - 1;
			 browser = navigator.userAgent.substring(i).substring(0, k);       
	 }
	//alert(browser); 
	 	
	var sfEls = document.getElementById("navig").getElementsByTagName("LI"); 	

	if(trimAll(browser) != 'Netscape5.0')
	{
		for (var i=0; i<sfEls.length; i++) 
		{ 
			sfEls[i].onmouseover=function() 
			{ 
				this.className+=" over"; 
			} 
			sfEls[i].onmouseout=function() 
			{ 
				this.className=this.className.replace(new RegExp(" over\\b"), ""); 
			} 
		}
	}
}

<!-- Begin
function popUp(URL) {
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=640,height=480,left = 256,top = 192');");
}
// End -->
