var strapline = 0;

function showGame(game,country,layout) {

	 if (layout == null) {
   		layout = "ww";
 		}

	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;
	
	if (b < 900) {
		var mgw = 480;
		var mgh = 354;
		var www = 480;
		var wwh = 353;
		var myw = 475;
		var myh = 300;
		var ptechleft = 150;
		var ptechwidth = 330;
		var ptechtop1 = 10;
		var ptechheight1 =40;
		var skyleft = 1;
		var skywidth = 1;
		var skytop1 = 1;
		var skyheight1 = 1;
		var gccleft = 1;
		var gccwidth = 400;
		var gcctop1 = 1;
		var gccheight1 = 400;
		var spinrleft = 1;
		var spinrwidth = 480;
		var spinrtop1 = 1;
		var spinrheight1 = 400;
		var mybetleft = 1;
		var mybetwidth = 480;
		var mybettop1 = 1;
		var mybetheight1 = 60;
		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;
		var myw = 595;
		var myh = 360;
		var ptechleft = 150;
		var ptechwidth = 330;
		var ptechtop1 = 10;
		var ptechheight1 =40;
		var skyleft = 1;
		var skywidth = 1;
		var skytop1 = 1;
		var skyheight1 = 1;
		var gccleft = 1;
		var gccwidth = 400;
		var gcctop1 = 1;
		var gccheight1 = 180;
		var mybetleft = 1;
		var mybetwidth = 780;
		var mybettop1 = 1;
		var mybetheight1 = 60;
		ileft = 492;
		iwidth = 100;
		itop1 = 140;
		iheight1 = 40;
		itop2 = 235;
		iheight2 = 90;
		}
	else if (b < 1600) {
		var mgw = 799;
		var mgh = 590;
		var www = 800;
		var wwh = 560;
		var myw = 795;
		var myh = 460;
		var ptechleft = 150;
		var ptechwidth = 330;
		var ptechtop1 = 10;
		var ptechheight1 =40;
		var skyleft = 1;
		var skywidth = 1;
		var skytop1 = 1;
		var skyheight1 = 1;
		var gccleft = 1;
		var gccwidth = 600;
		var gcctop1 = 1;
		var gccheight1 = 180;
		var spinrleft = 1;
		var spinrwidth = 780;
		var spinrtop1 = 1;
		var spinrheight1 = 400;
		var mybetleft = 1;
		var mybetwidth = 780;
		var mybettop1 = 1;
		var mybetheight1 = 60;
		ileft = 655;
		iwidth = 134;
		itop1 = 185;
		iheight1 = 50;
		itop2 = 315;
		iheight2 = 120;
		}
	else {
		var mgw = 1299;
		var mgh = 790;
		var www = 1300;
		var wwh = 760;
		var myw = 1295;
		var myh = 700;
		var ptechleft = 150;
		var ptechwidth = 330;
		var ptechtop1 = 10;
		var ptechheight1 =40;
		var skyleft = 1;
		var skywidth = 1;
		var skytop1 = 1;
		var skyheight1 = 1;
		var gccleft = 1;
		var gccwidth = 600;
		var gcctop1 = 1;
		var gccheight1 = 180;
		var spinrleft = 1;
		var spinrwidth = 1250;
		var spinrtop1 = 1;
		var spinrheight1 = 400;
		var mybetleft = 1;
		var mybetwidth = 1250;
		var mybettop1 = 1;
		var mybetheight1 = 60;
		ileft = 1155;
		iwidth = 134;
		itop1 = 195;
		iheight1 = 200;
		itop2 = 415;
		iheight2 = 160;
		}
	if (layout == "mg") {
		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>"); 
		}
	else if (game == "elvistop20" || game == "cashino" || game == "dealornodeal" || game == "snakes") {
		itop1 = 0;
		ileft = 0;
		iheight1 = 100;
		iwidth= www-10;
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+www+"\" height=\""+(wwh+80)+"\" frameborder=\"0\" src=\"/wwGamePaddy.php?g="+game+"&w="+www+"&h="+wwh+"&iwidth="+iwidth+"&ileft="+ileft+"&itop1="+itop1+"&itop2="+itop2+"&iheight1="+iheight1+"&iheight2="+iheight2+"\" class=\"game-frame\"></iframe>"); 
		}
	else if (layout == "ptech") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" scrolling=\"no\" frameborder=\"0\" src=\"/ptechGame.php?g="+game+"&w="+mgw+"&h="+mgh+"&iwidth="+ptechwidth+"&ileft="+ptechleft+"&itop1="+ptechtop1+"&iheight1="+ptechheight1+"\" class=\"game-frame\"></iframe>"); 
		}
	else if (layout == "gcc") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" scrolling=\"no\" frameborder=\"0\" src=\"/gccGame.php?g="+game+"&w="+mgw+"&h="+mgh+"&iwidth="+gccwidth+"&ileft="+gccleft+"&itop1="+gcctop1+"&iheight1="+gccheight1+"\" class=\"game-frame\"></iframe>");
		}
	else if (layout == "spinroom") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" scrolling=\"no\" frameborder=\"0\" src=\"/spinroomGame.php?g="+game+"&w="+mgw+"&h="+mgh+"&iwidth="+spinrwidth+"&ileft="+spinrleft+"&itop1="+spinrtop1+"&iheight1="+spinrheight1+"\" class=\"game-frame\"></iframe>");
		}
	else if (layout == "mybet") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+myw+"\" height=\""+myh+"\" scrolling=\"no\" frameborder=\"0\" src=\"/mybetGame.php?g="+game+"&w="+myw+"&h="+myh+"&iwidth="+mybetwidth+"&ileft="+mybetleft+"&itop1="+mybettop1+"&iheight1="+mybetheight1+"\" class=\"game-frame\"></iframe>");
		}
	else if (layout == "sky") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" scrolling=\"no\" frameborder=\"0\" src=\"/skyGame.php?g="+game+"&w="+mgw+"&h="+mgh+"&iwidth="+skywidth+"&ileft="+skyleft+"&itop1="+skytop1+"&iheight1="+skyheight1+"\" class=\"game-frame\"></iframe>");
		}
	else if (game == "cleopatra") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+www+"\" height=\""+wwh+"\" frameborder=\"0\" src=\"/nooverlayGame.php?g="+game+"&w="+www+"&h="+wwh+"&iwidth="+iwidth+"&ileft="+ileft+"&itop1="+itop1+"&itop2="+itop2+"&iheight1="+iheight1+"&iheight2="+iheight2+"\" class=\"game-frame\"></iframe>"); 
		}
	else if (layout == "login") {
		document.write ("<iframe id=\"fgame\" rel=\"noindex,nofollow\" width=\""+mgw+"\" height=\""+mgh+"\" scrolling=\"no\" frameborder=\"0\" src=\"/novomaticLogin.php\" 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(server,game,country,codes,frameheight) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (!frameheight) {
		frameheight = 270;
		}
		
	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://"+server+"/extdata.php?c=inet,itops,cwc,manhat,aladdin&cols=0,1,3,8,11,13,6,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+mgw+"&site=gfm\" style=\"border:0px;height:"+frameheight+"px;\"></iframe>"); 
		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://"+server+"/extdata.php?c=inet,itops,cwc,manhat,aladdin&cols=0,1,3,8,11,13,6,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+www+"&site=gfm\" style=\"border:0px;height:"+frameheight+"px;\"></iframe>"); 
		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 (game == "mg") {
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+mgw+"\" frameborder=\"0\" src=\"http://"+server+"/extdata.php?c=32r,lad,aslot,roxyp,lucky&cols=0,1,3,8,11,13,6,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+mgw+"&site=gfm\" style=\"border:1px;height:"+frameheight+"px;\"></iframe>"); 
		document.write("<center><em><strong>The online casinos listed above all carry this game</strong></em></center>");
		}
	else if (game == "ptech") {
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+mgw+"\" frameborder=\"0\" src=\"http://"+server+"/extdata.php?c="+codes+"&cols=0,1,3,8,11,13,6,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+mgw+"&site=gfm\" style=\"border:1px;height:"+frameheight+"px;\"></iframe>"); 
		document.write("<center><em><strong>The online casinos listed above all carry this game</strong></em></center>");
		}
	else {
		document.write ("<iframe rel=\"noindex,nofollow\" width=\""+www+"\" frameborder=\"0\" src=\"http://"+server+"/extdata.php?c="+codes+"&cols=0,1,3,8,11,13,6,14&hbgcol=FB9F10&hcol=fff&fsize=12px&w="+www+"&site=gfm\" style=\"border:0px;height:"+frameheight+"px;\"></iframe>"); 
		document.write("<center><em><strong>The online casinos listed above all carry this game</strong></em></center>");
		}	
	}
	
