function emptytime(){
  $('#'+'div_ti_teach_time2').html("");
  vaf_form_select_teaching_time(document.getElementById('ti_teaching_time'));
}

function changeIt(aid,url){
  for (i=1;i<=4;i++ )
  {
    pickID=document.getElementById("sel_img_"+i);
    pickID.src=url+"/ti_images/corousal_smll_pic"+i+"_"+i+".gif";
    document.getElementById("image"+i).style.display="none";
  }
  document.getElementById("sel_img_"+aid.substr(4,5)).src=url+"/ti_images/corousal_smll_pic"+aid.substr(4,5)+".gif";
  document.getElementById("image"+aid.substr(4,5)).style.display="block";
}

function matchelem() {
	var matches = [];
	var elems = document.getElementsByTagName("*");
	for (var i=0; i<elems.length; i++) {
  	if (elems[i].id.match(/^school_locality_/)) {
  		matches.push(elems[i]);
  	}
	}
	return matches;
}

function matchelem1() {
	var matches = [];
	var elems = document.getElementsByTagName("*");
	for (var i=0; i<elems.length; i++) {
  	if (elems[i].id.match(/^zonal_info_/)) {
  		matches.push(elems[i]);
  	}
	}
	return matches;
}

function resetTeachingTime(teachingTimeId, preferenceRank) {
  if(preferenceRank == "first") {
    $('#'+teachingTimeId).html('<select name="ti_teaching_time" id="ti_teaching_time" onchange="javascript: vaf_form_select_teaching_time(this);" class="ti_selectBox"  style="width: 180px; height:28px; font-family:arial; font-size:16px; padding:1px 1px 1px 0; color:#666; border:1px solid #d4d4d4;"><option value=\'\'>Select Teaching Time</option></select>');
  } else if(preferenceRank == "second") {
    $('#'+teachingTimeId).html('<select name="ti_teaching_time_second" id="ti_teaching_time_second" class="ti_selectBox" style="width: 180px; height:28px; font-family:arial; font-size:16px; padding:1px 1px 1px 0; color:#666; border:1px solid #d4d4d4;"><option value=\'\'>Select Teaching Time</option></select>');
  } else if(preferenceRank == "third") {
    $('#'+teachingTimeId).html('<select name="ti_teaching_time_third" id="ti_teaching_time_third" class="ti_selectBox" style="width: 180px; height:28px; font-family:arial; font-size:16px; padding:1px 1px 1px 0; color:#666; border:1px solid #d4d4d4;"><option value=\'\'>Select Teaching Time</option></select>');
  }
}
function resetTranningCenter(tranningCenterId) {
  $('#'+teachingTimeId).html('<select name="ti_teaching_time" id="ti_teaching_time" onchange="javascript: vaf_form_select_teaching_time(this);" class="ti_selectBox" style="width: 180px; height:28px; font-family:arial; font-size:16px; padding:1px 1px 1px 0; color:#666; border:1px solid #d4d4d4;"><option value=\'\'>Select Teaching Time</option></select>');
}
function resetTranningDate(tranningDateId) {
  $('#'+tranningDateId).html('<select name="ti_date" id="ti_date" class="ti_selectBox" style="width: 180px; height:28px; font-family:arial; font-size:16px; padding:1px 1px 1px 0; color:#666; border:1px solid #d4d4d4;"><option value=\'\'>Select Date</option></select>');
}
function resetTranningTime(tranningTimeId) {
  $('#'+tranningTimeId).html('<select name="ti_time" id="ti_time" class="ti_selectBox" style="width: 180px; height:28px; font-family:arial; font-size:16px; padding:1px 1px 1px 0; color:#666; border:1px solid #d4d4d4;"><option value=\'\'>Select Time</option></select>');
}


