var bStatus = false;
 String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
function gotopreview()
{
	location.href="preview.asp";
}
function funcchoice2(disp)
{//var doc =document.forms[0];

	if(disp=="show")
	{
		document.getElementById("div_pgeduc").style.display="";
		document.getElementById("choice2show").style.display="none";
		document.getElementById("choice2hide").style.display="";
		//document.getElementById("saltip1").style.display="";
	}
	else
	{		
		document.getElementById("pgcourse").focus();
		document.getElementById("div_pgeduc").style.display="none";
		document.getElementById("choice2show").style.display="";
		document.getElementById("choice2hide").style.display="none";
		//document.getElementById("saltip1").style.display="none";
		document.getElementById("pgcourse").selectedIndex=0;
		populateSpec('pgcourse','pgspec','pg');
		document.getElementById("pgcourse_type4").checked=true;
		document.getElementById("pgspec1").value="";
		document.getElementById("pginst").selectedIndex=0;
		document.getElementById("pgyear").selectedIndex=0;
	}
}
function funcchoice3(disp)
{
	if(disp=='show')
	{

		document.getElementById("div_ppgeduc").style.display="";
		document.getElementById("choice3show").style.display="none";
		document.getElementById("choice3hide").style.display="";
		location.href="#funcchoicee3";
		document.getElementById("choice2show").style.display="none";
		document.getElementById("choice2hide").style.display="none";

	}
	else
	{
		location.href="#funcchoicee2";
		document.getElementById("div_ppgeduc").style.display="none";
		document.getElementById("choice3show").style.display="";
		document.getElementById("choice3hide").style.display="none";
		document.getElementById("choice2show").style.display="none";
		document.getElementById("choice2hide").style.display="";
		document.getElementById("note").style.display="none";

		
		document.getElementById("ppgcourse").selectedIndex=0;
		populateSpec('ppgcourse','ppgspec','ppg');
		//document.getElementById("ppgcourse_type").selectedIndex=-1;
		document.getElementById("ppgcourse_type4").checked=true;
		document.getElementById("ppgspec1").value="";
		document.getElementById("ppginst").selectedIndex=0;
		document.getElementById("ppgyear").selectedIndex=0;	
	}
}
function undgrad()
{
	var doc=document.getElementById("ugcourse");
	//alert(doc.ugcourse.value);
	if(doc.value==-1)
	{
			document.getElementById("error_ugcourse").innerHTML="<font color='white'>Please Select Your Qualification.</font>";
			document.getElementById("error_ugcourse").style.backgroundColor="red";
			document.getElementById("error_ugcourse").style.display="";
			return false;
	}/*else if(doc.value==9999 && doc.ugcourse1.value.trim()=="")
	{
			document.getElementById("error_ugcourse").innerHTML="<font color='white'>Please Enter Your Qualification, in case of Others.</font>";
			document.getElementById("error_ugcourse").style.backgroundColor="red";
			document.getElementById("error_ugcourse").style.display="";
			return false;
	}*/else
	{
			document.getElementById("error_ugcourse").innerHTML="<font color='white'></font>";
			document.getElementById("error_ugcourse").style.backgroundColor="";
			return true;
	}
	

}
function undgradchange()
{//var doc=document.form1;

	if(document.getElementById("ugcourse").value==9999)
	{
		document.getElementById("ugcourse1").style.display="";
	}else
	{
		if(document.getElementById("ugcourse").value==1)
		{
			document.getElementById("spec1").style.display="none";

			populateSpec('ugcourse','ugspec','ug');
			document.getElementById("ugspec").value="";
		}else
		{
			document.getElementById("spec1").style.display="";
		
		}
		document.getElementById("ugcourse1").style.display="none";
	}

}

function undgradunivchange()
{var doc=document.form1;

	if(doc.uginst.value==9999)
	{
		doc.uginst1.style.display="";
	}else
	{
		doc.uginst1.style.display="none";
	}

}

function undgradspec()
{
		var doc=document.getElementById("ugspec");
	//		if(document.getElementById("div_ppgeduc").style.display=="")
	//{
	if(doc.value==-1)
	{
			document.getElementById("error_ugspec").innerHTML="<font color='white'>Please Select The Specialization of Your Qualification.</font>";
			document.getElementById("error_ugspec").style.backgroundColor="red";
//			document.getElementById("error_ugspec").style.display="";
			return false;
	}else
	{
			document.getElementById("error_ugspec").innerHTML="<font color='white'></font>";
			document.getElementById("error_ugspec").style.backgroundColor="";
			return true;
	}
}

