
  function gs_promo(ui_input) {

   // return; // exit

    // control whether a cookie is set 
    // so we know whether to show the promo again or not.

    var promo_HTML = '<div class="mydiv" id="promo_DIV">';

	//promo_HTML += '<div onclick="gs_promo_sign_up(\'/free-gaming-website/\');" style="float: left; cursor: pointer; cursor: hand;">';

  	//promo_HTML += '<img src="c.gif" style="margin-bottom:100px;" alt="Click here for full details...." width="200" height="267" border="0">';
	//promo_HTML += '</div>';

	promo_HTML += '<span id="promo-Close">';
	 promo_HTML += '<a href="#" onclick="return gs_promo(true);"><img src="/close.gif" border="0" alt="Close"></a>';
	promo_HTML += '</span>';

	promo_HTML += '<font size=+1><b>Want Your Own Gaming Website?</b></font>';
	//promo_HTML += '<font size=+1><b>Want Your Own Autopilot Money Making Gaming Website?</b></font>';
	//promo_HTML += '<font size=+1><b>"High Quality Gaming Websites"</b></font>';
	//promo_HTML += '<font size=+1><b>We\'ll build you a Gaming Website</b></font>';
	//promo_HTML += '<font size=+1><b>Want a FREE Gaming Website?</b></font>';
	//promo_HTML += '<font size=+1><b>STOP! Get A FREE Gaming Website</b></font>';
	
	promo_HTML += '<br><br>';

	promo_HTML += '<big>Just enter your Name and Email below and for a <u><i>limited time only</i></u> we\'ll build you your own <b>Money Making</b> Gaming Website with 108 games, built in YouTube Player and <i>Web 2.0</i> Live Search, <u><b>ABSOLUTELY FREE OF CHARGE</b></u>.<br/>It is FREE and there\'s no catch! <br/>Grab your site now before they\'re all gone...RRP $199.</big>';

	//promo_HTML += '<font size=2>Just enter your Name and Email below and we\'ll give you your own Money Making Gaming Website with 108 Games and <u><b>show you how to make it Profitable!</b></u><br/>It is FREE and there\'s no catch! <br/>Grab your site now before they\'re all gone...RRP £299.</font>';

	//promo_HTML += '<input type="button" class="promo-Go" onmouseover="this.className=\'promo-Go-Over\';" onmouseout="this.className=\'promo-Go\';" title="Don\'t miss out... click here to read more" onclick="return gs_promo_sign_up(\'/free-gaming-website/\');" value="More info...">'; //Grab yours now!

	//http://www.aweber.com/form/thankyou_vo.html//http://game-scape.com/free-gaming-website/
	promo_HTML += '<form method="post" action="http://www.aweber.com/scripts/addlead.pl"><input type="hidden" name="meta_web_form_id" value="915161998"><input type="hidden" name="meta_split_id" value=""><input type="hidden" name="unit" value="game-scape"><input type="hidden" name="redirect" value="http://www.aweber.com/form/thankyou_vo.html" id="redirect_1a249bd82d9220cbb521428524195af5"><input type="hidden" name="meta_redirect_onlist" value=""><input type="hidden" name="meta_adtracking" value=""><input type="hidden" name="meta_message" value="1"><input type="hidden" name="meta_required" value="from"><input type="hidden" name="meta_forward_vars" value="0"><table><tr><td colspan=2><center></center></td></tr><tr><td>Name:</td><td><input type="text" name="name" value="" title="first name" size="20"></td></tr><tr><td>Email:</td><td><input type="text" name="from" value="" title="primary email" size="20"></td></tr><tr><td colspan=2><center></center></td></tr><tr><td align="center" colspan="2"><input type="submit" name="submit" value="Free Instant Access!"></td></tr></table></form><img src="http://forms.aweber.com/form/displays.htm?id=nIysjGyMnJwc" border="0" />'; 
      
     //<!--submit-Free Instant Access!-->
 
      promo_HTML += '<font size=1>We respect your right to privacy. We will not sell or give away your email address to anyone.</font></div>';

	// fill the offer DIV with the HTML 
	document.getElementById('box1').innerHTML = promo_HTML;  

    if(ui_input) { // user hit ui


    //show offer again
    setCookie("show_promo", "yes", 365);

    if( confirm ( "Are you sure? Press cancel to get your own Gaming Website. It will be ready to make money and has 108 cool games built-in. This offer is for a limited time only." ) == true ) {
	
    //if( confirm ( "Are you sure?\nYour own Gaming Website.\nIt's ready to make money and has 108 cool games built-in.\n\n" ) == true ) {
	try{document.getElementById('gameContainer').style.display='block';}catch(e){}
    }
    else{
	location.reload();
	//gs_promo_sign_up('/free-gaming-website/');
	//return;
    }
     /*
      if( confirm( "Click OK to hide this offer permanently.\nClick CANCEL to see it next time." ) == true ) { //Dismiss the FREE Website offer permanently
        alert( 'Read the full offer below if you change your mind' );
        setCookie("show_promo", "no", 365);
      }
      else {
        setCookie("show_promo", "yes", 365);
      }
    */

    }
    gs_set_promo_display('box1'); // makes the box visible  
  }

  function makeFrame() 
  {
    var framedata = '<iframe src="free-gaming-website.shtml" width=100% height=100%></iframe>';
    return framedata;
  }

  function gs_set_promo_display(object) 
  {  
    // make the opt-in box visible/invisible
    var obj = document.getElementById(object);

    var mem = getCookie('show_promo');
    var show_promo = (mem)? mem : false;

    // alert( 'show promo: '+show_promo );

    obj.style.display = (obj.style.display != "block" && ( !show_promo || show_promo == "yes" ))? "block" : "none";         
    return false;
  }
  
  function gs_promo_sign_up(promo_URL) {
   if(!promo_URL){
     promo_URL = "/free-gaming-website/"; 
   }location.href = promo_URL;
  }

  function getCookie(NameOfCookie) {
    if (document.cookie.length > 0) {              
      begin = document.cookie.indexOf(NameOfCookie+"=");       
      if (begin != -1) {           
        begin += NameOfCookie.length+1;       
        end = document.cookie.indexOf(";", begin);
        if (end == -1) end = document.cookie.length;
          return unescape(document.cookie.substring(begin, end));
        } 
      }
    return null;
  }

  function setCookie(NameOfCookie, value, expiredays) {
    var ExpireDate = new Date(), domain = location.host;
    ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));

    document.cookie = NameOfCookie + "=" + escape(value) + 
    ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString() ); //+"; path=/; domain=" + domain  
  }

  function delCookie (NameOfCookie) {
    if (getCookie(NameOfCookie)) {
      document.cookie = NameOfCookie + "=" +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
    }
  }
	// menu functions

        function GamePage(index) {
	  // menu function  
	  if(!index) location.href="/index1.shtml";
	  else location.href="/index" + index + ".shtml";
      } 

	function JumptoGame(path) {
	  // select box function 
          location.href='http://www.game-scape.com/'+path;
      }

	function goFullScreen()	{

	var gameURL = document.getElementsByTagName('param')[0].value;

	  if( gameURL.match('.swf') ) {
	    location.href = gameURL;
	  } else {
	      alert( 'not available for this game.' );
	  }
	}

	function toggler(obj) {
	  // toggle element display
          document.getElementById(obj).style.display = (document.getElementById(obj).style.display!="block")? "block" : "none";
	  return false;
      }

      var XMLHttpRequestObject = false; 

      if (window.XMLHttpRequest) {
	
        XMLHttpRequestObject = new XMLHttpRequest();
      } else if (window.ActiveXObject) {
        XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
      }

      function getData(dataSource) 
      { 
        if(XMLHttpRequestObject) {
          XMLHttpRequestObject.open("GET", dataSource); 

          XMLHttpRequestObject.onreadystatechange = function() 
          { 
            if (XMLHttpRequestObject.readyState == 4 && 
              XMLHttpRequestObject.status == 200) { 
		
		var xreq = XMLHttpRequestObject.responseText;
		xreq = xreq.replace(/\bwindow.google.ac.\b/gi,"");
                eval( xreq );
            } 
          } 
          XMLHttpRequestObject.send(null); 
        }
      }

      function getSuggest(keyEvent) 
      {
        keyEvent = (keyEvent) ? keyEvent: window.event;
        input = (keyEvent.target) ? keyEvent.target : 
          keyEvent.srcElement;

        if (keyEvent.type == "keyup") {
          if (input.value) {
            getData("google.php?qu=" + input.value);
          } 
          else {
            var targetDiv = document.getElementById("targetDiv");

            targetDiv.innerHTML = "<div></div>";
          }
        }
      }

      function sendRPCDone(unusedVariable, searchTerm, arrayTerm, 
        arrayResults, unusedArray) 
      {
        var data = "<table>";
        var loopIndex;

        if (arrayResults.length != 0) {
          for (var loopIndex = 0; loopIndex < arrayResults.length; 
            loopIndex++) {
            data += "<tr><td>" +
            "<a href='http://www.google.com/search?q=" + 
            arrayTerm[loopIndex] + "'>" + arrayTerm[loopIndex] + 
            '</a></td><td>' + arrayResults[loopIndex] + "</td></tr>";
          }
        }

        data += "</table>";

        var targetDiv = document.getElementById("targetDiv");

        targetDiv.innerHTML = data;
      }

/*

// <a href="javascript:checkGameType();">check Game Type</a>

function checkGameType() 
{
  var gameFileName;
  var pmz = document.getElementsByTagName('param');

  if(pmz&&pmz.length>=1) {

    for(var i = 0; i < pmz.length; i++ ) {
    
      if( pmz[i].name == "movie") {

        gameFileName = pmz[i].value;
        break;
      }
    }

   gameFileName=gameFileName.split(".");
   gameFileName=gameFileName[1];
    if(gameFileName.indexOf('swf')!=-1) 
      return true;
    else 
      return false;
  }
}

*/
