<!--//

function bookmarkUs()
{
	window.external.AddFavorite('http://www.throughthelens.co.za', 'Karoo Photographers / Laresa Perlman');
}

function showEnlarged(prefix, picUrl) 
{
	window.open(prefix+"display-popup.shtml?"+picUrl, "poppis", "resizable=1,HEIGHT=300,WIDTH=300,Left=20%,Top=20%");
}

function openCourses() 
{
	window.open("courses.shtml", "pop", "resizable=1,HEIGHT=500,WIDTH=500");
}

function openPhotographer() 
{
	window.open("photographer.shtml", "pop", "resizable=1, HEIGHT=500,WIDTH=500");
}

function openOrderPrint() 
{
	window.open("order-print.shtml", "pop", "resizable=1, scrollbars=yes, HEIGHT=800,WIDTH=500");
}

function validateCourses()
{
	
	fv = new formValidator();
	
	if (fv.isEmpty("course_your_name"))
		fv.raiseError("Please fill in your name.");
	
	if (!fv.isEmpty("email"))
	{
		if (!fv.isEmailAddress("email"))
			fv.raiseError("Please provide a valid E-Mail Address.");
	}
	else
		fv.raiseError("Please provide us with your E-Mail Address.");
	
	if (fv.isEmpty("course_your_number"))
		fv.raiseError("Please provide us with a contact number.");
		
	if (!fv.isSelected("course_level"))
		fv.raiseError("Please select a course level.");		
		
	if (fv.isEmpty("course_your_camera"))
		fv.raiseError("Please provide us with your camera make and model.");
		
	if (!fv.isSelected("course_name"))
		fv.raiseError("Please select a course name.");
	
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;	
}

function validatePhotographer()
{
	
	fv = new formValidator();
	
	if (fv.isEmpty("photographer_full_name"))
		fv.raiseError("Please fill in your name.");
	
	if (!fv.isEmpty("email"))
	{
		if (!fv.isEmailAddress("email"))
			fv.raiseError("Please provide a valid E-Mail Address.");
	}
	else
		fv.raiseError("Please provide us with your E-Mail Address.");
	
	if (fv.isEmpty("photographer_your_number"))
		fv.raiseError("Please provide us with a contact number.");
		
	if (fv.isEmpty("photographer_event_type"))
		fv.raiseError("Please provide us with the event type.");		
		
	if (fv.isEmpty("photographer_event_date"))
		fv.raiseError("Please provide us with the event date.");
		
	if (fv.isEmpty("photographer_shoot_venue"))
		fv.raiseError("Please provide us with the shoot venue.");
	
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;	
}

function OrderPrint()
{
	
	fv = new formValidator();
	
	if (fv.isEmpty("your_name"))
		fv.raiseError("Please fill in your name.");
	
	if (!fv.isEmpty("email"))
	{
		if (!fv.isEmailAddress("email"))
			fv.raiseError("Please provide a valid E-Mail Address.");
	}
	else
		fv.raiseError("Please provide us with your E-Mail Address.");
	
	if (fv.isEmpty("your_number"))
		fv.raiseError("Please provide us with a contact number.");
		
	if (fv.isEmpty("postal_address"))
		fv.raiseError("Please provide us with your postal address");		
		
	if (!fv.isSelected("image_ref_no"))
		fv.raiseError("Please select an image reference number.");
		
	if (!fv.isSelected("image_size"))
		fv.raiseError("Please select an image size.");
	
	if (fv.numErrors() > 0)
	{
		fv.displayErrors();
		return false;
	}
	else
		return true;	
}

//-->
