// JavaScript Document
$(document).ready(function(){
$('div#office_details').hide();
$('#office1').click(function(){
$('#office_details').slideDown("slow");
});
$('#office2').click(function(){
$('#office_details').slideUp("slow");
});
//submit button
$("input[@id='agree']").click(function(){
if($("input[@id='agree']").is(":checked"))
{
$('.button').attr("disabled",false);
}
else
{
$('.button').attr("disabled",true);
}
});




///submission starts
$('#application').submit(function(){

if($('#first_name').val().length<3)
{
	alert("Please enter First Name!");
	$('#first_name').focus();
	return false;
}
else if($('#last_name').val().length<3)
{
	alert("Please enter Last Name!");
	$('#last_name').focus();
	return false;
}
else if($('#email').val()=="" || $('#email').val().length<8 || $('#email').val().indexOf("@")==-1 || $('#email').val().indexOf(".")==-1)
{
	alert("Please enter Email Address!");
	$('#email').focus();
	return false;
}
else if($('#home_address').val().length<5)
{
	alert("Please enter Valid Address!");
	$('#home_address').focus();
	return false;
}
else if($('#home_state').val()=='select')
{
	alert("Please select State!");
	$('#home_state').focus();
	return false;
}
else if($('#home_city').val().length<3)
{
	alert("Please enter City!");
	$('#home_city').focus();
	return false;
}
else if($('#home_area').val().length<3)
{
	alert("Please enter Area/Location!");
	$('#home_area').focus();
	return false;
}
else if($('#home_pincode').val().length<3)
{
	alert("Please enter PinCode!");
	$('#home_pincode').focus();
	return false;
}
else if($('#home_phone').val().length<3)
{
	alert("Please enter Phone No!");
	$('#home_phone').focus();
	return false;
}
else if($('#home_mobile').val().length<3)
{
	alert("Please enter Mobile No!");
	$('#home_mobile').focus();
	return false;
}
else if($('#qualification').val().length<2)
{
	alert("Please enter Educational Qualification!");
	$('#qualification').focus();
	return false;
}
else if($('#institution').val().length<3)
{
	alert("Please enter Institution Name!");
	$('#institution').focus();
	return false;
}

else if($('#year_of_study').val().length<3)
{
	alert("Please enter Year of Study!");
	$('#year_of_study').focus();
	return false;
}
else if($('#education_city').val().length<3)
{
	alert("Please enter City of Education!");
	$('#education_city').focus();
	return false;
}
else if($('#current_occupation').val()=='select')
{
	alert("Please select Current Job Type!");
	$('#current_occupation').focus();
	return false;
}
else if($('#company_dept').val().length<3)
{
	alert("Please enter Company/Department Information!");
	$('#company_dept').focus();
	return false;
}
else if($('#experience').val()=='select')
{
	alert("Please select Experience!");
	$('#experience').focus();
	return false;
}
else if($('#company_address').val().length<3)
{
	alert("Please enter Company Address!");
	$('#company_address').focus();
	return false;
}
else if($('#schools').val().length<1)
{
	alert("Please enter Approx. Schools in your area!");
	$('#schools').focus();
	return false;
}
else if($('#coaching_centers').val().length<1)
{
	alert("Please enter Approx. Coaching Center in your area!");
	$('#coaching_centers').focus();
	return false;
}
else
{
	return true;
}



//submission ends
});
});