var httpObj = false;
		try {
			  httpObj = new XMLHttpRequest();
		} catch (trymicrosoft) {
		  try {
				httpObj = new ActiveXObject("Msxml2.XMLHTTP");
		  } catch (othermicrosoft) {
			try {
			  httpObj = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (failed) {
			  httpObj = false;
			}
	  }
	}

var httpObj10 = false;
		try {
			  httpObj10 = new XMLHttpRequest();
		} catch (trymicrosoft) {
		  try {
			  httpObj10 = new ActiveXObject("Msxml2.XMLHTTP");
		  } catch (othermicrosoft) {
			try {
			  httpObj10 = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (failed) {
			  httpObj10 = false;
			}
	  }
	}

var httpObjClient = false;
		try {
			  httpObjClient = new XMLHttpRequest();
		} catch (trymicrosoft) {
		  try {
			  httpObjClient = new ActiveXObject("Msxml2.XMLHTTP");
		  } catch (othermicrosoft) {
			try {
			  httpObjClient = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (failed) {
			  httpObjClient = false;
			}
	  }
	}

var CityName = new Array('Ahmedabad','Bangalore','Bhopal','Bhubaneswar','Calicut','Chandigarh','Chennai','Cochin','Coimbatore','Delhi','Ernakulam','Faridabad','Ghaziabad','Guntur','Gurgaon','Guwahati','Hyderabad','Indore','Jaipur','Kannur','Kanpur','Kolkata','Kottayam','Lucknow','Ludhiana','Madurai','Malapuram','Mangalore','Mumbai','Mysore','Nagpur','Nashik','Navi Mumbai','Noida','Palghat','Patna','Pune','Rajkot','Salem','Secunderabad','Surat','Thane','Thrissur','Tiruchy','Trivandrum','Vadodara','Vijayawada','Vishakhapatnam','Warangal');

function DisplayError(Message){
	document.getElementById("newerror").style.display = "block";
	document.getElementById("newerror").innerHTML = '<p style="margin:0 auto; color:#000000;">' + Message + '</p>';
}

function DisplayError2(Message){
	document.getElementById("newerror1").style.display = "block";
	document.getElementById("newerror1").innerHTML = '<p style="margin:0 auto; color:#000000;">' + Message + '</p>';
}

function HideError(){ 
	document.getElementById("newerror").innerHTML = '';
	document.getElementById("newerror").style.display = "none";
}


function HideError2(){ 
	document.getElementById("newerror1").innerHTML = '';
	document.getElementById("newerror1").style.display = "none";
}

function DisplayError1(Message,DivName){
	document.getElementById(DivName).style.display = "block";
	document.getElementById(DivName).innerHTML = '<p style="margin:0 auto; color:#000000;">' + Message + '</p>';
}

function HideError1(DivName){
	document.getElementById(DivName).innerHTML = '';
	document.getElementById(DivName).style.display = "none";
}

function ShowCross(name){
		if(name=='city1'){
			document['city1'].src = urlpath + "images/delete.png";
			document.getElementById('othercity').className = "new_form_feild_error";			
		}else if(name=='day' || name=='month' || name=='year'){
			document['year'].src = urlpath + "images/delete.png";
			document.getElementById(name).className = "new_form_feild_error";		
		}else if(name == 'agreement'){
			document[name].src = urlpath + "images/delete.png";			  
		}else{   
             document.getElementById(name).className = "new_form_feild_error";	
			 document[name].src = urlpath + "images/delete.png";
		}
}

function RemoveCross(name){
	if(name=='city1'){ 
		document['city1'].src = urlpath + "images/accept.png";
		document.getElementById('othercity').className = "new_form_feild";	
	}else if(name=='day' || name=='month' || name=='year'){
		document['year'].src = urlpath + "images/accept.png";
		document.getElementById(name).className = "new_select_feild";	
	}else{
		document[name].src = urlpath + "images/accept.png";
		document.getElementById(name).className = "new_form_feild";	
	}
}

function SetValue(value){
	document.getElementById("seterror").value = value;
}

function GetInputName(name){
	if(name=="f_name"){ 
		document['l_name'].src = urlpath + "images/blank.gif";
		document.getElementById(name).className= "new_form_feild";
	}else if(name=="day" || name=="month" || name=="year"){
		document['year'].src = urlpath + "images/blank.gif";
		document.getElementById(name).className= "new_select_feild";
	}else if(name=="maritalstatus"){
		document['gender'].src = urlpath + "images/blank.gif";
		document.getElementById(name).className= "new_select_feild";
	}else{ 
		document[name].src = urlpath + "images/blank.gif";
		document.getElementById(name).className= "new_form_feild";
	}
}




















function Checkblankfield(name){
	
	if(document.getElementById('city').value != 'Other'){ 
	var field = new Array('f_name','l_name','email','mobile','city','day','month','year','gender','maritalstatus','username','user_pass');
	}else{ 
    var field = new Array('f_name','l_name','email','mobile','city','othercity','day','month','year','gender','maritalstatus','username','user_pass');
	}

    GetInputName(name);
	
		for( var i =0 ; i<field.length ; i++) { 

					if(field[i] == name) {
						break;
					}else{
							var value = trim(document.getElementById(field[i]).value); 
							if(value == '') { 
									if(field[i]=="f_name"){ 
									document['l_name'].src = urlpath + "images/delete.png";
									document.getElementById(field[i]).className = "new_form_feild_error";	
									return false;
									}else if(field[i] == "month" || field[i] == "day" || field[i] == "year"){
										document['year'].src = urlpath + "images/delete.png";
										document.getElementById(field[i]).className = "new_form_feild_error";	
										return false;
									}else if(field[i]=="maritalstatus"){ 
										document['gender'].src = urlpath + "images/delete.png";
										document.getElementById(field[i]).className = "new_form_feild_error";	
										return false;
									}else{		
									ShowCross(field[i]);
									return false;
									}
						   }else if(value == '--Enter a city--'){
							   document['city1'].src = urlpath + "images/delete.png";
							   document.getElementById(field[i]).className = "new_form_feild_error";
							   return false;
						  }
				}
		}
}

function CheckFirstName(){ 

	var FirstNameValue = trim(document.getElementById("f_name").value);
	var value = NameValidity(FirstNameValue);
	document.getElementById("f_name").value = trim(CapitalizeMe(FirstNameValue));
	
	
	if(FirstNameValue == ''){	
		return false;
	}else if(value){
		document['l_name'].src = urlpath + "images/delete.png";
		document.getElementById("f_name").className= "new_form_feild_error";
		DisplayError(value);
		return false;
	}else{
		if(FirstNameValue != ''){
			document['l_name'].src = urlpath + "images/blank.gif";
			document.getElementById("f_name").className= "new_form_feild";
			HideError();
			return true;
		}
	}
}

function CheckLastName(){ 
	
	var LastNameValue = trim(document.getElementById("l_name").value);
	var value = NameValidity(LastNameValue);
	document.getElementById("l_name").value = trim(CapitalizeMe(LastNameValue));
	
	if(LastNameValue == ''){	
		return false;
	}else if(value){
		ShowCross('l_name');
		DisplayError(value);
		return false;
	}else{ 
		if(LastNameValue != ''){
			if(CheckFirstName()){
				document['l_name'].src = urlpath + "images/accept.png";
				document.getElementById('l_name').className= "new_form_feild";
				HideError();
				return true;
			}
		}
	}
}

function CheckEmail(){
	if(!EmailValidationonblur()) return false;
	else return true;
}

function EmailValidationonblur(){

	var EmailValue = trim(document.getElementById("email").value);
	var value = EmailValidity(EmailValue);
	
	if(EmailValue == ''){
		document.getElementById("mobile").focus();
		return false;
	}else if(value) {
		ShowCross('email');
		DisplayError(value);
		document.getElementById("mobile").focus();
		return false;
	}else{
		EmailDataBaseValidationonblur();
		document.getElementById("mobile").focus();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}

function EmailDataBaseValidationonblur(){

var url = urlpath+"CheckEmailTest.php?email="+trim(document.getElementById("email").value);
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==4){
			if(httpObj.responseText == '--1--'){
				ShowCross('email');
				DisplayError('Email is already registered. <a href="http://youmint.com/login">Log-in</a>.');
				SetValue(httpObj.responseText);
			}else if(httpObj.responseText == '--2--'){
				ShowCross('email');
				DisplayError('Email address seems to be incorrect.');
				SetValue(httpObj.responseText);
			}else{
				RemoveCross('email');
				HideError();
				SetValue(0);
			}
		}
	}
	httpObj.send(null);
}

function CheckMobile(){
	if(!MobileValidationonblur()) return false;
	else return true;
}


function MobileValidationonblur() {
	var MobileValue = trim(document.getElementById('mobile').value);
	var value = MobileValidity(MobileValue);
	if(MobileValue == ''){
		return false;
	}else if(value){
		DisplayError(value);
		ShowCross('mobile');
		return false;
	}else{
		MobileDataBaseValidationonblur();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;

}

function MobileDataBaseValidationonblur() {
	var url = urlpath+"CheckMobileTest.php?mobile="+trim(document.getElementById('mobile').value);
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==4){
			if(httpObj.responseText == '--1--'){
				ShowCross('mobile');
				DisplayError('Mobile is already registered. <a href="http://youmint.com/login">Log-in</a>.');
				SetValue(httpObj.responseText);
			}else if(httpObj.responseText == '--2--'){
				ShowCross('mobile');
				DisplayError('Mobile is blocked. Contact Support.');
				SetValue(httpObj.responseText);
			}else{
				RemoveCross('mobile');
				HideError();
				SetValue(0);
			}
		}
	}
	httpObj.send(null);
}

function CheckNriMobile(){
	if(!NriMobileValidationonblur()) return false;
	else return true;
}

function NriMobileValidationonblur(){
	var MobileValue = trim(document.getElementById('mobile').value);
	var value = MobileValidityNRI(MobileValue);
	
	if(MobileValue == ''){
		return false;
	}else if(value){
		DisplayError(value);
		ShowCross('mobile');		
		return false;
	}else{
		MobileDataBaseValidationonblur();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}

function CheckCountry(name){
	if(name == "country" || name == "city" || name == "gender" || name == "maritalstatus"){
		if(document.getElementById(name).value == '')
		{
			//ShowCross(name);
			return false;
		}
		if(document.getElementById(name).value != '')
		{
			RemoveCross(name);
			HideError();
			return true;
		}
	}
}

function CallCityValue(value){
	if(value=='Other'){
		var rishi = ': <select name="city" id="city" class="new_select_feild" onfocus="javascript:Checkblankfield(\'city\');" onchange="javascript:ChanageCityOnSelection(this.value);" style=" width:110px; font-family:lucida grande, tahoma, verdana, arial, sans-serif; font-size:11px; border:1px solid #a1a1a1;">';
	}else{
		var rishi = ': <select name="city" id="city" class="new_select_feild" onfocus="javascript:Checkblankfield(\'city\');" onBlur="javascript:CheckCountry(this.name);" onchange="javascript:ChanageCityOnSelection(this.value);" style=" width:220px; font-family:lucida grande, tahoma, verdana, arial, sans-serif; font-size:11px; border:1px solid #a1a1a1; ">';
	}
	for(i=0;i<CityName.length;i++){
		if(CityName[i]==value)
			rishi = rishi + '<option value="'+CityName[i]+'" selected>'+CityName[i]+'</option>';
		else
			rishi = rishi + '<option value="'+CityName[i]+'">'+CityName[i]+'</option>';
	}
	if(value=='Other'){
		rishi = rishi + '<option value="Other" selected>Other City</option>';
		rishi = rishi + '</select>&nbsp;<input name="othercity" id="othercity" type="text" class="new_form_feild" style="width:97px;" onfocus="Checkblankfield(\'city\'); ClearCity();" onBlur="SetOtherCity();" value="--Enter a city--"/><img width="16" height="16" name="city1" src="'+urlpath+'images/blank.gif" alt="" style="margin:0px 0px 4px 5px; vertical-align:middle;"/>';
	}
	else{
		rishi = rishi + '<option value="Other">Other City</option>';
		rishi = rishi + '</select><img width="16" height="16" name="city" src="'+urlpath+'images/blank.gif" alt="" style="margin:0px 0px 4px 4px; vertical-align:middle;"/>';
	}
	return rishi;
}	

function ClearCity(){
	if(document.getElementById("othercity").value=='--Enter a city--')
	   document.getElementById("othercity").value="";
	   document['city1'].src = urlpath + "images/blank.gif";
	   document.getElementById('othercity').className= "new_form_feild";
}

function SetCityValue(divName,setcity){
	document.getElementById(divName).innerHTML = setcity;
}

function ChanageCityOnSelection(value){
	if(value!='Other'){
		setcity = CallCityValue(value);
		document.getElementById("show_other_city").style.display = "none";
		document.getElementById("show_city").style.display = "block";
		SetCityValue('show_city',setcity);
		document.getElementById('city').focus();
	}else{
		setcity = CallCityValue(value);
		document.getElementById("show_city").style.display = "none";
		document.getElementById("show_other_city").style.display = "block";
		SetCityValue('show_other_city',setcity);
		document.getElementById('othercity').focus();
	}
}

function OpenCountryList(){
	document.getElementById('ReportBug5').style.display = 'block';
	document.getElementById('mask_div').style.visibility = 'visible';
	document.getElementById('mask_div').className = 'mask_feedback';

	var url = urlpath+"country.html";
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==1 || httpObj.readyState==2 || httpObj.readyState==3){
			//document.getElementById('LoadCountryLoadingDiv').style.display = "block";
		}
		if(httpObj.readyState==4){
			document.getElementById('LoadCountryList').innerHTML = httpObj.responseText;
		}
	}
	httpObj.send(null);
}