function vaf_form_select_city(obj,elem4city)
{
    if(obj.value == 1) {
      $('#delhiMap').show();
      $('#mumbaiMap').hide();
    } else if(obj.value == 2) {
      $('#delhiMap').hide();
      $('#mumbaiMap').show();
    } else {
      $('#delhiMap').hide();
      $('#mumbaiMap').hide();
    }

//  reset all dependant drop down start
    resetTeachingTime("div_ti_teach_time", "first");   //Teaching Time 1
    resetTeachingTime("div_ti_teach_time_second", "second");   //Teaching Time 2
    resetTeachingTime("div_ti_teach_time_third", "third");   //Teaching Time 3

    $('#ti_3days1').val('');        //reset teaching day 1
    $('#ti_3days1_second').val(''); //reset teaching day 2
    $('#ti_3days1_third').val('');  //reset teaching day 3

//    resetTranningCenter("div_ti_teach_time");   //Tranning Center
    resetTranningDate("resetTranningDate");   //Tranning Date
    resetTranningTime("div_ti_time");   //Tranning Time
//  reset all dependant drop down end

    //school localities divs hide
    var school_localities_divs=matchelem();
    for(var i=0;i<school_localities_divs.length;i++) {
      school_localities_divs[i].style.display='none';
    }

    //zonal infos divs hide
    var zonal_info_divs=matchelem1();
    for(var i=0;i<zonal_info_divs.length;i++) {
                    zonal_info_divs[i].style.display='none';
    }


    document.getElementById(elem4city[0]).innerHTML="Loading...";
    $.get(
     base_url + "/ajax/ti_show_places_for_city.php?city_id="+escape(obj.value),
     {
     },
     function(htmlData) {
        data123 = htmlData.split("@@@@");

        $('#'+elem4city[0]).html(data123[0]);
        $('#div_ti_place_second').html(data123[1]);
        $('#div_ti_place_third').html(data123[2]);
        $.get(
          base_url + "/ajax/ti_show_schools_for_place.php?place_id="+escape(obj.value),
          {
          },
          function(htmlData) {
              $('#div_ti_school').html(htmlData);
          }
        );
//        for(var i=1;i<elem4city.length;i++) {
//        	document.getElementById(elem4city[i]).disabled=true;
//        }
//        document.getElementById('allfilled_div1').style.display='none';

        //document.getElementById('allfilled_div2').style.display='none';
        //document.getElementById('ti_submit_button').style.display='none';
     }
   );
}

function vaf_form_select_teaching_time(obj)
{
    var ti_3days = null;
//     if (document.getElementById('ti_3days1').checked) {
//         ti_3days = document.getElementById('ti_3days1').value;
//     } else {
//         ti_3days = document.getElementById('ti_3days2').value;
//     }
    ti_3days = document.getElementById('ti_3days1').value;
    $.get(
    base_url + "/ajax/ti_check_status.php?ti_place="+escape(document.getElementById('ti_place').value)+"&teaching_3days="+escape(ti_3days)+"&teaching_time="+escape(obj.value),
    {
    },
    function(htmlData) {
        if(htmlData.indexOf('DENY')>=0) {
     			document.getElementById('ti_submit_button').style.display='none';
     			$('#'+'div_ti_teach_time2').html("</b><div id='allfilled_div1' style='color:red'>The capacity for this batch has been filled. Please select a different combination.</div>");
        	//document.getElementById('ti_school').disabled=true;
        }else{
        	document.getElementById('ti_submit_button').style.display='block';
        	//$('#'+'div_ti_teach_time2').html("");
        }
     }
   );
}



function hideZoneData(preferenceRank){
  var matches = [];
  if(preferenceRank == "first") {
    var elems = document.getElementsByTagName("*");
    for (var i=0; i<elems.length; i++) {
      if (elems[i].id.match(/^zonal_info_first_/)) {
        matches.push(elems[i]);
      }
    }
  } else if(preferenceRank == "second") {
    var elems = document.getElementsByTagName("*");
    for (var i=0; i<elems.length; i++) {
      if (elems[i].id.match(/^zonal_info_second_/)) {
        matches.push(elems[i]);
      }
    }
  } else if(preferenceRank == "third") {
    var elems = document.getElementsByTagName("*");
    for (var i=0; i<elems.length; i++) {
      if (elems[i].id.match(/^zonal_info_third_/)) {
        matches.push(elems[i]);
      }
    }
  }
  var zonal_info_divs = matches;
  for(var i=0;i<zonal_info_divs.length;i++) {
    zonal_info_divs[i].style.display='none';
  }
}