function showRatings(type,svr,page,game) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var mgw = 480;
		}
	else if (b < 1100) {
		var mgw = 600;
		}
	else {
		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;
		}
	document.write ('<span class="ratings-form" style="width:'+mgw+'px;">');
	document.write ('<table width="'+mgw+'" cellpadding="0" cellspacing="0" border="0" class="ratings-table">');
	document.write ('<tr><td valign="top" width="60%"><iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.gamesfruitmachines.co.uk%2F'+page+'&amp;layout=standard&amp;show_faces=false&amp;width=300&amp;action=like&amp;font=tahoma&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:300px; height:25px"></iframe></td>');
	document.write ('	 <td valign="top" width="40%"><iframe src="http://'+svr+'/rating.php?l=h&g='+game+'" style="width:100%;border:0px;height:30px;" scrolling="no" frameborder="no"></iframe></td>');
	document.write ('</tr></table>');
	document.write ('</span>');
	}

function showMailForm(type) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var mgw = 480;
		}
	else if (b < 1100) {
		var mgw = 600;
		}
	else {
		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;
		}
	document.write ('<span class="mail-form" style="width:'+mgw+'px;">');
	document.write ('<a id="mlstrap" class="mlstrap">Receive my monthly fruit machine newsletter...</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 ('</span>');
	document.write ('<script type="text/javascript" src="fadingtext.js"></script>');
	}


