function viewLargeImage(iPhotographerID, iPage, iType)
{
	var w=400
	var h=520
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2
	window.open('/photographers/view_image.asp?photographer_id='+iPhotographerID+'&pg='+iPage+'&type='+iType,'ViewImage','left='+winl+',top='+wint+',width='+w+',height='+h+',toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes')
}
function checkPressDownload()
{
	if (document.pressDownload.user_trade_name.value=='')
	{
		alert("Please enter a Publication / Company Name.")
		document.pressDownload.user_trade_name.focus();
		return false;
	}
	if (document.pressDownload.user_name.value=='')
	{
		alert("Please enter a name.")
		document.pressDownload.user_name.focus();
		return false;
	}
	if (echeck(document.pressDownload.user_email.value)==false)
	{
		alert("Please enter a valid email address.")
		document.pressDownload.user_email.focus();
		return false;
	}	
}
function echeck(str)
{
	var at="@"
	var dot="."
	var lat=str.indexOf(at)
	var lstr=str.length
	var ldot=str.indexOf(dot)
	if (str.indexOf(at)==-1)
	{
	   return false
	}
	if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr)
	{
	   return false
	}
	if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr)
	{
	    return false
	}
	if (str.indexOf(at,(lat+1))!=-1)
	{
	   return false
	}
	if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot)
	{
	   return false
	}
	if (str.indexOf(dot,(lat+2))==-1)
	{
	   return false
	}
	if (str.indexOf(" ")!=-1)
	{
	   return false
	}
 	return true
}
function viewLargePressImage(strFileName)
{
	var w=400
	var h=520
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2
	window.open('view_image.asp?file_name='+strFileName,'ViewImage','left='+winl+',top='+wint+',width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes')
}
function viewLargeRandomImage(strFileName)
{
	var w=400
	var h=520
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2
	window.open('/photographers/view_image_random.asp?file_name='+strFileName,'ViewImage','left='+winl+',top='+wint+',width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes')
}
function checkEmailAFriendForm()
{
	if (document.friendForm.customer_name.value=='')
	{
		alert("Please enter your name.")
		document.friendForm.customer_name.focus();
		return false;
	}	
	if (echeck(document.friendForm.customer_email.value) == false)
	{
		alert("Please enter a valid email address.")
		document.friendForm.customer_email.focus();
		return false;
	}
	if (document.friendForm.friend_name.value=='')
	{
		alert("Please enter your friend's name.")
		document.friendForm.friend_name.focus();
		return false;
	}	
	if (echeck(document.friendForm.friend_email.value) == false)
	{
		alert("Please enter a valid email address.")
		document.friendForm.friend_email.focus();
		return false;
	}		
}
function checkContactForm()
{	
	if (document.contact.first_name.value=='')
	{
		alert("Please enter your first name.")
		document.contact.first_name.focus();
		return false;
	}
	if (document.contact.last_name.value=='')
	{
		alert("Please enter your last name.")
		document.contact.last_name.focus();
		return false;
	}
	if (document.contact.company.value=='')
	{
		alert("Please enter your company.")
		document.contact.company.focus();
		return false;
	}
	if (document.contact.address1.value=='')
	{
		alert("Please enter the first line of your address.")
		document.contact.address1.focus();
		return false;
	}
	if (document.contact.town.value=='')
	{
		alert("Please enter your town.")
		document.contact.town.focus();
		return false;
	}
	if (document.contact.county.value=='')
	{
		alert("Please enter your county.")
		document.contact.county.focus();
		return false;
	}
	if (document.contact.postcode.value=='')
	{
		alert("Please enter your postcode.")
		document.contact.postcode.focus();
		return false;
	}
	if (document.contact.country.value=='')
	{
		alert("Please enter your country.")
		document.contact.country.focus();
		return false;
	}	
	if (!echeck(document.contact.email.value))
	{
		alert("Please enter a valid email address.")
		document.contact.email.focus();
		return false;
	}
	if (document.contact.telephone.value=='')
	{
		alert("Please enter your telephone number.")
		document.contact.telephone.focus();
		return false;
	}
	if (document.contact.enquiry.value=='')
	{
		alert("Please enter your enquiry.")
		document.contact.enquiry.focus();
		return false;
	}
}
function viewLargeSpecificImage(strImageName)
{
	var w=400
	var h=520
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2
	window.open('/venue/view_image.asp?image_name='+strImageName,'ViewImage','left='+winl+',top='+wint+',width='+w+',height='+h+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes')
}
function checkAddressForm()
{	
	if (document.frmAddress.customer_firstname.value=='')
	{
		alert("Please enter your first name.")
		document.frmAddress.customer_firstname.focus();
		return false;
	}
	if (document.frmAddress.customer_lastname.value=='')
	{
		alert("Please enter your last name.")
		document.frmAddress.customer_lastname.focus();
		return false;
	}
	if (document.frmAddress.customer_address1.value=='')
	{
		alert("Please enter the first line of your address.")
		document.frmAddress.customer_address1.focus();
		return false;
	}
	if (document.frmAddress.customer_town.value=='')
	{
		alert("Please enter your town.")
		document.frmAddress.customer_town.focus();
		return false;
	}
	if (document.frmAddress.customer_county.value=='')
	{
		alert("Please enter your county.")
		document.frmAddress.customer_county.focus();
		return false;
	}
	if (document.frmAddress.customer_postcode.value=='')
	{
		alert("Please enter your postcode.")
		document.frmAddress.customer_postcode.focus();
		return false;
	}
	if (document.frmAddress.customer_telephone.value=='')
	{
		alert("Please enter your telephone number.")
		document.frmAddress.customer_telephone.focus();
		return false;
	}
	if (!echeck(document.frmAddress.customer_email.value))
	{
		alert("Please enter a valid email address.")
		document.frmAddress.customer_email.focus();
		return false;
	}
}
function checkPaymentForm()
{	
	if (document.frmPayment.card_number.value=='')
	{
		alert("Please enter your card number.")
		document.frmPayment.card_number.focus();
		return false;
	}
	if (document.frmPayment.card_cvv.value=='')
	{
		alert("Please enter your CV2 number.")
		document.frmPayment.card_cvv.focus();
		return false;
	}
	if (document.frmPayment.card_name.value=='')
	{
		alert("Please enter the name on the card.")
		document.frmPayment.card_name.focus();
		return false;
	}
}