function vaf_form_select_place(obj,preferenceRank)
{
    $('#div_ti_teach_time2_'+preferenceRank).html('');
    $('#div_ti_teach_time2').html("");
    if(escape(obj.value) == '' ) {
      if(preferenceRank == "first") {
        resetTeachingTime("div_ti_teach_time", preferenceRank);
        hideZoneData(preferenceRank);
        $('#ti_3days1').val('');
      } else if(preferenceRank == "second") {
        resetTeachingTime("div_ti_teach_time_second", preferenceRank);
        hideZoneData(preferenceRank);
        $('#ti_3days1_second').val('');
      } else if(preferenceRank == "third") {
        resetTeachingTime("div_ti_teach_time_third", preferenceRank);
        hideZoneData(preferenceRank);
        $('#ti_3days1_third').val('');
      }
      return false;
    }
    preferLocation1 = $('#ti_place').val();
    preferLocation2 = $('#ti_place_second').val();
    preferLocation3 = $('#ti_place_third').val();

    if(obj.value!='') {
      if(preferenceRank == 'second') {
        
        hideZoneData(preferenceRank);
        document.getElementById('zonal_info_'+preferenceRank+'_'+obj.value).style.display='block';
      } else if(preferenceRank == 'third') {

        
        hideZoneData(preferenceRank);
        document.getElementById('zonal_info_'+preferenceRank+'_'+obj.value).style.display='block';
      } else {
        

        hideZoneData(preferenceRank);
        document.getElementById('zonal_info_'+preferenceRank+'_'+obj.value).style.display='block';
      }
    }

    //document.getElementById('div_ti_teach_time').innerHTML="Loading...";
      $.get(
    base_url + "/ajax/ti_show_teach_time_for_place.php?place_id="+escape(obj.value)+"&preferenceRank="+preferenceRank,
    {
    },
    function(htmlData) {
      if(preferenceRank == "second") {
        $('#div_ti_teach_time_second').html(htmlData);
        $('#ti_3days1_second').val('');        //reset teaching day 1
      } else if(preferenceRank == "third") {
        $('#div_ti_teach_time_third').html(htmlData);
        $('#ti_3days1_third').val('');        //reset teaching day 1
      } else if(preferenceRank == "first") {
        $('#div_ti_teach_time').html(htmlData);
        $('#ti_3days1').val('');        //reset teaching day 1
      }
      //document.getElementById(elem4place[2]).disabled=false;
      //document.getElementById('allfilled_div1').style.display='none';
      ////document.getElementById('allfilled_div2').style.display='none';
      //document.getElementById('ti_submit_button').style.display='none';
    }
  );
}


function vaf_form_select_school(obj,elem4school)
{
		//school localities divs hide
		var school_localities_divs=matchelem();
		for(var i=0;i<school_localities_divs.length;i++) {
				school_localities_divs[i].style.display='none';
		}

		if(obj.value!='') {
			document.getElementById('school_locality_'+obj.value).style.display='block';
  	}

    document.getElementById(elem4school[0]).innerHTML="<span style='padding-left:20px;'>Loading...</span>";
	    $.get(
     base_url + "/ajax/ti_show_dates_for_school.php?school_id="+escape(obj.value),
     {
     },
     function(htmlData) {
	      $('#'+elem4school[0]).html(htmlData);
	      //document.getElementById('ti_submit_button').style.display='block';
       /*
     		//if htmlData contains string "All seats are filled for this center"
     		if(htmlData.match(/X1Y2Z3/)) {
     			document.getElementById('ti_submit_button').style.display='none';
     			$('#'+elem4school[0]).html("<div id='allfilled_div1' style='color:red'><b>The capacity for this induction centre has been filled, kindly choose a different induction zone or centre</b></div>"+htmlData);
     		}
     		else {
	        $('#'+elem4school[0]).html(htmlData);
	        document.getElementById('ti_submit_button').style.display='block';
     		}

     		for(var i=1;i<elem4school.length;i++) {
        	//document.getElementById(elem4school[i]).disabled=true;
        }*/
        //document.getElementById('allfilled_div2').style.display='none';
        //document.getElementById('ti_submit_button').style.display='none';
     }
   );
}

