
//verify for netscape/mozilla
var isNS4 = (navigator.appName=="Netscape")?1:0;


if(typeof(HtmlText) != 'undefined' ){
var HtmlTable = "";
HtmlTable = "<table width='469' align='center' cellpadding='0' cellspacing='0'><tr><td colspan='3'><img src='../images2/text_box_03.png' width='469' height='27'></td></tr><tr><td><img src='../images2/text_box_05.png' width='22' height='373'></td><td valign='top' width='425' style='color: #ffffff; font-size: 11px; background-image: url(../images2/text_box_07.png); line-height: 13px; text-align: justify'>" + HtmlText + "</td><td><img src='../images2/text_box_09.png' width='22' height='373'></td></tr><tr><td colspan='3'><img src='../images2/text_box_10.png' width='469' height='27'></td></tr></table>";
}



if (document.images)
{
  pic1= new Image(1,1); 
  pic1.src="/images2/no-arrow2.gif"; 

  pic2= new Image(2,373); 
  pic2.src="/images2/text_box_07.png"; 

}


// ----- FUNCTIONS ----- \\
/*
Function created for bonuses on PL page.
*/
function toggleBonus()
{
	var vars = [], hash;
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
	for(var i = 0; i < hashes.length; i++)
	{
		hash = hashes[i].split('=');
		vars.push(hash[0]);
		vars[hash[0]] = hash[1];
	}
	
	 switch(vars['bonus']){
	 	case "1":
	 	default:
	     //toggleDisplay('speacial-bonus-1500');
	 	break;
	 	case "2":
	 	 toggleDisplay('toggle01');
	 	break;
	 	return false;
	 }
}

function returnLanguageCode(lang)
{
	
	var vars = [], hash, folder = '', flags = '';
	var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
	for(var i = 0; i < hashes.length; i++)
	{
		hash = hashes[i].split('=');
		vars.push(hash[0]);
		vars[hash[0]] = hash[1];
	}
	
	
	/*Folder is to store what value holds in lang.
	  Example lang=1 , folder = 'en'
	*/
	flags = vars['flag'];
	switch(flags)
	{
		case '1':
		folder = 'en';
		break;
		
		case '2':
		folder = 'de';
		break;
		
		case '3':
		folder = 'fr';
		break;
		
		case '4':
		folder = 'se';
		break;
		
		case '5':
		folder = 'fi';
		break;
		
		case '6':
		folder = 'it';
		break;
		
		case '7':
		folder = 'no';
		break;
		
		case '8':
		folder = 'nl';
		break;
		
		default:
		folder = 'en';
		break;
	}
	return folder;
}

function imageRestore(el){
var folder = "../images2/pl/" + returnLanguageCode() + "/pl-button-1.png";
document.getElementById(el).src = folder;
}

function imageSwap(el){
var folder = "../images2/pl/" + returnLanguageCode() + "/pl-button-2.png";
document.getElementById(el).src = folder;
}


function toggleDisplay(divID)
{
	
	if(document.getElementById('special-bonus-1000')){
		document.getElementById('special-bonus-1000').style.display = 'none';	
	}
	document.getElementById('toggle01').style.display = 'none';
	document.getElementById('toggle02').style.display = 'none';
	document.getElementById('toggle03').style.display = 'none';
	document.getElementById('toggle04').style.display = 'none';
	document.getElementById('toggle05').style.display = 'none';
	document.getElementById('toggle06').style.display = 'none';
	document.getElementById('toggle07').style.display = 'none';
	document.getElementById('toggle08').style.display = 'none';
	document.getElementById(divID).style.display = 'block';
}


function toggleDisplayPokerListing(divID)
{
	
	
	
}

/*End of PL functions*/

/*
Function created for bonuses on HP main page.
*/

	function toggleBonusDisplay(divToggle){
	
	document.getElementById("bonus01").style.display = 'none';
	document.getElementById("bonus02").style.display = 'none';
	document.getElementById("bonus03").style.display = 'none';
	document.getElementById("bonus04").style.display = 'none';
	document.getElementById("bonus05").style.display = 'none';
	document.getElementById("bonus06").style.display = 'none';
	document.getElementById("bonus07").style.display = 'none';
	document.getElementById("bonus08").style.display = 'none';
	document.getElementById(divToggle).style.display = 'block';
	}
  
