var undefinedObject;var openingListing_currentType="sale";
var openingListing_currentMode="list";
var openingListing_changeEnabled=true;
var openingListing_currentNode=0;
var openingListing_customType="";
var openingListing_LIST_MODE="list";
var openingListing_MAP_MODE="map";
var openingListing_selectedIDs=new Array();
function openingListing_switchToMode(mode){if(openingListing_changeEnabled){$("#col2_content_wrapper").animate({opacity:"hide"},{queue:"false",duration:100,easing:"linear"});
$("#col2_content_wrapper").html('<div class="preloader_wrapper_col3"><div id ="loader" class="preloader_light_32_alt"/><span>Loading</span></div>');
$("#col2_content_wrapper").animate({opacity:"show"},{queue:"false",duration:100,easing:"linear"});
openingListing_options.data="searchType="+openingListing_currentType+"&relocate=false&pageid="+openingListing_currentNode+"&customType="+openingListing_customType;
openingListing_options.url=openingListing_viewMode[mode];
$("#list_mode, #map_mode").removeClass("active");
openingListing_setCurrentMode(mode);
openingListing_changeEnabled=false;
$.ajax(openingListing_options);
}return false;}function openingListing_setCurrentMode(mode){openingListing_currentMode=mode;
switch(mode){case openingListing_LIST_MODE:$("#list_mode").addClass("active");
break;case openingListing_MAP_MODE:$("#map_mode").addClass("active");
recalculateNavHeight();
break;}}function openingListing_setCurrentType(searchType){if(openingListing_currentType!=searchType){openingListing_currentType=searchType;
}}function openingListing_setCurrentNode(value){openingListing_currentNode=value;
}function openingListing_setCustomType(customType){if(openingListing_customType!=customType){openingListing_customType=customType;
}}function propertyOpeningTimes_isSelectedId(value){var pos=openingListing_selectedIDs.indexOf(value);
if(pos==-1||pos==undefinedObject){return false;
}else{return true;}}function propertyOpeningTimes_selectedIDsPush(value){var pos=openingListing_selectedIDs.indexOf(value);
if(pos==-1||pos==undefinedObject){openingListing_selectedIDs.push(value);
}}function propertyOpeningTimes_selectedIDsPop(value){var pos=openingListing_selectedIDs.indexOf(value);
if(pos==0){openingListing_selectedIDs.shift();
}else{if(pos==openingListing_selectedIDs.length-1){openingListing_selectedIDs.pop();
}else{if(pos!=-1&&pos!=undefinedObject){openingListing_selectedIDs[pos]=openingListing_selectedIDs[0];
openingListing_selectedIDs.shift();
}}}}function propertyOpeningTimes_toggleCheckBox(attr1,attr2){var theValue=$("#"+attr1).attr("value");
if($("#"+attr1).attr("checked")==true){$("#"+attr2).addClass("checkBoxChecked");
propertyOpeningTimes_selectedIDsPush(theValue);
$("#"+attr1+"_row").removeClass("noprint");
}else{$("#"+attr2).removeClass("checkBoxChecked");
propertyOpeningTimes_selectedIDsPop(theValue);
$("#"+attr1+"_row").addClass("noprint");
}return false;}function propertyOpeningTimes_toggleAllCheckBoxes(attr1,attr2){var theValue=$("#"+attr1).attr("value");
if($("#"+attr1).attr("checked")==true){$("#"+attr2).addClass("checkBoxChecked");
$("#"+attr1+"_row").removeClass("noprint");
$("#opening_times_form").find("label").each(function(){$("#"+this.id).addClass("checkBoxChecked");
});$("#opening_times_form").find("input").each(function(){var theValue=$("#"+this.id).attr("value");
propertyOpeningTimes_selectedIDsPush(theValue);
$("#"+this.id+"_row").removeClass("noprint");
});}else{$("#"+attr2).removeClass("checkBoxChecked");
$("#"+attr1+"_row").addClass("noprint");
$("#opening_times_form").find("label").each(function(){$("#"+this.id).removeClass("checkBoxChecked");
});$("#opening_times_form").find("input").each(function(){var theValue=$("#"+this.id).attr("value");
propertyOpeningTimes_selectedIDsPop(theValue);
$("#"+this.id+"_row").addClass("noprint");
});}}function openingListing_sendEmail(pagePath,searchType,openType,openArray,nType,ntoKey,nfromKey,nReferer){var idList=openArray.toString();
var options={dataType:"json",url:"/site/master.cfm?fuseaction=site-ajax.validateAuth",type:"GET",async:false,cache:false,timeout:30,success:function(response){if(response.retcode=="OK"){subnav_show("site-ajax.displayPopupEmailOpenTimes&searchType="+searchType+"&openType="+openType+"&idList="+idList,0);
}else{subnav_show("site-ajax.displayLogin",1,"component","site-ajax.displayPopupEmailOpenTimes%26thisPagePath="+pagePath+"%26searchType="+searchType+"%26openType="+openType+"%26idList="+idList);
}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("An error occured, please try again\n"+textStatus+" "+errorThrown);
}};$.ajax(options);return false;
}function openingListing_sendMMS(pagePath,searchType,openType,openArray,nType,ntoKey,nfromKey,nReferer){var idList=openArray.toString();
var options={dataType:"json",url:"/site/master.cfm?fuseaction=site-ajax.validateAuth",type:"GET",async:false,cache:false,timeout:30,success:function(response){if(response.retcode=="OK"){subnav_show("site-ajax.displayPopupTimesMMS&searchType="+searchType+"&openType="+openType+"&idList="+idList,0);
}else{subnav_show("site-ajax.displayLogin",1,"component","site-ajax.displayPopupTimesMMS%26thisPagePath="+pagePath+"%26searchType="+searchType+"%26openType="+openType+"%26idList="+idList);
}},error:function(XMLHttpRequest,textStatus,errorThrown){alert("An error occured, please try again\n"+textStatus+" "+errorThrown);
}};$.ajax(options);return false;
}function openingListing_showHeader(display){if(display){$("#table_opening_times_header").css("display","block");
}else{$("#table_opening_times_header").css("display","none");
}}
