jQuery(document).ready(function(){setTimeout(function(){jQuery('#msg').fadeOut(1000)},3000);setTimeout(function(){jQuery('#authMessage').fadeOut(1000)},3000);jQuery('#editlink').click(function(){jQuery('#edit').toggle();jQuery('#st').toggle()});jQuery('#menumaster').click(function(){jQuery('#menuchild').toggle()});jQuery("#add").click(function(){jQuery("#all_custom_locations  option:selected").appendTo("#custom_locations");return false});jQuery("#addAll").click(function(){jQuery("#all_custom_locations option").appendTo("#custom_locations");return false});jQuery("#remove").click(function(){jQuery("#custom_locations option:selected").appendTo("#all_custom_locations");return false});jQuery("#removeAll").click(function(){jQuery("#custom_locations option").appendTo("#all_custom_locations");return false});jQuery('#all_custom_locations').dblclick(function(){jQuery("#all_custom_locations  option:selected").appendTo("#custom_locations");return false});jQuery('#custom_locations').dblclick(function(){jQuery("#custom_locations option:selected").appendTo("#all_custom_locations");return false});initLogin();if(jQuery.cookie('search')=="city"){toggleSearch('link_1','search_1')}else if(jQuery.cookie('search')=="zipcode"){toggleSearch('link_2','search_2')}else if(jQuery.cookie('search')=="mls"){toggleSearch('link_3','search_3')}else{toggleSearch('link_1','search_1')}});function click(id){jQuery("#"+id).html('')}function close_div(id){jQuery("#"+id).html('')}function toggle_details_link(id,id2,tab_id){jQuery("#"+id2).fadeOut('slow');jQuery("#"+id).fadeIn('slow');if(tab_id){jQuery("#"+tab_id).html('')}}function jqCheckAll(id,name,master){if(jQuery('#'+master).is(':checked')){jQuery("form#"+id+" INPUT[@name="+name+"][type='checkbox']").attr('checked',true)}else{jQuery("form#"+id+" INPUT[@name="+name+"][type='checkbox']").attr('checked',false)}}function checkChangePasswordForm(){var errorMsg="";if(jQuery("#UserOldPassword").val()==""){errorMsg+="Old password must not be blank \n"}if(jQuery("#UserNewPassword").val()==""){errorMsg+="New password must not be blank \n"}if(jQuery("#UserConfirmPassword").val()==""){errorMsg+="Confirm password must not be blank and should match with new password. \n"}if(errorMsg!=""){alert(errorMsg);return false}return true}function updateLoginHeader(strData){var arrResponce=strData.split("~~");strData=arrResponce[2];jQuery('#header_signup').html(strData);initLogin();jQuery("#signin_menu").toggle();jQuery("#signin").toggleClass("menu-open");if(jQuery.trim(arrResponce[0])=='failer'){jQuery("input[id='UserPassword']").val('');jQuery("#signin_menu #msg").html(arrResponce[1])}else{jQuery("#aLogin").html("My Account");jQuery("#aLogin").attr("href","/users")}}function initLogin(){jQuery("#signin").click(function(e){e.preventDefault();jQuery("#signin_menu").toggle();jQuery("#signin").toggleClass("menu-open")});jQuery("#signin_menu").mouseup(function(){return false});jQuery(document).mouseup(function(e){if(jQuery(e.target).parent("a.signin").length==0){jQuery("#signin").removeClass("menu-open");jQuery("#signin_menu").hide()}})}function toggleSearch(src,div){jQuery('#search_1').hide();jQuery('#search_2').hide();jQuery('#search_3').hide();jQuery('#'+div).show();jQuery('#link_1').css('color','#FF0000');jQuery('#link_1').css('cursor','pointer');jQuery('#link_2').css('color','#FF0000');jQuery('#link_2').css('cursor','pointer');jQuery('#link_3').css('color','#FF0000');jQuery('#link_3').css('cursor','pointer');jQuery('#'+src).css('color','#0D449F');jQuery('#'+src).css('cursor','default');options={path:'/',expires:10};if(src=="link_1"){jQuery.cookie('search','city',options)}else if(src=="link_2"){jQuery.cookie('search','zipcode',options)}else if(src=="link_3"){jQuery.cookie('search','mls',options)}else{jQuery.cookie('search','city',options)}}function clearText(src,text){t=jQuery("#"+src).val();if(jQuery.trim(t)==text){jQuery("#"+src).val('')}}function addText(src,text){t=jQuery("#"+src).val();if(jQuery.trim(t)==''){jQuery("#"+src).val(text)}}function click_area(strName){check_status=$("input[id='"+strName+"']").attr('checked');jQuery("input[id='"+strName+"']").attr('checked',!check_status)}function selectAllNone(strCheckedStatus){form=document.forms['CommunityTemplateAdminGeneratePagesForm'];for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"){form.elements[i].checked=strCheckedStatus}}}function selectAllCategory(strCheckedStatus){form=document.forms['StaticPageAdminIndexForm'];for(i=0;i<form.elements.length;i++){if(form.elements[i].type=="checkbox"){form.elements[i].checked=strCheckedStatus}}}var arrMlsPro=new Array();function jQuery_addfavorite(mlsno){var strWait="<table border=0 cellspacing=0><tr><td align=right><img src='/img/wait.gif'/></td><td valign=middle align=left> Please wait...</td></tr></table>";if(mlsno!=""){arrMlsPro[mlsno]=jQuery("#divFavorite_"+mlsno).html();jQuery("#divFavorite_"+mlsno).html(strWait);jQuery.ajax({type:"POST",url:"/users/ajaxaddfavourite",data:"mlsnum="+mlsno,success:function(data){if(jQuery.trim(data)=='Error:Loginrequire'){jQuery("#divFavorite_"+mlsno).html(arrMlsPro[mlsno]);callbackdialog='addfavourite';mls=mlsno;showLogin()}else{jQuery("#divFavorite_"+mlsno).html(data)}},complete:function(){jQuery("#favoritestatus_"+mlsno).hide();jQuery("#favoritestatus_"+mlsno).fadeIn(1000);jQuery("#favoritestatus_"+mlsno).fadeOut(15000)}})}}function jQuery_removefavorite(mlsno){if(confirm("Are you sure you want to remove this property from your favorite list?")){var strWait="<table border=0 cellspacing=0><tr><td align=right><img src='/img/wait.gif'/></td><td valign=middle align=left> Please wait...</td></tr></table>";if(mlsno!=""){jQuery("#divFavorite_"+mlsno).html(strWait);jQuery.ajax({type:"POST",url:"/users/ajaxremovefavourite",data:"mlsnum="+mlsno,success:function(data){if(jQuery.trim(data)=='Error:Loginrequire'){alert("not allowed to perfome this operation")}else{jQuery("#divFavorite_"+mlsno).html(data)}},complete:function(){jQuery("#favoritestatus_"+mlsno).hide();jQuery("#favoritestatus_"+mlsno).fadeIn(1000);jQuery("#favoritestatus_"+mlsno).fadeOut(15000)}})}}}function jQuery_removefavorite_favouritepage(mlsno){if(confirm("Are you sure you want to remove this property from your favorite list?")){var strWait="<table border=0 cellspacing=0><tr><td align=right><img src='/img/wait.gif'/></td><td valign=middle align=left> Please wait...</td></tr></table>";if(mlsno!=""){arrMlsPro[mlsno]=jQuery("#divFavorite_"+mlsno).html();jQuery("#favoritestatus_"+mlsno).html(strWait);jQuery.ajax({type:"POST",url:"/users/removefavourite",data:"mlsnum="+mlsno,success:function(data){if(jQuery.trim(data)=='Error:Loginrequire'){alert("not allowed to perfome this operation")}else{jQuery("#divFavorite_"+mlsno).fadeOut(5000)}},complete:function(){jQuery("#favoritestatus_"+mlsno).hide();jQuery("#favoritestatus_"+mlsno).fadeIn(5000);jQuery("#favoritestatus_"+mlsno).fadeOut(5000)}})}}}function jQuery_Delete_Savesearch(id){if(confirm("Are you sure you want to remove this saved search from your favorite list?")){var strWait="<table border=0 cellspacing=0><tr><td align=right><img src='/img/wait.gif'/></td><td valign=middle align=left> Please wait...</td></tr></table>";if(id!=""){jQuery("#searchsavestatus_"+id).html(strWait);jQuery.ajax({type:"POST",url:"/search_saves/ajaxdelete",data:"id="+id,success:function(data){if(jQuery.trim(data)=='Error:Loginrequire'){alert("not allowed to perfome this operation")}else{jQuery("#divSavedSearch_"+id).fadeOut(5000)}},complete:function(){jQuery("#searchsavestatus_"+id).hide();jQuery("#searchsavestatus_"+id).fadeIn(5000);jQuery("#searchsavestatus_"+id).fadeOut(5000)}})}}}function jQuery_savesearch(){jQuery.ajax({type:"POST",url:"/SearchSaves/ajaxadd",success:function(data){if(jQuery.trim(data)=='Error:Loginrequire'){callbackdialog="savesearch";showLogin()}else{jQuery("#save_search_title_dialogbox").dialog("open")}},complete:function(){}})}function jQuery_leadformArrangeViewing(){init_lead_formArrangeViewing_dialogbox();jQuery("#ArrangeViewingForm").dialog("open")}function jQuery_leadformMakeOffer(){init_lead_formMakeOffer_dialogbox();jQuery("#MakeOfferForm").dialog("open")}function jQuery_leadformAdditionalInfo(){init_lead_formAdditionalInfo_dialogbox();jQuery("#AdditionalInfoForm").dialog("open")}function updateHeader(){jQuery.ajax({type:"POST",url:"/users/getloginheader",success:function(data){alert(data)}})}function changeEmailNotification(id){var strWait="<table border=0 cellspacing=0><tr><td align=right><img src='/img/mail_loader.gif'/></td><td valign=middle align=left> Please wait...</td></tr></table>";var strSuccess="<table border=0 cellspacing=0><tr><td align=right><img src='/img/success.png'/></td><td valign=middle align=left> Successfully updated.</td></tr></table>";var strFail="<table border=0 cellspacing=0><tr><td align=right><img src='/img/warning.png'/></td><td valign=middle align=left> Error! Try again.</td></tr></table>";jQuery("#emailnotificationwait_"+id).html(strWait);jQuery("#emailnotificationwait_"+id).show();jQuery.ajax({type:"POST",url:"/SearchSaves/ajaxedit",data:"id="+id+"&value="+jQuery('#emailnotification'+id).val(),success:function(data){if(jQuery.trim(data)=='Success'){jQuery("#emailnotificationwait_"+id).html(strSuccess)}else{jQuery("#emailnotificationwait_"+id).html(strFail)}},complete:function(){jQuery("#emailnotificationwait_"+id).fadeOut(5000)}})}function checkCounty(){strError="<img src='/img/warning.png'> Please select a city/subdivision.";defaultCountyvalue=jQuery("#SearchPropertiesCounty option:first").val();selectedCountyvalue=jQuery("#SearchPropertiesCounty option:selected").val();defaultvalue=jQuery("#SearchPropertiesCity option:first").val();selectedvalue=jQuery("#SearchPropertiesCity option:selected").val();if((defaultCountyvalue!=selectedCountyvalue)&&(defaultvalue==selectedvalue)){jQuery("#ErrorMsg").html(strError);jQuery("#ErrorMsg").show();jQuery("#ErrorMsg").fadeOut(5000);return false}else{jQuery("#ErrorMsg").html("");jQuery("#ErrorMsg").hide()}return true}