/*End of bonuses functions*/

	function numbersOnly(){ // only allow numbers, no periods
		if(!isNS4){if(event.keyCode < 48 || event.keyCode > 57) event.returnValue = false;}else{if(event.which < 48 || event.which > 57) returnfalse;}
	}

	function MM_preloadImages() { //v3.0
	  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
	}
	
	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}
	
	function MM_findObj(n, d) { //v4.01
	  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	  if(!x && d.getElementById) x=d.getElementById(n); return x;
	}
	
	function MM_swapImage() { //v3.0
	  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
	}
	
	function MM_openBrWindow(theURL,winName,features) { //v2.0
	  window.open(theURL,winName,features);
	}

	function printpage() {
	 if (typeof(window.print) != 'undefined') {
	     window.print();
	 } 
	}
	function PopClose(){
		if (window.opener && !window.opener.closed){
		  self.close();
		}else{
		 window.location="http://www.hollywoodpoker.com/";
		}
	}

	function modelPopClose(){
		if (window.opener && !window.opener.closed){
		  window.opener.location="http://www.hollywoodpoker.com/hollywood-models-search/index.html";
		  self.close();
		}else{
		 window.location="http://www.hollywoodpoker.com/hollywood-models-search/index.html";
		}
	}
	function PopGotoClose(goWhere){
		if (window.opener && !window.opener.closed){
		  window.opener.location=goWhere;
		  self.close();
		}else{
		  window.location=goWhere;
		}
	}
  
	function timerDownload(name,path){
		set_src = window.location.search;
		set_src = set_src.substring(1,set_src.length);
		if(window.location.search.indexOf("&np") != -1){
			var postionOfnp = set_src.indexOf("&np");
			set_src = set_src.slice(0,postionOfnp);
		}
		setTimeout("downloadHollywoodPoker(set_src)", 6000);
	}
	
	function timerDownloadAndRedirect(name,path){
		set_src = window.location.search;
		set_src = set_src.substring(1,set_src.length);
		if(window.location.search.indexOf("&np") != -1){
			var postionOfnp = set_src.indexOf("&np");
			set_src = set_src.slice(0,postionOfnp);
		}
		downloadHollywoodPoker(set_src);
		document.location="http://www.hollywoodpoker.com/join.html"
	}

	function downloadHollywoodPoker(set_src){
		var msg = 'Would you like to Download Hollywood Poker while browsing?';
		var currentCookies = document.cookie;
		if (currentCookies.indexOf("askOnce=") == -1){
			if (confirm(msg)){
				track(1,1,1000,1000);
				var pathToExe = "http://www.pokernetwork.co.uk/games/204/Z4DC/";
				if (set_src.length > 0) { 
					pathToExe += set_src + "/";
				}
				pathToExe += "InstallerHollywoodPoker.exe";
				window.location = pathToExe;
			}
			var expiresAt = new Date();
			expiresAt.setFullYear(expiresAt.getFullYear() + 1);
			document.cookie = "askOnce=yes; expires=" + expiresAt.toGMTString();
		} 
	}
	
	
// ----- TIMER DOWNLOAD NO COOKIE ------ \\

	function timerDownload2(name,path){
		set_src = window.location.search;
		set_src = set_src.substring(1,set_src.length);
		if(window.location.search.indexOf("&np") != -1){
			var postionOfnp = set_src.indexOf("&np");
			set_src = set_src.slice(0,postionOfnp);
		}
		setTimeout("downloadHollywoodPoker(set_src)", 6000);
	}
	
	function timerDownloadAndRedirect2(name,path){
		set_src = window.location.search;
		set_src = set_src.substring(1,set_src.length);
		if(window.location.search.indexOf("&np") != -1){
			var postionOfnp = set_src.indexOf("&np");
			set_src = set_src.slice(0,postionOfnp);
		}
		downloadHollywoodPoker(set_src);
		document.location="http://www.hollywoodpoker.com/join.html"	
	}
	
	function downloadHollywoodPoker(set_src){
		var msg = 'Would you like to Download Hollywood Poker while browsing?';
			if (confirm(msg)){
				track(1,1,1000,1000);
				var pathToExe = "http://www.pokernetwork.co.uk/games/204/Z4DC/";
				if (set_src.length > 0) { 
					pathToExe += set_src + "/";
				}
				pathToExe += "InstallerHollywoodPoker.exe";
				window.location = pathToExe;
			}
			var expiresAt = new Date();
			expiresAt.setFullYear(expiresAt.getFullYear() + 1);
			document.cookie = "askOnce=yes; expires=" + expiresAt.toGMTString();
	}
	
	