function CloseCountryList(){
	document.getElementById('ReportBug5').style.display = 'none';
	document.getElementById('mask_div').style.visibility = 'hidden';
}

function SetOtherCity(){
	if(document.getElementById("othercity").value=="")
		document.getElementById("othercity").value="--Enter a city--";
		
		var CityValue = document.getElementById('othercity').value;
		var value = CityValidity(CityValue);
		
		if(CityValue == '' || CityValue=='--Enter a city--'){
			return false;
		}else if(value){
			ShowCross('city1');
			DisplayError(value);
			return false;
		}else{
			RemoveCross('city1');
			return true;
		}
	return true;
}

function CheckCity(){
	if(document.getElementById("city").value==''){
		return false;	
	}else if(document.getElementById("city").value=='Other'){
		if(!SetOtherCity()) return false;
		else return true;
	}else
		return true;
}

function CheckDob(name){ 	
		if(name == "month"||name == "day"||name == "year"){
			if(document.getElementById(name).value == ''){ 
				return false;
			}
			if(document.getElementById(name).value != ''){ 
				if(document.getElementById('day').value!='' || document.getElementById('month').value!='' || document.getElementById('year').value!=''){
					if(!CheckDate()){
						return false;
					}else{
						return true;
					}
				}else{
					if(name=="year" && document.getElementById('month').value!='' && document.getElementById('day').value!=''){
						document['year'].src = urlpath + "images/accept.png";
						RemoveCross(name);
					}
					if(name=="month" && document.getElementById('year').value!='' && document.getElementById('day').value!=''){
						document['year'].src = urlpath + "images/accept.png";
                        RemoveCross(name);
					}
					if(name=="day" && document.getElementById('month').value!='' && document.getElementById('year').value!=''){
						document['year'].src = urlpath + "images/accept.png";
                        RemoveCross(name);
					}
						document.getElementById(name).border = "1px solid #a1a1a1";
						document.getElementById(name).style.background = "#ffffff";
						document.getElementById("error").innerHTML = '';
						document.getElementById("error").style.display = "none";
						return true;
				}
			}
		}
}

