/* array for news*/
var news = new Array();
news[0] = "Enrollments are open for EC/CS/IT/ME/IN/EE/CIVIL- GATE 2012 BATCH.";
news[1] = "GATEWAY ACADEMY LAUNCHES WEEKEND BATCHES FOR GATE 2012.";
news[2] = "ADMISSIONS OPEN FOR GATE 2012 BATCH";
news[3] = "<font size='2'><b>OUR SISTER CONCERNS</b></font>";
news[4] = "<b>WQC Institute of NDT and Inspection Technology</b> - <a href='http://www.wqcndtinstitute.com' target='_blank'>www.wqcndtinstitute.com</a>";
news[5] = "-> Admissions started for NDT Coaching";
news[6] = "<b>SCHOOL OF LOGISTICS MANAGEMENT AND TECHNOLOGY</b> - <a href='http://www.slmt.in' target='_blank'>www.slmt.in</a>";
news[7] = "-> Admission started for Diploma, Higher Diploma, Advanced Diploma &";
news[8] = "-> Certificate courses in SHIPPING & TRANSPORTATION";
news[9] = "<b>SCHOOL OF MARKETING AND MANAGEMENT TECHNOLOGY</b>";
news[10] = "-> Higher Diploma, Diploma, Advanced Diploma and Certificate Courses in MARKETING & MANAGEMENT";

function valRegistration()
{
	var name = document.registration.txtName.value;
	var mobile = document.registration.txtMobile.value;
	var landline= document.registration.txtLandline.value
	var email = document.registration.txtEmail.value;
	var address = document.registration.txtAddress.value;
	var college= document.registration.txtCollege.value;
	var passing= document.registration.txtPassing.value;
	var reg=/^([^_\-\.])+([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\.\-])+\.([A-Za-z]{2,4})$/;
	var reg1=/^([0-9]{10,11})$/;
	if(name=="")
	{
		alert("Please Enter your name");
		document.registration.txtName.focus();
	}
	else if(mobile=="")
	{
		alert("Please Enter your Mobile Number");
		document.registration.txtMobile.focus();
	}
	else if(reg1.test(mobile)==false)
	{
		alert("Phone number not valid");
		document.registration.txtMobile.focus();
	}
	else if(landline=="")
	{
		alert("Please Enter your Landline Number");
		document.registration.txtLandline.focus();
	}
	else if(reg1.test(landline)==false)
	{
		alert("Phone number not valid");
		document.registration.txtLandline.focus();
	}
	else if(email=="")
	{
		alert("Please Enter your Email ID");
		document.registration.txtEmail.focus();
	}
	else if(reg.test(email)==false)
	{
		alert("Please Enter Valid EmailID");
		document.registration.txtEmail.focus();
	}
	else if(address=="")
	{
		alert("Please Enter your Address");
		document.registration.txtAddress.focus();
	}
	else if(college=="")
	{
		alert("Please Enter the College");
		document.registration.txtCollege.focus();
	}
	else if(passing=="")
	{
		alert("Please Enter the Year of Passing");
		document.registration.txtPassing.focus();
	}
	else
	{
		document.registration.submit();
	}
}
function valRegistrationclear()
{
	document.registration.reset();
}

function valFeedback()
{
	var name = document.feedback.txtName.value;
	var subject = document.feedback.txtSubject.value;
	var mobile = document.feedback.txtMobile.value;
	var email = document.feedback.txtEmail.value;
	var feedback = document.feedback.txtFeedback.value;
	var reg=/^([^_\-\.])+([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\.\-])+\.([A-Za-z]{2,4})$/;
	var reg1=/^([0-9]{10,11})$/;
	if(name=="")
	{
		alert("Please Enter your name");
		document.feedback.txtName.focus();
	}
	else if(email=="")
	{
		alert("Please Enter your Email ID");
		document.feedback.txtEmail.focus();
	}
	else if(reg.test(email)==false)
	{
		alert("Please Enter Valid EmailID");
		document.feedback.txtEmail.focus();
	}
	else if(mobile=="")
	{
		alert("Please Enter your Mobile Number");
		document.feedback.txtMobile.focus();
	}
	else if(reg1.test(mobile)==false)
	{
		alert("Phone number not valid");
		document.feedback.txtMobile.focus();
	}
	else if(subject=="")
	{
		alert("Please Enter your Subject");
		document.feedback.txtSubject.focus();
	}
	else if(feedback=="")
	{
		alert("Please Enter your Feebback");
		document.feedback.txtSubject.focus();
	}
	else
	{
		document.feedback.submit();
	}
}
		

