
function clearerror()
		{
		str=document.Form1.t1.value;
		if(/^\d+.?\d+%?$/.test(str)==false)
		{
		v3.innerText="   Enter numeric value";
		document.Form1.t1.value="";
		}
		else
		v3.innerText="";
	    }
		function validate()
		{
		if(document.Form1.r1.checked==false&&document.Form1.r2.checked==false)
		v1.innerText="   Please select";
		else if(document.Form1.q1.checked==false&&document.Form1.q2.checked==false&&document.Form1.q3.checked==false&&document.Form1.q4.checked==false)
		v2.innerText="   Please select";
		else if(document.Form1.t1.value=="")
		{v3.innerText="   Please Fill";}
		else
		{
		str=document.Form1.t1.value;
		if(/^\d+.?\d+%?$/.test(str)==false)
		{
		v3.innerText="   Enter numeric value";
		document.Form1.t1.value="";
		}
		}
		}
		function rank(i)
		{
		v2.innerText="";
		v3.innerText="";
		if(document.Form1.q[--i].checked)
		{
		document.Form1.t1.style.visibility="visible";
		document.Form1.t1.disabled=false;
		document.Form1.t1.value="";
	    document.Form1.t1.focus();
		}
		switch(++i)
		{
		case 1:
		{
		
		if(document.Form1.r1.checked==true)
		{
		l1.innerText="Your MET rank: ";
		row2.style.height='20px';
		row3.style.height='0px';
		row4.style.height='0px';
		}
		else 
		{
		l1.innerText="Your CET Rank: ";
		row2.style.height='20px';
		row3.style.height='20px';
		}
		break;
		}
		case 2:
		{
		l1.innerText="Marks Scored(%): ";
	    row2.style.height='20px';
		row3.style.height='20px';
		break;
		}
		case 3:
		{
		
		if(document.Form1.r1.checked==true)
		{
		row2.style.height='20px';
		row3.style.height='0px';
		row4.style.height='0px';
		l1.innerText="Marks Scored(%): ";
		}
		else 
		{
		row2.style.height='20px';
		row3.style.height='20px';
		l1.innerText="Your LEET Rank: ";
		}
		break;
		}
		case 4:
		{
		row2.style.height='20px';
		row3.style.height='20px';
		l1.innerText="Marks Scored(%): ";
		break;
		}
		
		}
		}
		function btech()
		{
		v1.innerText="";
		v2.innerText="";
		v3.innerText="";
		row1.style.height='20px';
		row2.style.height='0px';
		row3.style.height='0px';
		row4.style.height='20px';
		document.Form1.q1.checked=false;
		document.Form1.q2.checked=false;
		document.Form1.q3.checked=false;
		document.Form1.q4.checked=false;
		document.Form1.t1.style.visibility="hidden";
		document.Form1.t1.disabled=true;
		l1.innerText="";
		document.Form1.q1.style.visibility="visible";
		document.Form1.q2.style.visibility="visible";
		document.Form1.q3.style.visibility="visible";
		document.Form1.q4.style.visibility="visible";
		l11.innerText="CET";
		l12.innerText="+2(Non Medical)";
		l13.innerText="LEET";
		l14.innerText="Diploma(Engg.)";
	    document.Form1.dd1.disabled=false;
		document.Form1.dd1.style.visibility="visible";
		document.Form1.dd2.style.visibility="visible";
		document.Form1.dd3.style.visibility="visible";
		l4.style.visibility="visible";
		l3.innerText="Give Preference:";
		}
		function mba()
		{
		v1.innerText="";
		v2.innerText="";
		v3.innerText="";
		row1.style.height='20px';
		row2.style.height='0px';
		row3.style.height='0px';
		row4.style.height='0px';
		document.Form1.q1.checked=false;
		document.Form1.q2.checked=false;
		document.Form1.q3.checked=false;
		document.Form1.q4.checked=false;
		document.Form1.t1.style.visibility="hidden";
		document.Form1.t1.disabled=true;
		l1.innerText="";
		document.Form1.q1.style.visibility="visible";
		document.Form1.q2.style.visibility="hidden";
		document.Form1.q3.style.visibility="visible";
		document.Form1.q4.style.visibility="hidden";
		l11.innerText="MET";
		l12.innerText="";
		l13.innerText="Graduation";
		l14.innerText="";
		l3.innerText="";
		l4.style.visibility="visible";
		document.Form1.dd1.style.visibility="hidden";
		document.Form1.dd2.style.visibility="hidden";
		document.Form1.dd3.style.visibility="hidden";
		document.Form1.dd1.selectedIndex=0;
	    document.Form1.dd1.disabled=true;
		while(document.Form1.dd2.length!=1)
				    {
				     document.Form1.dd2.options[1] = null;
                    }
                     document.Form1.dd2.selectedIndex=0;
					document.Form1.dd2.disabled=true;
				while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
		}
		function populateDD2()
		{
		switch (document.Form1.dd1.selectedIndex)
			{ 
			case 0:
				{
				while(document.Form1.dd2.length!=1)
				    {
				     document.Form1.dd2.options[1] = null;
                    }
                     document.Form1.dd2.selectedIndex=0;
					document.Form1.dd2.disabled=true;
				while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
				break;
				}
				case 1:
				{
				while(document.Form1.dd2.length!=1)
				    {
                    document.Form1.dd2.options[1] = null;
                    }
                     var opt = new Option('CSE', 'CSE');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('ECE', 'ECE');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    document.Form1.dd2.selectedIndex=0;
					document.Form1.dd2.disabled=false;
				while(document.Form1.dd3.length!=1)
				    {
                    document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
                   
                break;
				}
				case 2:
				{
				while(document.Form1.dd2.length!=1)
				    {
                    document.Form1.dd2.options[1] = null;
                    }
                     var opt = new Option('IT', 'IT');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('ECE', 'ECE');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    document.Form1.dd2.selectedIndex=0;
                    document.Form1.dd2.selectedIndex=0;
					document.Form1.dd2.disabled=false;
				while(document.Form1.dd3.length!=1)
				    {
                    document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
                   
					break;
				}
				case 3:
				{
				while(document.Form1.dd2.length!=1)
				    {
                    document.Form1.dd2.options[1] = null;
                    }
                    var opt = new Option('IT', 'IT');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('CSE', 'CSE');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    document.Form1.dd2.selectedIndex=0;
					document.Form1.dd2.disabled=false;
				while(document.Form1.dd3.length!=1)
				    {
				    document.Form1.dd3.options[1] = null;
				    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
                  
                    break;
				}
				case 4:
				{
				while(document.Form1.dd2.length!=1)
				    {
				    document.Form1.dd2.options[1] = null;
                    }
                    var opt = new Option('IT', 'IT');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('CSE', 'CSE');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    var opt = new Option('ECE', 'ECE');
                    document.Form1.dd2.options[document.Form1.dd2.options.length] = opt;
                    document.Form1.dd2.selectedIndex=0;
					document.Form1.dd2.disabled=false;
			    while(document.Form1.dd3.length!=1)
				    {
				    document.Form1.dd3.options[1] = null;
				    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
                 
                    break;
                    }
				}
			}
         function populateDD3()
         {
         document.Form1.Text1.value=document.Form1.dd2.value;
            switch (document.Form1.dd2.options[document.Form1.dd2.selectedIndex].text)
			{
				case "2nd Choice":
				{
					while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=true;
				break;
				}
				case "IT":
				{
					while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=false;
					switch(document.Form1.dd1.options[document.Form1.dd1.selectedIndex].value)
					{
						case "CSE":
						{
							 var opt = new Option('ECE', 'ECE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "ECE":
						{
							var opt = new Option('CSE', 'CSE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "Mech":
						{
							var opt = new Option('CSE', 'CSE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
                    var opt = new Option('ECE', 'ECE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
					
					}
					break;
				}
				case "CSE":
				{
					while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=false;
					switch(document.Form1.dd1.options[document.Form1.dd1.selectedIndex].value)
					{
						case "IT":
						{
							 var opt = new Option('ECE', 'ECE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "ECE":
						{
							 var opt = new Option('IT', 'IT');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							 var opt = new Option('Mech', 'Mech');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "Mech":
						{
							 var opt = new Option('IT', 'IT');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							var opt = new Option('ECE', 'ECE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
				
					}
					break;
				}
				case "ECE":
				{
					while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=false;
					switch(document.Form1.dd1.options[document.Form1.dd1.selectedIndex].value)
					{
						case "IT":
						{
							var opt = new Option('CSE', 'CSE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
                    var opt = new Option('Mech', 'Mech');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "CSE":
						{
							 var opt = new Option('IT', 'IT');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							 var opt = new Option('Mech', 'Mech');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "Mech":
						{
							 var opt = new Option('IT', 'IT');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							var opt = new Option('CSE', 'CSE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
			
					}
					break;
				}
				case "Mech":
				{
					while(document.Form1.dd3.length!=1)
				    {
				     document.Form1.dd3.options[1] = null;
                    }
                    document.Form1.dd3.selectedIndex=0;
					document.Form1.dd3.disabled=false;
					switch(document.Form1.dd1.options[document.Form1.dd1.selectedIndex].value)
					{
						case "IT":
						{
							var opt = new Option('CSE', 'CSE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							var opt = new Option('ECE', 'ECE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "CSE":
						{
							 var opt = new Option('IT', 'IT');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
								var opt = new Option('ECE', 'ECE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
						case "ECE":
						{
							var opt = new Option('IT', 'IT');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
						var opt = new Option('CSE', 'CSE');
                    document.Form1.dd3.options[document.Form1.dd3.options.length] = opt;
							break;
						}
			
					}
					break;
				}
				}
			}	
	