function CheckDate(){
	var Day = document.getElementById("day").value;
	var Month = document.getElementById("month").value;
	var Year = document.getElementById("year").value;
	var Dob = Year+"-"+Month+"-"+Day;

	age = qryHowOld(new Date(), Month + '/' + Day + '/' + Year );

		if(age.indexOf('Year') != -1) {
			age_count = age.substring( 0, age.indexOf('Year') );
			age_count = parseInt(age_count);
			if(age_count < 18) {
				ShowCross('year');
				DisplayError("Your age must be 18+ to join!");
				return false;
			}else{
				RemoveCross('year');
				HideError();
			    return true;
			}
		}
}

function qryHowOld(varAsOfDate, varBirthDate)
{
	var dtAsOfDate;
	var dtBirth;
	var dtAnniversary;
	var intSpan;
	var intYears;
	var intMonths;
	var intWeeks;
	var intDays;
	var intHours;
	var intMinutes;
	var intSeconds;
	var strHowOld;

	// get born date
	dtBirth = new Date(varBirthDate);

	// get as of date
	dtAsOfDate = new Date(varAsOfDate);

	// if as of date is on or after born date
	if ( dtAsOfDate >= dtBirth )
	{

		// get time span between as of time and birth time
		intSpan = ( dtAsOfDate.getUTCHours() * 3600000 +
		dtAsOfDate.getUTCMinutes() * 60000 +
		dtAsOfDate.getUTCSeconds() * 1000    ) -
		( dtBirth.getUTCHours() * 3600000 +
		dtBirth.getUTCMinutes() * 60000 +
		dtBirth.getUTCSeconds() * 1000       )

		// start at as of date and look backwards for anniversary

		// if as of day (date) is after birth day (date) or
		//    as of day (date) is birth day (date) and
		//    as of time is on or after birth time
		if ( dtAsOfDate.getUTCDate() > dtBirth.getUTCDate() ||
		( dtAsOfDate.getUTCDate() == dtBirth.getUTCDate() && intSpan >= 0 ) )
		{

			// most recent day (date) anniversary is in as of month
			dtAnniversary =
			new Date( Date.UTC( dtAsOfDate.getUTCFullYear(),
			dtAsOfDate.getUTCMonth(),
			dtBirth.getUTCDate(),
			dtBirth.getUTCHours(),
			dtBirth.getUTCMinutes(),
			dtBirth.getUTCSeconds() ) );

		}

		// if as of day (date) is before birth day (date) or
		//    as of day (date) is birth day (date) and
		//    as of time is before birth time
		else
		{

			// most recent day (date) anniversary is in month before as of month
			dtAnniversary =
			new Date( Date.UTC( dtAsOfDate.getUTCFullYear(),
			dtAsOfDate.getUTCMonth() - 1,
			dtBirth.getUTCDate(),
			dtBirth.getUTCHours(),
			dtBirth.getUTCMinutes(),
			dtBirth.getUTCSeconds() ) );

			// get previous month
			intMonths = dtAsOfDate.getUTCMonth() - 1;
			if ( intMonths == -1 )
			intMonths = 11;

			// while month is not what it is supposed to be (it will be higher)
			while ( dtAnniversary.getUTCMonth() != intMonths )

			// move back one day
			dtAnniversary.setUTCDate( dtAnniversary.getUTCDate() - 1 );

		}

		// if anniversary month is on or after birth month
		if ( dtAnniversary.getUTCMonth() >= dtBirth.getUTCMonth() )
		{

			// months elapsed is anniversary month - birth month
			intMonths = dtAnniversary.getUTCMonth() - dtBirth.getUTCMonth();

			// years elapsed is anniversary year - birth year
			intYears = dtAnniversary.getUTCFullYear() - dtBirth.getUTCFullYear();

		}

		// if birth month is after anniversary month
		else
		{

			// months elapsed is months left in birth year + anniversary month
			intMonths = (11 - dtBirth.getUTCMonth()) + dtAnniversary.getUTCMonth() + 1;

			// years elapsed is year before anniversary year - birth year
			intYears = (dtAnniversary.getUTCFullYear() - 1) - dtBirth.getUTCFullYear();

		}

		// to calculate weeks, days, hours, minutes and seconds
		// we can take the difference from anniversary date and as of date

		// get time span between two dates in milliseconds
		intSpan = dtAsOfDate - dtAnniversary;

		// get number of weeks
		intWeeks = Math.floor(intSpan / 604800000);

		// subtract weeks from time span
		intSpan = intSpan - (intWeeks * 604800000);

		// get number of days
		intDays = Math.floor(intSpan / 86400000);

		// subtract days from time span
		intSpan = intSpan - (intDays * 86400000);

		// get number of hours
		intHours = Math.floor(intSpan / 3600000);

		// subtract hours from time span
		intSpan = intSpan - (intHours * 3600000);

		// get number of minutes
		intMinutes = Math.floor(intSpan / 60000);

		// subtract minutes from time span
		intSpan = intSpan - (intMinutes * 60000);

		// get number of seconds
		intSeconds = Math.floor(intSpan / 1000);

		// create output string
		if ( intYears > 0 )
		if ( intYears > 1 )
		strHowOld = intYears.toString() + ' Years';
		else
		strHowOld = intYears.toString() + ' Year';
		else
		strHowOld = '';

		if ( intMonths > 0 )
		if ( intMonths > 1 )
		strHowOld = strHowOld + ' ' + intMonths.toString() + ' Months';
		else
		strHowOld = strHowOld + ' ' + intMonths.toString() + ' Month';

		if ( intWeeks > 0 )
		if ( intWeeks > 1 )
		strHowOld = strHowOld + ' ' + intWeeks.toString() + ' Weeks';
		else
		strHowOld = strHowOld + ' ' + intWeeks.toString() + ' Week';

		if ( intDays > 0 )
		if ( intDays > 1 )
		strHowOld = strHowOld + ' ' + intDays.toString() + ' Days';
		else
		strHowOld = strHowOld + ' ' + intDays.toString() + ' Day';

		if ( intHours > 0 )
		if ( intHours > 1 )
		strHowOld = strHowOld + ' ' + intHours.toString() + ' Hours';
		else
		strHowOld = strHowOld + ' ' + intHours.toString() + ' Hour';

		if ( intMinutes > 0 )
		if ( intMinutes > 1 )
		strHowOld = strHowOld + ' ' + intMinutes.toString() + ' Minutes';
		else
		strHowOld = strHowOld + ' ' + intMinutes.toString() + ' Minute';

		if ( intSeconds > 0 )
		if ( intSeconds > 1 )
		strHowOld = strHowOld + ' ' + intSeconds.toString() + ' Seconds';
		else
		strHowOld = strHowOld + ' ' + intSeconds.toString() + ' Second';

	}
	else
	strHowOld = 'Not Born Yet'

	// return string representation
	return strHowOld
}

