function clickthruad(adid,pageid)
	{
	$.get("refer.aspx", { advertid:adid, advertpageid:pageid } );
	return true;
	}

// //////////////////////////////////////////////////////////////////////////////

// Member login

// //////////////////////////////////////////////////////////////////////////////
function ValidateMemberLogin(f)
	{


	if  (f.member_code.value=="")
			{
			alert('Please enter your Member account number');
			f.email.focus();
			return false;
			}

	else if ( f.pwd.value=="" )
			{
			alert('Please enter your member account password');
			f.pwd.focus();
			return false;
			}

	else if  (f.email.value=="")
			{
			alert('Please enter your email address');
			f.email.focus();
			return false;
			}


	else
		return true;
		
	}

function ValidateEmail(f)
	{

	if  (f.email.value=="")
			{
			alert('Please enter your email address');
			f.email.focus();
			return false;
			}


	else
			{
			f.actionx.value=3;
			f.submit();
			return true;
			}
		
	}


// //////////////////////////////////////////////////////////////////////////////

// Join the GA

// //////////////////////////////////////////////////////////////////////////////
function ValidateNewJoiner(f)
	{


	if  (f.membershipcategoryid.value==0)
			{
			alert('Please choose the Membership Category');
			f.membershipcategoryid.focus();
			return false;
			}

	else if ( f.company_name.value=="" )
			{
			alert('Please enter your company name');
			f.company_name.focus();
			return false;
			}

	else if  (f.contact_name.value=="")
			{
			alert('Please enter your company contact name');
			f.contact_name.focus();
			return false;
			}

	else if  (f.addr1.value=="" || f.addr_city=="" || f.addr_postcode=="" )
			{
			alert('Please enter your company address and postcode');
			f.addr1.focus();
			return false;
			}

	else if  (f.telephone.value=="")
			{
			alert('Please enter your telephone number');
			f.telephone.focus();
			return false;
			}

	else if  (f.email.value=="")
			{
			alert('Please enter your email address');
			f.email.focus();
			return false;
			}

	else if  (f.turnoverbandid.value==0)
			{
			alert('Please enter your turnover band');
			f.turnoverbandid.focus();
			return false;
			}

	else if  (f.employeebandid.value==0)
			{
			alert('Please enter your number of employees band');
			f.employeebandid.focus();
			return false;
			}
	else if  (f.hasstreamline.value=="X")
			{
			alert('Please confirm your Streamline details');
			f.hasstreamline.focus();
			return false;
			}

	else if  (f.heardabout.value=="not_stated")
			{
			alert('Please tell us how you heard about the GA');
			f.heardabout.focus();
			return false;
			}

	else if  (f.joinreason.value=="not_stated")
			{
			alert('Please tell us your main reason for joining the GA');
			f.joinreason.focus();
			return false;
			}
	else if  (f.declaration.checked==false)
			{
			alert('Please confirm you have read the Declaration');
			f.declaration.focus();
			return false;
			}

	else
		return true;
		
	}




function ValidatePayment(f)
	{


	if  (f.paymentmethod.value==0)
			{
			alert('Please select your payment method');
			f.paymentmethod.focus();
			return false;
			}


	else
		return true;
		
	}