function vaf_form_select_date(obj,school_obj, divname)
{
     document.getElementById(divname).innerHTML="Loading...";
	    $.get(
     base_url + "/ajax/ti_show_time_for_date_school.php?date="+escape(obj.value)+"&school_id="+escape(school_obj.value),
     {
     },
     function(htmlData) {
     		//if htmlData contains string "All seats are filled for this session"
     		if(htmlData.match(/V1B2N3/)) {
     			document.getElementById('ti_submit_button').style.display='none';
	     			$('#'+divname).html("<div id='allfilled_div2' style='color:red'><b>The capacity for this session time for this centre has been filled, kindly choose a different session time</b></div>"+htmlData);
     		}
     		else {
	        $('#'+divname).html(htmlData);
	        document.getElementById('ti_submit_button').style.display='block';
     		}
     }
   );
}
function abc () {
  count=count+1;
  if (count==4){
    clearInterval(a);
    count=1;
    $('#'+tempid).html(temphtml1);
//     document.getElementById(tempid).innerHTML=temphtml1;
    tempid="";
    temphtml1="";
  }

}
var a,tempid,temphtml1;
var count=1;
function cmd (id, html1) {
  tempid=id;
  temphtml1=html1;
  a=setInterval(abc,1000);
}
function vote_hot_not(vote_type, id, participant, flag, gender, col_id) {
  if(flag == '1') {
    sid = document.getElementById('hidden2').value;
    if (document.getElementById('image1').value) {
      album = document.getElementById('image1').value;
    }
  } else {
    sid = document.getElementById('hidden1').value;
    if (document.getElementById('image2').value) {
      album = document.getElementById('image2').value;
    }
  }
  album_data = album.split('@');
  album_pic = album_data[0];
  album_pic_id = album_data[1];

//   document.getElementById('img_'+flag).style.backgroundImage ='Loading.... <img src="'+base_url+'/images/loading.gif" alt="" />';
  $.get(
    base_url + "/ajax/dt_hot_not.php?vote_type="+vote_type+"&id="+id+"&participant="+participant+"&flag="+flag+"&sid="+sid+"&album_pic_id="+album_pic_id+"&album_pic="+album_pic+"&gender="+gender+"&col_id="+col_id,
    {
    },
    function(htmlData) {
      if(vote_type == 'hot') {
        html = htmlData.split('@@@');
        $('#'+id).html(html[0]);
        /*cmd = "document.getElementById('"+id+"').innerHTML="+html[1]; */
        //var time = setTimeout (cmd(id,html[1]), 4000);
        if (html[1] == 'no_hotnot') {
          cmd('no_hotnot',html[2]);
        } else {
          cmd(id,html[1]);
        }
      } else if((vote_type == 'not')) {
        html = htmlData.split('@@@');
        if (html[0] == '<pre>no_hotnot') {
          $('#no_hotnot').html(html[1]);
        } else {
          if(trim(html[1])) {
            document.getElementById(id).innerHTML=html[1];
          } else {
            document.getElementById(id).innerHTML=html[1];
          }
        }
      }
    }
  );
}
// function popup_register(block , pop_type,  position, ref_id, return_file, additional_data_json) {
//  try{
//   var video_div = document.getElementById('video_player_div');
//   if (video_div) {
//     document.getElementById('video_player_div').style.visibility='hidden';
//   }
//  if(additional_data_json) {
//  	var additional_data_pass=escape(additional_data_json);
//  }
//   var tid = 0;
//   get_data ='additional_data='+additional_data_pass+'&pop_type='+pop_type+'&position='+position+'&ref_id='+ref_id+'&return_file=';
//   if ( return_file && return_file!='') {
//     get_data += return_file;
//   } else {
//     get_data += escape(document.URL);
//   }
//   $.ajax({
//     type: "GET",
//     url: base_url+"/popup_register.php?show="+block,
//     data: get_data,
//     success: function(data) {
//     var r = data.split('@#$~~');
//     if (r[0] == 'Already login' ) {
//       window.location = r[1];
//     } else {
//       window.parent.document.getElementById('register_popup_parent').style.display='block';
//       window.parent.document.getElementById('register_popup').innerHTML = data;
//       mydiv = window.parent.document.getElementById('register_popup_parent');
// 
//       if (typeof( window.pageYOffset ) == 'number' ) {
//         var s = window.pageYOffset;
//       } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
//         var s = document.body.scrollTop;
//       } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
//         var s = document.documentElement.scrollTop;
//       }
//       var y =  80 + parseInt(s);
//       mydiv.style.top = y + 'px';
//     }
//   }
//   });
//   } catch (e){
//    alert(e.message);
//   }
// }
// function popup_close() {
//  if (document.getElementById('bubble_body')){
//   document.getElementById('bubble_body').style.display='none';
//  }
//  if (document.getElementById('bubble_iframe')){
//   document.getElementById('bubble_iframe').style.display='none';
//  }
//  document.getElementById('register_popup_parent').style.display='none';
//  document.getElementById('register_popup').innerHTML='';
//  var video_div = document.getElementById('video_player_div');
//  if (video_div) {
//   document.getElementById('video_player_div').style.visibility='visible';
//  }
// }
// function change_popup_block(id) {
//   remove_bubble_or_error();
//   if ( id == 'signin' ) {
//     $('#'+id).css('display', 'block');
//     $('#signup').css('display', 'none');
//   } else {
//     $('#'+id).css('display', 'block');
//     $('#signin').css('display', 'none');
//   }
// }
function hotnot_college(col_id, gender) {
  if (gender == '') {
    gender = 'F';
  }
  self.location = base_url+"/dt09.php?col_id="+col_id+"&type="+gender;
}