function CheckSexStatus(name){
		if(name == "gender"||name == "maritalstatus"){
			if(document.getElementById(name).value == ''){
				return false;
			}
			if(document.getElementById(name).value != ''){
				if(name=="maritalstatus" && document.getElementById('gender').value!='' ){
					document['gender'].src = urlpath + "images/accept.png";					
				}
				if(name=="gender" && document.getElementById('maritalstatus').value!=''){
					document['gender'].src = urlpath + "images/accept.png";
				}				
				document.getElementById(name).border = "1px solid #a1a1a1";
				document.getElementById(name).style.background = "#ffffff";
				document.getElementById("newerror").innerHTML = '';
				document.getElementById("newerror").style.display = "none";
				return true;
			}
		}
}

function CheckUserName(){
	if(!UserNameValidationonblur()){
		return false;
	}else{ 
		return true;
	}
}

function UserNameValidationonblur(){
	var UserNameValue = trim(document.getElementById("username").value);
	var value = UserNameValidity(UserNameValue);
	if(UserNameValue == ''){
		return false;
	}else if(value) {
		ShowCross('username');
		DisplayError(value);
		return false;	
	}else{
		UserNameDataBaseValidationonblur();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}

function UserNameDataBaseValidationonblur() {
	var url = urlpath+"CheckUserNameTest.php?username="+trim(document.getElementById("username").value);
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==4){
			if(httpObj.responseText=='--1--'){
				ShowCross('username');
				DisplayError('Username is already registered. <a href="http://youmint.com/login">Log-in</a>.');
				SetValue(httpObj.responseText);
			}else if(httpObj.responseText=='--2--'){
				ShowCross('username');
				DisplayError('Username is blocked. Contact Support.');
				SetValue(httpObj.responseText);
			}else{
				RemoveCross('username');
				HideError();
				SetValue(0);
			}
		}
	}
	httpObj.send(null);
}

function gotoRegStep2(){
	
	if(!Checkblankfieldonsubmit()) return false;
	else if(!CheckFirstName()) return false;
	else if(!CheckLastName()) return false;
	else if(!EmailValidation()) return false;
	else if(!MobileValidation()) return false;
	else if(!CheckCity()) return false; 
	else if(!CheckCountry("city")) return false;
	else if(!CheckDob("day")) return false;
	else if(!CheckDob("month")) return false;
	else if(!CheckDob("year")) return false;
	else if(!CheckSexStatus("gender")) return false;
	else if(!CheckSexStatus("maritalstatus")) return false;
	else if(!UserNameValidation()) return false;
	else if(!CheckPassword()) return false;
	else if(!CheckTC("agreement")) return false;
	else{
	document.getElementById('ymregisterbutton').className = 'green_gradiant_disabled';
	document.getElementById('ymregisterloadingimage').style.display = 'block';
	return true;
	}
}