function undgraduniv()
{
	
	var doc=document.form1;
	//alert(doc.ugcourse.value);
	if(doc.uginst.value==-1)
	{
			document.getElementById("error_uginst").innerHTML="<font color='white'>Please Select Your University.</font>";
			document.getElementById("error_uginst").style.backgroundColor="red";
			document.getElementById("error_uginst").style.display="";
			return false;
	}else if(doc.uginst.value==9999 && doc.uginst1.value.trim()=="")
	{
			document.getElementById("error_uginst").innerHTML="<font color='white'>Please Enter Your University, in case of Others.</font>";
			document.getElementById("error_uginst").style.backgroundColor="red";
			document.getElementById("error_uginst").style.display="";
			return false;
	}else
	{
			document.getElementById("error_uginst").innerHTML="<font color='white'></font>";
			document.getElementById("error_uginst").style.backgroundColor="";
			return true;
	}
}
function undgradyear()
{
	var doc=document.form1;
		if(doc.ugyear.value==-1)
	{
			document.getElementById("error_ugyear").innerHTML="<font color='white'>Please Select The Year of Passing of Your Qualification.</font>";
			document.getElementById("error_ugyear").style.backgroundColor="red";
			document.getElementById("error_ugyear").style.display="";
			return false;
	}else
	{
			document.getElementById("error_ugyear").innerHTML="<font color='white'></font>";
			document.getElementById("error_ugyear").style.backgroundColor="";
			return true;
	}
}
//pg validation begins
function pggrad()
{
	var doc=document.form1;
	//alert(doc.ugcourse.value);
	if(doc.pgcourse.value==-1)
	{
			document.getElementById("error_pgcourse").innerHTML="<font color='white'>Please Select Your Qualification.</font>";
			document.getElementById("error_pgcourse").style.backgroundColor="red";
			document.getElementById("error_pgcourse").style.display="";
			return false;
	}else if(doc.pgcourse.value==9999 && doc.pgcourse1.value.trim()=="")
	{
			document.getElementById("error_pgcourse").innerHTML="<font color='white'>Please Enter Your Qualification, in case of Others.</font>";
			document.getElementById("error_pgcourse").style.backgroundColor="red";
			document.getElementById("error_pgcourse").style.display="";
			return false;
	}else
	{
			document.getElementById("error_pgcourse").innerHTML="<font color='white'></font>";
			document.getElementById("error_pgcourse").style.backgroundColor="";
			return true;
	}
	

}
function pggradchange()
{var doc=document.form1;

	if(doc.pgcourse.value==9999)
	{
		doc.pgcourse1.style.display="";
	}else
	{
		doc.pgcourse1.style.display="none";
	}

}

function pggradunivchange()
{var doc=document.form1;

	if(doc.pginst.value==9999)
	{
		doc.pginst1.style.display="";
	}else
	{
		doc.pginst1.style.display="none";
	}

}

function pggradspec()
{
		var doc=document.getElementById("pgspec");
	if(doc.value==-1)
	{
			document.getElementById("error_pgspec").innerHTML="<font color='white'>Please Select The Specialization of Your Qualification.</font>";
			document.getElementById("error_pgspec").style.backgroundColor="red";
			document.getElementById("error_pgspec").style.display="";
			return false;
	}else
	{
			document.getElementById("error_pgspec").innerHTML="<font color='white'></font>";
			document.getElementById("error_pgspec").style.backgroundColor="";
			return true;
	}
}