// ----- VALIDATION FORM COMMON ----- \\
	function validateLogin(f)
	{	
		// validate nickname
		if (f.alias.value.length == 0)
		{
			alert("Please enter a nickname.");
			f.alias.focus();
			return false; 
		}
		
		if ((f.alias.value.length < 2) || (f.alias.value.length > 12))
		{
			alert("The nickname must be between 2 and 12 letters and/or numbers.");
			f.alias.focus();
			return false; 
		}
		if (f.password.value.length == 0)
		{
			alert("Please enter a password.");
			f.password.focus();
			return false; 
		}
		
		if ((f.password.value.length < 8) || (f.password.value.length > 12))
		{
			alert("The password must be between 8 and 12 letters and/or numbers.");
			f.password.focus();
			return false; 
		}
	}


// ----- VALIDATION FORM COMMON ----- \\
	function isValid(obj, objType)
	{
		if (objType == "text")
		{
			if (obj.value.length == 0) 
				return false;
			else 
				return true;
		}
		else if (objType == "select")
		{
			if (obj.options[0].selected)
				return false;
			else
				return true;
		}
		else if (objType == "checkbox")
		{
			if (obj.checked)
				return true;
			else
		   		return false;	
		} 
		return true;
	}
	function  validateLongSignupForm(f)
	{
		// validate nickname
		if (f.nickname.value.length == 0)
		{
			alert("Please enter a nickname.");
			f.nickname.focus();
			return false; 
		}
		
		if ((f.nickname.value.length < 2) || (f.nickname.value.length > 12))
		{
			alert("The nickname must be between 2 and 12 letters and/or numbers.");
			f.nickname.focus();
			return false; 
		}
	
		// validate email
		if (f.email.value.length == 0)
		{
			alert("Please enter your email address.");
			f.email.focus();
			return false; 
		}
	
		if (f.email.value != f.email1.value)
		{
		    alert("The two emails do not match. Please retype.");
		    f.email.focus();
		    return false;
		}
	
		var i = 1;
		var s = f.email.value;
		var l = s.length;
	
		while ((i < l) && (s.charAt(i) != "@"))
		{
			i++;
		}
	
		if ((i >= l) || (s.charAt(i) != "@"))
		{
			alert("The email address is invalid. Please enter your full email address (eg. name@server.com)");
			f.email.focus();
			return false;
		}
		else
		{
			i += 2;
		}
		
		while ((i < l) && (s.charAt(i) != "."))
		{
			i++;
		}
	
		if ((i >= l - 1) || (s.charAt(i) != "."))
		{
			alert("The email address is invalid. Please enter your full email address (eg. name@server.com)");
			f.email.focus();
			return false;
		}
	
		// validate password
		if (f.password1.value.length == 0)
		{
			alert("Please enter a password.\n-it must be 8-12 numbers AND letters long\n-it must contain BOTH numbers and letters.");
			f.password1.focus();
			return false; 
		}
		
		var numberOfDigits = 0;
		var numberOfLetters = 0;
		var numberOfGarbageChars = 0;
		s = f.password1.value;
		
		for (i = 0; i < s.length; i++)
		{   
			var c = s.charAt(i);
			if ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) )
			{
				numberOfLetters++;
			}
			else if ((c >= "0") && (c <= "9"))
			{
				numberOfDigits++;
			}
			else
			{
				numberOfGarbageChars++;
			}
		}
	
		if (numberOfGarbageChars > 0)
		{
			alert("The password may only contain letters (a-z A-Z) and numericals (0-9).");
			f.password1.focus();
			return false; 
		}
	
		if (((f.password1.value.length < 8) || (f.password1.value.length > 12)) && ((numberOfDigits == 0) || (numberOfLetters == 0)))
		{
			alert("The password must be between 8 and 12 numbers and letters.");
			f.password1.focus();
			return false; 
		}
		else if ((numberOfDigits == 0) || (numberOfLetters == 0))
		{
			alert("The password must contain both letters AND numbers.");
			f.password1.focus();
			return false; 
		}
		else if ((f.password1.value.length < 8) || (f.password1.value.length > 12))
		{
			alert("The password must be between 8 and 12 characters.");
			f.password1.focus();
			return false; 
		}
	
		if (f.password2.value.length == 0)
		{
			alert("Please retype your password in the second password box.");
			f.password2.focus();
			return false; 
		}
	
		if (f.password1.value != f.password2.value)
		{
			alert("The two passwords do not match. Please retype.");
			f.password1.focus();
			return false; 
		}
	
		if (!isValid(f.title, "select"))
		{
			alert("Please choose a title.");
			f.title.focus();
			return false; 
		}
		if (!isValid(f.firstName, "text")) 
		{
			alert("Please enter your first name.");
			f.firstName.focus();
			return false; 
		}
		if (!isValid(f.lastName, "text")) 
		{
			alert("Please enter your last name.");
			f.lastName.focus();
			return false; 
		}
		if (!isValid(f.address1, "text")) 
		{
			alert("Please enter your address.");
			f.address1.focus();
			return false; 
		}
		if (!isValid(f.city, "text")) 
		{
			alert("Please enter a city.");
			f.city.focus();
			return false; 
		}
		if (!isValid(f.country, "select"))
		{
			alert("Please enter your country!");
			f.country.focus();
			return false; 
		}
		if (!isValid(f.zip, "text")) 
		{
			alert("Please enter your zip code or your postal code.");
			f.zip.focus();
			return false; 
		}
	//	if (f.timeZone.options[f.timeZone.selectedIndex].value == 'none')
	//	{
	//		alert("Please select a time zone.");
	//		f.timeZone.focus();
	//		return false; 
	//	}
		if (!isValid(f.phone, "text"))
		{
			alert("Please enter your phone number.");
			f.phone.focus();
			return false; 
		}
		if (!isValid(f.year_of_birth, "select"))
		{
			alert("Please tell us what year you were born in.");
			f.year_of_birth.focus();
			return false; 
		}
		if (!isValid(f.month_of_birth, "select"))
		{
			alert("Please tell us what month you were born in.");
			f.month_of_birth.focus();
			return false; 
		}
		if (!isValid(f.day_of_birth, "select"))
		{
			alert("Please tell us what day of the month you were born on.");
			f.day_of_birth.focus();
			return false; 
		}
		if (!isValid(f.terms, "checkbox"))
			{
				alert("Please acknowledge that you agree to the terms and conditions! You have to do this before you can activate your account.");
				f.terms.focus();
				return false; 
			}
			if (!isValid(f.ru21, "checkbox"))
			{
				alert("If you are over 21, please tick the ‘I am over 21’ checkbox. We can’t let you play unless you are over 21 and you check it off.");
				f.ru21.focus();
				return false; 
			}
			if (!isValid(f.readagreement, "checkbox"))
			{
				alert("Please acknowledge that you agree to the affiliate agreement! You have to do this before you can activate your account.");
				f.ru21.focus();
				return false; 
			}	
	
		return true; //confirmSignupWindow(f);
	}