function showToolBar(country,type,game) {
var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var mgw = 480;
		}
	else if (b < 1100) {
		var mgw = 600;
		}
	else {
		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;
		}
	
	if (country != "XX") { // Newsletter + Slotseek
		document.write ('<span class="mail-form" style="width:'+mgw+'px;">');
		document.write ('<table width="100%" cellpadding="0" cellspacing="0" border="0" class="mail-table">');
		document.write ('<tr><td valign="top" width="50%">Join the monthly GFM/Slotjunkies newsletter...</td>');
		document.write ('	 <td valign="top" width="50%">&nbsp;Find reputable online casinos with...</td>');
		document.write ('</tr>');
		document.write ('<tr><td valign="top" width="50%"><div style="margin-top:7px;">Email: <input type="text" name="YMLP0" class="input-med"> &nbsp; &nbsp; <input type="submit" value="JOIN" class="submit-sml"></div></td>');
		document.write ('	 <td valign="top" width="50%"><iframe width="'+mgw+'" frameborder="0" src="http://www.slotseek.com/searchframe.php?s=gfm&bg=FB9F10&strap=none&width='+((mgw-40)/2)+'&txt='+game+'" scrolling="no" style="border:1px;height:30px;width:'+((mgw-40)/2)+'px;"></iframe></td>');
		document.write ('</tr></table>');
		document.write ('</span>');
		}
	else { // version with bonus promos
		document.write ('<span class="mail-form" style="width:'+mgw+'px;">');
		document.write ('<table width="100%" cellpadding="0" cellspacing="0" border="0" class="mail-table">');
		document.write ('<tr><td valign="top" width="50%">Join the monthly GFM/Slotjunkies newsletter...</td>');
		document.write ('	 <td valign="top" width="50%"><strong><a href="/goto-casino.php?c=paddy" target="_blank">PADDY POWER CASINO</A> £500 LIMITED TIME BONUS</strong></td>');
		document.write ('</tr>');
		document.write ('<tr><td valign="top" width="50%"><div style="margin-top:7px;">Email: <input type="text" name="YMLP0" class="input-med"> &nbsp; &nbsp; <input type="submit" value="JOIN" class="submit-sml"></div></td>');
		document.write ('	 <td valign="top" width="50%"><br>&nbsp;<strong>£250 BONUS NOW AT <a href="/goto-casino.php?c=mrgreen" target="_blank">MR GREEN</a> (CLEOPATRA etc)</strong></td>');
		document.write ('</tr></table>');
		document.write ('</span>');
		}
	}
	
function showSlotSeek(txt) {
	var b = (typeof window.innerWidth == 'undefined')?document.body.clientWidth:window.innerWidth;
	if (b < 900) {
		var mgw = 480;
		}
	else if (b < 1100) {
		var mgw = 600;
		}
	else {
		var mgw = 800;
		}
	document.write ("<iframe width=\""+mgw+"\" frameborder=\"0\" src=\"http://www.slotseek.com/searchframe.php?s=gfm&strap=0&txt="+txt+"\" scrolling=\"no\" style=\"border:1px;height:50px;width:"+mgw+";\"></iframe>"); 
	}