function edit_a_details(id) {
  $("#"+id).toggle("slow");
}

function check_pref_values(div_id) {
  check_1 = check_2 = check_3 = 0;
  var err_msg = '';
  preferLocation1 = $('#ti_place').val();
  teachingTime1 = $('#ti_teaching_time').val();
  teachingDay1 = $('#ti_3days1').val(); 
  if (preferLocation1 && teachingTime1 && teachingDay1) {
    check_1 = 1;
  }

  preferLocation2 = $('#ti_place_second').val();
  teachingTime2 = $('#ti_teaching_time_second').val();
  teachingDay2 = $('#ti_3days1_second').val();
  if (preferLocation2 && teachingTime2 && teachingDay2) {
    check_2 = 1;
  }
  
  teachingTime3 = $('#ti_teaching_time_third').val();
  preferLocation3 = $('#ti_place_third').val();
  teachingDay3 = $('#ti_3days1_third').val();
  if (preferLocation3 && teachingTime3 && teachingDay3) {
    check_3 = 1;
  }

  if ((check_1 == 1) && (check_2 == 1)) { 
    if ((preferLocation1 == preferLocation2) && (teachingTime1 == teachingTime2) && (teachingDay1 == teachingDay2)) {
      err_msg = 'Preference 1 and Preference 2 cannot be the same';
    }
  }

  if ((check_1 == 1) && (check_3 == 1) && (err_msg == '')) { 
    if ((preferLocation1 == preferLocation3) && (teachingTime1 == teachingTime3) && (teachingDay1 == teachingDay3)) {
      err_msg = 'Preference 1 and Preference 3 cannot be the same';
    }
  }

  if ((check_2 == 1) && (check_3 == 1) && (err_msg == '')) {
    if ((preferLocation2 == preferLocation3) && (teachingTime2 == teachingTime3) && (teachingDay2 == teachingDay3)) {
      err_msg = 'Preference 2 and Preference 3 cannot be the same';
    }
  }


if (err_msg) {
  if (div_id == 1) {
    hideZoneData('first');
    resetTeachingTime("div_ti_teach_time", 'first');
    document.getElementById('ti_3days1').value = '';
    document.getElementById('ti_place').value = '';
    $('#'+'div_ti_teach_time2').html('<div id="allfilled_div1" style="color: red;">'+err_msg+'</div>');
  } else if (div_id == 2) {
    hideZoneData('second');
    resetTeachingTime("div_ti_teach_time_second", 'second');
    document.getElementById('ti_3days1_second').value = '';
    document.getElementById('ti_place_second').value = '';
    $('#'+'div_ti_teach_time2_second').html('<div id="allfilled_div1" style="color: red;">'+err_msg+'</div>');
  } else if (div_id == 3) {
    hideZoneData('third');
    resetTeachingTime("div_ti_teach_time_third", 'third');
    document.getElementById('ti_3days1_third').value = '';
    document.getElementById('ti_place_third').value = '';
    $('#'+'div_ti_teach_time2_third').html('<div id="allfilled_div1" style="color: red;">'+err_msg+'</div>');
  }
}
}

