var strapline = 0;

function showGame(game,country) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	
	//Positions of transparent overlays
	var ileft = 0;
	var iwidth = 1;
	var itop1 = 0;
	var iheight1 = 1;
	var itop2 = 0;
	var iheight2 = 0;
	
	var cryptoleft = 150;
	var cryptowidth = 330;
	var cryptotop1 = 10;
	var cryptoheight1 =40;
	
	if (b < 900) {
		var mgw = 480;
		var mgh = 354;
		var www = 480;
		var wwh = 353;
		ileft = 395;
		iwidth = 80;
		itop1 = 120;
		iheight1 = 30;
		itop2 = 200;
		iheight2 = 70;
		}
	else if (b < 1100) {
		var mgw = 600;
		var mgh = 440;
		var www = 600;
		var wwh = 420;
		ileft = 492;
		iwidth = 100;
		itop1 = 140;
		iheight1 = 40;
		itop2 = 235;
		iheight2 = 90;
		}
	else {
		var mgw = 799;
		var mgh = 590;
		var www = 800;
		var wwh = 560;
		ileft = 655;
		iwidth = 134;
		itop1 = 185;
		iheight1 = 50;
		itop2 = 315;
		iheight2 = 120;
		//var itop = 55;
		//var iheight = 552;
		}
	if (game == "loaded" || game == "cashapilla" || game == "thunderstruck" || game == "tombraider" || game == "tombraiderII" || game == "hitman" || game == "wheelofwealth") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" frameborder=\"0\" src=\"/getGame.php?cc="+country+"&g="+game+"&w="+mgw+"&h="+mgh+"\" class=\"game-frame\"></iframe>"); 
		}
	else if (game == "kingkong") {
		//document.write ("<iframe rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" frameborder=\"0\" src=\"/getGame.php?cc="+country+"&g="+game+"&w="+mgw+"&h="+mgh+"\" class=\"game-frame\"></iframe>"); 
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+(mgh-30)+"\" scrolling=\"no\" frameborder=\"0\" src=\"/cryptoGame.php?g="+game+"&w="+mgw+"&h="+mgh+"&iwidth="+cryptowidth+"&ileft="+cryptoleft+"&itop1="+cryptotop1+"&iheight1="+cryptoheight1+"\" class=\"game-frame\"></iframe>"); 
		}
	else if (game == "baccarat" || game == "blackjack" || game == "craps" || game == "roulette" || game == "gladiator1" || game == "slotfather") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" frameborder=\"0\" src=\"/getGame.php?cc="+country+"&g="+game+"&w="+mgw+"&h="+mgh+"\" class=\"game-frame\"></iframe>"); 
		}
	else if (game == "gems") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\"640\" height=\"480\" frameborder=\"0\" src=\"/getGame.php?cc="+country+"&g="+game+"&w=640&h=480\" class=\"game-frame\"></iframe>"); 
		}
	else {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+www+"\" height=\""+wwh+"\" frameborder=\"0\" src=\"/wwGame.php?g="+game+"&w="+www+"&h="+wwh+"&iwidth="+iwidth+"&ileft="+ileft+"&itop1="+itop1+"&itop2="+itop2+"&iheight1="+iheight1+"&iheight2="+iheight2+"\" class=\"game-frame\"></iframe>"); 
		}
	}
	
function showCasinoGrid(game,country,codes,frameheight,gamename) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var mgw = 480;
		var www = 480;
		}
	else if (b < 1100) {
		var mgw = 600;
		var www = 600;
		}
	else {
		var mgw = 799;
		var www = 800;
		}
	if (country == "US" && game == "mg") {
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+mgw+"\" frameborder=\"0\" src=\"http://www.azonlinecasinos.com/extdata.php?c=manhat,inet,bodog,itops,gveg,aladdin&cols=0,1,3,8,11,12,5,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+mgw+"&site=ocv\" style=\"border:0px;height:300px;\" scrolling=\"no\"></iframe>"); 
		if (gamename) {
			document.write("<center><em>USA Real-Play on this game is not currently allowed.<br>However, the online casinos listed above <strong>do accept</strong> USA players.</em></center>");
			}
		}
	else if (country == "US") {
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+mgw+"\" frameborder=\"0\" src=\"http://www.azonlinecasinos.com/extdata.php?c=itops,bodog,manhat,lred,inet,soasis&cols=0,1,3,8,11,12,5,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+www+"&site=ocv\" style=\"border:0px;height:300px;\" scrolling=\"no\"></iframe>"); 
		if (gamename) {
			document.write("<center><em>USA Real-Play on this game is not currently allowed.<br>However, the online casinos listed above <strong>do accept</strong> USA players.</em></center>");
			}
		}
	else if (country == "CA" && game == "ww") {
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+www+"\" frameborder=\"0\" src=\"http://www.azonlinecasinos.com/extdata.php?c=skyv&cols=0,1,3,8,11,12,5,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+www+"&site=ocv\" style=\"border:0px;height:120px;\" scrolling=\"no\"></iframe>"); 
		document.write("<center><em>The above Wagerworks casino is the only casino with IGT games that accepts Canadian players.</em></center>");
		}
	else if (game == "mg") {
		if (gamename) {
			document.write("<center><em><strong>The online casinos listed below all have the '"+gamename+"' slot</strong></em></center>");
			}
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+mgw+"\" frameborder=\"0\" src=\"http://www.azonlinecasinos.com/extdata.php?c="+codes+"&cols=0,1,3,8,11,12,5,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+mgw+"&site=ocv\" style=\"border:1px;height:"+frameheight+"px;\" scrolling=\"no\"></iframe>"); 
		}
	else {
		if (gamename) {
			document.write("<center><em><strong>The online casinos listed below all have the '"+gamename+"' slot</strong></em></center>");
			}
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+www+"\" frameborder=\"0\" src=\"http://www.azonlinecasinos.com/extdata.php?c="+codes+"&cols=0,1,3,8,11,12,5,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+www+"&site=ocv\" style=\"border:0px;height:"+frameheight+"px;\" scrolling=\"no\"></iframe>"); 
		}	
	}
	
