function validateForm()
{
	var obj = document.frmVen;

	if(obj.first_name.value == '' || obj.first_name.value == 'First Name')
	{
		alert("Please enter First Name");
		obj.first_name.focus();
		return;
	}
	if(obj.last_name.value == '' || obj.last_name.value == 'Last Name')
	{
		alert("please enter Last Name");
		obj.last_name.focus();
		return;
	}
	if(obj.email.value == '' || obj.email.value == 'Email')
	{
		alert("please enter Email");
		obj.email.focus();
		return;
	}
	if(obj.file1.value == "" && obj.file2.value == "" && obj.file3.value == "")
	{
		alert("Please select a Photo file");
		obj.file1.focus();
		return;
	}
	if(obj.file1.value != "")
	{
       var imgPat = /^.+(\.(jpg|jpeg|png|gif))$/i;
		if(!imgPat.test(obj.file1.value))
		{
			alert("Please upload only JPG/GIF/PNG image.");
			obj.file1.focus();
			obj.file1.select();
			return;
		}
		if(obj.submission_title1.value == '' || obj.submission_title1.value == 'Title of Submission')
		{
			alert("please enter First Title of Submission");
			obj.submission_title1.focus();
			return;
		}

	}
	if(obj.file2.value != "")
	{
        var imgPat = /^.+(\.(jpg|jpeg|png|gif))$/i;
		if(!imgPat.test(obj.file2.value))
		{
			alert("Please upload only JPG/GIF/PNG image.");
			obj.file2.focus();
			obj.file2.select();
			return;
		}
		if(obj.submission_title2.value == '' || obj.submission_title2.value == 'Title of Submission')
		{
			alert("please enter Second Title of Submission");
			obj.submission_title2.focus();
			return;
		}

	}
	if(obj.file3.value != "")
	{
       var imgPat = /^.+(\.(jpg|jpeg|png|gif))$/i;
		if(!imgPat.test(obj.file3.value))
		{
			alert("Please upload only JPG/GIF/PNG image.");
			obj.file3.focus();
			obj.file3.select();
			return;
		}
		if(obj.submission_title3.value == '' || obj.submission_title3.value == 'Title of Submission')
		{
			alert("please enter Third Title of Submission");
			obj.submission_title3.focus();
			return;
		}

	}

	obj.action = 'index.php';
	$("#loader_image").css('display','block');
	obj.submit();

}
//For File value exchange to textbox

function choose_image_file1()
{

document.getElementById('test_file1').value = document.getElementById('file1').value;
}
function choose_image_file2()
{

document.getElementById('test_file2').value = document.getElementById('file2').value;
}

function choose_image_file3()
{

document.getElementById('test_file3').value = document.getElementById('file3').value;
}