function Checkblankfieldonsubmit(){ 
    if(document.getElementById('city').value != 'Other'){ 
	var field = new Array('f_name','l_name','email','mobile','city','day','month','year','gender','maritalstatus','username','user_pass');
	}else{ 
    var field = new Array('f_name','l_name','email','mobile','city','othercity','day','month','year','gender','maritalstatus','username','user_pass');
	}

    for( var i =0 ; i<field.length ; i++) { 

		var value = trim(document.getElementById(field[i]).value); 
		if(value == '') { 
				if(field[i]=="f_name"){
				document['l_name'].src = urlpath + "images/delete.png";
				document.getElementById(field[i]).className = "new_form_feild_error";	
				return false;
				}else if(field[i] == "month" || field[i] == "day" || field[i] == "year"){
					document['year'].src = urlpath + "images/delete.png";
					document.getElementById(field[i]).className = "new_form_feild_error";	
					return false;
				}else if(field[i]=="maritalstatus"){
					document['gender'].src = urlpath + "images/delete.png";
					document.getElementById(field[i]).className = "new_form_feild_error";	
					return false;
				}else{		
				    ShowCross(field[i]);
				     return false;
				}
	   }else if(value == '--Enter a city--'){
			       document['city1'].src = urlpath + "images/delete.png";
				   document.getElementById(field[i]).className = "new_form_feild_error";
                   return false;
       }       
	}
	
	return true;
}

function EmailValidation(){
	var EmailValue = trim(document.getElementById("email").value);
	var value = EmailValidity(EmailValue);
	
	if(EmailValue == ''){
		return false;
	}else if(value) {
		ShowCross('email');
		DisplayError(value);
		return false;
	}else{
		EmailDataBaseValidation();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}

function EmailDataBaseValidation(){
	var url = urlpath+"CheckEmailTest.php?email="+trim(document.getElementById("email").value);
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==4){
			if(httpObj.responseText == '--1--'){
				ShowCross('email');
				DisplayError('Email is already registered. <a href="http://youmint.com/login">Log-in</a>.');
				SetValue(httpObj.responseText);
			}else if(httpObj.responseText == '--2--'){
				ShowCross('email');
				DisplayError('Email address seems to be incorrect.');
				SetValue(httpObj.responseText);
			}else{
				RemoveCross('email');
				SetValue(0);
			}
		}
	}
	httpObj.send(null);
}

function MobileValidation(){
	var MobileValue = trim(document.getElementById('mobile').value);
	var value = MobileValidity(MobileValue);
	if(MobileValue == ''){
		return false;
	}else if(value){
		DisplayError(value);
		ShowCross('mobile');		

		return false;
	}else{
		MobileDataBaseValidation();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}

function MobileDataBaseValidation(){
	var url = urlpath+"CheckMobileTest.php?mobile="+trim(document.getElementById('mobile').value);
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==4){
			if(httpObj.responseText == '--1--'){
				ShowCross('mobile');
				DisplayError('Mobile is already registered. <a href="http://youmint.com/login">Log-in</a>.');
				SetValue(httpObj.responseText);
			}else if(httpObj.responseText == '--2--'){
				ShowCross('mobile');
				DisplayError('Mobile is blocked. Contact Support.');
				SetValue(httpObj.responseText);
			}else{
				RemoveCross('mobile');
				SetValue(0);
			}
		}
	}
	httpObj.send(null);
}

function UserNameValidation(){
	var UserNameValue = trim(document.getElementById("username").value);
	var value = UserNameValidity(UserNameValue);
	if(UserNameValue == ''){
		return false;
	}else if(value) {
		ShowCross('username');
		DisplayError(value);
		return false;	
	}else{
		UserNameDataBaseValidation();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}

function UserNameDataBaseValidation(){
	var url = urlpath+"CheckUserNameTest.php?username="+trim(document.getElementById("username").value);
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==4){
			if(httpObj.responseText=='--1--'){
				ShowCross('username');
				DisplayError('Username is already registered. <a href="http://youmint.com/login">Log-in</a>.');
				SetValue(httpObj.responseText);
			}else if(httpObj.responseText=='--2--'){
				ShowCross('username');
				DisplayError('Username is blocked. Contact Support.');
				SetValue(httpObj.responseText);
			}else{
				RemoveCross('username');
				SetValue(0);
			}
		}
	}
	httpObj.send(null);
}

function CheckPassword(){	
	var PasswordValue = trim(document.getElementById("user_pass").value);
	var value = inValidPassword(PasswordValue);
	var status = 0;

	if(PasswordValue==''){
		ShowCross('user_pass');
	}else if(value){ 
		ShowCross('user_pass');
		DisplayError(value);			
		status = 1;
	}else{
		if(PasswordValue != ''){
			RemoveCross('user_pass');
			HideError();
		}
	}

	if(PasswordValue=='' || status==1){ 			
		return false;
	}else{
		return true;
	}
}

function CheckTC(){
	if(document.getElementById("agreement").checked == false){
			ShowCross('agreement');
			return false;
	}else{
			RemoveCross('agreement');
			return true;			
	}
}


function gotoNriRegStep2(){	
	if(!Checkblankfieldonsubmit()) return false;
	else if(!CheckFirstName()) return false;
	else if(!CheckLastName()) return false;
	else if(!EmailValidation()) return false;
	else if(!NriMobileValidation()) return false;
	else if(!CheckCity()) return false;
	else if(!CheckCountry("city")) return false;
	else if(!CheckDob("day")) return false;
	else if(!CheckDob("month")) return false;
	else if(!CheckDob("year")) return false;
	else if(!CheckSexStatus("gender")) return false;
	else if(!CheckSexStatus("maritalstatus")) return false;
	else if(!UserNameValidation()) return false;
	else if(!CheckPassword()) return false;
	else if(!CheckTC("agreement")) return false;
	else{
		document.getElementById('ymregisterbutton').className = 'green_gradiant_disabled';
		document.getElementById('ymregisterloadingimage').style.display = 'block';	
		return true;
	}
}

function NriMobileValidation(){
	var MobileValue = trim(document.getElementById('mobile').value);
	var value = MobileValidityNRI(MobileValue);
	
	if(MobileValue == ''){
		return false;
	}else if(value){
		DisplayError(value);
		ShowCross('mobile');		
		return false;
	}else{
		MobileDataBaseValidation();
		if(document.getElementById("seterror").value=='--1--')	
			return false;
		else if(document.getElementById("seterror").value=='--2--')	
			return false;
	}
	return true;
}















































































function CheckPasswordEmpty(){
	var PasswordValue = trim(document.getElementById("user_pass").value);
	if(PasswordValue==''){
			ShowCross('user_pass');
			return false;
		}
	return true;
}

function CheckPasswordValue(){
    var PasswordValue = trim(document.getElementById("user_pass").value);
	var value = inValidPassword(PasswordValue);

	if(value){ 
	   ShowCross('user_pass');	  
	   DisplayError2(value);		
	   return false;
	}else{
	   RemoveCross('user_pass');
	   HideError2();
	}
	return true;
}

