var strNew = "test";
var brow = "test";
var browserName=navigator.appName; 
function newStr(b,g) {
if(b == "Microsoft Internet Explorer") {
strNew = "<div id=\"wrap\"><div id=\"Jheader\"><div id=\"headerLeft\"></div><div id=\"headerRight\"></div><div id=\"headerContent\"><h1><a href=\"http://www.platinumplay.com\" onmousedown=\"this.href='http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_237485';\">Download Game</a></h1></div></div><div class=\"iframe\">";
strNew += "<iframe name=\"ifrm\" id=\"ifrm\" src=\"https://fortunelounge.microgaming.com/freeplay/t3start.asp?gameID=" + g + "&sext1=demo&sext2=demo\" frameborder=\"0\">";
strNew += "Sorry, your browser doesn't support iframes. <a href=\"https://fortunelounge.microgaming.com/freeplay/t3start.asp?gameID=" + g + "&sext1=demo&sext2=demo\">Click here</a> for the game.</iframe>";
strNew += "</div><div id=\"bot\"><div id=\"botLeft\"></div><div id=\"botRight\"></div><div id=\"botContent\"><p><a class=\"bot\" href=\"https://fortunelounge.microgaming.com/freeplay/t3start.asp?sext1=demo&sext2=demo\" target=\"ifrm\">More Games</a> | <a class=\"bot\" href=\"http://www.platinumplay.com\" onmousedown=\"this.href='http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_235548';\">Visit Casino</a> | <a class=\"bot\" href=\"http://www.platinumplay.com\" onmousedown=\"this.href='http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_235548';\">Real Play Flash Casino</a> | <a class=\"bot\" href=\"javascript:history.go(0)\">Refresh</a> | <a class=\"bot\" href=\"../how-to/\">Help</a></p></div></div>";
strNew += "<script type=\"text/javascript\">\nfunction setIframe(h) {\nvar theIframe = document.getElementById? document.getElementById('ifrm'): document.all? document.all['ifrm']: null;\nif (theIframe) {\nviewport.getWinHeight();\n//  both theIframe.height and theIframe.style.height seem to work\n theIframe.style.height = Math.round( h * viewport.height ) + \"px\";\n // theIframe.style.marginTop = Math.round( (viewport.height - parseInt(theIframe.style.height) )/2 ) + \"px\";\n theIframe.style.marginTop = 0 + \"px\"; }\n}\n";
strNew += "\n// for sizing and positioning the iframe in the window\n// .5 for height=\"50%\"\nsetIframe(.8);\nwindow.onresize = function() { setIframe(.6) }\n</script>\n</div>";
 return strNew;
} else {
strNew = "<center><div id=\"img_wrap\"><div id=\"Jheader\"><div id=\"headerLeft\"></div><div id=\"headerRight\"></div><div id=\"headerContent\"><h1><a href=\"http://www.platinumplay.com\" onmousedown=\"this.href='http://www.platinumplay.com';\">Download Game</a></h1></div></div><img src=\"../images/games/" + g + ".jpg\" alt=\"" + g + "\"width=440 height=250/><div id=\"bot\"><div id=\"botLeft\"></div><div id=\"botRight\"></div><div id=\"botContent\"><p><a href=\"http://www.platinumplay.com\" class=\"bot\" onmousedown=\"this.href='http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_235548';\">Visit Casino</a> | <a class=\"bot\" href=\"http://www.platinumplay.com\" onmousedown=\"this.href='http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_235548';\">Real Play Flash Casino</a> | <a class=\"bot\" href=\"../how-to/\">Help</a></p></div></div></div></center>";
 return strNew;
}
}
var viewport = {
  getWinWidth: function () {
    this.width = 0;
    if (window.innerWidth) this.width = window.innerWidth - 22;
    else if (document.documentElement && document.documentElement.clientWidth) 
  		this.width = document.documentElement.clientWidth;
    else if (document.body && document.body.clientWidth) 
  		this.width = document.body.clientWidth;
  },
  
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 0;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  },
  
  getScrollX: function () {
    this.scrollX = 0;
  	if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
  	else if (document.documentElement && document.documentElement.scrollLeft)
  		this.scrollX = document.documentElement.scrollLeft;
  	else if (document.body && document.body.scrollLeft) 
  		this.scrollX = document.body.scrollLeft; 
  	else if (window.scrollX) this.scrollX = window.scrollX;
  },
  
  getScrollY: function () {
    this.scrollY = 0;    
    if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop)
  		this.scrollY = document.documentElement.scrollTop;
  	else if (document.body && document.body.scrollTop) 
  		this.scrollY = document.body.scrollTop; 
  	else if (window.scrollY) this.scrollY = window.scrollY;
  },
  
  getAll: function () {
    this.getWinWidth(); this.getWinHeight();
    this.getScrollX();  this.getScrollY();
  }
  
}