// ----- SIGNUP VALIDATION ----- \\
	function  validateSignupForm(f)
	{
		// validate nickname
		if (f.nickname.value.length == 0)
		{
			alert("Please enter a nickname.");
			f.nickname.focus();
			return false; 
		}
		
		if ((f.nickname.value.length < 2) || (f.nickname.value.length > 12))
		{
			alert("The nickname must be between 2 and 12 letters and/or numbers.");
			f.nickname.focus();
			return false; 
		}
	
		// validate email
		if (f.email.value.length == 0)
		{
			alert("Please enter your email address.");
			f.email.focus();
			return false; 
		}
	
		if (f.email.value != f.email1.value)
        {
            alert("The two emails do not match. Please retype.");
            f.email.focus();
            return false;
        }

		var i = 1;
		var s = f.email.value;
		var l = s.length;
	
		while ((i < l) && (s.charAt(i) != "@"))
		{
			i++;
		}
	
		if ((i >= l) || (s.charAt(i) != "@"))
		{
			alert("The email address is invalid. Please enter your full email address (eg. name@server.com)");
			f.email.focus();
			return false;
		}
		else
		{
			i += 2;
		}
		
		while ((i < l) && (s.charAt(i) != "."))
		{
			i++;
		}
	
		if ((i >= l - 1) || (s.charAt(i) != "."))
		{
			alert("The email address is invalid. Please enter your full email address (eg. name@server.com)");
			f.email.focus();
			return false;
		}
	
		// validate password
		if (f.password1.value.length == 0)
		{
			alert("Please enter a password.\n-it must be 8-12 numbers AND letters long\n-it must contain BOTH numbers and letters.");
			f.password1.focus();
			return false; 
		}
		
		var numberOfDigits = 0;
		var numberOfLetters = 0;
		var numberOfGarbageChars = 0;
		s = f.password1.value;
		
		for (i = 0; i < s.length; i++)
		{   
			var c = s.charAt(i);
			if ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) )
			{
				numberOfLetters++;
			}
			else if ((c >= "0") && (c <= "9"))
			{
				numberOfDigits++;
			}
			else
			{
				numberOfGarbageChars++;
			}
		}
	
		if (numberOfGarbageChars > 0)
		{
			alert("The password may only contain letters (a-z A-Z) and numericals (0-9).");
			f.password1.focus();
			return false; 
		}
	
		if (((f.password1.value.length < 8) || (f.password1.value.length > 12)) && ((numberOfDigits == 0) || (numberOfLetters == 0)))
		{
			alert("The password must be between 8 and 12 numbers and letters.");
			f.password1.focus();
			return false; 
		}
		else if ((numberOfDigits == 0) || (numberOfLetters == 0))
		{
			alert("The password must contain both letters AND numbers.");
			f.password1.focus();
			return false; 
		}
		else if ((f.password1.value.length < 8) || (f.password1.value.length > 12))
		{
			alert("The password must be between 8 and 12 characters.");
			f.password1.focus();
			return false; 
		}
	
		if (f.password2.value.length == 0)
		{
			alert("Please retype your password in the second password box.");
			f.password2.focus();
			return false; 
		}
	
		if (f.password1.value != f.password2.value)
		{
			alert("The two passwords do not match. Please retype.");
			f.password1.focus();
			return false; 
		}
		
		return true; //confirmSignupWindow(f);
	}

