     ///////////////////////////
    //                       //
   //    JackpotKing.com    //
  //     jackpotking.js    //
 //                       //
///////////////////////////

// This next function (KingNinjaRoll) and the following IF statement are there just to
// protect us from those who would look up our proverbial skirt.  It checks to see if
// this page is the top of the frameset (which it should never be).  If it is, then it
// writes a form to the page with it's own URL and submits that form to the index page.
// That way, any honest bookmarkers can still set bookmarks inside the site but nobody
// can look at our pages outside of our frameset.  Also, it submits the form every 10th
// of a second, so they'll have to be pretty quick on the mouse to get around it :)

//function KingNinjaRoll(){
//	document.KingNinjaForm.submit();
//	setTimeout('KingNinjaRoll()',500);
//}

//if (self.location == top.location){
//	var NinjaFormGuts = '<form name="KingNinjaForm" action="http://www.jackpotking.com/index.html" method="post" target="_top">'
//		+'<input type="hidden" name="whatpage" value="'+self.location+'">'
//		+'</form>';
//	document.write(NinjaFormGuts);
//	KingNinjaRoll();
//}

// Royal Pain in the cache:		
img_home_on = new Image();
img_home_on.src = "images/nav_home_on.gif";
img_login_on = new Image();
img_login_on.src = "images/nav_login_on.gif";
img_games_on = new Image();
img_games_on.src = "images/nav_games_on.gif";
img_prizes_on = new Image();
img_prizes_on.src = "images/nav_prizes_on.gif";
img_help_on = new Image();
img_help_on.src = "images/nav_help_on.gif";

function RollOverKing(WhatImage,WhatSource){
	if (document.images){
		if (document.all) document.images(WhatImage).src=WhatSource;
		if (document.layers) document.images[WhatImage].src=WhatSource;
	}
}

function PopWindow(Url,WindowName,WindowHeight,WindowWidth,Scrollbars) {
	if (!Scrollbars && Scrollbars!=0) Scrollbars=1;
	var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars='+Scrollbars+',width='+WindowWidth+',height='+WindowHeight+',left=250,top=100';
	window.open(Url,WindowName,WindowProps);
}

function PopPic(PicUrl, PicHeight, PicWidth){
	var PicWinHeight=PicHeight+60;
	var PicWinWidth=PicWidth+50;
	var xPopPic=100;
	var yPopPic=100;
	var nn=(document.layers)?true:false;
	var inheight=(nn)?window.innerHeight:document.body.clientHeight;
	var inwidth=(nn)?window.innerWidth:document.body.clientWidth;
	xPopPic=(inwidth/2)-(PicWinWidth/2);
	yPopPic=(inheight/2)-(PicWinHeight/2)+40;
	var PicWindowProps = "toolbar=0,location=0,status=0,menubar=0,scrollbars=0,width="+PicWinWidth+",height="+PicWinHeight+",left="+xPopPic+",top="+yPopPic+",screenX="+xPopPic+",screenY="+yPopPic;
	var PicPop=window.open('','PicPop',PicWindowProps);
   	var doc = PicPop.document;
   	doc.open('text/html');
   	doc.write('<HTML><HEAD><TITLE>JackpotKing.com<\/TITLE><\/HEAD><BODY bgcolor="white"><center>');
   	doc.write('<IMG SRC="'+ PicUrl +'" height="'+PicHeight+'" width="'+PicWidth+'" border="0"><br><br>');
   	doc.write('<font face="verdana,helvetica" size="2"><a href="javascript:self.close()">Close Window<\/a><\/font><\/center><\/BODY><\/HTML>');
   	doc.close();
}

function PopGame(WhatGame) {
	var Url = "game/gameframe.html?WhatGame="+WhatGame;
	var WindowWidth = 630;
	var WindowHeight = 430;
	var WindowTop = (screen.availHeight/2) - (WindowHeight/2);
	var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;
	GameWindow = window.open(Url,"GameWindow",WindowProps);
	return;
}

function CheckTopMembers() {
	var Url = "check_top_members.html";
	var WindowWidth = 250;
	var WindowHeight = 310;
	var WindowTop = (screen.availHeight/2) - (WindowHeight/2);
	var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;
	GameWindow = window.open(Url,"TopMemberWindow",WindowProps);
	return;
}

function PopTaF() {
	var Url = "tellafriend.html";
	var WindowWidth = 300;
	var WindowHeight = 330;
	var WindowTop = (screen.availHeight/2) - (WindowHeight/2);
	var WindowLeft = (screen.availWidth/2) - (WindowWidth/2);
	var WindowProps = 'toolbar=0,location=0,status=0,menubar=0,scrollbars=0,width='+WindowWidth+',height='+WindowHeight+',left='+WindowLeft+',top='+WindowTop+',screenx='+WindowLeft+',screeny='+WindowTop;
	GameWindow = window.open(Url,"TaF",WindowProps);
	return;
}