function showGameWWExternal(game,size,country) {
	if (size==1) {
		var www = 480;
		var wwh = 353;
		ileft = 395;
		iwidth = 80;
		itop1 = 120;
		iheight1 = 30;
		itop2 = 200;
		iheight2 = 70;
		}
	else if (size==2) {
		var www = 600;
		var wwh = 420;
		ileft = 492;
		iwidth = 100;
		itop1 = 140;
		iheight1 = 40;
		itop2 = 235;
		iheight2 = 90;
		}
	else {
		var www = 800;
		var wwh = 560;
		ileft = 655;
		iwidth = 134;
		itop1 = 185;
		iheight1 = 50;
		itop2 = 315;
		iheight2 = 120;
		}
	
	document.write ("<iframe rel=\"noindex,nofollow\" width=\""+www+"\" height=\""+wwh+"\" frameborder=\"0\" src=\"/wwGame.php?g="+game+"&w="+www+"&h="+wwh+"&iwidth="+iwidth+"&ileft="+ileft+"&itop1="+itop1+"&itop2="+itop2+"&iheight1="+iheight1+"&iheight2="+iheight2+"\" class=\"game-frame\"></iframe>"); 

	}
	
	
function showGameMGExternal(game,size,country) {
	if (size==1) {
		var mgw = 480;
		var mgh = 354;
		}
	else if (size==2) {
		var mgw = 600;
		var mgh = 440;
		}
	else {
		var mgw = 799;
		var mgh = 590;
		}

	document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" frameborder=\"0\" src=\"/getGame.php?cc="+country+"&g="+game+"&w="+mgw+"&h="+mgh+"\" class=\"game-frame\"></iframe>"); 

	}
	
function showPromoLink(type) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var www = 500;
		var mgw = 480;
		}
	else if (b < 1100) {
		var www = 600;
		var mgw = 600;
		}
	else {
		var www = 780;
		var mgw = 800;
		}
	if (type == "ww") { // wagerworks
		mgw = mgw - 2;
		}
	else if (type == "rtg") { // rtg
		mgw = mgw + 1;
		}
	else if (type == "spin") {
		mgw = 642;
		}
	else if (type == "mspoker") {
		mgw = 640;
		}
	else if (type == "shockwave") {
		mgw = 640;
		}
	
	document.write ('<span class="toolbar-form" style="color:#000;width:'+mgw+'px;">');
	document.write ('<strong style="color:#CC0000;">EXCLUSIVE OCV BONUS</strong>: Use Promo Code "VEGAS" to play Cleopatra, Cleopatra II, Wolf Run and<br>');
	document.write ('more IGT slots with a <strong>£200 Match Bonus</strong> at IGTs <a href="/goto-casino.php?c=kerch" target="_blank">Kerching Casino!</a>. Limited time offer to OCVers only!!<br>');
	//document.write ('<strong style="color:#ffff00;">USA Players - One Last Chance?</strong>:<br>Microgaming casinos (who carry games such as ');
	//document.write ('Tombraider, Thunderstruck, Cashapilla, Loaded, Hitman etc) ');
	//document.write ('stopped accepting new players on 9th November. However, <a href="/goto-casino.php?c=itops" class="mlstrapyellow" target="_blank">Intertops Casino</a> ');
	//document.write ('which uses Microgaming still appears to be taking US registrations, although for how long I don\'t know. ');
	//document.write ('! So be quick!');
	document.write ('</span>');
	document.write ('<script type="text/javascript" src="fadingtext.js"></script>');
	}
	