// ----- CONFIRM SIGNUP WINDOW ----- \\
	function  confirmSignupWindow(f)
	{
		f.submit();
	}

// ----- ACTIVATION VALIDATION ----- \\
	function LZ(x) {return(x<0||x>9?"":"0")+x}

	
	function formatDate(date,format) {
	format=format+"";
	var result="";
	var i_format=0;
	var c="";
	var token="";
	var y=date.getYear()+"";
	var M=date.getMonth()+1;
	var d=date.getDate();
	var E=date.getDay();
	var H=date.getHours();
	var m=date.getMinutes();
	var s=date.getSeconds();
	var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
	// Convert real date parts into formatted versions
	var value=new Object();
	if (y.length < 4) {y=""+(y-0+1900);}
	value["y"]=""+y;
	value["yyyy"]=y;
	value["yy"]=y.substring(2,4);
	value["M"]=M;
	value["MM"]=LZ(M);
	value["d"]=d;
	value["dd"]=LZ(d);
	value["H"]=H;
	value["HH"]=LZ(H);
	if (H==0){value["h"]=12;}
	else if (H>12){value["h"]=H-12;}
	else {value["h"]=H;}
	value["hh"]=LZ(value["h"]);
	if (H>11){value["K"]=H-12;} else {value["K"]=H;}
	value["k"]=H+1;
	value["KK"]=LZ(value["K"]);
	value["kk"]=LZ(value["k"]);
	if (H > 11) { value["a"]="PM"; }
	else { value["a"]="AM"; }
	value["m"]=m;
	value["mm"]=LZ(m);
	value["s"]=s;
	value["ss"]=LZ(s);
	while (i_format < format.length) {
		c=format.charAt(i_format);
		token="";
		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
			token += format.charAt(i_format++);
			}
		if (value[token] != null) { result=result + value[token]; }
		else { result=result + token; }
		}
	return result;
	}



	function OfAgeClick(clicker)
	{
	   if (clicker.value == "on") {
		   var dateVar = formatDate(new Date(),"yyyyMMddHHmmss");
		   document.f.OfAgeClicked.value = dateVar;
	   }
	}
	
	function TermsClick(clicker)
	{
	   if (clicker.value == "on") {
		   var dateVar = formatDate(new Date(),"yyyyMMddHHmmss");
		   document.f.TermsClicked.value = dateVar;
	   }
	}
	
	function  validateActivation(f)
	{
		if (!isValid(f.terms, "checkbox"))
		{
			alert("Please acknowledge that you agree to the terms and conditions! You have to do this before you can activate your account.");
			f.terms.focus();
			return false; 
		}
		if (!isValid(f.ru21, "checkbox"))
		{
			alert("Residents of the US must be over the age of 21. Residents outside the US must be over the age of 18. ");
			f.ru21.focus();
			return false; 
		}
		if (!isValid(f.activationCode, "text")) 
		{
			alert("Please enter your activation code!");
			f.activationCode.focus();
			return false; 
		}	
		return true;
	}

