// --------------------------- Javascript functions and code applied in page user.php --------------------------- 

var toggleEnter = false;

function set_user_focus() {
	with (document.forms.frmRegister) {
		if ((txtUsername.value != "") && (txtFirstName.value == "")) 
		 	txtPassword.focus();
		else
			txtUsername.focus();
		}
	} // function set_user_focus()
	
function submit_me() {
	toggleEnter = true;
	document.forms.frmRegister.submit(); 
	} // function submit_me()

function form_init_js() {
	toggleEnter=false;

	with (document.forms.frmRegister ) {
		txtUsername.value = "";
		txtPassword.value = "";
		txtConfirmPassword.value = "";
		txtFirstName.value = '';
		txtLastName.value = "";
		txtEmailID.value = "";
		txtAddress1.value = "";
		txtAddress2.value = "";
		txtCity.value = "";
		txtState.value = "";
		txtCountry.value = "";
		txtPIN.value = "";
		txtPhOff.value = "";
		txtPhHom.value = "";
		txtPhMob.value = "";
		txtareaQuote.value = "";
		imgMyPic.src  =  "images/photo.gif";
		selGeneral.value = 0;
		selFunctionalLiteracy.value = 0;
		selComputerLiteracy.value = 0;
		selDemocracy.value = 0;
		selSpecialEducation.value = 0;
		selMMEnglish.value = 0;
		selMMSanskrit.value = 0;
		selRenewEnergy.value = 0;
		selWaterMgmt.value = 0;
		selSoilCon.value = 0;
		selGIS.value = 0;
		selMF.value = 0;
		selBC.value = 0;
		selMicroMarkets.value = 0;
		selEcoTourism.value = 0;
		selMobClinic.value = 0;
		selDOTS.value = 0;
		selMedStore.value = 0;
		selNutrition.value = 0;
		hidSaveDelete.value = "";
		}
		
	set_user_focus();
	} // function form_init_js() 
	
function set_hidbutton(myButton) {
//	alert (toggleEnter);
//	alert(myButton);
	if (!toggleEnter) 
		document.forms.frmRegister.hidSaveDelete.value=myButton;
	} // function set_hidbutton(myButton)
	
// --------------------------- Javascript functions and code applied in page user.php --------------------------- 