var win=null;function popup_image(G,F){var D=200;var A=300;var C=(screen.width-D)/2;var E=(screen.height-A)/2;var B="top="+E+",";B+="left="+C+",";B+="width="+D+",";B+="height="+A+",";B+="scrollbars=no,";B+="resizable=yes";F=F.replace(/\s/g,"%20");win=window.open("/image_popup.php?image_url="+G+"&title="+F,"image",B);win.window.focus()}function popup_product(F,H){var E=588;var A=440;var D="";if(screen.width>800){E=821;A=622;D="large"}var C=(screen.width-E)/2;var G=(screen.height-A)/2;var B="top="+G+",";B+="left="+C+",";B+="width="+E+",";B+="height="+A+",";B+="scrollbars=no,";B+="resizable=yes";win=window.open("/product_popup.php?style="+F+"&image="+H+"&template="+D,"gallery",B);win.window.focus()}function popup_page(E,A,F,B){var D=(screen.width-E)/2;var G=(screen.height-A)/2;var C="top="+G+",";C+="left="+D+",";C+="width="+E+",";C+="height="+A+",";C+="scrollbars=no,";C+="resizable=yes";win=window.open(F,"editor",C);win.window.focus()}var gid=function(){var C=new Array();for(var B=0;B<arguments.length;B++){var A=arguments[B];if(typeof (A)==="string"){A=document.getElementById(A)}if(arguments.length==1){return A}C.push(A)}return C};function newImage(A){if(document.images){var B=new Image();B.src=A;return B}return null}function clear_select(A){for(var B=A.childNodes.length-1;B>0;B--){if((A.childNodes[B].tagName=="OPTION"&&(A.childNodes[B].value>0))||A.childNodes[B].tagName=="OPTGROUP"){A.removeChild(A.childNodes[B])}}}function get_select_value(A){return A.options[A.selectedIndex].value}function set_select_value(A,C){for(var B=0;B<A.length;B++){if(A[B].value==C){A.selectedIndex=B;return }}}function update_dropdown_pt(C,F,E){if(F){var B=get_select_value(C);clear_select(C);for(var A=0;A<F.length;A++){if(F[A]){var D=document.createElement("option");C.appendChild(D);D.value=F[A];D.text=E[F[A]]}}set_select_value(C,B)}}function update_dropdown(C,F){var B=get_select_value(C);var E=C;var D;clear_select(C);for(var A=0;A<F.length;A++){if(F[A][2]=="optgroup"){D=document.createElement("optgroup");D.label=F[A][0];C.appendChild(D);E=D}else{D=document.createElement("option");E.appendChild(D);D.value=F[A][1];D.text=F[A][0]}}set_select_value(C,B)}function clear_checklist(C){var B=C.childNodes.length;for(var A=B-1;A>=0;A--){C.removeChild(C.childNodes[A])}}function update_checklist_pt(E,G,F){clear_checklist(E);if(G){for(var D=0;D<G.length;D++){if(G[D]){var A=document.createElement("input");A.type="checkbox";A.value=G[D];A.id="suburb_"+G[D];A.name="suburb_id[]";var C=document.createElement("label");C.innerHTML=F[G[D]];C.htmlFor="suburb_"+G[D];var B=document.createElement("br");E.appendChild(A);E.appendChild(C);E.appendChild(B)}}return true}else{return false}}function checkall(C){var B=C.childNodes.length;for(var A=B-1;A>=0;A--){if(C.childNodes[A].type=="checkbox"){C.childNodes[A].checked=true}}}function uncheckall(C){var B=C.childNodes.length;for(var A=B-1;A>=0;A--){if(C.childNodes[A].type=="checkbox"){C.childNodes[A].checked=false}}}function show(A){gid(A).style.display="block"}function hide(A){gid(A).style.display="none"}function validatePropertySearch(A){if(parseInt(get_select_value(gid("SearchType"+A)),10)<1){alert("Please select a search type");gid("SearchType"+A).focus();return false}return true}var useMap=false;function showMap(A){show("PropertyMap");hide("PropertyRegionContainer"+A);hide("showMapAction");show("hideMapAction");useMap=true}function hideMap(A){hide("PropertyMap");show("PropertyRegionContainer"+A);hide("hideMapAction");show("showMapAction");useMap=false}function updateMap(A){if(rm[A]){gid("PropertyMap").src=rm[A]}}function update_regions(A,B){var C=0;if(ptr[A]){C=A}update_dropdown_pt(gid("PropertyRegion"+B),ptr[C],r)}function hideSuburbs(A){hide("PropertySuburbContainer"+A);uncheckall(gid("PropertySuburbOptions"+A))}function checkSuburb(A){gid("suburb_"+A).checked=true}function change_property_type(C,B){var A=parseInt(get_select_value(gid("SearchType"+B)),10);if(A==4){if(C==64){hide("PropertyBuyLease"+B)}else{show("PropertyBuyLease"+B)}}}function change_area(C,B){var A=parseInt(get_select_value(gid("SearchType"+B)),10);var D=0;if((C>0)&&!useMap){if(pts[A]){D=A;if(update_checklist_pt(gid("PropertySuburbOptions"+B),pts[D][C],r)){show("PropertySuburbContainer"+B)}else{hideSuburbs(B)}}else{hideSuburbs(B)}}else{hideSuburbs(B)}}function change_region(C,B){var A=parseInt(get_select_value(gid("SearchType"+B)),10);var D=0;/*if(A==4){hide("PropertyAreaContainer"+B);return }*/if(C>0){if(pta[A]){D=A}update_dropdown_pt(gid("PropertyArea"+B),pta[D][C],r);show("PropertyAreaContainer"+B)}else{hide("PropertyAreaContainer"+B)}hideSuburbs(B);updateMap(C);change_area(parseInt(get_select_value(gid("PropertyArea"+B)),10),B)}function change_search_type(A,B){switch(parseInt(A,10)){case 1:show("PropertyPriceRange"+B);hide("PropertyRentalPriceRange"+B);show("PropertyBedRooms"+B);show("PropertyBathRooms"+B);hide("PropertyBuyLease"+B);break;case 2:show("PropertyPriceRange"+B);hide("PropertyRentalPriceRange"+B);show("PropertyBathRooms"+B);show("PropertyBedRooms"+B);hide("PropertyBuyLease"+B);break;case 3:show("PropertyPriceRange"+B);hide("PropertyRentalPriceRange"+B);hide("PropertyBathRooms"+B);hide("PropertyBedRooms"+B);hide("PropertyBuyLease"+B);break;case 4:show("PropertyPriceRange"+B);hide("PropertyRentalPriceRange"+B);hide("PropertyBathRooms"+B);hide("PropertyBedRooms"+B);show("PropertyBuyLease"+B);break;case 5:hide("PropertyPriceRange"+B);show("PropertyRentalPriceRange"+B);show("PropertyBedRooms"+B);hide("PropertyBathRooms"+B);hide("PropertyBuyLease"+B);break;default:hide("PropertyTypeContainer"+B);hide("PropertyPriceRange"+B);hide("PropertyRentalPriceRange"+B);hide("PropertyBedRooms"+B);hide("PropertyBathRooms"+B);hide("PropertyBuyLease"+B);update_regions(A,B);return }show("PropertyTypeContainer"+B);update_dropdown(gid("PropertyType"+B),pt[A]);change_property_type(parseInt(get_select_value(gid("PropertyType"+B)),10),B);update_regions(A,B);change_region(parseInt(get_select_value(gid("PropertyRegion"+B)),10),B)}function setSearchType(A,B){set_select_value(gid("SearchType"+B),A);change_search_type(A,B)}function setPropertyType(B,A){set_select_value(gid("PropertyType"+A),B);change_property_type(B,A)}function setRegion(B,A){set_select_value(gid("PropertyRegion"+A),B);change_region(B,A)}function setArea(B,A){set_select_value(gid("PropertyArea"+A),B);change_area(B,A)}function update_prices(A,G,F,D){var C=gid(A);for(var B=0;B<G.length;B++){var E=document.createElement("option");C.appendChild(E);E.value=F[B];E.text=G[B]}set_select_value(C,D)}var preloadFlag=false;function preloadImages(){if(document.images){var A=newImage("/images/spacer.gif");var H=newImage("images/menu-arrow.gif");var L=newImage("/images/menu_1-on.gif");var M=newImage("/images/menu_1-off.gif");var F=newImage("/images/menu_6-on.gif");var D=newImage("/images/menu_6-off.gif");var N=newImage("/images/menu_15-on.gif");var J=newImage("/images/menu_15-off.gif");var I=newImage("/images/menu_16-on.gif");var G=newImage("/images/menu_16-off.gif");var B=newImage("/images/menu_17-on.gif");var C=newImage("/images/menu_17-off.gif");var E=newImage("/images/menu_113-on.gif");var K=newImage("/images/menu_113-off.gif");preloadFlag=true}}var iActive=new Array();iActive[1]=false;iActive[6]=false;iActive[15]=false;iActive[16]=false;iActive[17]=false;iActive[113]=false;function hide_tabs(){if(iActive[1]){gid("menu_img_1").src="/images/menu_1-off.gif";iActive[1]=false}if(iActive[6]){gid("menu_img_6").src="/images/menu_6-off.gif";iActive[6]=false}if(iActive[15]){gid("menu_img_15").src="/images/menu_15-off.gif";iActive[15]=false}if(iActive[16]){gid("menu_img_16").src="/images/menu_16-off.gif";iActive[16]=false}if(iActive[17]){gid("menu_img_17").src="/images/menu_17-off.gif";iActive[17]=false}if(iActive[113]){gid("menu_img_113").src="/images/menu_113-off.gif";iActive[113]=false}}function mouseover(A,B){A.src="/images/forsale/forsale"+B+"_on.gif"}function mouseout(A,B){A.src="/images/forsale/forsale"+B+"_off.gif"}function m_over(A,B){popup("mm_"+A);hide_tabs();if(!B){gid("menu_img_"+A).src="/images/menu_"+A+"-on.gif";iActive[A]=true}}function m_out(){popdown()}function M_hideLayer(B,A){if(!A){hide_tabs()}}var AC_FL_RunContent=0
