var city=[];var region=[];var country=[];var cssObj={"background-color":"transparent","font-weight":""};var cssObj1={"background-color":"#EFEDAC","font-weight":"bold"};$(document)["ready"](function (){$(".pagerLink")["click"](setCurrentPage);$("#selected_country")["dropdownchecklist"]({width:150});$("#selected_region")["dropdownchecklist"]({width:150});$("#selected_city")["dropdownchecklist"]({width:150});$(".navmenu")["click"](function (){if(!$("#selectedItems").is(":visible"))$("#selectedItems").show();var _0x43e0x5=$(this)["attr"]("id");attrStr=_0x43e0x5["split"]("_");if($("#chk_"+attrStr[0]+"_"+attrStr[1])["attr"]("checked")){$("#chk_"+attrStr[0]+"_"+attrStr[1])["attr"]("checked","");$(this)["css"](cssObj);removeSelectedItems(attrStr[0],attrStr[1]);if(attrStr[0]=="city"){city=removeElemFromArr(city,attrStr[1]);} else {if(attrStr[0]=="region"){region=removeElemFromArr(region,attrStr[1]);} else {if(attrStr[0]=="country"){country=removeElemFromArr(country,attrStr[1]);} ;} ;} ;} else {setSelectedItems(attrStr[0],attrStr[1],$(this)["text"]());$("#chk_"+attrStr[0]+"_"+attrStr[1])["attr"]("checked","true");$(this)["css"](cssObj1);if(attrStr[0]=="city"){city[city["length"]]=attrStr[1];} else {if(attrStr[0]=="region"){region[region["length"]]=attrStr[1];} else {if(attrStr[0]=="country"){country[country["length"]]=attrStr[1];} ;} ;} ;} ;currentPage=1;getObjects();} );$(".navmenu")["hover"](function (){$(this)["css"]({"color":"#116086","text-decoration":"none","background-color":"#EFEDAC","font-weight":"bold"});} ,function (){var _0x43e0x5=$(this)["attr"]("id");attrStr=_0x43e0x5["split"]("_");if(!$("#chk_"+attrStr[0]+"_"+attrStr[1])["attr"]("checked")){$(this)["css"]({"color":"#990000","text-decoration":"none","background-color":"transparent","font-weight":""});} ;} );} );function setCurrentPage(){currentPage=$(this)["text"]();getObjects();return false;} ;function getObjects(){$("#objects")["slideToggle"]("slow");$["get"]("/WS/objects.php",{"country[]":country,"region[]":region,"city[]":city,lang:lang,section:section,currentPage:currentPage},function (_0x43e0x8){$("#objects")["html"](_0x43e0x8);$("#objects")["slideToggle"]("slow");$(".pagerLink")["click"](setCurrentPage);$(".nextPagerBlock")["click"](nextClick);$(".prevPagerBlock")["click"](prevClick);} );} ;function removeElemFromArr(_0x43e0xa,_0x43e0xb){_0x43e0xa=jQuery["grep"](_0x43e0xa,function (_0x43e0xc){return _0x43e0xc!=_0x43e0xb;} );return _0x43e0xa;} ;function setSelectedItems(_0x43e0xe,_0x43e0xf,_0x43e0x10){$("#selected_"+_0x43e0xe)["dropdownchecklist"]("destroy");$("#selected_"+_0x43e0xe)["append"]($("\x3Coption\x3E\x3C/option\x3E")["attr"]("value",_0x43e0xf)["attr"]("selected","selected")["text"](_0x43e0x10));$("#selected_"+_0x43e0xe)["dropdownchecklist"]({width:150,onComplete:function (_0x43e0x11){removeUnselectedItems(_0x43e0x11);} });} ;function removeSelectedItems(_0x43e0xe,_0x43e0xf){$("#selected_"+_0x43e0xe)["dropdownchecklist"]("destroy");$("#selected_"+_0x43e0xe+" option[value=\x27"+_0x43e0xf+"\x27]")["remove"]();$("#selected_"+_0x43e0xe)["dropdownchecklist"]({width:150,onComplete:function (_0x43e0x11){removeUnselectedItems(_0x43e0x11);} });} ;function removeUnselectedItems(_0x43e0x11){$("#"+_0x43e0x11["id"])["dropdownchecklist"]("destroy");unselectedItems=[];for(i=0;i<_0x43e0x11["options"]["length"];i++){if(!_0x43e0x11["options"][i]["selected"]){attrStr=_0x43e0x11["id"]["split"]("_");eval(attrStr[1]+" = removeElemFromArr( "+attrStr[1]+", "+_0x43e0x11["options"][i]["value"]+")");$("#chk_"+attrStr[1]+"_"+_0x43e0x11["options"][i]["value"])["attr"]("checked","");$("#"+attrStr[1]+"_"+_0x43e0x11["options"][i]["value"])["css"]({"background-color":"transparent","font-weight":""});unselectedItems[0]=_0x43e0x11["options"][i]["value"];} ;} ;for(i=0;i<unselectedItems["length"];i++){$("#"+_0x43e0x11["id"]+" option[value=\x27"+unselectedItems[i]+"\x27]")["remove"]();} ;getObjects();$("#"+_0x43e0x11["id"])["dropdownchecklist"]({width:150,onComplete:function (_0x43e0x11){removeUnselectedItems(_0x43e0x11);} });} ;