function CheckFullName() {
  var full_name =trim(document.getElementById('full_name').value);
  var fullnameRegEx = /^[a-zA-Z\s]+$/;
  if(!trim(full_name) || full_name == __('Full Name') ) {
    $('#e_full_name').html(getExclamationErrorText()+'<u>'+__('Full name is mandatory. Please enter your First and Last name with a space. No special characters allowed.')+'</u>');
    show_err_border('full_name');
    return true;
  } else if(full_name.length>50 || full_name.length<4) {
    $('#e_full_name').html(getExclamationErrorText()+'<u>'+__('Full name should be 3-50 characters long')+'.</u>');
    show_err_border('full_name');
    return true;
  } else if (full_name.split(' ').length < 2) {
    $('#e_full_name').html(getExclamationErrorText()+'<u>'+__('Invalid full name. Please enter your First and Last name with a space. No special characters allowed.')+'</u>');
    show_err_border('full_name');
    return true;
  } else if(full_name.search(fullnameRegEx) == -1) {
    $('#e_full_name').html(getExclamationErrorText()+'<u>'+__('Invalid full name. Please enter your First and Last name with a space. No special characters allowed.')+'</u>');
    show_err_border('full_name');
    return true;
  }
  $('#e_full_name').html('<img src="'+skin_url+'/images_landing/spacer.gif" />');
  return false;
}


function CheckEmail() {
  var email =document.getElementById('email').value;
  var emailRegEx = /^[a-z0-9]+([_\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\.[a-z]{2,}$/i;
  if(!trim(email)) {
    $('#e_email').html(getExclamationErrorText()+'<u>'+__('Please enter a valid email id.')+'</u>');
    show_err_border('email');
    return true;
  } else if (email.search(emailRegEx) == -1) {
    $('#e_email').html(getExclamationErrorText()+'<u>'+__('Invalid email address.')+'</u>');
    show_err_border('email');
    return true;
  }
  $('#e_email').html('<img src="'+skin_url+'/images_landing/spacer.gif" />');
  return false;
}

function CheckMobile() {
  var mobile =document.getElementById('mobile').value;
  var mobileRegEx = /^[0-9]+$/;
  if(!trim(mobile)) {
    $('#e_mobile').html(getExclamationErrorText()+'<u>'+__('Please enter a valid mobile no.')+'</u>');
    show_err_border('email');
    return true;
  } else if (mobile.search(mobileRegEx) == -1) {
    $('#e_mobile').html(getExclamationErrorText()+'<u>'+__('Invalid mobile no.')+'</u>');
    show_err_border('mobile');
    return true;
  } else if (mobile.length < 10) {
    $('#e_mobile').html(getExclamationErrorText()+'<u>'+__('Enter 10 digit mobile no.')+'</u>');
    show_err_border('mobile');
    return true;
  } else {
    $.ajax({
      type: "POST",
      async:true,
      url: base_url + "/ajax/save_user_interest.php",
      data: "mobile="+mobile+"&action=checkMobile"
    }).done(function( msg ) {
      if(msg == "exist") {
        $('#e_mobile').html(getExclamationErrorText()+'<u>'+__('This mobile no already exist: You have already registered with this mobile no.')+'</u>');
        show_err_border('mobile');
        return true;
      }
    });
  }
  $('#e_mobile').html('<img src="'+skin_url+'/images_landing/spacer.gif" />');
  return false;
}

function save_user_interest(obj, button_url) {
  $('#form_submit_button').html('Loading...');

  if(CheckFullName() || CheckEmail() || CheckMobile()) {
    $('#form_submit_button').html("<input tabindex='"+form_signup_button_tabindex+"' type='image' src='"+button_url+"' />");
    return false;
  }
  var full_name = trim(document.getElementById('full_name').value);
  var email = document.getElementById('email').value;
  var mobile = document.getElementById('mobile').value;
  var city = document.getElementById('city').value;

  // check mobile no already exist
  $.ajax({
    type: "POST",
    async:true,
    url: base_url + "/ajax/save_user_interest.php",
    data: "mobile="+mobile+"&action=checkMobile"
  }).done(function( msg ) {
    if(msg == "exist") { // if mobile no exist return without save
      $('#e_mobile').html(getExclamationErrorText()+'<u>'+__('This mobile no already exist: You have already registered with this mobile no.')+'</u>');
      $('#form_submit_button').html("<input tabindex='"+form_signup_button_tabindex+"' type='image' src='"+button_url+"' />");
      show_err_border('mobile');
      return false;
    } else { //if mobile no does not exist then save data
      $.ajax({
        type: "POST",
        url: base_url + "/ajax/save_user_interest.php",
        data: "full_name="+full_name+"&email="+email+"&mobile="+mobile+"&city="+city+"&action=add"
      }).done(function( msg ) {
        $('#user_interest').html("");
        $('#form_submit_button').html("Thank you for your interest in Teach India!");
      });
    }
  });
  return false;
}