function CheckDob12(name){
	
	if(name == "month"||name == "day"||name == "year"){
		if(document.getElementById(name).value == '')
		{
			//document['year'].src = urlpath + "images/delete.png";
			return false;
		}
		if(document.getElementById(name).value != '')
		{
			if(name=="year" && document.getElementById('month').value!='' && document.getElementById('day').value!='')
				document['year'].src = urlpath + "images/accept.png";
			if(name=="month" && document.getElementById('year').value!='' && document.getElementById('day').value!='')
				document['year'].src = urlpath + "images/accept.png";
			if(name=="day" && document.getElementById('month').value!='' && document.getElementById('year').value!='')
			document['year'].src = urlpath + "images/accept.png";
			document.getElementById(name).border = "1px solid #c2cbe6";
			document.getElementById(name).style.background = "#ffffff";
			document.getElementById("error").innerHTML = '';
			document.getElementById("error").style.display = "none";
			return true;
		}
	}
}

function CheckCaptchaCode(){
	if(trim(document.getElementById("user_verify").value)==''){
		ShowCross('user_verify');
		return false;
	}else if(trim(document.getElementById("user_verify").value)!=''){
		document['user_verify'].src = urlpath + "images/blank.gif";
		document.getElementById('user_verify').style.border = "1px solid #a1a1a1";
		document.getElementById('user_verify').style.background = "#fff";
		return true;
	}
}

var timer = 0;
var timer1 = 0;





///////////////////////////////////////////////////////////////// Continuous Polling Begin //////////////////////////////////////////////////////////////////////////////////////////////////////

function CheckForMobileVerification(count){

		if( count < 20 ){
			var url = urlpath+"checkformobileverification.php";
			httpObj10.open("POST",url,true);
			httpObj10.onreadystatechange = function(){
				if(httpObj10.readyState==1||httpObj10.readyState==2||httpObj10.readyState==3){}
				if(httpObj10.readyState==4){
						var strContent = httpObj10.responseText;
					if( strContent=='--2--' ){
						count = count + 1;
						pid = setTimeout(function(){CheckForMobileVerification(count)}, 10000);
					}else{
						ArrayResponse = strContent.split('~');
						if( ArrayResponse[0]=='--1--' ){
							
							document.getElementById("signinform").innerHTML = '';
							if( document.getElementById('form1').style.display == 'block'){
								HideError();
								document.getElementById('RishiRajNigam').innerHTML = '<div style="text-align: left; padding-left: 10px; font-weight: normal; font-family: \'lucida grande\',tahoma,verdana,arial,sans-serif; font-size: 12px;"><p style="text-align:center; line-height:250%; padding:20px 10px; margin-top: 11px;"><strong>Your mobile has been successfully </strong><strong><br /><span style="font-size:26px; font-weight:bold; color:#027c25;">Verified</span></strong></p></div><div style="margin-left: 9px; margin-top: 5px;" align="center"><input name="submit" value="Continue" style="background-image: url('+urlpath+'images/mobileverify/fetch_button.gif); width: 140px; height: 27px; border: 0px none; font-weight: bold; padding-bottom: 3px; cursor:pointer; color: rgb(255, 255, 255);" onclick="javascript:LoadNextStep();" type="submit"></div><p style="text-align:center; margin:10px ">&nbsp;</p>';
							}

							if( document.getElementById('form2').style.display == 'block'){
								HideError();
								document.getElementById('RishiRajNigam1').innerHTML = '<div style="text-align: left; padding-left: 10px; font-weight: normal; font-family: \'lucida grande\',tahoma,verdana,arial,sans-serif; font-size: 12px;"><p style="text-align:center; line-height:250%; padding:20px 10px; margin-top: 11px;"><strong>Your mobile has been successfully </strong><strong><br /><span style="font-size:26px; font-weight:bold; color:#027c25;">Verified</span></strong></p></div><div style="margin-left: 9px; margin-top: 5px;" align="center"><input name="submit" value="Continue" style="background-image: url('+urlpath+'images/mobileverify/fetch_button.gif); width: 140px; height: 27px; border: 0px none; font-weight: bold; padding-bottom: 3px; cursor:pointer; color: rgb(255, 255, 255);" onclick="javascript:LoadNextStep();" type="submit"></div><p style="text-align:center; margin:10px ">&nbsp;</p>';
							}

						}
					}
				}
			}
			httpObj10.send(null);
		}
}

/////////////////////////////////////////////////////////////////// Continuous Polling End //////////////////////////////////////////////////////////////////////////////////////////////////////



function SendingEmailNew(){
	var url = urlpath+"ReSendVerificationEmail.php";
	httpObj10.open("POST",url,true);
	httpObj10.onreadystatechange = function(){
		if(httpObj10.readyState==1||httpObj10.readyState==2||httpObj10.readyState==3){}
		if(httpObj10.readyState==4){
			var strContent = httpObj10.responseText;
		}
	}
	httpObj10.send(null);
}

function ShowEmailTimerDivNew(){
	document.getElementById('FirstTimeEmailVerificationCode').style.display = "block";
}

function captureHitEnter(e, func_with_param) {
	var characterCode;

	if(e && e.which){
		e = e
		characterCode = e.which
	}
	else{
		e = event
		characterCode = e.keyCode
	}
	if(characterCode == 13){
		eval(func_with_param);
		return false;
	}
	else{
			return true;
	}
}

function RedirectRegistration(){
	location.href = "registrationstep4.php";
	return false;
}

function RemoveValue(name){
	if(name=='user_name2' && document.getElementById(name).value=='username')
		document.getElementById(name).value = '';
	if(name=='user_pass2' && document.getElementById(name).value=='password')
		document.getElementById(name).value = '';
}

function getInputLogin(name){ 
	if(trim(document.getElementById(name).value) == ''){
		document.getElementById(name).style.border = "1px solid #d12f19";
		document.getElementById(name).style.background = "#f7cbc2";
		return false;
	}
	if(document.getElementById(name).value != ''){ 
		document.getElementById(name).style.border = "1px solid #a1a1a1";
		document.getElementById(name).style.background = "#fff";
		return true;
	}
}



function getInputLogin1(name){ 
	if(trim(document.getElementById(name).value) == ''){
		document.getElementById(name).className = "new_form_feild_error";
		return false;
	}
	if(document.getElementById(name).value != ''){ 
		document.getElementById(name).className = "new_form_feild";
		return true;
	}
}

