function submit_logininfo(val)
{
	document.getElementById("txtWhichApp").value = val
		
	if ( MM_validateLayers() == true)
		postdatatoserver( );
		
}
function postdatatoserver() 
{
	var theform;
	if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) 
	{
		theform = document.forms["form1"];
		//alert("i am in true")
	}
	else {
		//alert("i am here in false")		
		theform = document.form1;
	}
	theform = document.form1;
	//alert(theform)
	theform.__EVENTTARGET.value = 'btnNext'.split("$").join(":");
	theform.__EVENTARGUMENT.value = "";
	theform.submit();
}

function MM_validateLayers() 
{
	//alert("i ammmvalidatelayer")
	var validationsArray = new Array();

	validationsArray[0] = new validation("txtEmailAddress" ,"validateEmail","","Valid Email Address is required");
	//validationsArray[1] = new validation("cmbSecretQuestion" ,"validateCombo","","Please select the secret question");
	//validationsArray[2] = new validation("txtSecretAnswer" ,"validateNotEmpty","","Secret Answer is required");
	validationsArray[1] = new validation("txtPassword^txtConfirmPassword" ,"validatePasswordCompare","","Both Passwords must be same and must have more than 6 characters");
	
	// validControls() return true if any control is invalid, otherwise false			
	if (validateControls (validationsArray) == true )
		return  false ;
	else
		return true ;
}



function selectApplication(strVal)
{
	if(strVal==0)
	{ //Quick Application
		//alert("Quick Application");
		document.getElementById("quickApp").style.display='';
		document.getElementById("tab1").style.display='';
		document.getElementById("tab0").style.display='none';
		document.getElementById("FullApp").style.display='none';
		document.getElementById("ContinueFullApp").style.display='none';
		document.getElementById("ContinueQuickApp").style.display='';
		
		
		
	}
	if(strVal==1)
	{ //Full Application
		//alert("Full Application");
		document.getElementById("quickApp").style.display='none';
		document.getElementById("tab1").style.display='none';
		document.getElementById("tab0").style.display='';
		document.getElementById("FullApp").style.display='';
		document.getElementById("ContinueFullApp").style.display='';
		document.getElementById("ContinueQuickApp").style.display='none';
	}
	if(strVal==3)
	{ //Full Application
		//alert("Full Application");
		document.getElementById("quickApp").style.display='none';
		document.getElementById("tab1").style.display='none';
		document.getElementById("tab0").style.display='';
		document.getElementById("FullApp").style.display='';
		document.getElementById("ContinueFullApp").style.display='';
		document.getElementById("ContinueQuickApp").style.display='none';
		document.getElementById("Image1").src="images/login_12.gif"
		document.getElementById("Image2").src="images/login_14.gif"		
	}
}