// ----- REAL VALIDATION ----- \\
function  validateRMEForm(f)
{
	if (!isValid(f.title, "select"))
	{
		alert("Please choose a title.");
		f.title.focus();
		return false; 
	}
	if (!isValid(f.firstName, "text")) 
	{
		alert("Please enter your first name.");
		f.firstName.focus();
		return false; 
	}
	if (!isValid(f.lastName, "text")) 
	{
		alert("Please enter your last name.");
		f.lastName.focus();
		return false; 
	}
	if (!isValid(f.address1, "text")) 
	{
		alert("Please enter your address.");
		f.address1.focus();
		return false; 
	}
	if (!isValid(f.city, "text")) 
	{
		alert("Please enter a city.");
		f.city.focus();
		return false; 
	}
	if (!isValid(f.zip, "text")) 
	{
		alert("Please enter your zip code or your postal code.");
		f.zip.focus();
		return false; 
	}
	if (!isValid(f.country, "select"))
	{
		alert("Please enter your country!");
		f.country.focus();
		return false; 
	}
//	if (f.timeZone.options[f.timeZone.selectedIndex].value == 'none')
//	{
//		alert("Please select a time zone.");
//		f.timeZone.focus();
//		return false; 
//	}
	if (!isValid(f.phone, "text"))
	{
		alert("Please enter your phone number.");
		f.phone.focus();
		return false; 
	}
	if (!isValid(f.year_of_birth, "select"))
	{
		alert("Please tell us what year you were born in.");
		f.year_of_birth.focus();
		return false; 
	}
	if (!isValid(f.month_of_birth, "select"))
	{
		alert("Please tell us what month you were born in.");
		f.month_of_birth.focus();
		return false; 
	}
	if (!isValid(f.day_of_birth, "select"))
	{
		alert("Please tell us what day of the month you were born on.");
		f.day_of_birth.focus();
		return false; 
	}
	if (!isValid(f.terms, "checkbox"))
		{
			alert("Please acknowledge that you agree to the terms and conditions! You have to do this before you can activate your account.");
			f.terms.focus();
			return false; 
		}
	if (f.id)
	{
		if (!isValid(f.idType, "select"))
		{
			alert("Please select a ID # Type.");
			f.idType.focus();
			return false; 
		}
		if (!isValid(f.id, "text")) 
		{
			alert("Please enter a ID #");
			f.id.focus();
			return false; 
		}
	}

	return true;
}

// ----- MODEL PIC SUBMIT VALIDATION ----- \\
	function  validateModelTerms(f)
	{
		if (!isValid(f.modelterms, "checkbox"))
		{
			alert("You must agree to the Model Terms and Conditions before you can submit your photos.");
			f.modelterms.focus();
			return false; 
		}
		location.href='mailto:models@hollywoodpoker.com';
		return true;
	}

// ----- CHECK BROWSWER FOR MENU ----- \\

	var SubA
	if (document.getElementById) { 
	 SubA=0;
	} 
	else if (document.layers) { 
	 SubA=1;
	} 
	else if (document.all) { 
	 SubA=1;
	} 
	
// ---- Div Hide Layer ---- \\

function toggle(theMenu){
     var elem = document.getElementById(theMenu);
     elem.style.display = (elem.style.display == "none")? "":"none";
}

