var mheight=0;
var mwidth=0;
//window.onbeforeunload = function()
//{
	//mheight=document.body.offsetHeight;
	//mwidth=document.body.offsetWidth;
	//if( (window.event.clientX>(mwidth-15)) && (window.event.clientY<=0) )
	//{
	//	if(confirm("Go to the USA Casino & get $555 Bonus!")==true)
	//	{
	//		window.opener='m';
	//		window.open('http://www.usa-online-casino.com','title','width=800,height=600,resizable=yes,scrollbars=yes,status=yes,toolbar=yes,location=yes,menubar=yes');
	//		window.close();
	//	}
	//	else { window.opener='m'; window.close(); }
	//}
//}

//function upopup(url,w,h,s,n){
	//var x;
	//var l = (window.screen.width-w)/2;
//	var t = (window.screen.height-h)/2; 
//	x = window.open(url,n,"height="+h+",width="+w+",status=no,toolbar=no,menubar=no,location=no,scrollbars="+s+",left="+l+",top="+t);
//    x.window.focus();
//}

//function Download(buttonId){
  //  if(buttonId==null) buttonId="0000";
 // 	var urlStr = window.location.href;
  //	var pageLang; 
	//pageLang = "en";  
 //	var urlStrArray = urlStr.split("/");						//seperate url into array, "/" is the seperator
//  	var pageStr = urlStrArray[urlStrArray.length-1];			//page name is the last in the array
//  	var len = pageStr.indexOf("."); 							//find seperator between file name and extension
//  	var pageName = pageStr.substr(0,len);						//seperate file name from extension (save file name)
//	if(pageName=="") pageName = "index";						//if ".com" address with no actual file
//  	var finalStr = pageLang + "+" + pageName + "+" + buttonId;	//"+" is the seperator of the final string
//	finalStr = replaceWith(finalStr,"_","-");					//replace all the "_" with "-" because the cgi won't accept "_".
 // 	window.location.href="SetupCasino.exe";
//}

function replaceWith(str,char2find,char2replace){
  var newStr = ""
  for(var i=0 ; i<str.length ; i++)
    if(str.charAt(i) == char2find)
	  newStr += char2replace;
	else
	  newStr += str.charAt(i)
  return newStr;
}

function jmscroller()
{
 
	var mytotalsum = 0;
	for (i=1; i<=11; i++ )
		{
			JP[i] += (Inc[i]);
			mytotalsum= mytotalsum+(JP[i]/100);
		}	
		totalsum = num2dollar(mytotalsum);
		//document.jpform.jackpottotal.value = totalsum;
		//document.jackpottotal.innerHTML = totalsum;
		document.getElementById('jackpottotal').innerHTML = totalsum;		
		window.setTimeout("jmscroller()", 1000);
			
}
function keepgoing()
{
	var aImages = document.getElementsByTagName("img");
	for (i=0;i<aImages.length;i++)
	{
		if(aImages[i].src.indexOf(".gif") != -1)
			aImages[i].src = aImages[i].src;
	}
}