function Login(){
	if(!getInputLogin('user_name2')) return false;
	else if(!getInputLogin('user_pass2')) return false;
	else if(LoginUserNameValidity(trim(document.getElementById('user_name2').value))){
		location.href=urlpath+"LoginError.html";
		return false;
	}

	var name = document.getElementById("user_name2").value;
	var pass = document.getElementById("user_pass2").value;
	var agreement = document.getElementById("agreement2").checked;
	
	var url =  urlpath+"LoginVerification.php?name="+name+"&pass="+pass+"&agreement="+agreement;
	
	document.getElementById('loginbutton').value='Signing In...';
	document.getElementById('loginbutton').disabled = 'true';

	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==1||httpObj.readyState==2||httpObj.readyState==3){
			document.getElementById('loginbutton').value = 'Signing In...';
			document.getElementById('loginbutton').disabled = 'true';
		}
		if(httpObj.readyState==4){
			var strContent = httpObj.responseText;
			
			
			if(strContent==1){
				document.getElementById('loginbutton').value='Login';
				document.getElementById('loginbutton').disabled = '';
				//DisplayError1('Username or Password is not correct!','userloginerror');
				location.href=urlpath+"LoginError.html";
			}else if(strContent=='--2--'){
				location.href=urlpath+"Invite.html";
			}else if(strContent=='--3--'){
				location.href=urlpath+"FreeSms.html";
			}else{
				location.href=urlpath+"Profile.html";
				//location.href=urlpath+"Video.html";
				//location.href=urlpath+"Invite.html";
			}
		}
	};
	httpObj.send(null);
	return false;
}

function CheckForgotPasswordUserName(){ 
	if(!getInputLogin('user_name1')) return false;
	else return true;
}

function CheckForgotPasswordMobile(){
	var MobileValue = trim(document.getElementById('mobile1').value);
	var value = MobileValidity(MobileValue);
	
	if(MobileValue == ''){
		ShowCross('mobile1');
		return false;
	}else if(value){
		ShowCross('mobile1');
		DisplayError1(value,'forgotpassworderror');
		return false;
	}else{
		RemoveCross('mobile1');
		HideError1('forgotpassworderror');
		return true;
	}
}

function ForgotPasswordRegistration(){ 
	
	if(!CheckForgotPasswordUserName()) return false;

	//else if(!CheckForgotPasswordMobile()) return false;
	
	//var mobile = document.getElementById("mobile1").value;
	//var url = urlpath+"ForgotPassword.php?username="+username+"&mobile="+mobile;

	var email = document.getElementById("user_name1").value;
	
	if(containSpecialCharacters( email, '@.' ) ) { 
		DisplayError1('Invalid Email','forgotpassworderror');
		return false;
	}

	var url = urlpath+"ForgotPassword.php?email="+email;
	//alert(url);
	httpObj.open("POST",url,true);
	
	document.getElementById("ForgotPaswordFormDiv").style.display = "none";

	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==1||httpObj.readyState==2||httpObj.readyState==3){
			document.getElementById("ForgotPaswordLoadingDiv").style.display = "block";
		}
		if(httpObj.readyState==4){
			document.getElementById("ForgotPaswordLoadingDiv").style.display = "none";
			if(httpObj.responseText=='--No--'){
				document.getElementById("ForgotPaswordFormDiv").style.display = "block";
				document.getElementById("user_name1").value = email;
				DisplayError1('Information provided is not correct!','forgotpassworderror');
				return false;
			}else{
				document.getElementById("ForgotPaswordFormDiv").style.display = "block";
				document.getElementById("ForgotPaswordFormDiv").innerHTML = '<p style=" text-align:center; margin-top:20px;margin-bottom:20px;   font-size:11px;">Your password has been sent to your email account.<br>If you do not see the email, please also check your junk or trash folder. <br /><br /><a href="http://www.youmint.com/login"><b>Click Here</b></a> for login.</p>';
				HideError1('forgotpassworderror');
			}
		}
	}
	httpObj.send(null);
}

function NriCheckForgotPasswordMobile(){
	var MobileValue = trim(document.getElementById('mobile1').value);
	var value = MobileValidityNRI(MobileValue);
	
	if(MobileValue == ''){
		ShowCross('mobile1');
		return false;
	}else if(value){
		ShowCross('mobile1');
		DisplayError1(value,'forgotpassworderror');
		return false;
	}else{
		RemoveCross('mobile1');
		HideError1('forgotpassworderror');
		return true;
	}
}

function NriForgotPasswordRegistration(){
	if(!CheckForgotPasswordUserName()) return false;
	
	var email = document.getElementById("user_name1").value;
	//var country = document.getElementById("nri_country").value;

	if( containSpecialCharacters(email, '@.' ) ) {
		DisplayError1('Invalid Email','forgotpassworderror');
		return false;
	}

	
	//else if(!NriCheckForgotPasswordMobile()) return false;
	//var mobile = document.getElementById("mobile1").value;
	//var url = urlpath+"NriForgotPassword.php?username="+username+"&mobile="+mobile+"&country="+country;
	
	//var url = urlpath+"NriForgotPassword.php?email="+email+"&country="+country;
	var url = urlpath+"NriForgotPassword.php?email="+email; 
	httpObj.open("POST",url,true);
	
	document.getElementById("ForgotPaswordFormDiv").style.display = "none";

	httpObj.onreadystatechange = function(){
		if(httpObj.readyState==1||httpObj.readyState==2||httpObj.readyState==3){
			document.getElementById("ForgotPaswordLoadingDiv").style.display = "block";
		}
		if(httpObj.readyState==4){
			document.getElementById("ForgotPaswordLoadingDiv").style.display = "none";
			if(httpObj.responseText=='--No--'){
				document.getElementById("ForgotPaswordFormDiv").style.display = "block";
				document.getElementById("user_name1").value = email;
				DisplayError1('Information provided is not correct!','forgotpassworderror');
				return false;
			}else{
				document.getElementById("ForgotPaswordFormDiv").style.display = "block";
				document.getElementById("ForgotPaswordFormDiv").innerHTML = '<p style=" text-align:center; margin-top:20px;margin-bottom:20px;   font-size:11px;">Your password has been sent to your email account.<br>If you do not see the email, please also check your junk or trash folder. <br /><br /><a href="http://www.youmint.com/login"><b>Click Here</b></a> for login.</p>';
				HideError1('forgotpassworderror');
			}
		}
	}
	httpObj.send(null);
}	