// ---- AJAX Tracking Functions ---- \\
var http_request = false;
function track(s,p,q,a) {
    http_request = false;
    if (window.XMLHttpRequest) { // Mozilla, Safari,...
        http_request = new XMLHttpRequest();
        if (http_request.overrideMimeType) {
            http_request.overrideMimeType('text/xml');
        }
    } else if (window.ActiveXObject) { // IE
        try {
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try {
            http_request = new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {}
        }
    }
    http_request.onreadystatechange = alertContents;
    http_request.open('GET', '/process_tracking.php?q='+q+'&a='+a+'&s='+s+'&p='+p, false);
    
    http_request.send(null);
}
function alertContents() {
	//do nothing
}

// ---- Scroller Functions ---- \\
function P7_VScroller(el,dr,ty,oy,spd) { //v1.7 by PVII
 var g,gg,fr,sp,pa='',slw=true,m=false,h,ly;ty=parseInt(ty);
 if((g=MM_findObj(el))!=null){gg=(document.layers)?g:g.style;}else{return;}
 if(dr=="Stop"){if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if((parseInt(navigator.appVersion)>4 || navigator.userAgent.indexOf("MSIE")>-1)&& !window.opera){pa="px";}
 if(navigator.userAgent.indexOf("NT")>-1 || navigator.userAgent.indexOf("Windows 2000")>-1){slw=false;}
 if(spd=="Slow"){sp=(slw)?2:1;fr=(slw)?80:70;}else if(spd=="Medium"){sp=(slw)?4:1;fr=(slw)?40:10;
 }else{sp=(slw)?8:4;fr=(slw)?40:10;}if(spd=="Warp"){sp=5000;}var yy=parseInt(gg.top);if(isNaN(yy)){
 if(g.currentStyle){yy=parseInt(g.currentStyle.top);}else if(document.defaultView&&document.defaultView.getComputedStyle){
 yy=parseInt(document.defaultView.getComputedStyle(g,"").getPropertyValue("top"));}else{yy=0;}}
 if(document.all || document.getElementById){h=parseInt(g.offsetHeight);
 if(!h){h=parseInt(g.style.pixelHeight);}
 }else if(document.layers){h=parseInt(g.clip.height);}ly=ty+parseInt(oy)-h;
 if(dr=="Down"){if(yy>ly){m=true;yy-=sp;if(yy<ly){yy=ly;}}}
 if(dr=="Up"){if(yy<ty){m=true;yy+=sp;if(yy>ty){yy=ty;}}}
 if(dr=="Reset"){gg.top=ty+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=false;}
 if(m){gg.top=yy+pa;if(g.toMove){clearTimeout(g.p7Magic);}g.toMove=true;
 eval("g.p7Magic=setTimeout(\"P7_VScroller('"+el+"','"+dr+"',"+ty+","+oy+",'"+spd+"')\","+fr+")");
 }else{if(yy==ly){gg.top=ty+pa;if(g.toMove){clearTimeout(g.p7Magic);}eval("g.p7Magic=setTimeout(\"P7_VScroller('contentLayer','Down',0,80,'Slow')\",1)");}g.toMove=false; }
}

// ---- Side Nav Random Image ---- \\
function random_images(imgnum, alignpic, folder, alt, width, height, border, pictype)
{
  if (!imgnum)
  {
    imgnum=2;
  }
  if (!folder)
  {
    folder='images';
  }
  var useRand = 0;
  var rand1 = 0;
  do {
    var randnum = Math.random();
    rand1 = Math.round((imgnum - 1) * randnum) + 1;
  } while (rand1 == useRand);
  useRand = rand1;
  document.write('<img src="');
  if (!pictype){pictype='jpg';}
  if (useRand<10){
    document.write('../'+folder+'/00'+useRand+'.'+pictype);
  }
  else if (useRand<100)
  {
    document.write('../'+folder+'/0'+useRand+'.'+pictype);
  }
  else
  {
    document.write('../'+folder+'/'+ useRand+'.'+pictype);
  }
  document.write('" alt="'+alt+'"');
  if (width)
  {
    document.write(' width="'+width+'"');
  }
  if (height)
  {
    document.write(' height="'+height+'"');
  }
  if (border)
  {
    document.write(' border="'+border+'"');
  } 
  else 
  {
    document.write(' border="0"');
  }
  if (alignpic)
  {
    document.write(' align="'+alignpic+'"');
  }
  else
  {
     document.write(' align="left"');
  } 
  document.write('>');
}
// ---- TOOL TIP ---- \\
	
var offsetfromcursorX=12 //Customize x offset of tooltip
var offsetfromcursorY=10 //Customize y offset of tooltip
var videoTooltip;

//var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
//var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).

var offsetdivfrompointerX = 10;
var offsetdivfrompointerY = 14;

document.write('<div id="dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="dhtmlpointer" src="/images2/arrow2.gif">') //write out pointer image

//Added  by Sue (10-12-2007) - Set the class ID for the tooltip to video_dhtmltooltip or video_dhtmlpointer
if (videoTooltip) {
document.write('<div id="video_dhtmltooltip"></div>') //write out tooltip DIV
document.write('<img id="video_dhtmlpointer" src="/images2/no-arrow2.gif">') //write out pointer image
} 
//End of videoTooltip addition

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6) {
	var tipobj=document.all ? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
	
	//Added  by Sue (10-12-2007) - Set the class ID for the tooltip to video_dhtmltooltip or video_dhtmlpointer
	if (videoTooltip)
		tipobj=document.all ? document.all["video_dhtmltooltip"] : document.getElementById? document.getElementById("video_dhtmltooltip") : ""
	//End of videoTooltip addition
}

var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : "";

//Added  by Sue (10-12-2007) - Set the class ID for the tooltip to video_dhtmltooltip or video_dhtmlpointer
if (videoTooltip)
	pointerobj=document.all? document.all["video_dhtmlpointer"] : document.getElementById? document.getElementById("video_dhtmlpointer") : "";
//End of videoTooltip addition

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thewidth, thecolor){
if (ns6||ie){
if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
tipobj.innerHTML=thetext
enabletip=true
return false
}
}

