if(window&&window.top&&(window!=window.top)){
top.location.href=location.href;
}
var STYLE_LABEL="label";
var STYLE_CITY_LABEL="label city";
var STYLE_LABEL_SELECTED="label selected";
function changeTab(_1,_2,_3,_4,_5){
var _6=document.getElementById(_1);
var _7=_6.getElementsByTagName("div");
for(var i=0;i<_7.length;i++){
var _9=_7[i];
var _a=_9.className&&(_9.className.indexOf("folder")>=0);
if(_a&&(_9.id==_2)){
_9.className="folder more";
}else{
if(_a){
_9.className="folder less";
}
}
}
var _b=document.getElementById("propertieslist");
if(_b&&(_b!=null)){
_6.removeChild(_b);
}
if(_5&&(_5!=null)){
var _c=createDivElement("propertieslist","folder more");
var _d=getPropertyList(_5);
_c.appendChild(_d);
_6.appendChild(_c);
}
var _e=document.getElementById(_3);
var _f=_e.getElementsByTagName("li");
for(var i=0;i<_f.length;i++){
var _10=_f[i];
if(_10.id==_4){
_10.className="active";
}else{
_10.className="deactive";
}
}
}
function getPropertyList(_11){
var _12=createUnorderedListElement(null,"propertylist");
for(var i=0;i<_11.length;i++){
var _14=_11[i];
var _15=createListItemElement(null,null);
var _16=createImageElement(null,null,_14.imageUrl,"alt");
var _17=createLinkElement(null,_14.href,null);
_17.appendChild(_16);
_15.appendChild(_17);
_12.appendChild(_15);
var _18=createDivElement(null,null);
var _19=createLinkElement(null,_14.href,_14.title);
_18.appendChild(_19);
var _1a=createBrElement();
_18.appendChild(_1a);
var _1b=document.createTextNode(_14.description);
_18.appendChild(_1b);
_15.appendChild(_18);
_12.appendChild(_15);
}
return _12;
}
function City(_1c,_x,_y,_1f,_20){
this.identifier=_1c;
this.displayName=_1f;
this.x=_x;
this.y=_y;
this.url=_20;
}
City.prototype.getIdentifier=function(){
return this.identifier;
};
City.prototype.getX=function(){
return this.x;
};
City.prototype.getY=function(){
return this.y;
};
City.prototype.getDisplayName=function(){
return this.displayName;
};
City.prototype.getUrl=function(){
return this.url;
};
function Area(_21,_22,_23,_x,_y,_26){
this.identifier=_21;
this.name=_22;
this.categories=_23;
this.x=_x;
this.y=_y;
this.displayName=_26;
}
Area.prototype.getIdentifier=function(){
return this.identifier;
};
Area.prototype.getName=function(){
return this.name;
};
Area.prototype.getCategories=function(){
return this.categories;
};
Area.prototype.getX=function(){
return this.x;
};
Area.prototype.getY=function(){
return this.y;
};
Area.prototype.getDisplayName=function(){
return this.displayName;
};
function doOnload(){
paintAreaDivs("map");
paintAreaSelect("map","280","10");
paintCityDivs("map");
}
function paintAreaSelect(_27,_28,_29){
var _2a=document.createElement("select");
var _2b=new Option();
_2b.value="";
_2b.text=pleaseSelect;
_2a.options[_2a.options.length]=_2b;
for(var i=0;i<areas.length;i++){
var _2d=areas[i];
var _2b=new Option();
_2b.value=_2d.getIdentifier();
_2b.text=_2d.getName();
_2a.options[_2a.options.length]=_2b;
}
_2a.onchange=function(){
showSelectedHiddenLayer(getSelectedOptionValue(_2a));
};
var _2e=document.getElementById(_27);
_2a.style.position="absolute";
_2a.style.left=_28+"px";
_2a.style.top=_29+"px";
_2e.appendChild(_2a);
}
function getSelectedOptionValue(_2f){
var _30;
if(_2f.selectedIndex>-1){
_30=_2f.options[_2f.selectedIndex].value;
}else{
_30="";
}
return _30;
}
function paintAreaDivs(_31){
var _32=document.getElementById(_31);
for(var i=0;i<areas.length;i++){
var _34=areas[i];
var _35=getAreaPopupDiv(_34);
layerArray[layerArray.length]=_35.id;
var _36=getAreaLabelDiv(_34);
_32.appendChild(_35);
_32.appendChild(_36);
}
}
function paintCityDivs(_37){
var _38=document.getElementById(_37);
for(var i=0;i<cities.length;i++){
var _3a=cities[i];
var _3b=getCityLabelDiv(_3a);
_38.appendChild(_3b);
}
}
function getAreaPopupDiv(_3c){
var _3d=document.createElement("div");
_3d.className="options";
var _3e="options-"+_3c.getIdentifier();
_3d.id=_3e;
var _3f=document.createElement("div");
_3f.className="onclicktitle";
var _40=document.createElement("span");
_40.className="closelink";
_40.appendChild(document.createTextNode(" [x]"));
_40.onclick=function(){
hideShownLayer(_3e);
deselectLabel(_3c.getIdentifier());
};
var _41=document.createTextNode(_3c.getName());
_3f.appendChild(_41);
_3f.appendChild(_40);
_3d.appendChild(_3f);
_3d.appendChild(getLinkElement(hrefPrefix+_3c.getIdentifier()+hrefSaleSuffix,propertiesForSale));
_3d.appendChild(document.createElement("br"));
_3d.appendChild(getLinkElement(hrefPrefix+_3c.getIdentifier()+hrefRentalStandardSuffix,propertiesRentalStandard));
_3d.appendChild(document.createElement("br"));
_3d.appendChild(getLinkElement(hrefPrefix+_3c.getIdentifier()+hrefRentalShortTermSuffix,propertiesRentalShortTerm));
_3d.appendChild(document.createElement("br"));
_3d.appendChild(getLinkElement(hrefGuidePrefix+_3c.getIdentifier()+hrefGuideSuffix,areaGuide));
return _3d;
}
function getCityLabelDiv(_42){
var _43=document.createElement("div");
_43.className=STYLE_CITY_LABEL;
_43.id="label-"+_42.getIdentifier();
_43.style.left=_42.getX()+"px";
_43.style.top=_42.getY()+"px";
var _44=document.createElement("a");
_44.href="http://"+_42.getUrl();
_44.style.color="black";
_44.innerHTML=_42.getDisplayName();
_43.appendChild(_44);
return _43;
}
function getAreaLabelDiv(_45){
var _46=document.createElement("div");
_46.className=STYLE_LABEL;
_46.id="label-"+_45.getIdentifier();
_46.style.left=_45.getX()+"px";
_46.style.top=_45.getY()+"px";
_46.onclick=function(_47){
showSelectedHiddenLayer(_45.getIdentifier());
};
_46.onmouseover=function(_48){
_46.className=STYLE_LABEL_SELECTED;
};
_46.onmouseout=function(_49){
_46.className=STYLE_LABEL;
};
var _4a=document.createElement("span");
_4a.id="m_"+_45.getIdentifier();
_4a.innerHTML=_45.getDisplayName();
_46.appendChild(_4a);
return _46;
}
function getLinkElement(_4b,_4c){
var _4d=document.createElement("a");
_4d.href=_4b;
var _4e=document.createTextNode(_4c);
_4d.appendChild(_4e);
return _4d;
}
function showSelectedHiddenLayer(_4f){
var _50=document.getElementById("options-"+_4f);
if(_50){
var _51=getArea(_4f);
var _52=20+new Number(_51.getX());
var _53=20+new Number(_51.getY());
selectDeselectLabels(_4f);
paintHiddenLayer(_50,_52,_53);
}
}
function selectDeselectLabels(_54){
for(var i=0;i<areas.length;i++){
var _56=areas[i];
var _57=_56.getIdentifier();
var _58=document.getElementById("label-"+_57);
if(_57==_54){
_58.className=STYLE_LABEL_SELECTED;
}else{
_58.className=STYLE_LABEL;
}
}
}
function getArea(_59){
var _5a=null;
for(var i=0;i<areas.length;i++){
var _5c=areas[i];
if(_5c.getIdentifier()==_59){
_5a=_5c;
break;
}
}
return _5a;
}
function paintHiddenLayer(_5d,_x,_y){
_5d.style.visibility="visible";
_5d.style.left=_x+"px";
_5d.style.top=_y+"px";
hideLayersExcept(_5d.id);
}
function hideLayersExcept(_60){
for(var i=0;i<layerArray.length;i++){
if(layerArray[i]!=_60){
hideShownLayer(layerArray[i]);
}
}
}
function hideShownLayer(_62){
var _63=document.getElementById(_62);
if(_63){
_63.style.visibility="hidden";
}
}
function deselectLabel(_64){
var _65=document.getElementById("label-"+_64);
_65.className=STYLE_LABEL;
}