function HideOverDiv(type){
	
	document.getElementById('NetworkAlertDiv').style.display = 'none';
	document.getElementById('mask_div').style.visibility = 'hidden';
	document.getElementById('city').disabled = '';
	document.getElementById('day').disabled = '';
	document.getElementById('month').disabled = '';
	document.getElementById('year').disabled = '';
	document.getElementById('gender').disabled = '';
	document.getElementById('maritalstatus').disabled = '';
	
	if(type=='close' || type =='click'){
		document.getElementById('networkreferer').style.display = 'none';
	}
	
	if(type =='click'){
		document.getElementById('f_name').focus();
	}
	var url = urlpath+"OverlayClick.php?type=" + type;
	httpObj.open("POST",url,true);
	httpObj.onreadystatechange = function(){}
	httpObj.send(null);

}



function containSpecialCharacters(str, exclude) { 

	var iChars = "! @#$%^&*()+=-[]\\\';,./{}|\":<>?";
	if(exclude) { 
		for (var j=0; j < exclude.length; j++) {
			iChars = iChars.replace(exclude.charAt(j), '');
		}
	}
    
	for (var i = 0; i < str.length; i++) { 
		if (iChars.indexOf(str.charAt(i)) != -1) {
			return true;
		}
	}
	return false;
}











/*==== new function added=======*/

function OpenFeedback() {
	 document.getElementById('feedbackname').value="";
	 document.getElementById('feedbackemail').value="";
	 document.getElementById('feedbackusername').value="";
	 document.getElementById('feedback').value="";
	 document.getElementById('ThankyouDiv').style.display="none";
     document.getElementById('FeedBackFormDiv').style.display="block";
	 document.getElementById('mask_div').className='mask_feedback';
	 document.getElementById('slide-out-div').style.zIndex=3;
	}


function removeloginusername(){
	if( document.getElementById("user_name3").value == 'Username OR Mobile OR Email' )
		document.getElementById("user_name3").value = '';
}

function addloginusername(){
	if( document.getElementById("user_name3").value == '' )
		document.getElementById("user_name3").value = 'Username OR Mobile OR Email';
}


function YouMintLogin3(){
	if(!getInputLogin1('user_name3')) return false;
	else if(!getInputLogin1('user_pass3')) return false;
	else if(LoginUserNameValidity(trim(document.getElementById('user_name3').value))){
		window.location.href=urlpath+"LoginError.html";
		return false;
	}

	var name = document.getElementById("user_name3").value;
	var pass = document.getElementById("user_pass3").value;
	var rememberme = document.getElementById("rememberme3").checked;
	
	var url =  urlpath+"LoginVerification.php?name="+name+"&pass="+pass+"&agreement=true&checkvalue="+rememberme;
	var logintimeout = setTimeout(function(){LoginButtonReverse()},10000);
	document.getElementById('ymloginbutton').className = 'green_gradiant_disabled fright';
	document.getElementById('ymloadingimage').style.display = 'block';

	httpObj10.open("POST",url,true);
	httpObj10.onreadystatechange = function(){
		if(httpObj10.readyState==1||httpObj10.readyState==2||httpObj10.readyState==3){}
		if(httpObj10.readyState==4){
			var strContent = httpObj10.responseText;
			if(strContent==1){
				location.href=urlpath+"LoginError.html";
			}else if(strContent=='--2--'){
				location.href=urlpath+"Occasion_Invite.php";
			}else if(strContent=='--3--'){
				window.location.href=urlpath+"FreeSms.html";
			}else if(strContent=='--6--'){
				window.location.href="http://www.youmint.com/freesms/";	
			}else if(strContent=='--7--'){
				window.location.href=urlpath+"eventsmstemplates.php";	
			}else if(strContent=='--8--'){
				window.location.href=urlpath+"ProfileSettings.php?unsub=yes";	
			}else{
				//window.location.href=urlpath+"FreeSms.html";
				window.location.href=urlpath+"Profile.html";
			}
		}
	};
	httpObj10.send(null);
	return false;
}

function LoginButtonReverse(){
	document.getElementById('ymloginbutton').className = 'green_gradiant fright';
	document.getElementById('ymloadingimage').style.display = 'none';
}

function OpenLoginDiv_New(linkdiv,gmdiv,maildiv,msgdiv,typediv){
  document.getElementById('mask_div').className = 'mask_feedback';
  OpenLoginDiv(linkdiv,gmdiv,maildiv,msgdiv,typediv);
}

function CreateNewAccount(){
   document.getElementById('f_name').focus();
   return false;
}

/***********************************************************************************************************************************************************/

function getzipdialforgotpassword(){
	var forgotpasswordmobile = document.getElementById('forgotmobilenumber').value;
	var url =  urlpath+"getzipdialforgotpassword.php?mobile="+forgotpasswordmobile;
	httpObj10.open("POST",url,true);
	httpObj10.onreadystatechange = function(){
		if(httpObj10.readyState==1||httpObj10.readyState==2||httpObj10.readyState==3){}
		if(httpObj10.readyState==4){
			var strContent = httpObj10.responseText;
			if( strContent == '--1--' ){
				return false;
			}else{
				document.getElementById('forgotpasswordzipdialnumber').innerHTML = strContent;
				document.getElementById('forgotpasswordfirststep').style.display = 'none';
				 document.getElementById('forgotpasswordsecondstep').style.display = 'block';
				setTimeout(function(){checkforgotpasswordmobilenumber(1)} , 0);
			}
		}
	};
	httpObj10.send(null);
	return false;
}

function checkforgotpasswordmobilenumber(count){

		if( count < 50 ){
			var url = urlpath+"checkformobileverificationforgotpass.php";
			httpObj10.open("POST",url,true);
			httpObj10.onreadystatechange = function(){
				if(httpObj10.readyState==1||httpObj10.readyState==2||httpObj10.readyState==3){}
				if(httpObj10.readyState==4){
					var strContent = httpObj10.responseText;
					if( strContent=='--2--' ){
						count = count + 1;
						pid = setTimeout(function(){checkforgotpasswordmobilenumber(count)}, 5000);
					}else{
						ArrayResponse = strContent.split('~');
						if( ArrayResponse[0]=='--1--' ){
							document.getElementById('forgotpassworddisplay').innerHTML = ArrayResponse[1];
							document.getElementById('forgotpasswordsecondstep').style.display = 'none';
							document.getElementById('forgotpasswordthirdstep').style.display = 'block';
							clearTimeout(pid);
						}
					}
				}
			}
			httpObj10.send(null);
		}
}

/***********************************************************************************************************************************************************/