function greenroomsearch(thetext) {
	if (thetext.defaultValue==thetext.value)	
	{	thetext.value = ""	}
}

function positiontip(e){
if (enabletip){
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20

var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY

var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000

//if the horizontal distance isn't enough to accomodate the width of the context menu
if (rightedge<tipobj.offsetWidth){
//move the horizontal position of the menu to the left by it's width
tipobj.style.left=curX-tipobj.offsetWidth+"px"
nondefaultpos=true
}
else if (curX<leftedge)
tipobj.style.left="5px"
else{
//position the horizontal position of the menu where the mouse is positioned
tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
pointerobj.style.left=curX+offsetfromcursorX+"px"
}

//same concept with the vertical position
if (bottomedge<tipobj.offsetHeight){
tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
nondefaultpos=true
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
tipobj.style.visibility="visible"
if (!nondefaultpos)
pointerobj.style.visibility="visible"
else
pointerobj.style.visibility="hidden"
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
pointerobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}

document.onmousemove=positiontip



//SHOW HIDE FOR WHATS HAPPENING IN THE PROMOTIONS SECTION
last_tab = 'tab1';
function show(layerName) { 
document.getElementById(layerName).style.display = '';
} 

function hide(layerName) { 
document.getElementById(layerName).style.display = 'none';
} 

function show_next(tab_name) {
document.getElementById(last_tab).className = 'tab';
var curr = document.getElementById(tab_name);
curr.className='tab_hover';
hide(last_tab+'_data');
show(tab_name+'_data');
last_tab=tab_name;
}

/*
function toggleDisplay(divID)
{
	document.getElementById('speacial-bonus-1500').style.display = 'none';
	document.getElementById('toggle01').style.display = 'none';
	document.getElementById('poker-bonus-maniac').style.display = 'none';
	document.getElementById('poker-fanatic-bonus').style.display = 'none';
	document.getElementById('poker-enthusiast-bonus').style.display = 'none';
	document.getElementById('tournament-player-bonus').style.display = 'none';
	document.getElementById('casual-bonus-player').style.display = 'none';
	document.getElementById(divID).style.display = 'block';
}
*/

function togglePromo(divID)
{
	document.getElementById('promolp-hh').style.display = 'none';
	document.getElementById(divID).style.display = 'block';
}

function loadPage(list) 
{
	location.href=list.options[list.selectedIndex].value
}
