// JavaScript Document

	function TermsCond(){
		window.open('http://www.mancentral.com/free-gay-dating/asp/rulesOUT.asp','popup','toolbar=no,location=no,directories=no,status=no,' + 
		'menubar=no,scrollbars=yes,resizable=yes,screenX=0,screenY=0,top=0,left=0,width=745,height=440');
	}


	function countryCheck(){
		
		var index=document.JoinForm.Country.selectedIndex;
		var countryName=document.JoinForm.Country[index].value;
		
		if(countryName!="Choose"){
			if(countryName==7 || countryName==25 || countryName==54 ||
				countryName==58 || countryName==75 || countryName==77 ||
				countryName==79|| countryName==112 || countryName==113 ||
				countryName==125 || countryName==129 || countryName==130 ||
				countryName==143 || countryName==145 || countryName==151 ||
				countryName==165 || countryName==166){
				
				//	submit down as it is with level one passed to indicate that the next level down from the country	
				//	has been selected. Also pass country through
				
				document.JoinForm.countryLevel.value=1;
				document.JoinForm.method="Post";
				document.JoinForm.action="join.asp";
				document.JoinForm.submit();
			}
			else{
				if(document.JoinForm.countryLevel.value!=0){
					document.JoinForm.countryLevel.value=0;
					document.JoinForm.method="Post";
					document.JoinForm.action="join.asp";
					document.JoinForm.submit();
				}
			}
		}
	}
	
	function getSublocations(){
		if(document.JoinForm.locations[document.JoinForm.locations.selectedIndex].value!="Choose"){
			document.JoinForm.countryLevel.value=2;
			document.JoinForm.method="Post";
			document.JoinForm.action="join.asp";
			document.JoinForm.submit();
		}
	}
	
	function usernameCheck(x){
		if(x){
			if(document.JoinForm.Username.value=="Choose a username")document.JoinForm.Username.value="";
		}
		else{
			if(document.JoinForm.Username.value=="")document.JoinForm.Username.value="Choose a username";
		}
	}
	/*
	function passwordCheck(x){
		if(x){
			if(document.JoinForm.pwrd.value=="Choose a password")document.JoinForm.pwrd.value="";
		}
		else{
			if(document.JoinForm.pwrd.value=="")document.JoinForm.pwrd.value="Choose a password";
		}
	}
	*/
	function emailCheck(x){
		if(x){
			if(document.JoinForm.email.value=="Your email address")document.JoinForm.email.value="";
		}
		else{
			if(document.JoinForm.email.value=="")document.JoinForm.email.value="Your email address";
		}
	}
	











	var allCookies=document.cookie;
	var pos=allCookies.indexOf("referrer=stored_");
	if(pos==-1){
		document.cookie ="referrer=stored_"+(escape(document.referrer))+";path=/";
	}



