var url=new Array(4);
url[0]=['http://www.fivestargamble.com','700','825'];
url[1]=['http://www.roxypalace.com/nullpop_index.asp?btag=rpaff392','650','770'];
url[3]=['http://www.spinpalace.com/index_slots2.asp?s=wgs10533&a=wgsaffad1186','610','780'];
url[4]=['http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_46618','640','820'];
url[6]=['http://www.goldenrivieracasino.com/index.asp?BTag=graff1711','625','825'];


function showPopup(){
var allcookies=document.cookie;
var pos=allcookies.indexOf('popup=');
if(pos!=-1){
var start=pos+6;
var end=allcookies.indexOf(';',start);
if(end==-1)end=allcookies.length;
var i=allcookies.substring(start,end);
if(i==url.length-1)popup(0);
else popup(++i);
}
else popup(0);
}

function popup(i){
var popup=window.open(url[i][0],'','height='+url[i][1]+',width='+url[i][2]+',top=20,left=80,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=no,toolbar=no,directories=no');
popup.blur();
self.focus();
setcookie(i);
}

function setcookie(i){
var nextyear=new Date();
nextyear.setFullYear(nextyear.getFullYear()+1);
document.cookie='popup='+i+';expires='+nextyear.toGMTString();
}

function GoTo(URL)
		{window.location=URL;}

var roxy="http://www.roxypalace.com/nullpop_index.asp?btag=rpaff392";
var intercasino="http://www.intercasino.com/index.php3?1375319";
var threetwored="http://www.32red.com/index.php?BTag=32RedBanAff179";
var interukcasino="http://www.intercasino.co.uk/index.html?1375319";
var spinpalace="http://www.spinpalace.com/index_slots2.asp?s=wgs10533&a=wgsaffad1186";
var fortuneroom="http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_46617";
var platinumplay="http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_46618";
var royalvegas="http://www.fortuneaffiliates.com/tagservlet/tagservlet?btag=ad_46619";
var delrio="http://banner.casinodelrio.com/cgi-bin/redir.cgi?id=N&member=winprize&profile=ocb";

function isEmailAddr(email)
{
  var result = false
  var theStr = new String(email)
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}

function FormValidator(theForm)
{

  if (theForm.email.value == "")
  {
    alert("Please enter a valid e-mail address.");
    theForm.email.focus();
    return (false);
  }

  if (!isEmailAddr(theForm.email.value))
  {
    alert("Please enter a complete email address in the form: yourname@yourdomain.com");
    theForm.email.focus();
    return (false);
  }
   
  if (theForm.email.value.length < 3)
  {
    alert("Please enter at least 3 characters in the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  if (theForm.firstname.value == "")
  {
    alert("Please enter your first name.");
    theForm.firstname.focus();
    return (false);
  }
  if (theForm.lastname.value == "")
  {
    alert("Please enter your last name.");
    theForm.lastname.focus();
    return (false);
  }
  return (true);
}