function showToolbarLink(type) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var www = 500;
		var mgw = 480;
		}
	else if (b < 1100) {
		var www = 600;
		var mgw = 600;
		}
	else {
		var www = 780;
		var mgw = 800;
		}
	if (type == "ww") { // wagerworks
		mgw = mgw - 2;
		}
	else if (type == "rtg") { // rtg
		mgw = mgw + 1;
		}
	else if (type == "spin") {
		mgw = 642;
		}
	else if (type == "mspoker") {
		mgw = 640;
		}
	else if (type == "shockwave") {
		mgw = 640;
		}
	
	document.write ('<span class="toolbar-form" style="width:'+mgw+'px;">');
	document.write ('<a href="http://ocv.ourtoolbar.com/" target="_blank">NEW: OCV Browser Toolbar - 1-Click access to all these games & more</a><br>');
	//document.write ('<strong style="color:#ffff00;">USA Players - One Last Chance?</strong>:<br>Microgaming casinos (who carry games such as ');
	//document.write ('Tombraider, Thunderstruck, Cashapilla, Loaded, Hitman etc) ');
	//document.write ('stopped accepting new players on 9th November. However, <a href="/goto-casino.php?c=itops" class="mlstrapyellow" target="_blank">Intertops Casino</a> ');
	//document.write ('which uses Microgaming still appears to be taking US registrations, although for how long I don\'t know. ');
	//document.write ('! So be quick!');
	document.write ('</span>');
	document.write ('<script type="text/javascript" src="fadingtext.js"></script>');
	}
	
function showMailForm(type) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var www = 500;
		var mgw = 480;
		}
	else if (b < 1100) {
		var www = 600;
		var mgw = 600;
		}
	else {
		var www = 780;
		var mgw = 800;
		}
	if (type == "ww") { // wagerworks
		mgw = mgw - 2;
		}
	else if (type == "rtg") { // rtg
		mgw = mgw + 1;
		}
	else if (type == "spin") {
		mgw = 642;
		}
	else if (type == "mspoker") {
		mgw = 640;
		}
	else if (type == "shockwave") {
		mgw = 640;
		}
	
	document.write ('<span class="mail-form" style="width:'+mgw+'px;">');
	document.write ('<a id="mlstrap" class="mlstrap">Check out my monthly OCV/Slotjunkies newswire...</a><br>');
	document.write ('Email: <input type="text" name="YMLP0" class="input-sml"> &nbsp;');
	document.write ('<select name="YMLP3" class="select-sml">');
	document.write ('<option value="Unspecified">Region...');
	document.write ('<option>Africa<option>Asia<option>Australasia<option>Canada<option>Europe');
	document.write ('<option>Scandinavia<option>South America<option>USA<option>Other');
	document.write ('</select> &nbsp; <input type="submit" value="JOIN" class="submit-sml">');
	//document.write ('<strong style="color:#ffff00;">USA Players - One Last Chance?</strong>:<br>Microgaming casinos (who carry games such as ');
	//document.write ('Tombraider, Thunderstruck, Cashapilla, Loaded, Hitman etc) ');
	//document.write ('stopped accepting new players on 9th November. However, <a href="/goto-casino.php?c=itops" class="mlstrapyellow" target="_blank">Intertops Casino</a> ');
	//document.write ('which uses Microgaming still appears to be taking US registrations, although for how long I don\'t know. ');
	//document.write ('! So be quick!');
	document.write ('</span>');
	document.write ('<script type="text/javascript" src="fadingtext.js"></script>');
	}

function gotoCasino(casino) {
	alert ('game');
	window.parent.location.href = "/goto-casino.php?c="+casino;
	}
	
/* Dropdown menu code */
// Copyright 2006-2007 javascript-array.com

var timeout	= 500;
var closetimer	= 0;
var ddmenuitem	= 0;
var fgame = 0;

// open hidden layer
function mopen(id)
{	
	// cancel close timer
	mcancelclosetime();

	// close old layer
	if(ddmenuitem) 
	ddmenuitem.style.visibility = 'hidden';
	if(fgame)
	fgame.style.visibility = 'visible';

	// hide game iframe
	fgame = document.getElementById('fgame');
	fgame.style.visibility = 'hidden';
	// get new layer and show it
	ddmenuitem = document.getElementById(id);
	ddmenuitem.style.visibility = 'visible';

}
// close showed layer
function mclose()
{
	if(ddmenuitem) 
		ddmenuitem.style.visibility = 'hidden';
	if (fgame)
		fgame.style.visibility = 'visible';
}

// go close timer
function mclosetime()
{
	closetimer = window.setTimeout(mclose, timeout);
}

// cancel close timer
function mcancelclosetime()
{
	if(closetimer)
	{
		window.clearTimeout(closetimer);
		closetimer = null;
	}
}

// close layer when click-out
document.onclick = mclose; 