function pggraduniv()
{
	
	var doc=document.form1;
	//alert(doc.ugcourse.value);
	if(doc.pginst.value==-1)
	{
			document.getElementById("error_pginst").innerHTML="<font color='white'>Please Select Your University.</font>";
			document.getElementById("error_pginst").style.backgroundColor="red";
			document.getElementById("error_pginst").style.display="";
			return false;
	}else if(doc.pginst.value==9999 && doc.pginst1.value.trim()=="")
	{
			document.getElementById("error_pginst").innerHTML="<font color='white'>Please Enter Your University, in case of Others.</font>";
			document.getElementById("error_pginst").style.backgroundColor="red";
			document.getElementById("error_pginst").style.display="";
			return false;
	}else
	{
			document.getElementById("error_pginst").innerHTML="<font color='white'></font>";
			document.getElementById("error_pginst").style.backgroundColor="";
			return true;
	}
}
function pggradyear()
{
	var doc=document.form1;
		if(doc.pgyear.value==-1)
	{
			document.getElementById("error_pgyear").innerHTML="<font color='white'>Please Select The Year of Passing of Your Qualification.</font>";
			document.getElementById("error_pgyear").style.backgroundColor="red";
			document.getElementById("error_pgyear").style.display="";
			return false;
	}else
	{
			document.getElementById("error_pgyear").innerHTML="<font color='white'></font>";
			document.getElementById("error_pgyear").style.backgroundColor="";
			return true;
	}
}
//pg validation ends

//ppg validation begins
function ppggrad()
{
	var doc=document.form1;
	//alert(doc.ugcourse.value);
	if(doc.ppgcourse.value==-1)
	{
			document.getElementById("error_ppgcourse").innerHTML="<font color='white'>Please Select Your Qualification.</font>";
			document.getElementById("error_ppgcourse").style.backgroundColor="red";
			document.getElementById("error_ppgcourse").style.display="";
			return false;
	}else if(doc.ppgcourse.value==9999 && doc.ppgcourse1.value.trim()=="")
	{
			document.getElementById("error_ppgcourse").innerHTML="<font color='white'>Please Enter Your Qualification, in case of Others.</font>";
			document.getElementById("error_ppgcourse").style.backgroundColor="red";
			document.getElementById("error_ppgcourse").style.display="";
			return false;
	}else
	{
			document.getElementById("error_ppgcourse").innerHTML="<font color='white'></font>";
			document.getElementById("error_ppgcourse").style.backgroundColor="";
			return true;
	}
	

}
function ppggradchange()
{var doc=document.form1;

	if(doc.ppgcourse.value==9999)
	{
		doc.ppgcourse1.style.display="";
	}else
	{
		doc.ppgcourse1.style.display="none";
	}

}

function ppggradunivchange()
{var doc=document.form1;

	if(doc.ppginst.value==9999)
	{
		doc.ppginst1.style.display="";
	}else
	{
		doc.ppginst1.style.display="none";
	}

}

function ppggradspec()
{
		var doc=document.form1;
	if(doc.ppgspec.value==-1)
	{
			document.getElementById("error_ppgspec").innerHTML="<font color='white'>Please Select The Specialization of Your Qualification.</font>";
			document.getElementById("error_ppgspec").style.backgroundColor="red";
			document.getElementById("error_ppgspec").style.display="";
			return false;
	}else
	{
			document.getElementById("error_ppgspec").innerHTML="<font color='white'></font>";
			document.getElementById("error_ppgspec").style.backgroundColor="";
			return true;
	}
}

function ppggraduniv()
{
	
	var doc=document.form1;
	//alert(doc.ugcourse.value);
	if(doc.ppginst.value==-1)
	{
			document.getElementById("error_ppginst").innerHTML="<font color='white'>Please Select Your University.</font>";
			document.getElementById("error_ppginst").style.backgroundColor="red";
			document.getElementById("error_ppginst").style.display="";
			return false;
	}else if(doc.ppginst.value==9999 && doc.ppginst1.value.trim()=="")
	{
			document.getElementById("error_ppginst").innerHTML="<font color='white'>Please Enter Your University, in case of Others.</font>";
			document.getElementById("error_ppginst").style.backgroundColor="red";
			document.getElementById("error_ppginst").style.display="";
			return false;
	}else
	{
			document.getElementById("error_ppginst").innerHTML="<font color='white'></font>";
			document.getElementById("error_ppginst").style.backgroundColor="";
			return true;
	}
}
function ppggradyear()
{
	var doc=document.form1;
		if(doc.ppgyear.value==-1)
	{
			document.getElementById("error_ppgyear").innerHTML="<font color='white'>Please Select The Year of Passing of Your Qualification.</font>";
			document.getElementById("error_ppgyear").style.backgroundColor="red";
			document.getElementById("error_ppgyear").style.display="";
			return false;
	}else
	{
			document.getElementById("error_ppgyear").innerHTML="<font color='white'></font>";
			document.getElementById("error_ppgyear").style.backgroundColor="";
			return true;
	}
}
//ppg validation ends


