var util=new function(){
var _1=null;
var _2=true;
this.useFormData=function(){
return _2;
};
this.setUseFormData=function(_3){
_2=_3;
};
this.loadCssFile=loadCssFile;
var _4=new CurrentBrowser();
this.currentBrowser=_4;
this.currentOs=_4.operatingSystem;
this.isMobile=_4.isMobile;
this.fixIEpng=false;
this.fixIEmarking=false;
this.isIE=false;
this.isIE6=false;
if(document.createElementNS){
this.createElement=createElementNS;
}else{
this.createElement=createElementHtml;
}
if(_4.browser=="Explorer"){
this.onPageLoad=onPageLoad;
this.getEvent=getEvent_ie;
this.xml2text=xml2text_ie;
this.attach=attach_ie;
this.stopPropagation=stopPropagation_ie;
this.isIE=true;
if(_4.version<7){
if(document.compatMode=="BackCompat"){
this.getScrollbarPosition=getScrollbarPosition_ie6quirks;
}else{
this.getScrollbarPosition=getScrollbarPosition_ie6;
}
this.getWindowHeight=getWindowHeight_ie6;
this.getWindowWidth=getWindowWidth_ie6;
this.isIE6=true;
this.fixIEpng=true;
this.fixIEmarking=true;
this.loadPngImage=loadPngImage_ie6;
this.getXmlhttp=getXmlhttp_ie6;
}else{
this.getScrollbarPosition=getScrollbarPosition_ie;
this.fixIEpng=false;
this.fixIEmarking=false;
this.loadPngImage=loadPngImage;
this.getXmlhttp=getXmlhttp_ie;
this.getWindowHeight=getWindowHeight_ie;
this.getWindowWidth=getWindowWidth_ie;
}
}else{
if(_4.browser=="Firefox"){
this.onPageLoad=onPageLoad_ff;
this.fixIEpng=false;
this.fixIEmarking=false;
this.getEvent=getEvent_ff;
this.loadPngImage=loadPngImage;
this.getXmlhttp=getXmlhttp;
this.xml2text=xml2text_ff;
this.getScrollbarPosition=getScrollbarPosition_ff;
this.getWindowHeight=getWindowHeight_ff;
this.getWindowWidth=getWindowWidth_ff;
this.stopPropagation=stopPropagation_ff;
this.attach=attach_ff;
}else{
if(_4.browser=="Safari"){
this.onPageLoad=onPageLoad;
this.fixIEpng=false;
this.fixIEmarking=false;
this.getEvent=getEvent_ff;
this.loadPngImage=loadPngImage;
this.getXmlhttp=getXmlhttp;
this.xml2text=xml2text;
if(_4.version>=520){
this.getScrollbarPosition=getScrollbarPosition_ff;
}else{
this.getScrollbarPosition=getScrollbarPosition_safari;
}
this.getWindowHeight=getWindowHeight_ff;
this.getWindowWidth=getWindowWidth_ff;
this.stopPropagation=stopPropagation_ff;
this.attach=attach_ff;
if(_4.operatingSystem=="Series60"){
_2=false;
}
}else{
this.onPageLoad=onPageLoad;
this.fixIEpng=false;
this.fixIEmarking=false;
this.getEvent=getEvent;
this.loadPngImage=loadPngImage;
this.getXmlhttp=getXmlhttp;
this.xml2text=xml2text;
this.getScrollbarPosition=getScrollbarPosition;
this.stopPropagation=stopPropagation;
this.attach=attach;
this.getWindowHeight=getWindowHeight;
this.getWindowWidth=getWindowWidth;
}
}
}
function onPageLoad(_5,_6){
if(_6==null){
window.onload=_5;
}else{
if(_1!=null){
clearTimeout(_1);
}
if(attach(_6)==null){
_1=setTimeout(function(){
util.onPageLoad(_5,_6);
},10);
}else{
_5();
}
}
}
function onPageLoad_ff(_7,_8){
if(_8==null){
if(document.addEventListener!=null){
document.addEventListener("DOMContentLoaded",_7,false);
}else{
window.onload=_7;
}
}else{
if(_1!=null){
clearTimeout(_1);
}
if(attach(_8)==null){
_1=setTimeout(function(){
util.onPageLoad(_7,_8);
},10);
}else{
_7();
}
}
}
function createElement(_9){
if(util.createElementNS){
return document.createElementNS("http://www.w3.org/1999/xhtml","html:"+_9);
}else{
return document.createElement(_9);
}
}
function createElementNS(_a){
return document.createElementNS("http://www.w3.org/1999/xhtml","html:"+_a);
}
function createElementHtml(_b){
return document.createElement(_b);
}
function xml2text(_c){
try{
var _d=null;
_d=new XMLSerializer();
var _e=_d.serializeToString(_c);
if(_e==null){
return xml2text_serializer(_c);
}else{
return _e;
}
}
catch(e){
try{
return _c.xml;
}
catch(e){
return "<error>No XML Serializer available</error>";
}
}
}
function xml2text_serializer(_f){
var _10="";
if(_f.nodeType==9){
if(_f.hasChildNodes()){
for(var _11=_f.firstChild;_11;){
_10+=xml2text_serializer(_11);
_11=_11.nextSibling;
}
}
}else{
if(_f.nodeType==3){
_10.data;
}else{
if(_f.nodeType==1){
_10="<"+_f.tagName;
if(_f.hasAttributes()){
var _12=_f.attributes;
for(var i=0;i<_12.length;i++){
_10+=" "+_12[i].name+"=\""+_12[i].value+"\"";
}
}
if(_f.hasChildNodes()){
_10+=">";
for(var _11=_f.firstChild;_11;){
_10+=xml2text_serializer(_11);
_11=_11.nextSibling;
}
_10+="</"+_f.tagName+">";
}else{
_10+=" />";
}
}
}
}
return _10;
}
function xml2text_ff(_14){
var _15=null;
_15=new XMLSerializer();
return _15.serializeToString(_14);
}
function xml2text_ie(_16){
return _16.xml;
}
function getScrollbarPosition(){
var pos=null;
if(typeof (window.pageYOffset)=="number"){
return new Point(window.pageXOffset,window.pageYOffset);
}else{
if(document.body.scrollTop>0||document.body.scrollLeft>0){
pos=new Point(document.body.scrollLeft,document.body.scrollTop);
}else{
pos=new Point(document.documentElement["scrollLeft"],document.documentElement["scrollTop"]);
}
}
return pos;
}
function getScrollbarPosition_ie6(){
return new Point(document.documentElement["scrollLeft"],document.documentElement["scrollTop"]);
}
function getScrollbarPosition_ie6quirks(){
return new Point(document.body.scrollLeft,document.body.scrollTop);
}
function getScrollbarPosition_ie(){
return new Point(document.documentElement["scrollLeft"],document.documentElement["scrollTop"]);
}
function getScrollbarPosition_ff(){
return new Point(window.pageXOffset,window.pageYOffset);
}
function getScrollbarPosition_safari(){
return new Point(0,0);
}
function getEvent(_18){
if(!_18){
return window.event;
}
return _18;
}
function getEvent_ie(_19){
return window.event;
}
function getEvent_ff(_1a){
return _1a;
}
function loadPngImage(_1b,url){
_1b.src=url+".png";
}
function loadPngImage_ie6(_1d,url){
_1d.src=url+".gif";
_1d.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod='scale', src='"+url+".png');";
}
function getXmlhttp(){
return new XMLHttpRequest();
}
function getXmlhttp_ie(){
return new ActiveXObject("Microsoft.XMLHTTP");
}
function getXmlhttp_ie6(){
return new ActiveXObject("Msxml2.XMLHTTP");
}
function attach(id){
if(document.all){
return document.all[id];
}else{
if(document.layers){
return document.layers[id];
}else{
return document.getElementById(id);
}
}
}
function attach_ie(id){
return document.all[id];
}
function attach_ff(id){
return document.getElementById(id);
}
function stopPropagation(_22){
var ev=getEvent(_22);
if(ev.stopPropagation){
ev.stopPropagation();
}else{
ev.cancelBubble=true;
}
}
function stopPropagation_ff(ev){
ev.stopPropagation();
}
function stopPropagation_ie(ev){
window.event.cancelBubble=true;
}
function getWindowHeight(){
if(window.innerHeight){
return window.innerHeight;
}else{
return document.documentElement.clientHeight;
}
}
function getWindowHeight_ie(){
return document.documentElement.clientHeight;
}
function getWindowHeight_ff(){
return window.innerHeight;
}
function getWindowHeight_ie6(){
if(document.documentElement.clientHeight>0){
return document.documentElement.clientHeight;
}else{
return document.body.clientHeight;
}
}
function getWindowWidth(){
if(window.innerWidth){
return window.innerWidth;
}else{
return document.documentElement.clientWidth;
}
}
function getWindowWidth_ie(){
return document.documentElement.clientWidth;
}
function getWindowWidth_ff(){
return window.innerWidth;
}
function getWindowWidth_ie6(){
if(document.documentElement.clientWidth>0){
return document.documentElement.clientWidth;
}else{
return document.body.clientWidth;
}
}
this.objectXY=function(_26){
var pos=this.getScrollbarPosition();
for(var _28=_26;_28;_28=_28.offsetParent){
pos.x+=_28.offsetLeft;
pos.y+=_28.offsetTop;
}
return pos;
};
this.inObjectXY=function(ev,_2a){
var _2b=this.getScrollbarPosition();
var _2c=new Point(ev.clientX+_2b.x,ev.clientY+_2b.y);
for(var _2d=_2a;_2d;_2d=_2d.offsetParent){
_2c.x-=_2d.offsetLeft;
_2c.y-=_2d.offsetTop;
}
return _2c;
};
this.inObjectXYname=function(ev,_2f){
var _30=attach(_2f);
return this.inObjectXY(ev,_30);
};
this.parameterObject2Text=function(_31){
var xml="";
if(_31!=null){
for(var i=0;i<_31.length;i++){
xml+=_31[i].attributename+"=\""+this.xmlAttributeString(_31[i].attributevalue)+"\" ";
}
}
return xml;
};
this.falseFunction=function(){
return false;
};
this.voidFunction=function(){
};
this.getFreeIndex=function(_34){
try{
var _35=_34.length;
while(_34[_35]!=undefined){
_35++;
}
return _35;
}
catch(e){
return null;
}
};
this.leavingObject=function(ev,_37){
if(_37==null){
return false;
}else{
var _38=util.inObjectXY(ev,_37);
return _38.x<=1||_38.y<=1||_38.x>_37.clientWidth||_38.y>_37.clientHeight;
}
};
this.xmlAttributeString=function(_39){
if(_39==null){
return null;
}else{
var _3a=_39+"";
_3a=_3a.replace(/&/g,"&amp;");
_3a=_3a.replace(/</g,"&lt;");
_3a=_3a.replace(/>/g,"&gt;");
_3a=_3a.replace(/\'/g,"&apos;");
_3a=_3a.replace(/"/g,"&quot;");
return _3a;
}
};
this.xmlUnescape=function(_3b){
if(_3b==null){
return null;
}else{
var _3c=_3b+"";
_3c=_3c.replace(/&amp;/g,"&");
_3c=_3c.replace(/&lt;/g,"<");
_3c=_3c.replace(/&gt;/g,">");
_3c=_3c.replace(/&apos;/g,"'");
_3c=_3c.replace(/&quot;/g,"\"");
return _3c;
}
};
this.xmlElementTextContent=function(_3d){
var _3e="";
var _3f=_3d.firstChild;
while(_3f!=null){
if(_3f.nodeType==3){
_3e+=_3f.nodeValue;
}
_3f=_3f.nextSibling;
}
return _3e;
};
function loadCssFile(_40){
var _41=util.createElement("link");
_41.setAttribute("rel","stylesheet");
_41.setAttribute("type","text/css");
_41.setAttribute("href",_40);
var _42=document.getElementsByTagName("head");
_42[0].appendChild(_41);
}
};
function Point(x,y){
this.x=x;
this.y=y;
}
function Tile(id,_46,_47){
this.id=id;
this.indexCol=_46;
this.indexRow=_47;
this.col=_46;
this.row=_47;
this.x=0;
this.y=0;
this.div=null;
this.created=true;
}
function Attribute(_48,_49){
this.attributename=_48;
this.attributevalue=_49;
}
function AssociatedArray(){
var _4a=new Array();
this.get=get;
this.set=set;
function set(_4b,_4c){
var _4d=false;
for(var i=0;i<_4a.length&&!_4d;i++){
if(_4a[i]!=null&&_4a[i].itemName==_4b){
_4d=true;
_4a[i].itemValue=_4c;
}
}
if(!_4d){
_4a.push({"itemName":_4b,"itemValue":_4c});
}
}
function get(_4f){
var _50=null;
for(var i=0;i<_4a.length&&_50==null;i++){
if(_4a[i]!=null&&_4a[i].itemName==_4f){
_50=_4a[i].itemValue;
}
}
return _50;
}
}
function CurrentBrowser(){
function searchString(_52,_53){
for(var i=0;i<_52.length;i++){
var _55=_52[i].string;
var _56=_52[i].prop;
this.versionSearchString=_52[i].versionSearch||_52[i].identity;
if(_55){
if(_55.indexOf(_52[i].subString)!=-1){
return _52[i].identity;
}
}else{
if(_56){
return _52[i].identity;
}
}
}
return _53;
}
function searchVersion(_57){
var _58=_57.indexOf(this.versionSearchString);
if(_58==-1){
return null;
}
return parseFloat(_57.substring(_58+this.versionSearchString.length+1));
}
var _59=new Array({string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"});
this.browser=searchString(_59,"Unknown Browser");
this.version=searchVersion(navigator.userAgent,null)||searchVersion(navigator.appVersion,null)||"Unknown Version";
this.operatingSystem=navigator.platform;
this.isMobile=(navigator.platform=="Series60")||(navigator.platform=="Symbian OS")||(navigator.platform=="SymbianOS")||(navigator.platform=="Series80")||(navigator.platform=="Windows CE")||(navigator.platform=="Pocket PC")||(navigator.platform=="Windows Mobile'")||(navigator.platform=="PalmOS'");
}
function DropDownList(_5a,_5b,_5c){
var _5d=null;
var _5e=null;
var _5f=null;
var _60=new Array();
var _61=new Array();
var _62=null;
var div=null;
createDiv();
setEvents();
this.show=show;
this.hide=hide;
function createDiv(){
div=util.createElement("div");
div.className=_5c;
_5a.parentNode.appendChild(div);
div.style.left="0px";
div.style.top="0px";
var _64=util.objectXY(div);
var pos=util.objectXY(_5a);
div.style.left=(pos.x-_64.x)+"px";
div.style.top=(pos.y-_64.y+_5a.offsetHeight)+"px";
}
function setEvents(){
_5e=_5a.onblur;
_5a.onblur=inputLeaveEvent;
_5d=_5a.onkeydown;
_5a.onkeydown=keyDownHandling;
}
function inputLeaveEvent(_66){
_5f=setTimeout(hide,100);
if(_5e!=null){
_5e(_66);
}
}
function keyDownHandling(_67){
var _68=null;
var ev=util.getEvent(_67);
if(ev.keyCode){
_68=ev.keyCode;
}else{
if(ev.which){
_68=ev.which;
}
}
if(div.style.visibility=="visible"){
if(_68==13){
if(_62!=null){
select(_62);
}
}else{
if(_68==40&&(_62<_60.length-1)){
highlight(_62+1);
}else{
if(_68==38&&_62>0){
highlight(_62-1);
}
}
}
}
if(_5d!=null){
_5d(_67);
}
}
function show(_6a){
empty();
var _6b=_60.length;
for(var i=0;i<_6a.length;i++){
_60[_6b+i]=getOptionDiv(_6a[i],_6b+i);
_61[_6b+i]=_6a[i];
div.appendChild(_60[_6b+i]);
}
_62=_6b;
_60[_62].className=_5c+"_item_select";
div.style.visibility="visible";
}
function hide(){
if(_5f!=null){
clearTimeout(_5f);
}
div.style.visibility="hidden";
}
function getOptionDiv(_6d,_6e){
var _6f=util.createElement("div");
_6f.appendChild(document.createTextNode(_6d.caption));
_6f.className=_5c+"_item";
_6f.onmouseover=function(){
return highlight(_6e);
};
_6f.onclick=function(){
return select(_6e);
};
return _6f;
}
function empty(){
for(var i=0;i<_60.length;i++){
div.removeChild(_60[i]);
}
_60=new Array();
}
function highlight(_71){
_60[_62].className=_5c+"_item";
_62=_71;
_60[_62].className=_5c+"_item_select";
}
function select(_72){
hide();
_5b(_61[_72].callbackArgument);
}
}
function EventHandler(){
var _73=new Array();
this.addListener=addListener;
this.deleteListener=deleteListener;
this.triggerEvent=triggerEvent;
function addListener(_74){
var id=util.getFreeIndex(_73);
_73[id]=_74;
return id;
}
function deleteListener(id){
if(id!=null){
_73[id]=null;
var _77=true;
for(var i=0;i<_73.length&&_77;i++){
if(_73[i]!=null){
_77=false;
}
}
if(_77){
_73=new Array();
}
}
}
function triggerEvent(_79){
for(var id=0;id<_73.length;id++){
if(_73[id]!=null){
_73[id](_79);
}
}
}
}
var visualFx=new function(){
this.shrinkHiding=shrinkHiding;
function shrinkHiding(_7b,_7c,_7d,_7e,_7f,_80,_81,_82,_83){
var _84=_7d;
var _85=_7e;
var _86=null;
var _87=1;
var _88=1;
var _89=true;
var _8a=true;
var _8b=true;
this.hide=hide;
this.show=show;
this.setShrinkDirection=setShrinkDirection;
start();
function start(){
_7b.oncontextmenu=util.stopPropagation;
_7b.onmousedown=util.stopPropagation;
_7b.ondblclick=util.stopPropagation;
_8b=_7f;
if(_7f){
_7b.onclick=show;
}else{
_7b.onclick=hide;
}
}
function setShrinkDirection(_8c,_8d){
_89=_8d;
_8a=_8c;
}
function hide(_8e){
if(_8b){
if(_8e){
try{
_8e();
}
catch(e){
}
}
}else{
if(_84==null){
_84=Math.round(_7c.offsetWidth);
}
if(_85==null){
_85=Math.round(_7c.offsetHeight);
}
_87=Math.round(_84/_82);
_88=Math.round(_85/_82);
_7b.onclick=util.stopPropagation;
if(_86!=null){
clearTimeout(_86);
}
_86=setTimeout(function(){
hideTimed(1,_8e);
},_81);
}
}
function hideTimed(_8f,_90){
if(_86!=null){
clearTimeout(_86);
}
var _91=_84-_87*_8f;
if(_91<0){
_91=0;
}
var _92=_85-_88*_8f;
if(_92<0){
_92=0;
}
if(_92==0&&_91==0){
if(util.isIE6){
if(_8a){
_7c.style.width="1px";
}
if(_89){
_7c.style.height="1px";
}
}else{
if(_8a){
_7c.style.width="0px";
}
if(_89){
_7c.style.height="0px";
}
}
_7c.style.visibility="hidden";
if(_80!=null){
_7b.className=_80+"_show";
}
_7b.onclick=show;
if(_83!=null){
_83(false);
}
if(_90!=null){
try{
_90();
}
catch(e){
}
}
_8b=true;
}else{
if(!util.isIE6||(_91>0&&_92>0)){
var _93="";
if(_8a){
_7c.style.width=_91+"px";
_93+="width: "+_91+"px;";
}
if(_89){
_7c.style.height=_92+"px";
_93+=" height: "+_92+"px;";
}
_7c.setAttribute("style",_93);
}
_86=setTimeout(function(){
return hideTimed(_8f+1,_90);
},_81);
}
}
function show(_94){
if(!_8b){
if(_94){
try{
_94();
}
catch(e){
}
}
}else{
_7c.style.visibility="hidden";
if(_84==null||_85==null){
_7c.style.width="auto";
_7c.style.height="auto";
_84=Math.round(_7c.offsetWidth);
_85=Math.round(_7c.offsetHeight);
_7c.style.width="0";
_7c.style.height="0";
}
_87=Math.round(_84/_82);
_88=Math.round(_85/_82);
_7b.onclick=util.stopPropagation;
if(_86!=null){
clearTimeout(_86);
}
_86=setTimeout(function(){
showTimed(1,_94);
},_81);
}
}
function showTimed(_95,_96){
_7c.style.visibility="visible";
if(_86!=null){
clearTimeout(_86);
}
var _97=_87*_95;
if(_84<_97){
_97=_84;
}
var _98=_88*_95;
if(_85<_98){
_98=_85;
}
var _99="";
if(_8a){
_7c.style.width=_97+"px";
_99+="width: "+_97+"px;";
}
if(_89){
_7c.style.height=_98+"px";
_99+=" height: "+_98+"px;";
}
_7c.setAttribute("style",_99);
if(_84==_97&&_85==_98){
if(_80!=null){
_7b.className=_80+"_hide";
}
_7b.onclick=hide;
if(_83!=null){
_83(true);
}
if(_96){
try{
_96();
}
catch(e){
}
}
_8b=false;
}else{
_86=setTimeout(function(){
showTimed(_95+1,_96);
},_81);
}
}
}
};
function DocumentEvents(_9a){
var _9b=new Array();
this.addEvent=addEvent;
this.deleteEvent=deleteEvent;
this.handleEvent=handleEvent;
function addEvent(_9c){
var id=util.getFreeIndex(_9b);
_9b[id]=_9c;
if(_9a=="mouseMove"){
document.onmousemove=handleEvent;
}else{
if(_9a=="mouseUp"){
document.onmouseup=handleEvent;
}
}
return id;
}
function deleteEvent(id){
if(id!=null){
_9b[id]=null;
var _9f=true;
for(var i=0;i<_9b.length;i++){
if(_9b[i]!=null){
_9f=false;
}
}
if(_9f){
_9b=new Array();
if(_9a=="mouseMove"){
document.onmousemove=null;
}else{
if(_9a=="mouseUp"){
document.onmouseup=null;
}
}
}
}
}
function handleEvent(_a1){
for(var id=0;id<_9b.length;id++){
if(_9b[id]!=null){
_9b[id](_a1);
}
}
}
}
var DocumentMouseMoveEvent=new DocumentEvents("mouseMove");
var DocumentMouseUpEvent=new DocumentEvents("mouseUp");
function AjaxObject(_a3){
var _a4=null;
var _a5=0;
var _a6=new Array();
var _a7=null;
var _a8=10000;
var _a9=0;
var _aa=10000;
var _ab=new Array();
var _ac="<<<<<Navici<<<<";
this.lookupTime=_aa;
this.addRequestObject=addRequestObject;
this.sendRequest=sendRequest;
this.requestQueueLookup=requestQueueLookup;
this.setRequestTimeout=setRequestTimeout;
function addRequestObject(obj){
_ab.push(obj);
}
function setRequestTimeout(_ae){
_a8=_ae;
}
function sendRequest(){
if(_a5==0||_a5==4){
var _af="";
if(_a5==0){
_af=buildRequest();
}
if(_af!=""){
_a4=util.getXmlhttp();
_a5=1;
_a4.open("POST",_a3,true);
_a4.onreadystatechange=callbackFunction;
_a7=setTimeout(function(){
requestRetry();
},_a8);
if(util.useFormData()){
var _b0="--"+_ac+"\r\n"+"Content-Disposition: form-data; name=\"requestXml\"\r\n\r\n"+_af+"\r\n"+"--"+_ac+"--\r\n";
_a4.setRequestHeader("Content-type","multipart/form-data; boundary=\""+_ac+"\"");
_a4.send(_b0);
}else{
_a4.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=UTF-8");
_a4.send("requestXml="+encodeURIComponent(_af));
}
}else{
_a5=0;
}
}else{
}
}
function callbackFunction(){
if(_a4.readyState==4){
clearTimeout(_a7);
var _b1=-1;
var _b2="";
try{
_b1=_a4.status;
_b2=_a4.statusText;
}
catch(e){
requestFailed();
}
if(_b1!=200&&_b1!=0&&_b1!=-1){
requestFailed();
}else{
if(_b1!=-1){
handleResponse(_a4.responseXML);
_a4=null;
_a5=0;
sendRequest();
}else{
requestFailed();
}
}
}
}
function requestRetry(){
clearTimeout(_a7);
try{
_a4.abort();
}
catch(e){
}
requestFailed();
}
function requestQueueLookup(){
if(_a9){
clearTimeout(_a9);
_a9=0;
}
if(_a5==0){
sendRequest();
}
_a9=setTimeout(function(){
requestQueueLookup();
},_aa);
}
function requestFailed(){
_a5=0;
for(var i=0;i<_ab.length;i++){
_ab[i].requestFailed();
}
}
function buildRequest(){
var _b4="";
for(var i=0;i<_ab.length;i++){
_a6[i]=false;
var _b6=_ab[i].buildRequest();
if(_b6!=null){
_b4+="<ajax_request_object object_id=\""+i+"\" service=\""+_ab[i].service+"\">"+_b6+"</ajax_request_object>";
_a6[i]=true;
}
}
if(_b4!=""){
_b4="<navici_request>"+_b4+"</navici_request>";
}
return _b4;
}
function handleResponse(_b7){
var _b8=_b7.getElementsByTagName("navici_response")[0];
if(_b8==null){
for(var i=0;i<_ab.length;i++){
if(_a6[i]){
_ab[i].requestFailed();
}
}
}else{
var _ba=_b7.getElementsByTagName("ajax_response_object");
for(var i=0;i<_ba.length;i++){
if(_ba[i].hasChildNodes()){
var _bb=_ba[i].getAttribute("object_id");
try{
_ab[_bb].parseResultXML(_ba[i]);
}
catch(e){
}
_a6[_bb]=false;
}
}
for(var i=0;i<_ab.length;i++){
if(_a6[i]){
_ab[i].parseResultXML(null);
}
}
}
}
}
function ImageLayer(_bc,_bd,_be,_bf,_c0,_c1){
var _c2=null;
var _c3=new Array();
var _c4=null;
var _c5=null;
var _c6=new Array();
var _c7=new Array();
var _c8=new Array;
var _c9="";
var _ca=false;
var _cb=0;
var _cc=0;
var _cd=null;
var _ce=_c0;
var map=null;
var _d0="";
var _d1=util.fixIEpng&&_be=="png";
this.service="ImageLayer";
this.imageRequest=imageRequest;
this.setAutoVisible=function(_d2){
_ca=_d2;
};
this.start=start;
this.redraw=redraw;
this.buildRequest=buildRequest;
this.parseResultXML=parseResultXML;
this.requestFailed=requestFailed;
this.resetCache=resetCache;
this.setVisibility=setVisibility;
this.getVisibility=function(){
return _ce;
};
this.getID=function(){
return _bc;
};
this.getImages=function(){
return _c2;
};
this.addImageLayerObject=addImageLayerObject;
this.deleteImageLayerObject=deleteImageLayerObject;
this.clearImageLayerObjects=clearImageLayerObjects;
this.getImageLayerObjects=function(){
return _c8;
};
this.finishMove=finishMove;
function start(_d3){
_bd.addRequestObject(this);
map=_d3;
_cd=map.settings.availableImages;
_c5=map.getTileArray();
resetCache();
_c2=new Array();
var _d4=map.getTiles();
_cc=_d4.length;
_cb=_d4[0].length;
_d0=map.settings.MAP_IMAGEPATH+"/empty.gif";
for(var i=0;i<_c5.length;i++){
if(_c5[i].created){
_c2[i]=util.createElement("img");
_c2[i].className=_bf;
_c2[i].src=_d0;
_c2[i].style.visibility=_ce?"visible":"hidden";
_c2[i].tileCol=null;
_c2[i].tileRow=null;
_c2[i].tileZoom=null;
_c5[i].div.appendChild(_c2[i]);
}else{
_c2[i]=_c5[i].div.childNodes[map.tempLayerIndex];
}
}
}
function setVisibility(_d6){
_ce=_d6;
var _d7="";
var _d8="hidden";
if(_ce){
_d8="visible";
}
for(var i=0;i<_c2.length;i++){
_c2[i].style.visibility=_d8;
}
if(util.isIE6){
setTimeout(ie6Fix,100);
}
}
function ie6Fix(_da){
var _db=util.attach(map.settings.MAP_AREA);
_db.className=_db.className;
}
function addImageLayerObject(_dc){
var id=util.getFreeIndex(_c8);
_c8[id]=_dc;
_c9=buildImageLayerObjects();
return id;
}
function deleteImageLayerObject(id){
_c8[id]=null;
var _df=false;
for(var i=0;i<_c8.length;i++){
if(_c8[i]!=null){
_df=true;
}
}
if(_df){
_c9=buildImageLayerObjects();
}else{
_c9="";
_c8=new Array();
}
return 0;
}
function clearImageLayerObjects(){
_c8=new Array();
_c9="";
}
function buildImageLayerObjects(){
var _e1="";
for(var id=0;id<_c8.length;id++){
if(_c8[id]!=null){
_e1+=_c8[id];
}
}
if(_e1!=""){
_e1="<image_layer_objects>"+_e1+"</image_layer_objects >";
}
return _e1;
}
function resetCache(){
if(_c2!=null){
for(var i=0;i<_c2.length;i++){
_c2[i].tileZoom=null;
_c2[i].tileCol=null;
_c2[i].tileRow=null;
}
}
_c4=new Array();
for(var i=map.settings.MAP_MIN_ZOOM;i<=map.settings.MAP_MAX_ZOOM;i++){
_c4[i]=new Array();
}
}
function redraw(){
for(var i=0;i<_c5.length;i++){
imageRequest(_c5[i].id,map.getZoom(),_c5[i].col,_c5[i].row);
}
finishMove();
}
function requestFailed(){
if(_ce){
for(var id=0;id<_c7.length;id++){
if(_c6[id]==null){
_c6[id]=_c7[id];
}
}
_c7=new Array();
_bd.sendRequest();
}
}
function imageRequest(id,_e7,col,row){
if(_ce&&_c2[id]){
if(_c2[id].tileZoom!=_e7||_c2[id].tileCol!=col||_c2[id].tileRow!=row){
_c2[id].style.visibility="hidden";
_c2[id].src=_d0;
var url=null;
if(_c4[_e7][col]!=null){
if(_c4[_e7][col][row]!=null){
url=_c4[_e7][col][row];
}
}
if(url==null){
url="EMPTY";
if(_cd==null){
putImageRequest(id,_e7,col,row);
}else{
if(col>=_cd[_e7].MIN_COL&&col<=_cd[_e7].MAX_COL&&row>=_cd[_e7].MIN_ROW&&row<=_cd[_e7].MAX_ROW){
putImageRequest(id,_e7,col,row);
}
}
}
setImageUrl(id,col,row,_e7,url);
}
}
return true;
}
function setImageUrl(id,col,row,_ee,url){
if(_ee==map.getZoom()){
if(_c5[id].col==col&&_c5[id].row==row){
if(url=="EMPTY"){
if(_c2[id].src!=_d0){
_c2[id].src=_d0;
}
if(_c2[id].style.visibility=="visible"){
_c2[id].style.visibility="hidden";
}
}else{
if(_c2[id].src!=url){
if(_c1&&_d1&&_be=="png"){
if(_c2[id].style.visibility=="hidden"){
_c2[id].style.visibility="visible";
}
_c2[id].src=map.settings.MAP_IMAGEPATH+"/spacer.gif";
_c2[id].style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, src='"+url+"');";
}else{
_c2[id].style.visibility="hidden";
_c2[id].src=url;
_c2[id].style.visibility="visible";
}
}else{
if(_c2[id].style.visibility=="hidden"){
_c2[id].style.visibility="visible";
}
}
}
_c2[id].tileZoom=_ee;
_c2[id].tileCol=col;
_c2[id].tileRow=row;
}
}
}
function showImage(id){
if(_c2[id].style.visibility=="hidden"){
_c2[id].style.visibility="visible";
}
}
function putImageRequest(id,_f2,col,row){
var i=_c6.length-1;
var _f6=false;
_c6[id]={"zoom":_f2,"col":col,"row":row};
}
function buildRequest(){
if(_ce){
var i=0;
var _f8=_c6;
_c6=new Array();
var _f9="";
for(var id=0;id<_f8.length;id++){
if(_f8[id]!=null&&i<1000){
_c7[id]=_f8[id];
_f9+="<tile response_id=\""+id+"\" ";
_f9+="zoom=\""+_f8[id].zoom+"\" ";
_f9+="row=\""+_f8[id].row+"\" ";
_f9+="column=\""+_f8[id].col+"\" />";
}
i++;
}
if(i>0){
var _fb="<tiles layer=\""+_bc+"\" format=\""+_be+"\" >";
_fb+=_c9;
_fb+=_f9;
_fb+="</tiles>";
return _fb;
}else{
return null;
}
}else{
return null;
}
}
function parseResultXML(_fc){
if(_ce&&_fc!=null){
_c7=new Array();
var _fd=_fc.getElementsByTagName("tile");
for(var i=0;i<_fd.length;i++){
var id=_fd[i].getAttribute("id");
var col=_fd[i].getAttribute("column");
var row=_fd[i].getAttribute("row");
var zoom=_fd[i].getAttribute("zoom");
var url=_fd[i].firstChild.nodeValue;
if(_c4[zoom][col]==null){
_c4[zoom][col]=new Array();
}
_c4[zoom][col][row]=url;
setImageUrl(id,col,row,zoom,url);
}
}
}
function finishMove(){
if(_c6.length>0&&_ce){
_bd.sendRequest();
}
}
}
function LayerMarker(_104){
this.addMarker=addMarker;
this.addMarkerImage=addMarkerImage;
this.deleteMarker=deleteMarker;
function addMarker(type,x,y,_108,_109){
var xml="<marker type=\""+type+"\" ";
xml+="x=\""+x+"\" y=\""+y+"\" ";
if(_109!=null&&_109!=""){
xml+="label=\""+encodeURIComponent(_109)+"\" ";
}
if(_108!=null&&_108!=""){
xml+="color=\""+_108+"\" ";
}
xml+=" />";
return _104.addImageLayerObject(xml);
}
function addMarkerImage(x,y,_10d,_10e){
var xml="<marker type=\"image\" ";
xml+="x=\""+x+"\" y=\""+y+"\" ";
xml+="imagename=\""+_10d+"\" ";
if(_10e!=null&&_10e!=""){
xml+="label=\""+encodeURIComponent(_10e)+"\" ";
}
xml+=" />";
return _104.addImageLayerObject(xml);
}
function deleteMarker(id){
return _104.deleteImageLayerObject(id);
}
}
function LayerManager(_111,_112,_113){
var map=null;
var _115=new Array();
var _116=new Array();
var _117=null;
var menu=null;
var _119=null;
var _11a=new EventHandler();
var _11b=Array();
var _11c=Array();
var _11d=false;
this.service="Image";
this.start=start;
this.setMapType=setMapType;
this.getLayer=getLayer;
this.clearLayer=clearLayer;
this.redrawLayer=redrawLayer;
this.setLayerVisibility=setLayerVisibility;
this.getMapPrintXML=getMapPrintXML;
this.getMapPrintURL=getMapPrintURL;
this.getCurrentType=function(){
return _117;
};
this.createMenu=createMenu;
this.buildRequest=buildRequest;
this.parseResultXML=parseResultXML;
this.requestFailed=requestFailed;
this.addTypeChangeCallback=function(func){
return _11a.addListener(func);
};
this.deleteTypeChangeCallback=function(id){
_11a.addListener(id);
};
this.addDivLayer=addDivLayer;
this.deleteDivLayer=deleteDivLayer;
function start(_120,_121){
map=_121;
_119=_120;
var _122=false;
var _123=0;
for(var i=0;i<_112.LAYERS.length;i++){
if(!_113||_112.LAYERS[i].view=="background"){
var _125=false;
var css="map_image_background";
var _127=false;
if(_112.LAYERS[i].view=="dynamic"){
css="map_image_dynamic";
_125=true;
}else{
if(!_122){
_127=true;
_122=true;
_117=_112.LAYERS[i].type;
}
}
var _128=null;
if(_112.LAYERS[i].object==null){
_128=new ImageLayer(_112.LAYERS[i].type,_119,_112.LAYERS[i].format,css,_127,_125);
}else{
_128=_112.LAYERS[i].object;
}
_115[_123]={"layer":_128,"type":_112.LAYERS[i].type,"dynamic":_112.LAYERS[i].view=="dynamic","format":_112.LAYERS[i].format,"label":_112.LAYERS[i].label};
_123++;
map.addLayer(_128);
}
}
_119.addRequestObject(this);
}
function createMenu(){
var _129=map.getMapNode();
menu=util.createElement("div");
_129.appendChild(menu);
menu.className=_112.MAP_CSS_BASE+"_typemenu";
for(var i=0;i<_115.length;i++){
if(!_115[i].dynamic){
var _12b=util.createElement("div");
_12b.className=_112.MAP_CSS_BASE+"_typemenu_item";
_12b.onclick=util.stopPropagation;
_12b.oncontextmenu=util.stopPropagation;
_12b.onmousedown=util.stopPropagation;
_12b.ondblclick=util.stopPropagation;
var _12c=util.createElement("div");
_12b.appendChild(_12c);
var _12d=util.createElement("div");
_12d.appendChild(document.createTextNode(_115[i].label));
_12b.appendChild(_12d);
menu.appendChild(_12b);
_115[i].menuItemBackground=_12c;
_115[i].menuItemText=_12d;
setActiveMenuItem(_115[i],_115[i].type==_117);
}
}
}
function getSetTypeFunction(type){
return function(){
return _111.setMapType(type);
};
}
function setActiveMenuItem(_12f,_130){
if(_130){
_12f.menuItemBackground.className=_112.MAP_CSS_BASE+"_typemenu_item_bg_active";
_12f.menuItemText.className=_112.MAP_CSS_BASE+"_typemenu_item_text_active";
_12f.menuItemText.onclick=null;
}else{
_12f.menuItemBackground.className=_112.MAP_CSS_BASE+"_typemenu_item_bg";
_12f.menuItemText.className=_112.MAP_CSS_BASE+"_typemenu_item_text";
_12f.menuItemText.onclick=getSetTypeFunction(_12f.type);
}
}
function getLayer(type){
for(var i=0;i<_115.length;i++){
if(_115[i].type==type){
return _115[i].layer;
}
}
return null;
}
function setMapType(type){
for(var i=0;i<_115.length;i++){
if(!_115[i].dynamic){
_115[i].layer.setVisibility(_115[i].type==type);
if(menu!=null){
setActiveMenuItem(_115[i],_115[i].type==type);
}
}
}
_117=type;
map.redraw();
_11a.triggerEvent(_117);
return 0;
}
function clearLayer(type){
for(var i=0;i<_115.length;i++){
if(_115[i].type==type){
if(_115[i].dynamic){
_115[i].layer.setVisibility(false);
}
_115[i].layer.clearImageLayerObjects();
_115[i].layer.resetCache();
return 0;
}
}
return 1;
}
function redrawLayer(type){
for(var i=0;i<_115.length;i++){
if(_115[i].type==type){
_115[i].layer.resetCache();
if(_115[i].dynamic){
var _139=_115[i].layer.getImageLayerObjects();
_115[i].layer.setVisibility(_139.length>0);
}
_115[i].layer.redraw();
return 0;
}
}
return 1;
}
function setLayerVisibility(type,show){
for(var i=0;i<_115.length;i++){
if(_115[i].type==type){
_115[i].layer.setVisibility(show);
return 0;
}
}
return 1;
}
function addDivLayer(_13d){
var id=util.getFreeIndex(_116);
_116[id]=_13d;
return id;
}
function deleteDivLayer(id){
if(id!=null){
_116[id]=null;
var _140=true;
for(var i=0;i<_116.length;i++){
if(_116[i]!=null){
_140=false;
}
}
if(_140){
_116=new Array();
}
}
}
function getMapPrintXML(_142,_143,type,zoom,x,y,_148,id){
var _14a=_142;
var _14b=_143;
var _14c=zoom;
var _14d=x;
var _14e=y;
var _14f=type;
var _150=null;
var _151=map.getInfo();
if(_14a==null){
_14a=_151.width;
}
if(_14b==null){
_14b=_151.height;
}
if(_14c==null){
_14c=_151.zoom;
}
if(_14d==null){
_14d=_151.centerX;
}
if(_14e==null){
_14e=_151.centerY;
}
if(_14f==null){
_14f=_117;
}
for(var i=0;i<_115.length;i++){
if(_115[i].type==_14f){
_150=_115[i].format;
}
}
var xml="<image type=\""+_14f+"\" ";
if(_150!=null){
xml+="format=\""+_150+"\" ";
}
if(id!=null){
xml+="id=\""+id+"\" ";
}
xml+="zoom=\""+_14c+"\" ";
xml+="width=\""+_14a+"\" ";
xml+="height=\""+_14b+"\" ";
xml+="center_x=\""+_14d+"\" ";
xml+="center_y=\""+_14e+"\" ";
xml+=util.parameterObject2Text(_148);
xml+=">";
for(var i=0;i<_115.length;i++){
var _154=_115[i].layer.getImageLayerObjects();
for(var j=0;j<_154.length;j++){
xml+=_154[j];
}
}
for(var i=0;i<_116.length;i++){
if(_116[i]!=null){
var _156=_116[i].getMarkers();
for(var j=0;j<_156.length;j++){
if(_156[j]!=null&&_156[j].div.printXML!=null){
xml+=_156[j].div.printXML;
}
}
}
}
xml+="</image>";
return xml;
}
function getMapPrintURL(_157,_158,_159,type,zoom,x,y,_15e){
id=util.getFreeIndex(_11b);
_11b[id]={"id":id,"callback":_157,"width":_158,"height":_159,"type":type,"zoom":zoom,"x":x,"y":y,"parameters":_15e,"status":"queued"};
_11d=true;
_119.sendRequest();
}
function buildRequest(){
if(_11d){
var _15f="";
for(var i=0;i<_11b.length;i++){
_15f+=getMapPrintXML(_11b[i].width,_11b[i].height,_11b[i].type,_11b[i].zoom,_11b[i].x,_11b[i].y,_11b[i].parameters,i);
_11c[id]=_11b[id];
_11c[id].send=false;
}
_11b=new Array();
_11d=false;
return _15f;
}else{
return null;
}
}
function parseResultXML(_161){
if(_161!=null){
var _162=_161.getElementsByTagName("image");
for(i=0;i<_162.length;i++){
var id=_162[i].getAttribute("id");
_11c[id].callback(_162[i].firstChild.nodeValue);
_11c[id].send=true;
}
}
for(var id=0;id<_11c.length;id++){
if(_11c[id]!=null&&!_11c[id].send){
_11c[id].callback(null);
}
}
_11c=new Array();
}
function requestFailed(){
for(var id=0;id<_11c.length;id++){
if(_11c[id]!=null&&!_11c[id].send){
_11c[id].callback(1);
}
}
_11c=new Array();
}
}
function PoisOnLayer(_165){
var pois=new Array();
var _167=new Array();
var _168=new Array();
var _169=new Array();
this.setPoiVisibility=setPoiVisibility;
this.getVisiblePois=function(){
return _169;
};
function setPoiVisibility(_16a,_16b,_16c,_16d,_16e){
var _16f=getCategoryNumber(_16b);
if(_16e){
var xml=createXml(_16a,_16b,_16c,_16d);
if(pois[_16f]==null){
pois[_16f]=new mainCategoryObject();
if(_16c==null){
pois[_16f].layerObjectId=_165.addImageLayerObject(xml);
}else{
pois[_16f].subcategories[_16c]=_165.addImageLayerObject(xml);
}
}else{
if(_16c==null){
if(pois[_16f].layerObjectId!=null){
_165.deleteImageLayerObject(pois[_16f].layerObjectId);
}
pois[_16f].layerObjectId=_165.addImageLayerObject(xml);
}else{
subcategoryNr=getSubcategoryNumber(_16c);
if(pois[_16f].subcategories[subcategoryNr]!=null){
_165.deleteImageLayerObject(pois[_16f].subcategories[subcategoryNr]);
}
pois[_16f].subcategories[subcategoryNr]=_165.addImageLayerObject(xml);
}
}
updatePoisVisible();
return 0;
}else{
var _171=0;
if(pois[_16f]!=null){
if(_16c==null){
if(pois[_16f].layerObjectId!=null){
_171=_165.deleteImageLayerObject(pois[_16f].layerObjectId);
pois[_16f].layerObjectId=null;
}
}else{
subCats=pois[_16f].subcategories;
subcategoryNr=getSubcategoryNumber(_16c);
if(subCats[subcategoryNr]!=null){
_171=_165.deleteImageLayerObject(subCats[subcategoryNr]);
subCats[subcategoryNr].layerObjectId=null;
}
}
}
updatePoisVisible();
return _171;
}
}
function updatePoisVisible(){
_169=new Array();
for(var c=0;c<pois.length;c++){
if(pois[c]!=null){
if(pois[c].layerObjectId!=null){
_169.push({"category":_167[c],"subcategory":null});
}
for(var s=0;s<pois[c].subcategories.length;s++){
if(pois[c].subcategories[s]!=null){
_169.push({"category":_167[c],"subcategory":_168[s]});
}
}
}
}
}
function mainCategoryObject(){
this.layerObjectId=null;
this.subcategories=new Array();
}
function createXml(_174,_175,_176,_177){
var xml="<pois service=\""+_174+"\" category=\""+_175+"\" ";
if(_176!=null&&_176!=""){
xml+="subcategory=\""+_176+"\" ";
}
xml+=util.parameterObject2Text(_177);
xml+=" />";
return xml;
}
function getCategoryNumber(_179){
var _17a=null;
for(var i=0;i<_167.length&&_17a==null;i++){
if(_167[i]==_179){
_17a=i;
}
}
if(_17a==null){
_17a=_167.length;
_167[_167.length]=_179;
}
return _17a;
}
function getSubcategoryNumber(_17c){
var _17d=null;
for(var i=0;i<_168.length&&_17d==null;i++){
if(_168[i]==_17c){
_17d=i;
}
}
if(_17d==null){
_17d=_168.length;
_168[_168.length]=_17c;
}
return _17d;
}
}
function DivMarkerLayer(){
var _17f=new Array();
var map=null;
var _181=256;
var _182=0;
var _183=0;
var _184=0;
var _185=0;
var _186=null;
var _187=null;
var _188=null;
var _189=false;
this.start=start;
this.redraw=redraw;
this.imageRequest=function(){
};
this.finishMove=finishMove;
this.addMarker=addMarker;
this.deleteMarker=deleteMarker;
this.getMarkers=function(){
return _17f;
};
this.getVisibility=function(){
return _189;
};
function start(_18a){
map=_18a;
_188=map.getActiveSurface();
_181=map.settings.MAP_TILE_SIZE;
_186=map.getTiles();
_183=_186.length;
_182=_186[0].length;
_187=map.getTileContainer();
}
function redraw(){
finishMove();
}
function finishMove(){
var _18b=_186[0][0].col;
var _18c=_186[0][0].row;
if(_189){
for(var id=0;id<_17f.length;id++){
if(_17f[id]!=null){
var _18e=checkShow(_17f[id],_18b,_18c);
if(_18e==null&&_17f[id].shown){
_188.removeChild(_17f[id].div);
_17f[id].shown=false;
}else{
if(_18e!=null){
var left=(_18e.col-_18b)*_181+_18e.left+_187.x+_17f[id].offsetX;
var top=(_18e.row-_18c)*_181+_18e.top+_187.y+_17f[id].offsetY;
_17f[id].div.style.left=left+"px";
_17f[id].div.style.top=top+"px";
if(!_17f[id].shown){
_188.appendChild(_17f[id].div);
_17f[id].shown=true;
}
}
}
}
}
}
_184=_18b;
_185=_18c;
}
function addMarker(_191,x,y,_194,_195,_196,_197){
var id=util.getFreeIndex(_17f);
var _199=util.createElement("div");
_199.className=_191;
if(_194!=null&&_194!=""){
var _19a=document.createTextNode(_194);
_199.appendChild(_19a);
}
_199.markerId=id;
_17f[id]=new createMarker(id,_199,x,y,_195,_196,_197);
var _19b=checkShow(_17f[id],_184,_185);
if(_19b!=null){
_17f[id].shown=true;
var left=(_19b.col-_184)*_181+_19b.left+_187.x+_17f[id].offsetX;
var top=(_19b.row-_185)*_181+_19b.top+_187.y+_17f[id].offsetY;
_199.style.left=left+"px";
_199.style.top=top+"px";
_188.appendChild(_199);
}
_189=true;
return _199;
}
function deleteMarker(_19e){
if(_17f[_19e.markerId]!=null){
if(_17f[_19e.markerId].shown){
_188.removeChild(_17f[_19e.markerId].div);
}
_17f[_19e.markerId]=null;
}
var _19f=false;
for(var id=0;id<_17f.length;id++){
if(_17f[id]!=null){
_19f=true;
}
}
if(!_19f){
_17f=new Array();
_189=false;
}
return 0;
}
function checkShow(_1a1,_1a2,_1a3){
var _1a4=map.calcMapTileCoords(_1a1.x,_1a1.y,map.getZoom());
if(_1a4.col>=_1a2&&_1a4.col<_1a2+_183&&_1a4.row>=_1a3&&_1a4.row<_1a3+_182){
return _1a4;
}else{
return null;
}
}
function createMarker(id,div,x,y,_1a9,_1aa,_1ab){
this.id=id;
this.div=div;
this.x=x;
this.y=y;
this.offsetX=_1a9;
this.offsetY=_1aa;
this.shown=false;
this.div.printXML=_1ab;
}
}
function RouteRequests(_1ac){
var _1ad=new Array();
var _1ae=new Array();
var _1af=false;
var _1b0=new Array();
var _1b1=null;
this.service="RouteRequests";
this.start=start;
this.getRoute=getRoute;
this.deleteRoute=deleteRoute;
this.setRouteVisibility=setRouteVisibility;
this.getRouteVisibility=getRouteVisibility;
this.getRouteCount=getRouteCount;
this.buildRequest=buildRequest;
this.parseResultXML=parseResultXML;
this.requestFailed=requestFailed;
function start(_1b2){
_1b1=_1b2;
}
function getRoute(id,_1b4,_1b5,_1b6,_1b7){
if(_1b4.length>=2){
if(_1b0[id]!=null&&_1b0[id].layerObjectId!=null){
_1b1.deleteImageLayerObject(_1b0[id].layerObjectId);
_1b0[id]=null;
}
if(id==null){
id=util.getFreeIndex(_1b0);
}
_1ad[id]={"locations":_1b4,"language":_1b5,"parameters":_1b6,"callback":_1b7};
_1af=true;
_1ac.sendRequest();
return id;
}else{
return null;
}
}
function requestFailed(){
for(var id=0;id<_1ae.length;id++){
if(_1ae[id]!=null){
_1ae[id].callback(id,null,null,1);
}
}
}
function buildRequest(){
if(_1af){
var _1b9="";
for(var id=0;id<_1ad.length;id++){
if(_1ad[id]!=null){
_1ae[id]=_1ad[id];
_1ae[id].send=false;
_1b9+="<get_route id=\""+id+"\" language=\""+_1ad[id].language+"\" ";
_1b9+=util.parameterObject2Text(_1ad[id].parameters);
_1b9+=" >";
_1b9+="<output type=\"image_layer_objects\"/>";
_1b9+="<output type=\"gui_objects\"/>";
var _1bb=_1ad[id].locations;
for(var i=0;i<_1bb.length;i++){
_1b9+="<location order=\""+i;
_1b9+="\" x=\""+_1bb[i].getX()+"\" y=\""+_1bb[i].getY();
_1b9+="\" name=\""+_1bb[i].getName();
if(_1bb[i].getNumber()!=null&&_1bb[i].getNumber()!=""){
_1b9+="\" number=\""+_1bb[i].getNumber();
}
_1b9+="\" city=\""+_1bb[i].getCity();
_1b9+="\" />";
}
_1b9+="</get_route>";
}
}
_1ad=new Array();
_1af=false;
return _1b9;
}else{
return null;
}
}
function parseResultXML(_1bd){
if(_1bd!=null){
var _1be=_1bd.getElementsByTagName("route_response");
for(var i=0;i<_1be.length;i++){
var id=_1be[i].getAttribute("id");
if(id!=null){
var _1c1=_1be[i].getElementsByTagName("image_layer_objects");
var _1c2=_1be[i].getElementsByTagName("gui_objects");
if(_1c1.length==0||_1c2.length==0){
_1ae[id].callback(id,null,null,2);
}else{
var _1c3=new Array();
var i=0;
for(var node=_1c1[0].firstChild;node;node=node.nextSibling){
_1c3[i]=util.xml2text(node);
i++;
}
setResult(id,_1c3,_1c2[0].firstChild,_1ae[id].callback);
}
_1ae[id].send=true;
}
}
for(var id=0;id<_1ae.length;id++){
if(_1ae[id]!=null&&!_1ae[id].send){
_1ae[id].callback(id,null,null,0);
}
}
_1ae=new Array();
}
}
function setResult(id,_1c6,_1c7,_1c8){
if(_1b1!=null){
deleteRoute(id);
if(_1c6.length>0){
_1b0[id]=new Array();
var j=0;
for(var i=0;i<_1c6.length;i++){
if(_1c6[i]!=null&&_1c6[i]!=""){
_1b0[id][j]={"imageLayerXML":_1c6[j],"layerObjectId":null};
j++;
}
}
_1b0[id][0].layerObjectId=_1b1.addImageLayerObject(_1c6[0]);
}
}
_1c8(id,_1c7,0);
}
function getRouteCount(id){
if(_1b0[id]==0){
return 0;
}else{
return _1b0[id].length;
}
}
function setRouteVisibility(id,_1cd,_1ce){
if(_1b1!=null){
if(_1b0[id]!=null){
if(_1ce==null){
for(var i=0;i<_1b0[id].length;i++){
if(_1b0[id][i].layerObjectId!=null&&!_1cd){
_1b1.deleteImageLayerObject(_1b0[id][i].layerObjectId);
_1b0[id][i].layerObjectId=null;
}else{
if(_1b0[id].layerObjectId==null&&_1cd){
_1b0[id][i].layerObjectId=_1b1.addImageLayerObject(_1b0[id][i].imageLayerXML);
}
}
}
}else{
if(_1b0[id][_1ce]!=null){
if(_1b0[id][_1ce].layerObjectId!=null&&!_1cd){
_1b1.deleteImageLayerObject(_1b0[id][_1ce].layerObjectId);
_1b0[id][_1ce].layerObjectId=null;
}else{
if(_1b0[id].layerObjectId==null&&_1cd){
_1b0[id][_1ce].layerObjectId=_1b1.addImageLayerObject(_1b0[id][_1ce].imageLayerXML);
}
}
}
}
}else{
return 2;
}
return 0;
}else{
return 1;
}
}
function getRouteVisibility(id,_1d1){
var _1d2=0;
if(_1d1!=null){
_1d2=_1d1;
}
if(_1b0[id]!=null&&_1b0[id][_1d2]!=null){
return _1b0[id][_1d2].layerObjectId!=null;
}else{
return false;
}
}
function deleteRoute(id){
if(_1b0[id]!=null&&_1b1!=null){
for(var i=0;i<_1b0[id].length;i++){
if(_1b0[id][i].layerObjectId!=null){
_1b1.deleteImageLayerObject(_1b0[id][i].layerObjectId);
}
}
_1b0[id]=null;
}
return 0;
}
}
function GeoserverGeocodingXml(){
var _1d5=null;
var _1d6=100;
var _1d7=Array();
var _1d8=Array();
var _1d9=Array();
var _1da=Array();
var _1db=7;
start();
this.getXml=getXml;
this.getKey=function(){
return _1d5;
};
this.getParseFunction=function(){
return parseOpenGis;
};
this.getRootElementName=function(){
return "Response";
};
this.getFreeFormKey=function(){
return _1d5;
};
this.setFreeFormKey=function(key){
_1d5=key;
};
this.getMaxResults=function(){
return _1d6;
};
this.setMaxResults=function(_1dd){
_1d6=_1dd;
};
this.addLocationRestriction=addLocationRestriction;
this.deleteLocationRestriction=deleteLocationRestriction;
this.getLocationRestriction=getLocationRestriction;
this.addLocationType=addLocationType;
this.deleteLocationType=deleteLocationType;
this.addAllLocationType=addAllLocationType;
this.deleteAllLocationType=deleteAllLocationType;
this.addLanguage=addLanguage;
this.deleteLanguage=deleteLanguage;
function start(){
_1da[0]="POI";
_1da[1]="Street";
_1da[2]="PostalCode";
_1da[3]="MunicipalitySubdivision";
_1da[4]="Municipality";
_1da[5]="CountrySecondarySubdivision";
_1da[6]="CountrySubdivision";
_1da[7]="Country";
_1da[8]="POIClass";
_1da[9]="StreetAddress";
for(var i=0;i<=_1db;i++){
_1d8[i]=true;
}
}
function addLanguage(_1df){
if(_1df!=null&&_1df!=""){
var i=0;
var _1e1=false;
var lang=_1df.toUpperCase();
while(i<_1d9.length&&!_1e1){
if(_1d9[i]!=null&&_1d9[i].key==lang){
_1e1=true;
}
}
if(!_1e1){
var _1e3=getFreeIndex(_1d9);
_1d9[_1e3]={"key":key};
}
return 0;
}else{
return 1;
}
}
function deleteLanguage(_1e4){
if(_1e4!=null&&_1e4!=""){
var i=0;
var _1e6=false;
var lang=_1e4.toUpperCase();
while(i<_1d9.length&&!_1e6){
if(_1d9[i]!=null&&_1d9[i].key==lang){
_1d9[i]=null;
_1e6=true;
}
}
if(!_1e6){
return 0;
}else{
return 2;
}
}else{
return 1;
}
}
function addLocationType(_1e8){
var _1e9=getLocationTypeNr(_1e8);
if(_1e9>=0&&_1e9<=_1db){
_1d8[_1e9]=true;
return 0;
}else{
return 1;
}
}
function deleteLocationType(_1ea){
var _1eb=getLocationTypeNr(_1ea);
if(_1eb>=0&&_1eb<=_1db){
_1d8[_1eb]=false;
return 0;
}else{
return 1;
}
}
function deleteAllLocationType(){
for(var i=0;i<_1db;i++){
_1d8[i]=false;
}
}
function addAllLocationType(){
for(var i=0;i<_1db;i++){
_1d8[i]=true;
}
}
function addLocationRestriction(_1ee,key,_1f0,_1f1){
var _1f2=getLocationTypeNr(_1ee);
if(_1f2>=0){
if(key==null&&_1f0==null&&_1f1==null){
_1d7[_1f2]=null;
}else{
_1d7[_1f2]={"key":key,"method":_1f0,"idList":_1f1};
}
return 0;
}else{
return 1;
}
}
function deleteLocationRestriction(_1f3){
var _1f4=getLocationTypeNr(_1f3);
if(_1f4>=0){
_1d7[_1f4]=null;
return 0;
}else{
return 1;
}
}
function getLocationRestriction(_1f5){
var _1f6=getLocationTypeNr(_1f5);
if(_1f6>=0){
return _1d7[_1f6];
}else{
return null;
}
}
function getXml(id){
var _1f8="";
_1f8+="<Request methodName=\"LocationRequest\" requestID=\""+id+"\" maximumResponses=\""+_1d6+"\">";
_1f8+="<LocationRequest>";
_1f8+=getFreeFormKeyXml();
_1f8+=getLocationTypeListXml();
_1f8+=getAddressXml();
_1f8+=getPOIPropertiesXml();
_1f8+="</LocationRequest>";
_1f8+="</Request>";
return _1f8;
}
function getFreeFormKeyXml(){
var _1f9="";
if(_1d5!=null){
_1f9+="<FreeFormLocationName>";
_1f9+=util.xmlAttributeString(_1d5);
_1f9+="</FreeFormLocationName>";
}
return _1f9;
}
function getLocationTypeListXml(){
var _1fa="";
var _1fb="";
var _1fc=false;
for(var i=0;i<_1db;i++){
if(_1d8[i]==true){
_1fb+="<LocationType ";
_1fb+="name=\""+_1da[i]+"\" ";
_1fb+="/>";
}else{
_1fc=true;
}
}
if(_1fc){
_1fa+="<LocationTypeList>";
_1fa+=_1fb;
_1fa+="</LocationTypeList>";
}
return _1fa;
}
function getPOIPropertiesXml(){
var _1fe="";
if(_1d7[0]!=null||_1d7[8]!=null){
_1fe+="<POIProperties>";
_1fe+=getPOIPropertyXml("POIName","locationIds",_1d7[0]);
_1fe+=getPOIPropertyXml("POIClass","classIds",_1d7[8]);
_1fe+="</POIProperties>";
}
return _1fe;
}
function getPOIPropertyXml(name,_200,_201){
var _202="";
if(_201!=null){
_202+="<POIProperty name=\""+name+"\" ";
_202+=getAttributeXml("matchMethod",_201.method);
_202+=getAttributeXml(_200,_201.idList);
_202+=getAttributeXml("value",_201.key);
_202+=" />";
}
return _202;
}
function getAddressXml(){
result="";
if(_1d7[1]!=null||_1d7[2]!=null||_1d7[3]!=null||_1d7[4]!=null||_1d7[5]!=null||_1d7[6]!=null||_1d7[7]!=null||_1d7[9]!=null){
result+="<Address>";
if(_1d7[1]!=null||_1d7[9]!=null){
result+="<StreetAddress>";
result+=getLocationPartXml("StreetLocation",_1d7[9]);
result+=getLocationPartXml("Street",_1d7[1]);
result+="</StreetAddress>";
}
result+=getLocationPartXml("PostalCode",_1d7[2]);
result+=getPlaceXml("MunicipalitySubdivision",_1d7[3]);
result+=getPlaceXml("Municipality",_1d7[4]);
result+=getPlaceXml("CountrySecondarySubdivision",_1d7[5]);
result+=getPlaceXml("CountrySubdivision",_1d7[6]);
result+=getPlaceXml("Country",_1d7[7]);
result+="</Address>";
}
return result;
}
function getLocationPartXml(_203,_204){
var _205="";
if(_204!=null){
_205+="<"+_203+" ";
_205+=getAttributeXml("matchMethod",_204.method);
_205+=getAttributeXml("locationIds",_204.idList);
_205+=" >";
if(_204.key!=null&&_204.key!=""){
_205+=util.xmlAttributeString(_204.key);
}
_205+="</"+_203+">";
}
return _205;
}
function getPlaceXml(_206,_207){
var _208="";
if(_207!=null){
_208+="<Place type=\""+_206+"\" ";
_208+=getAttributeXml("matchMethod",_207.method);
_208+=getAttributeXml("locationIds",_207.idList);
_208+=" >";
if(_207.key!=null&&_207.key!=""){
_208+=util.xmlAttributeString(_207.key);
}
_208+="</Place>";
}
return _208;
}
function getAttributeXml(_209,_20a){
var _20b="";
if(_20a!=null&&_20a!=""){
_20b+=_209+"=\""+util.xmlAttributeString(_20a)+"\" ";
}
return _20b;
}
function parseOpenGis(_20c){
var _20d={"id":0,"locations":null,"status":0};
var id=_20c.getAttribute("requestID");
if(id!=null){
_20d.id=id;
var _20f=Array();
if(_20c.hasChildNodes()){
var node=_20c.firstChild;
var i=0;
while(node!=null){
if(node.nodeType==1){
parseLocationList(_20f,node);
}
node=node.nextSibling;
}
}
_20d.locations=_20f;
}
return _20d;
}
function parseLocationList(_212,_213){
var _214=null;
if(_213.nodeName=="LocationResponseList"){
var node=_213.firstChild;
while(node!=null){
if(node.nodeType==1){
var _216=parseLocation(node);
if(_216!=null){
_212[_212.length]=_216;
}
}
node=node.nextSibling;
}
}
}
function parseLocation(_217){
var _218=null;
if(_217.nodeName=="GeocodedAddress"){
_218=new MapLocation(0,0);
if(_217.hasChildNodes()){
var node=_217.firstChild;
while(node!=null){
if(node.nodeType==1){
if(node.nodeName=="Point"){
setPosition(_218,node);
}else{
if(node.nodeName=="Address"){
setAddress(_218,node);
}else{
if(node.nodeName=="GeocodeMatchCode"){
setMatchCode(_218,node);
}
}
}
}
node=node.nextSibling;
}
}
if(_218.getStreetLocation()==null){
_218.setType("Street");
}else{
_218.setType("Address");
}
}else{
if(_217.nodeName=="POI"){
_218=new MapLocation(0,0);
_218.setType("Poi");
var _21a=util.xmlUnescape(_217.getAttribute("POIName"));
_218.setPOIName(_21a);
if(_217.hasChildNodes()){
var node=_217.firstChild;
while(node!=null){
if(node.nodeType==1){
if(node.nodeName=="Point"){
setPosition(_218,node);
}else{
if(node.nodeName=="POIAttributeList"){
setPoiAttributes(_218,node);
}else{
if(node.nodeName=="Address"){
setAddress(_218,node);
}else{
if(node.nodeName=="GeocodeMatchCode"){
setMatchCode(_218,node);
}
}
}
}
}
node=node.nextSibling;
}
}
}
}
return _218;
}
function setPoiAttributes(_21b,_21c){
var _21d=_21c.getElementsByTagName("POIInfoList");
if(_21d.length>0){
var _21e=_21c.getElementsByTagName("POIInfo");
for(var i=0;i<_21e.length;i++){
var _220=util.xmlUnescape(_21e[i].getAttribute("name"));
var _221=util.xmlUnescape(_21e[i].getAttribute("value"));
if(_220!=null&&_220!=""&&_221!=null&&_221!=""){
_21b.setAttribute(_220,_221);
}
}
}
}
function setAddress(_222,_223){
if(_223.getAttribute("countryCode")!=null){
_222.setCountryCode(_223.getAttribute("countryCode"));
}
var _224=_223.getElementsByTagName("StreetAddress");
if(_224.length>0){
var _225=_224[0].getElementsByTagName("Street");
if(_225.length>0){
var _226=util.xmlElementTextContent(_225[0]);
_222.setStreet(util.xmlUnescape(_226));
}
var _227=_224[0].getElementsByTagName("StreetLocation");
if(_227.length>0){
var _228=util.xmlElementTextContent(_227[0]);
_222.setStreetLocation(util.xmlUnescape(_228));
}
}
var _229=_223.getElementsByTagName("Postalcode");
if(_229.length>0){
var _22a=util.xmlElementTextContent(_229[0]);
_222.setPostalcode(util.xmlUnescape(_22a));
}
var _22b=_223.getElementsByTagName("Place");
for(var i=0;i<_22b.length;i++){
setPlace(_222,_22b[i]);
}
}
function setMatchCode(_22d,_22e){
if(_22e.getAttribute("accuracy")!=null){
var _22f=Number(_22e.getAttribute("accuracy"));
_22d.setAttribute("accuracy",_22f);
}
}
function setPlace(_230,_231){
if(_231.getAttribute("type")!=null){
var type=_231.getAttribute("type");
var _233=util.xmlUnescape(util.xmlElementTextContent(_231));
if(type=="Municipality"){
_230.setMunicipality(_233);
}else{
if(type=="MunicipalitySubdivision"){
_230.setMunicipalitySubdivision(_233);
}else{
if(type=="CountrySecondarySubdivision"){
_230.setCountrySecondarySubdivision(_233);
}else{
if(type=="CountrySubdivision"){
_230.setCountrySubdivision(_233);
}else{
if(type=="Country"){
_230.setCountry(_233);
}
}
}
}
}
}
}
function setPosition(_234,_235){
var _236=_235.getElementsByTagName("pos");
if(_236.length>0){
var _237=util.xmlElementTextContent(_236[0]);
if(_237!=null&&_237!=""){
var _238=_237.split(" ");
var x=Number(_238[0]);
var y=Number(_238[1]);
if(x!="NaN"&&y!="NaN"){
_234.setX(x);
_234.setY(y);
}
}
}
}
function getLocationTypeNr(_23b){
var i=0;
var _23d=-1;
if(_23b!=null){
while(i<_1da.length&&_23d==-1){
if(_1da[i]==_23b){
_23d=i;
}
i++;
}
}
return _23d;
}
}
function Geocoding(){
var _23e=new Array();
var _23f=null;
var _240=new Array();
var _241=false;
var _242=null;
this.service="Geocoding";
this.start=start;
this.getAddress=getAddress;
this.getAddressByObject=getAddressByObject;
this.buildRequest=buildRequest;
this.parseResultXML=parseResultXML;
this.requestFailed=requestFailed;
this.errorAjaxFailed=1;
function start(_243){
_23f=_243;
_23f.addRequestObject(this);
_242=new NaviciSimpleGeocoding();
}
function getAddressByObject(id,_245,_246){
if(id==null){
id=util.getFreeIndex(_240);
}
_240[id]={"key":_245.getKey(),"xml":_245.getXml(id),"root":_245.getRootElementName(),"parser":_245.getParseFunction(),"callback":_246};
_241=true;
return id;
}
function getAddress(id,key,_249,_24a,_24b,_24c){
if(id==null){
id=util.getFreeIndex(_240);
}
_240[id]={"key":key,"xml":_242.getXml(id,key,_249,_24a,_24b),"root":_242.getRootElementName(),"parser":_242.getParseFunction(),"callback":_24c};
_241=true;
return id;
}
function requestFailed(){
for(var id=0;id<_23e.length;id++){
if(_23e[id]!=null&&!_23e[id].send){
_23e[id].callback(id,_23e[id].key,null,this.errorAjaxFailed);
}
}
_23e=new Array();
}
function buildRequest(){
if(_241){
var _24e="";
for(var id=0;id<_240.length;id++){
if(_240[id]!=null){
if(_240[id].xml==null){
_240[id].callback(id,_240[id].key,new Array(),0);
}else{
_23e[id]=_240[id];
_23e[id].send=false;
_24e+=_240[id].xml;
}
}
}
_240=new Array();
_241=false;
return _24e;
}else{
return null;
}
}
function parseResultXML(_250){
if(_250!=null&&_250.nodeType==1&&_250.nodeName=="ajax_response_object"){
if(_250.hasChildNodes()){
var node=_250.firstChild;
while(node!=null){
if(node.nodeType==1){
var id=0;
var _253=false;
var _254=null;
while(id<_23e.length&&!_253){
if(_23e[id]!=null&&_23e[id].root==node.nodeName){
response=_23e[id].parser(node);
_23e[response.id].callback(response.id,_23e[response.id].key,response.locations,response.status);
_23e[response.id]=null;
_253=true;
}
id++;
}
}
node=node.nextSibling;
}
}
}
for(var id=0;id<_23e.length;id++){
if(_23e[id]!=null&&!_23e[id].send){
_23e[id].callback(id,_23e[id].key,new Array(),0);
}
}
_23e=new Array();
}
function NaviciSimpleGeocoding(){
this.getXml=getXml;
this.getRootElementName=function(){
return "locations";
};
this.getParseFunction=getParseFunction;
function getXml(id,key,_257,_258,_259){
var _25a="<address_for_key id=\""+id+"\" key=\""+util.xmlAttributeString(key)+"\" ";
_25a+="max_results=\""+_258+"\" ";
_25a+="language=\""+_257+"\" ";
_25a+=util.parameterObject2Text(_259);
_25a+="/>";
return _25a;
}
function getParseFunction(){
return parseNavici;
}
function parseNavici(node){
var _25c={"id":0,"locations":null,"status":0};
id=node.getAttribute("id");
if(id!=null){
_25c.id=id;
var _25d=Array();
var _25e=node.getElementsByTagName("location");
for(var i=0;i<_25e.length;i++){
_25d[i]=parseXmlLocation(_25e[i]);
}
_25c.locations=_25d;
}
return _25c;
}
function parseXmlLocation(_260){
var _261=new MapLocation(_260.getAttribute("x"),_260.getAttribute("y"));
_261.setType(_260.getAttribute("type"));
for(var i=0;i<_260.attributes.length;i++){
_261.setAttribute(_260.attributes[i].nodeName,_260.attributes[i].nodeValue);
}
return _261;
}
}
}
function GeocodingReversed(){
var _263=new Array();
var _264=null;
var _265=new Array();
var _266=false;
this.service="ReverseGeocoding";
this.start=start;
this.getAddress=getAddress;
this.buildRequest=buildRequest;
this.parseResultXML=parseResultXML;
this.requestFailed=requestFailed;
this.errorAjaxFailed=1;
function start(_267){
_264=_267;
_264.addRequestObject(this);
}
function getAddress(id,x,y,_26b,_26c,_26d,_26e){
if(id==null){
id=util.getFreeIndex(_265);
}
_265[id]={"x":x,"y":y,"language":_26b,"maxResults":_26c,"parameters":_26d,"callback":_26e};
_266=true;
return id;
}
function requestFailed(){
for(var id=0;id<_263.length;id++){
if(_263[id]!=null&&!_263[id].send){
_263[id].callback(id,_263[id].x,_263[id].y,null,this.errorAjaxFailed);
}
}
_263=new Array();
}
function buildRequest(){
if(_266){
var _270="";
for(var id=0;id<_265.length;id++){
if(_265[id]!=null){
_263[id]=_265[id];
_263[id].send=false;
_270+="<address_for_location id=\""+id+"\" x=\""+_265[id].x+"\" y=\""+_265[id].y+"\" ";
_270+="language=\""+_265[id].language+"\" ";
_270+=util.parameterObject2Text(_265[id].parameters);
_270+="/>";
}
}
_265=new Array();
_266=false;
return _270;
}else{
return null;
}
}
function parseResultXML(_272){
if(_272!=null){
var _273=_272.getElementsByTagName("locations");
for(i=0;i<_273.length;i++){
var id=_273[i].getAttribute("id");
var _276=Array();
locationsXml=_273[i].getElementsByTagName("location");
for(var i=0;i<locationsXml.length;i++){
_276[i]=parseXmlLocation(locationsXml[i]);
}
_263[id].callback(id,_263[id].x,_263[id].y,_276,0);
_263[id].send=true;
}
}
for(var id=0;id<_263.length;id++){
if(_263[id]!=null&&!_263[id].send){
_263[id].callback(id,_263[id].x,_263[id].y,null,0);
}
}
_263=new Array();
}
function parseXmlLocation(_277){
var _278=new MapLocation(_277.getAttribute("x"),_277.getAttribute("y"));
_278.setType(_277.getAttribute("type"));
for(var i=0;i<_277.attributes.length;i++){
_278.setAttribute(_277.attributes[i].name,_277.attributes[i].nodeValue);
}
return _278;
}
}
function GeocodingReversedPoi(){
var _27a=new Array();
var _27b=null;
var _27c=new Array();
var _27d=false;
this.service="PoiReverseGeocoding";
this.start=start;
this.getPois=getPois;
this.buildRequest=buildRequest;
this.parseResultXML=parseResultXML;
this.requestFailed=requestFailed;
this.errorAjaxFailed=1;
function start(_27e){
_27b=_27e;
_27b.addRequestObject(this);
}
function getPois(id,x,y,_282,_283,_284,_285,_286,_287){
if(id==null){
id=util.getFreeIndex(_27c);
}
_27c[id]={"x":x,"y":y,"types":_282,"language":_283,"maxResults":_284,"service":_285,"parameters":_286,"callback":_287};
_27d=true;
_27b.sendRequest();
return id;
}
function requestFailed(){
for(var id=0;id<_27a.length;id++){
if(_27a[id]!=null&&!_27a[id].send){
_27a[id].callback(id,_27a[id].x,_27a[id].y,null,this.errorAjaxFailed);
}
}
_27a=new Array();
}
function buildRequest(){
if(_27d){
request="";
for(var id=0;id<_27c.length;id++){
if(_27c[id]!=null){
_27a[id]=_27c[id];
_27a[id].send=false;
request+="<poi_for_location id=\""+id+"\" service=\""+_27c[id].service+"\" x=\""+_27c[id].x+"\" y=\""+_27c[id].y+"\" ";
request+="language=\""+_27c[id].language+"\" ";
request+=util.parameterObject2Text(_27c[id].parameters);
request+=">";
var _28a=_27c[id].types;
for(var i=0;i<_28a.length;i++){
request+="<poi_type category=\""+_28a[i].category+"\" ";
if(_28a[i].subcategory!=null){
request+="subcategory=\""+_28a[i].subcategory+"\" ";
}
request+="/>";
}
request+="</poi_for_location>";
}
}
_27c=new Array();
_27d=false;
return request;
}else{
return null;
}
}
function parseResultXML(_28c){
if(_28c!=null){
var _28d=_28c.getElementsByTagName("locations");
for(i=0;i<_28d.length;i++){
var id=_28d[i].getAttribute("id");
var _290=Array();
locationsXml=_28d[i].getElementsByTagName("location");
for(var i=0;i<locationsXml.length;i++){
_290[i]=parseXmlLocation(locationsXml[i]);
}
_27a[id].callback(id,_27a[id].x,_27a[id].y,_290,0);
_27a[id].send=true;
}
}
for(var id=0;id<_27a.length;id++){
if(_27a[id]!=null&&!_27a[id].send){
_27a[id].callback(id,_27a[id].x,_27a[id].y,null,0);
}
}
_27a=new Array();
}
function parseXmlLocation(_291){
var _292=new MapLocation(_291.getAttribute("x"),_291.getAttribute("y"));
for(var i=0;i<_291.attributes.length;i++){
_292.setAttribute(_291.attributes[i].name,_291.attributes[i].nodeValue);
}
return _292;
}
}
function MapPopupManager(_294,_295){
var _296="Points of Interest";
var _297=new Array();
var _298=null;
var _299=_295.POPUP_CSS_BASE;
var _29a=_295.POPUP_DYNAMIC_POSITION;
var _29b=_295.POPUP_WIDTH;
var _29c=_295.POPUP_HEIGHT;
var _29d=_295.POPUP_BACKGROUND_IMAGE;
this.setEventCallback=function(_29e){
_298=_29e;
};
this.setTitle=function(_29f){
_296=_29f;
};
this.setCssBase=function(_2a0){
_299=_2a0;
};
this.addPopup=addPopup;
this.deletePopup=deletePopup;
function addPopup(x,y,_2a3){
var _2a4=-4;
var _2a5=-4;
var _2a6="auto";
var _2a7="auto";
var _2a8="auto";
var _2a9="auto";
var _2aa="_";
if(_29a){
var map=_294.getMapInfos();
if(y<map.centerY){
_2a5=-_29c-_2a5;
_2a7="0px";
_2aa+="t";
}else{
_2a6="0px";
_2aa+="b";
}
if(x>map.centerX){
_2a4=-_29b-_2a4;
_2a9="0px";
_2aa+="l";
}else{
_2a8="0px";
_2aa+="r";
}
}
var _2ac=_294.addDivMarker(_299,x,y,"",_2a4,_2a5);
_2ac.onmouseout=function(_2ad){
return mouseOutEvent(_2ad,_2ac.markerId);
};
var _2ae=util.createElement("div");
_2ae.className=_299+"_background";
_2ac.appendChild(_2ae);
if(_29d!=null){
var _2af=util.createElement("img");
_2ae.appendChild(_2af);
util.loadPngImage(_2af,_29d+_2aa);
if(_29a){
_2af.style.top=_2a6;
_2af.style.bottom=_2a7;
_2af.style.left=_2a8;
_2af.style.right=_2a9;
}
}
var _2b0=util.createElement("div");
_2b0.className=_299+"_window";
if(_29a){
_2b0.style.top=_2a6;
_2b0.style.bottom=_2a7;
_2b0.style.left=_2a8;
_2b0.style.right=_2a9;
}
_2b0.onmousedown=util.stopPropagation;
_2b0.onmousemove=util.stopPropagation;
_2b0.ondblclick=util.stopPropagation;
_2ac.appendChild(_2b0);
var _2b1=util.createElement("div");
_2b1.className=_299+"_header";
_2b1.appendChild(document.createTextNode(_296));
_2b0.appendChild(_2b1);
var _2b2=util.createElement("div");
_2b2.className=_299+"_close";
_2b2.onclick=function(_2b3){
return deletePopup(_2ac.markerId);
};
_2b1.appendChild(_2b2);
var _2b4=util.createElement("div");
_2b4.className=_299+"_pinopen";
_2b4.onclick=function(_2b5){
return pinclose(_2ac.markerId);
};
_2ac.pinDiv=_2b4;
_2b1.appendChild(_2b4);
var _2b6=util.createElement("div");
_2b6.className=_299+"_infoarea";
_2b0.appendChild(_2b6);
for(var i=0;i<_2a3.length;i++){
_2b6.appendChild(_2a3[i]);
}
_297[_2ac.markerId]=_2ac;
return _2ac;
}
function mouseOutEvent(_2b8,_2b9){
var ev=util.getEvent(_2b8);
util.stopPropagation(_2b8);
if(util.leavingObject(ev,_297[_2b9])){
deletePopup(_2b9);
}
}
function deletePopup(_2bb){
_294.deleteDivMarker(_297[_2bb]);
if(_298!=null){
_298(_297[_2bb],1);
}
_297[_2bb]=null;
}
function pinclose(_2bc){
_297[_2bc].onmouseout=null;
_297[_2bc].pinDiv.className=_299+"_pinclose";
_297[_2bc].pinDiv.onclick=function(_2bd){
return pinopen(_2bc);
};
_298(_297[_2bc],2);
}
function pinopen(_2be){
_297[_2be].onmouseout=function(_2bf){
return mouseOutEvent(_2bf,_2be);
};
_297[_2be].pinDiv.className=_299+"_pinopen";
_297[_2be].pinDiv.onclick=function(_2c0){
return pinclose(_2be);
};
_298(_297[_2be],3);
}
}
function PoiPopupFormatter(){
var _2c1=new Array();
var _2c2="poi_popup";
this.setCssBase=function(_2c3){
_2c2=_2c3;
};
this.format=format;
this.addElement=addElement;
this.deleteElement=deleteElement;
function addElement(_2c4){
var id=util.getFreeIndex(_2c1);
_2c1[id]=_2c4;
return id;
}
function deleteElement(id){
_2c1[id]=null;
return 0;
}
function format(_2c7){
elements=new Array();
for(var i=0;i<_2c7.length;i++){
var div=util.createElement("div");
div.className=_2c2;
if(_2c7[i].getAttribute("category")!=null){
var _2ca=util.createElement("div");
_2ca.className=_2c2+"_head";
var _2cb=_2c7[i].getAttribute("category");
var _2cc=_2c7[i].getAttribute("subcategory");
if(_2cc!=null){
_2cb+="("+_2cc+")";
}
_2ca.appendChild(document.createTextNode(_2cb));
div.appendChild(_2ca);
}
var _2cd=util.createElement("p");
_2cd.className=_2c2+"_text";
_2cd.appendChild(document.createTextNode(_2c7[i].getName()));
div.appendChild(_2cd);
for(var j=0;j<_2c1.length;j++){
if(_2c1[j]!=null){
var _2cf=_2c1[j].cloneNode(true);
cloneEventAttributes(_2c1[j],_2cf);
div.appendChild(_2cf);
_2cf.locationObject=_2c7[i];
}
}
elements.push(div);
}
return elements;
}
function cloneEventAttributes(_2d0,_2d1){
_2d1.onclick=_2d0.onclick;
_2d1.ondblclick=_2d0.ondblclick;
_2d1.onmousedown=_2d0.onmousedown;
_2d1.onmouseup=_2d0.onmouseup;
_2d1.onmouseover=_2d0.onmouseover;
_2d1.onmousemove=_2d0.onmousemove;
_2d1.onmouseout=_2d0.onmouseout;
_2d1.onkeypress=_2d0.onkeypress;
_2d1.onkeydown=_2d0.onkeydown;
_2d1.onkeyup=_2d0.onkeyup;
}
}
function PoiManager(_2d2,_2d3,_2d4,_2d5,_2d6,_2d7){
var _2d8=0;
var _2d9=0;
var _2da=new Array();
var map=_2d2.getMap();
var _2dc=true;
var _2dd=null;
enable();
_2d3.setEventCallback(popupevent);
_2dc=false;
this.disable=disable;
this.enable=enable;
function disable(){
if(_2dd!=null){
if(_2d7=="Click"){
map.deleteClickCallback(_2dd);
}else{
if(_2d7=="DoubleClick"){
map.addDoubleClickCallback(_2dd);
}else{
if(_2d7=="ContextClick"){
map.addContextClickCallback(_2dd);
}else{
map.addMouseOverCallback(_2dd);
}
}
}
_2dd=null;
}
}
function enable(){
if(_2dd==null){
if(_2d7=="Click"){
_2dd=map.addClickCallback(checkPoisForCoordinate);
}else{
if(_2d7=="DoubleClick"){
_2dd=map.addDoubleClickCallback(checkPoisForCoordinate);
}else{
if(_2d7=="ContextClick"){
_2dd=map.addContextClickCallback(checkPoisForCoordinate);
}else{
map.setMouseOverCallbackIntervall(_2d6);
_2dd=map.addMouseOverCallback(checkPoisForCoordinate);
}
}
}
}
}
function popupevent(_2de,_2df){
if(_2df==3){
_2dc=true;
}else{
_2dc=false;
}
}
function checkPoisForCoordinate(_2e0){
if(!_2dc&&isVisible()&&(_2d8!=_2e0.mouseCoordX||_2d9!=_2e0.mouseCoordY)){
_2dc=true;
_2d8=_2e0.mouseCoordX;
_2d9=_2e0.mouseCoordY;
var _2e1=new Array();
_2e1.push({"attributename":"zoom","attributevalue":_2e0.zoom});
var _2e2=new Array();
for(var i=0;i<_2da.length;i++){
_2e2.push({"category":_2da[i].category,"subcategory":_2da[i].subcategory});
}
_2d2.getPoisByCoordinates(1,_2e0.mouseCoordX,_2e0.mouseCoordY,_2e2,99,_2e1,showPos);
}
}
function showPos(id,x,y,_2e7,_2e8){
if(_2e8==0&&_2e7!=null&&_2e7.length>0){
var _2e9=_2d4.format(_2e7);
_2d3.addPopup(x,y,_2e9);
}else{
_2dc=false;
}
}
function isVisible(){
var _2ea=false;
_2da=_2d5();
for(var i=0;i<_2da.length&&!_2ea;i++){
_2ea=_2da[i];
}
return _2ea;
}
}
function MapLocation(_2ec,_2ed){
var _2ee=new Array();
var x=_2ec;
var y=_2ed;
var _2f1=null;
var name=null;
var _2f3=null;
var type=null;
var _2f5=null;
var _2f6=null;
var _2f7=null;
var _2f8=null;
var _2f9=null;
var _2fa=null;
var _2fb=null;
var _2fc=null;
var _2fd=null;
var _2fe=null;
this.getAddress=getAddress;
this.setAttribute=setAttribute;
this.getAttribute=getAttribute;
this.getX=function(){
return x;
};
this.getY=function(){
return y;
};
this.getCategory=function(){
return _2f1;
};
this.getCity=function(){
return _2fa;
};
this.getName=function(){
return name;
};
this.getNumber=function(){
return _2f7;
};
this.getType=function(){
return type;
};
this.getPOIName=function(){
return _2f5;
};
this.getStreet=function(){
return _2f6;
};
this.getStreetLocation=function(){
return _2f7;
};
this.getPostalcode=function(){
return _2f8;
};
this.getMunicipalitySubdivision=function(){
return _2f9;
};
this.getMunicipality=function(){
return _2fa;
};
this.getCountrySecondarySubdivision=function(){
return _2fb;
};
this.getCountrySubdivision=function(){
return _2fc;
};
this.getCountry=function(){
return _2fd;
};
this.getCountryCode=function(){
return _2fe;
};
this.setX=function(newX){
x=newX;
};
this.setY=function(newY){
y=newY;
};
this.setCategory=function(_301){
_2f1=_301;
};
this.setNumber=function(_302){
_2f7=_302;
};
this.setStreetLocation=function(_303){
_2f7=_303;
};
this.setCountryCode=function(_304){
_2fe=_304;
};
this.setName=setName;
this.setType=setType;
this.setPOIName=setPOIName;
this.setStreet=setStreet;
this.setPostalcode=setPostalcode;
this.setMunicipality=setMunicipality;
this.setMunicipalitySubdivision=setMunicipalitySubdivision;
this.setCity=setMunicipality;
this.setCountrySecondarySubdivision=setCountrySecondarySubdivision;
this.setCountrySubdivision=setCountrySubdivision;
this.setCountry=setCountry;
function setType(_305){
type=_305;
if(type=="Poi"||type=="poi"){
name=_2f5;
_2f1="poi";
type="Poi";
}else{
if(type=="Address"||type=="Street"||type=="street"){
name=_2f6;
_2f1="street";
type="Street";
}else{
if(type=="Postalcode"){
name=_2f8;
_2f1="postalcode";
}else{
if(type=="MunicipalitySubdivision"){
name=_2f9;
_2f1="district";
}else{
if(type=="Municipality"){
name=_2fa;
_2f1="city";
}else{
if(type=="CountrySecondarySubdivision"){
_2f1="county";
name=_2fb;
}else{
if(type=="CountrySubdivision"){
_2f1="state";
name=_2fc;
}else{
if(type=="Country"){
_2f1="country";
name=_2fd;
}
}
}
}
}
}
}
}
}
function setName(_306){
name=_306;
if(type=="Poi"){
_2f5=name;
}else{
if(type=="Address"||type=="Street"){
_2f6=_306;
}else{
if(type=="Postalcode"){
_2f8=_306;
}else{
if(type=="MunicipalitySubdivision"){
_2f9=_306;
}else{
if(type=="Municipality"){
_2fa=_306;
}else{
if(type=="CountrySecondarySubdivision"){
_2fb=_306;
}else{
if(type=="CountrySubdivision"){
_2fc=_306;
}else{
if(type=="Country"){
_2fd=_306;
}
}
}
}
}
}
}
}
}
function setPOIName(_307){
_2f5=_307;
if(type=="Poi"){
name=_307;
}
}
function setStreet(_308){
_2f6=_308;
if(type=="Street"){
name=_308;
}
}
function setPostalcode(_309){
_2f8=_309;
if(type=="Postalcode"){
name=_309;
}
}
function setMunicipalitySubdivision(_30a){
_2f9=_30a;
if(type=="MunicipalitySubdivision"){
name=_30a;
}
}
function setMunicipality(_30b){
_2fa=_30b;
if(type=="Municipality"){
name=_30b;
}
}
function setCountrySecondarySubdivision(_30c){
_2fb=_30c;
if(type=="CountrySecondarySubdivision"){
name=_30c;
}
}
function setCountrySubdivision(_30d){
_2fc=_30d;
if(type=="CountrySubdivision"){
name=_30d;
}
}
function setCountry(_30e){
_2fd=_30e;
if(type=="Country"){
name=_30e;
}
}
function getAddress(){
var _30f=name;
if(_2f7!=null&&_2f7!=""){
_30f+=" "+_2f7;
}
if(_2fa!=null){
_30f+=", "+_2fa;
}
return _30f;
}
function setAttribute(_310,_311){
if(_310=="Type"||_310=="type"){
setType(_311);
}else{
if(_310=="category"){
_2f1=_311;
}else{
if(_310=="name"){
setName(_311);
}else{
if(_310=="x"){
x=_311;
}else{
if(_310=="y"){
y=_311;
}else{
if(_310=="number"||_310=="StreetLocation"){
_2f7=_311;
}else{
if(_310=="caption"){
_2f3=_311;
}else{
if(_310=="POIName"){
setPOIName(_311);
}else{
if(_310=="Street"){
setStreet(_311);
}else{
if(_310=="Postalcode"){
setPostalcode(_311);
}else{
if(_310=="city"||_310=="Municipality"){
setMunicipality(_311);
}else{
if(_310=="MunicipalitySubdivision"){
setMunicipalitySubdivision(_311);
}else{
if(_310=="CountrySecondarySubdivision"){
setCountrySecondarySubdivision(_311);
}else{
if(_310=="CountrySubdivision"){
setCountrySubdivision(_311);
}else{
if(_310=="Country"){
setCountry(_311);
}else{
var _312=false;
for(var i=0;i<_2ee.length&&!_312;i++){
if(_2ee[i].attributename==_310){
_312=true;
_2ee[i].attributevalue=_311;
}
}
if(!_312){
_2ee.push({"attributename":_310,"attributevalue":_311});
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
function getAttribute(_314){
if(_314=="category"){
return _2f1;
}else{
if(_314=="name"){
return name;
}else{
if(_314=="x"){
return x;
}else{
if(_314=="y"){
return y;
}else{
if(_314=="number"||_314=="StreetLocation"){
return _2f7;
}else{
if(_314=="caption"){
return _2f3;
}else{
if(_314=="POIName"){
return _2f5;
}else{
if(_314=="Street"){
return _2f6;
}else{
if(_314=="Postalcode"){
return _2f8;
}else{
if(_314=="city"||_314=="Municipality"){
return _2fa;
}else{
if(_314=="MunicipalitySubdivision"){
return MmunicipalitySubdivision;
}else{
if(_314=="CountrySecondarySubdivision"){
return _2fb;
}else{
if(_314=="CountrySubdivision"){
return _2fc;
}else{
if(_314=="Country"){
return _2fd;
}else{
var _315=null;
for(var i=0;i<_2ee.length&&_315==null;i++){
if(_2ee[i].attributename==_314){
_315=_2ee[i].attributevalue;
}
}
return _315;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
function Map(_317){
var _318=null;
var _319=null;
var _31a=null;
var _31b=null;
var _31c=false;
var _31d=true;
var _31e=null;
var _31f=false;
var _320=0;
var _321=0;
var _322=0;
var _323=40;
var _324=250;
var _325=null;
var _326=null;
var _327=0;
var _328=new EventHandler();
var _329=new EventHandler();
var _32a=new EventHandler();
var _32b=new EventHandler();
var _32c=new EventHandler();
var _32d=new EventHandler();
var _32e=new EventHandler();
var _32f=new EventHandler();
var _330=50;
var _331=null;
var _332=false;
var _333=true;
var _334=_317.MAP_WIDTH;
var _335=_317.MAP_HEIGHT;
var _336=_317.MAP_TILE_SIZE;
var _337=5;
var _338=_317.scales;
var _339=null;
var _33a=0;
var _33b=0;
var _33c=null;
var _33d=new Point(0,0);
var _33e=0;
var _33f=0;
var _340=null;
var _341=new Array();
var _342=1;
var _343=1;
var _344=20;
var _345=new Array();
var _346=_336*_338[_337];
var _347=Math.floor(_334/2);
var _348=Math.floor(_335/2);
var _349=Math.floor(_334/2/_336)+1;
var _34a=Math.floor(_335/2/_336)+1;
this.settings=_317;
this.getWidth=function(){
return _334;
};
this.getHeight=function(){
return _335;
};
this.getCenter=getCenterCoordinates;
this.getZoom=function(){
return _337;
};
this.getActiveSurface=function(){
return _319;
};
this.getMapNode=function(){
return _318;
};
this.getTileBackground=function(){
return _31a;
};
this.getTileContainer=function(){
return _31b;
};
this.getTiles=function(){
return _340;
};
this.getTileArray=function(){
return _341;
};
this.getMapDivObject=function(){
return _318;
};
this.setBlock=setBlock;
this.getBlock=function(){
return _31d;
};
this.getDragStatus=function(){
return _31f;
};
this.addZoomChangeCallback=function(func){
return _32b.addListener(func);
};
this.deleteZoomChangeCallback=function(id){
_32b.deleteListener(id);
};
this.addContextClickCallback=function(func){
return _32a.addListener(func);
};
this.deleteContextClickCallback=function(id){
_32a.deleteListener(id);
};
this.addClickCallback=function(func){
return _328.addListener(func);
};
this.deleteClickCallback=function(id){
_328.deleteListener(id);
};
this.addDoubleClickCallback=function(func){
return _329.addListener(func);
};
this.deleteDoubleClickCallback=function(id){
_329.deleteListener(id);
};
this.addMapMovedCallback=function(func){
return _32d.addListener(func);
};
this.deleteMapMovedCallback=function(id){
_32d.deleteListener(id);
};
this.addMapDraggedCallback=function(func){
return _32c.addListener(func);
};
this.deleteMapDraggedCallback=function(id){
return _32c.deleteListener(id);
};
this.addMapMouseDownCallback=function(func){
return _32e.addListener(func);
};
this.deleteMapMouseDownCallback=function(id){
_32e.deleteListener(id);
};
this.addMouseOverCallback=function(func){
return _32f.addListener(func);
};
this.deleteMouseOverCallback=function(id){
_32f.deleteListener(id);
};
this.setMouseOverCallbackIntervall=setMouseOverCallbackIntervall;
this.getSingleClickSensitivity=function(){
return _327;
};
this.setSingleClickSensitivity=function(_35b){
_327=_35b;
};
this.addLayer=addLayer;
this.start=start;
this.setCenter=setCenter;
this.moveMapDelta=moveMapDelta;
this.moveMapDeltaXY=moveMapDeltaXY;
this.moveMapDeltaFinished=moveMapDeltaFinished;
this.setZoom=setZoom;
this.redraw=redraw;
this.setSize=setSize;
this.calcMapCoordinates=calcMapCoordinates;
this.calcMapTileCoords=calcMapTileCoords;
this.getInfo=getInfo;
var test=0;
function addLayer(_35d){
_345.push(_35d);
return _345.length-1;
}
function setBlock(_35e){
if(!_35e){
if(_31e!=null){
setCenter(_31e.x,_31e.y);
_31e=null;
}
}
_31d=_35e;
}
function setMouseOverCallbackIntervall(time){
if(_331!=null){
clearTimeout(_331);
_331=null;
}
_330=Math.floor(time/4);
if(_330>0){
var x=_33e;
var y=_33f;
_331=setTimeout(function(){
return mouseOverEvent(x,y,0);
},_330);
}
return 0;
}
function start(x,y,zoom){
_337=zoom;
_346=_336*_338[_337];
createMapObjects();
prepareViewer();
if(util.isIE){
var _365=_319.clientHeight;
var _366=_319.clientWidth;
_319.style.height=(_365+2*_336)+"px";
_319.style.width=(_366+2*_336)+"px";
_319.style.backgroundPosition=(Math.round(_366/2))+"px "+(Math.round(_365/2))+"px";
}
for(var i=0;i<_345.length;i++){
_345[i].start(this);
}
_31d=false;
setCenter(x,y);
setMouseOverCallbackIntervall(_330*4);
}
function createMapObjects(){
var _368=util.attach(_317.MAP_AREA);
_318=util.createElement("div");
_368.appendChild(_318);
_318.className=_317.MAP_CSS_BASE;
_318.style.width=_334+"px";
_318.style.height=_335+"px";
_31a=util.createElement("div");
_318.appendChild(_31a);
_31a.className=_317.MAP_CSS_BASE+"_backgroundtiles";
_31b={"x":0,"y":0,"div":null,"width":0,"height":0};
_31b.div=util.createElement("div");
_31a.appendChild(_31b.div);
_31b.div.className=_317.MAP_CSS_BASE+"_tilecontainer";
_319=util.createElement("div");
_318.appendChild(_319);
_319.className=_317.MAP_CSS_BASE+"_surface";
}
function prepareViewer(){
_339=new Point(0,0);
_33c=new Point(0,0);
var _369=(_340==null);
var _36a=_342;
var _36b=_343;
_342=Math.ceil((_335+2*_344)/_336)+1;
_343=Math.ceil((_334+2*_344)/_336)+1;
if(_369){
_340=new Array();
}else{
if(_343<_36b){
var _36c=_36b-_343;
for(var col=0;col<_36c;col++){
var _36e=_340.pop();
for(var row=0;row<_36a;row++){
var tile=_36e.pop();
_341.splice(tile.id,1);
_31b.div.removeChild(tile.div);
}
}
_36b=_343;
}
if(_342<_36a){
var _36c=_36a-_342;
for(var col=0;col<_36b;col++){
var _36e=_340[col];
for(var row=0;row<_36c;row++){
var tile=_36e.pop();
_341.splice(tile.id,1);
_31b.div.removeChild(tile.div);
}
}
}
}
_31b.width=(_343*_336);
_31b.height=(_342*_336);
_31b.div.style.width=_31b.width+"px";
_31b.div.style.height=_31b.height+"px";
_31b.x=0;
_31b.y=0;
var _371=0;
for(var col=0;col<_343;col++){
var _36e=_340[col];
if(_36e==null){
_36e=new Array();
}
for(var row=0;row<_342;row++){
var tile=_36e[row];
if(tile==null){
tile=new Tile(_371,null,null);
tile.div=util.createElement("div");
tile.div.className=_317.MAP_CSS_BASE+"_tile";
_31b.div.appendChild(tile.div);
tile.created=true;
}else{
tile.created=false;
}
tile.id=_371;
_341[_371]=tile;
_371++;
_36e[row]=tile;
}
_340[col]=_36e;
}
if(_369){
_319.onmousedown=pressViewer;
_319.ondblclick=doubleClickEvent;
_319.onmousemove=mousePosition;
_319.oncontextmenu=contextClickEvent;
_319.onmouseout=mouseLeavesMap;
}
}
function setSize(_372,_373,newX,newY){
if(!_31c){
_31c=true;
_334=_372;
_335=_373;
_347=Math.floor(_334/2);
_348=Math.floor(_335/2);
_349=Math.floor(_334/2/_336)+1;
_34a=Math.floor(_335/2/_336)+1;
_318.style.width=_334+"px";
_318.style.height=_335+"px";
prepareViewer();
_31c=false;
for(var i=0;i<_345.length;i++){
this.tempLayerIndex=i;
_345[i].start(this);
}
for(var t=0;t<_341.length;t++){
_341[t].create=false;
}
if(newX!=null&&newY!=null){
setCenter(newX,newY);
}else{
setCenter(_33a,_33b);
}
_32b.triggerEvent(getInfo());
}
}
function setCenter(newX,newY){
var x=Number(newX);
var y=Number(newY);
if(!_31c&&!_31d){
_31c=true;
var _37c=Math.floor((x-_317.MAP_MIN_X)/_346);
var _37d=Math.floor((_317.MAP_MAX_Y-y)/_346);
var _37e=x-(_317.MAP_MIN_X+_37c*_346);
var _37f=y-(_317.MAP_MAX_Y-_37d*_346);
_37e=-Math.ceil(_37e/_338[_337]);
_37f=Math.ceil(_37f/_338[_337]);
_339.x=-(_37c)*_336+_37e+_347;
_339.y=-(_37d)*_336+_37f+_348;
_37e+=_347-_349*_336;
_37f+=_348-_34a*_336;
if(_343*_336+_37e<_334){
_37c++;
_37e+=_336;
}
if(_342*_336+_37f<_335){
_37d++;
_37f+=_336;
}
_31b.x=_37e;
_31b.y=_37f;
_31b.div.style.top=_37f+"px";
_31b.div.style.left=_37e+"px";
for(var col=0;col<_343;col++){
for(var row=0;row<_342;row++){
var tile=_340[col][row];
tile.x=col*_336;
tile.y=row*_336;
tile.div.style.top=tile.y+"px";
tile.div.style.left=tile.x+"px";
var _383=_37c+col-_349;
var _384=_37d+row-_34a;
if(tile.col!=_383||tile.row!=_384){
tile.col=_383;
tile.row=_384;
requestTile(tile.id,tile.col,tile.row);
}
}
}
_33a=x;
_33b=y;
layerFinishMove();
_32d.triggerEvent(getInfo());
_31c=false;
}else{
_31e=new Point(x,y);
}
return 0;
}
function moveMapDelta(_385,_386){
var _387=Number(_385);
var _388=Number(_386);
if(!_31c){
_31c=true;
var _389=_31b.y+_388;
var _38a=_31b.x+_387;
if(_38a>-_344){
_38a-=_336;
_31b.x-=_336;
for(var row=0;row<_342;row++){
var _38c=_340[_343-1][row];
for(var col=_343-1;col>0;col--){
_340[col][row]=_340[col-1][row];
_340[col][row].x=col*_336;
_340[col][row].div.style.left=_340[col][row].x+"px";
}
_340[0][row]=_38c;
_340[0][row].x=0;
_340[0][row].col-=_343;
_340[0][row].div.style.left="0px";
requestTile(_340[0][row].id,_340[0][row].col,_340[0][row].row);
}
}else{
if(_38a<-_336-_344){
_38a+=_336;
_31b.x+=_336;
for(var row=0;row<_342;row++){
var _38e=_340[0][row];
for(var col=0;col<_343-1;col++){
_340[col][row]=_340[col+1][row];
_340[col][row].x=col*_336;
_340[col][row].div.style.left=_340[col][row].x+"px";
}
_340[_343-1][row]=_38e;
_340[_343-1][row].x=(_343-1)*_336;
_340[_343-1][row].col+=_343;
_340[_343-1][row].div.style.left=_340[_343-1][row].x+"px";
requestTile(_340[_343-1][row].id,_340[_343-1][row].col,_340[_343-1][row].row);
}
}
}
if(_389>-_344){
_389-=_336;
_31b.y-=_336;
for(var col=0;col<_343;col++){
var _38c=_340[col][_342-1];
for(var row=_342-1;row>0;row--){
_340[col][row]=_340[col][row-1];
_340[col][row].y=row*_336;
_340[col][row].div.style.top=_340[col][row].y+"px";
}
_340[col][0]=_38c;
_340[col][0].y=0;
_340[col][0].row-=_342;
_340[col][0].div.style.top="0px";
requestTile(_340[col][0].id,_340[col][0].col,_340[col][0].row);
}
}else{
if(_389<-_336-_344){
_389+=_336;
_31b.y+=_336;
for(var col=0;col<_343;col++){
var _38e=_340[col][0];
for(var row=0;row<_342-1;row++){
_340[col][row]=_340[col][row+1];
_340[col][row].y=row*_336;
_340[col][row].div.style.top=_340[col][row].y+"px";
}
_340[col][_342-1]=_38e;
_340[col][_342-1].y=(_342-1)*_336;
_340[col][_342-1].row+=_342;
_340[col][_342-1].div.style.top=_340[col][_342-1].y+"px";
requestTile(_340[col][_342-1].id,_340[col][_342-1].col,_340[col][_342-1].row);
}
}
}
_339.x+=_387;
_339.y+=_388;
_33a=_317.MAP_MIN_X-(_339.x-_347)*_338[_337];
_33b=_317.MAP_MAX_Y+(_339.y-_348)*_338[_337];
_31b.x=_38a;
_31b.y=_389;
_31b.div.style.top=_389+"px";
_31b.div.style.left=_38a+"px";
_32c.triggerEvent(getInfo());
layerFinishMove();
_31c=false;
return true;
}else{
return false;
}
}
function moveMapDeltaXY(newX,newY){
var x=Number(newX);
var y=Number(newY);
var _393=(_33a-x)/_338[_337];
var _394=(y-_33b)/_338[_337];
moveMapDelta(_393,_394);
_33a=x;
_33b=y;
}
function moveMapDeltaFinished(){
_32d.triggerEvent(getInfo());
}
function redraw(){
for(var i=0;i<_345.length;i++){
_345[i].redraw();
}
}
function requestTile(id,col,row){
for(var i=0;i<_345.length;i++){
_345[i].imageRequest(id,_337,col,row);
}
}
function pressViewer(_39a){
setTimer(0,0);
var ev=util.getEvent(_39a);
test=ev.clientX;
if(!_31f&&!_31d){
_31f=true;
var _39c=util.inObjectXY(ev,_319);
_31a.style.cursor=_319.style.cursor=_317.PAN_CURSOR_STYLE;
_33c=new Point(_39c.x,_39c.y);
_33d=new Point(_39c.x,_39c.y);
_325=DocumentMouseMoveEvent.addEvent(moveViewer);
_326=DocumentMouseUpEvent.addEvent(releaseViewer);
_319.onmousedown=null;
_32e.triggerEvent(getInfo(ev.clientX,ev.clientY));
}
util.stopPropagation(ev);
}
function releaseViewer(_39d){
setTimer(0,0);
if(!_31d){
var ev=util.getEvent(_39d);
DocumentMouseUpEvent.deleteEvent(_326);
DocumentMouseMoveEvent.deleteEvent(_325);
_325=null;
_326=null;
_31a.style.cursor=_319.style.cursor="default";
var _39f=util.inObjectXY(ev,_319);
if(Math.abs(_39f.x-_33d.x)<=_327&&Math.abs(_39f.y-_33d.y)<=_327){
_33e=ev.clientX;
_33f=ev.clientY;
var x=ev.clientX;
var y=ev.clientY;
var _3a2=setTimeout(function(){
return singleClickEvent(x,y);
},_324);
setTimer(_3a2,0);
}
if(_31f){
_31f=false;
_319.onmousedown=pressViewer;
_32d.triggerEvent(getInfo(ev.clientX,ev.clientY));
}
util.stopPropagation(ev);
if(util.fixIEmarking){
document.selection.empty();
}
}
}
function moveViewer(_3a3){
if(!_31d){
var ev=util.getEvent(_3a3);
var _3a5=new Date();
var _3a6=_3a5.getTime();
if((_3a6-_322)>_323){
_322=_3a6;
var _3a7=util.inObjectXY(ev,_319);
if(moveMapDelta(_3a7.x-_33c.x,_3a7.y-_33c.y)){
_33c.x=_3a7.x;
_33c.y=_3a7.y;
}
}
util.stopPropagation(ev);
}
}
function mousePosition(_3a8){
var ev=util.getEvent(_3a8);
_332=true;
_33e=ev.clientX;
_33f=ev.clientY;
}
function mouseLeavesMap(_3aa){
_332=false;
}
function setZoom(_3ab){
var _3ac=Number(_3ab);
if(_3ac!=_337){
if(_3ac>=_317.MAP_MIN_ZOOM&&_3ac<=_317.MAP_MAX_ZOOM){
_337=_3ac;
_346=_336*_338[_337];
setCenter(_33a,_33b);
_32b.triggerEvent(getInfo());
return 0;
}else{
return 1;
}
}else{
return 0;
}
}
function setTimer(_3ad,_3ae){
if(_320>0){
clearTimeout(_320);
}
_320=_3ad;
_321=_3ae;
}
function layerFinishMove(){
for(var i=0;i<_345.length;i++){
_345[i].finishMove();
}
}
function contextClickEvent(_3b0){
setTimer(0,0);
var ev=util.getEvent(_3b0);
if(!_31c&&!_31d){
_33e=ev.clientX;
_33f=ev.clientY;
_32a.triggerEvent(getInfo(_33e,_33f));
}
util.stopPropagation(ev);
}
function singleClickEvent(x,y){
setTimer(0,0);
if(!_31c&&!_31d){
_328.triggerEvent(getInfo(x,y));
}
}
function doubleClickEvent(_3b4){
setTimer(0,0);
var ev=util.getEvent(_3b4);
if(!_31c&&!_31d){
_33e=ev.clientX;
_33f=ev.clientY;
_329.triggerEvent(getInfo(_33e,_33f));
}
util.stopPropagation(ev);
}
function mouseOverEvent(_3b6,_3b7,_3b8){
clearTimeout(_331);
var x=_33e;
var y=_33f;
if(_332&&!_31c&&!_31d&&Math.abs(_33e-_3b6)<=1&&Math.abs(_33f-_3b7)<=1){
if(_3b8<4){
_331=setTimeout(function(){
return mouseOverEvent(x,y,_3b8+1);
},_330);
}else{
_32f.triggerEvent(getInfo(x,y));
_331=setTimeout(function(){
return mouseOverEvent(x,y,0);
},_330);
}
}else{
_331=setTimeout(function(){
return mouseOverEvent(x,y,0);
},_330);
}
}
function calcMapCoordinates(newX,newY,_3bd){
var x=Number(newX);
var y=Number(newY);
var zoom=Number(_3bd);
var _3c1=_317.MAP_MIN_X-Math.floor((_339.x-_347)-(x-_334/2))*_338[zoom];
var _3c2=_317.MAP_MAX_Y+Math.floor((_339.y-_348)-(y-_335/2))*_338[zoom];
return new Point(_3c1,_3c2);
}
function calcMapTileCoords(newX,newY,_3c5){
var x=Number(newX);
var y=Number(newY);
var zoom=Number(_3c5);
var col=Math.floor((x-_317.MAP_MIN_X)/_338[zoom]/_336);
var row=Math.floor((_317.MAP_MAX_Y-y)/_338[zoom]/_336);
var left=x-(_317.MAP_MIN_X+col*_336*_338[zoom]);
var top=y-(_317.MAP_MAX_Y-row*_336*_338[zoom]);
left=Math.ceil(left/_338[zoom]);
top=-Math.ceil(top/_338[zoom]);
return {"zoom":zoom,"col":col,"row":row,"left":left,"top":top};
}
function getCenterCoordinates(){
return calcMapCoordinates(_347,_348,_337);
}
function getInfo(_3cd,_3ce){
if(_3cd==null||_3ce==null){
_3cd=_33e;
_3ce=_33f;
}
var _3cf={"clientX":_3cd,"clientY":_3ce};
var _3d0=util.inObjectXY(_3cf,_319);
var _3d1=calcMapCoordinates(_3d0.x,_3d0.y,_337);
return {"zoom":_337,"centerX":_33a,"centerY":_33b,"mouseX":_3cd,"mouseY":_3ce,"mouseOnMapX":_3d0.x,"mouseOnMapY":_3d0.y,"mouseCoordX":_3d1.x,"mouseCoordY":_3d1.y,"width":_334,"height":_335};
}
}
function IndexMap(_3d2){
var map=null;
var _3d4=null;
var _3d5=null;
var _3d6=null;
var _3d7=200;
var _3d8=200;
var _3d9=null;
var _3da=null;
var _3db=50;
var _3dc=50;
var _3dd=0;
var _3de=0;
var _3df=0;
var _3e0=0;
var _3e1=null;
var _3e2=null;
var _3e3=null;
var _3e4=false;
var _3e5=true;
var _3e6=null;
var _3e7=false;
var _3e8=0;
var _3e9=40;
var _3ea=null;
var _3eb=null;
var _3ec=null;
var _3ed=_3d2.MAP_TILE_SIZE;
var _3ee=_3d2.scales;
var _3ef=1;
var _3f0=null;
var _3f1=new Array();
var _3f2=2;
var _3f3=2;
var _3f4=20;
var _3f5=new Array();
var _3f6="";
var _3f7=_3d2.MAP_START_X;
var _3f8=_3d2.MAP_START_Y;
var _3f9=null;
var _3ec=null;
var _3fa=null;
var _3fb=true;
var _3fc=_3ed*_3ee[_3ef];
var _3fd=Math.floor(_3d7/2/_3ed)+1;
var _3fe=Math.floor(_3d8/2/_3ed)+1;
var _3ff=Math.floor(_3d7/2);
var _400=Math.floor(_3d8/2);
this.settings=_3d2;
this.getZoom=function(){
return _3ef;
};
this.getTiles=function(){
return _3f0;
};
this.getTileArray=function(){
return _3f1;
};
this.start=start;
this.setCenter=setCenter;
this.setZoom=setZoom;
this.setDragCenter=setDragCenter;
this.redraw=redraw;
this.setLayout=setLayout;
this.addLayer=addLayer;
this.hide=function(_401){
_3e1.hide(_401);
};
this.show=function(_402){
_3e1.show(_402);
};
this.getVisibility=function(){
return _3fb;
};
this.getActiveSurface=function(){
return _3e2;
};
this.getWidth=function(){
return _3d7;
};
this.getHeight=function(){
return _3d8;
};
function addLayer(_403){
_3f5.push(_403);
return _3f5.length-1;
}
function setLayout(_404,_405){
_3d7=_404;
_3d8=_405;
}
function start(_406,_407){
map=_406;
if(_3d2.MAP_SMOOTHMOVE){
_3d4=new MapSmoothMove();
_3d4.start(map);
}
_3f6=_407;
_3d7=_3d2.INDEXMAP_WIDTH;
_3d8=_3d2.INDEXMAP_HEIGHT;
_3ff=Math.floor(_3d7/2);
_400=Math.floor(_3d8/2);
_3fd=Math.floor(_3d7/2/_3ed)+1;
_3fe=Math.floor(_3d8/2/_3ed)+1;
createMapObjects();
_3e1=new visualFx.shrinkHiding(_3d5,_3d6,_3d7,_3d8,false,_3d2.INDEXMAP_CSS_BASE+"_button",50,10,indexMapHide);
setZoom(map.getZoom());
_3fc=_3ed*_3ee[_3ef];
setZoomframeDimension();
prepareViewer();
for(var i=0;i<_3f5.length;i++){
_3f5[i].start(this);
}
_3e5=false;
var _409=map.getCenter();
setCenter(_409.x,_409.y);
}
function createMapObjects(){
_3d6=util.createElement("div");
var _40a=map.getMapNode();
_40a.appendChild(_3d6);
_3d6.className=_3d2.INDEXMAP_CSS_BASE;
_3d6.style.width=_3d7+"px";
_3d6.style.height=_3d8+"px";
_3e3={"x":0,"y":0,"div":null,"width":0,"height":0};
_3e3.div=util.createElement("div");
_3d6.appendChild(_3e3.div);
_3e3.div.className=_3d2.INDEXMAP_CSS_BASE+"_tilecontainer";
_3e2=util.createElement("div");
_3d6.appendChild(_3e2);
_3e2.className=_3d2.INDEXMAP_CSS_BASE+"_surface";
_3d9=util.createElement("div");
_3d9.className=_3d2.INDEXMAP_CSS_BASE+"_zoomframe";
_3e2.appendChild(_3d9);
_3da=util.createElement("div");
_3da.className=_3d2.INDEXMAP_CSS_BASE+"_moveframe";
_3e2.appendChild(_3da);
_3d5=util.createElement("div");
_3d5.className=_3d2.INDEXMAP_CSS_BASE+"_button_hide";
_40a.appendChild(_3d5);
}
function prepareViewer(){
_3f9=new Point(0,0);
_3ec=new Point(0,0);
_3f0=new Array();
_3e3.width=(_3f3*_3ed);
_3e3.height=(_3f2*_3ed);
_3e3.div.style.width=_3e3.width+"px";
_3e3.div.style.height=_3e3.height+"px";
_3e3.x=0;
_3e3.y=0;
var _40b=0;
for(var col=0;col<_3f3;col++){
var _40d=new Array();
for(var row=0;row<_3f2;row++){
var tile=new Tile(_40b,null,null);
tile.div=util.createElement("div");
tile.div.className=_3d2.MAP_CSS_BASE+"_tile";
_3e3.div.appendChild(tile.div);
_3f1[_40b]=tile;
_40b++;
_40d[row]=tile;
}
_3f0[col]=_40d;
}
_3da.onmousedown=pressMoveFrame;
_3e2.onclick=util.stopPropagation;
_3e2.oncontextmenu=util.stopPropagation;
_3e2.onmousedown=pressViewer;
_3e2.ondblclick=mapDoubleClick;
}
function setCenter(newX,newY){
var x=Number(newX);
var y=Number(newY);
if(!_3e4&&!_3e5&&_3fb){
_3e4=true;
if(_3d4!=null){
_3d4.stopCentering();
}
var _414=Math.floor((x-_3d2.MAP_MIN_X)/_3fc);
var _415=Math.floor((_3d2.MAP_MAX_Y-y)/_3fc);
var _416=x-(_3d2.MAP_MIN_X+_414*_3fc);
var _417=y-(_3d2.MAP_MAX_Y-_415*_3fc);
_416=-Math.ceil(_416/_3ee[_3ef]);
_417=Math.ceil(_417/_3ee[_3ef]);
_3f9.x=-(_414)*_3ed+_416+_3ff;
_3f9.y=-(_415)*_3ed+_417+_400;
_416+=_3ff-_3fd*_3ed;
_417+=_400-_3fe*_3ed;
if(_3f3*_3ed+_416<_3d7){
_414++;
_416+=_3ed;
}
if(_3f2*_3ed+_417<_3d8){
_415++;
_417+=_3ed;
}
_3e3.x=_416;
_3e3.y=_417;
_3e3.div.style.top=_417+"px";
_3e3.div.style.left=_416+"px";
for(var col=0;col<_3f3;col++){
for(var row=0;row<_3f2;row++){
var tile=_3f0[col][row];
tile.x=col*_3ed;
tile.y=row*_3ed;
tile.div.style.top=tile.y+"px";
tile.div.style.left=tile.x+"px";
var _41b=_414+col-_3fd;
var _41c=_415+row-_3fe;
if(tile.col!=_41b||tile.row!=_41c){
tile.col=_41b;
tile.row=_41c;
requestTile(tile.id,tile.col,tile.row);
}
}
}
_3f7=x;
_3f8=y;
_3e0=_3de;
_3df=_3dd;
_3da.style.left=_3e0+"px";
_3da.style.top=_3df+"px";
layerFinishMove();
_3e4=false;
}else{
_3e6=new Point(x,y);
}
return 0;
}
function moveMapDelta(_41d,_41e){
var _41f=Number(_41d);
var _420=Number(_41e);
if(!_3e4&&_3fb){
_3e4=true;
var _421=_3e3.y+_420;
var _422=_3e3.x+_41f;
if(_422>-_3f4){
_422-=_3ed;
_3e3.x-=_3ed;
for(var row=0;row<_3f2;row++){
var _424=_3f0[_3f3-1][row];
for(var col=_3f3-1;col>0;col--){
_3f0[col][row]=_3f0[col-1][row];
_3f0[col][row].x=col*_3ed;
_3f0[col][row].div.style.left=_3f0[col][row].x+"px";
}
_3f0[0][row]=_424;
_3f0[0][row].x=0;
_3f0[0][row].col-=_3f3;
_3f0[0][row].div.style.left="0px";
requestTile(_3f0[0][row].id,_3f0[0][row].col,_3f0[0][row].row);
}
}else{
if(_422<-_3ed-_3f4){
_422+=_3ed;
_3e3.x+=_3ed;
for(var row=0;row<_3f2;row++){
var _426=_3f0[0][row];
for(var col=0;col<_3f3-1;col++){
_3f0[col][row]=_3f0[col+1][row];
_3f0[col][row].x=col*_3ed;
_3f0[col][row].div.style.left=_3f0[col][row].x+"px";
}
_3f0[_3f3-1][row]=_426;
_3f0[_3f3-1][row].x=(_3f3-1)*_3ed;
_3f0[_3f3-1][row].col+=_3f3;
_3f0[_3f3-1][row].div.style.left=_3f0[_3f3-1][row].x+"px";
requestTile(_3f0[_3f3-1][row].id,_3f0[_3f3-1][row].col,_3f0[_3f3-1][row].row);
}
}
}
if(_421>-_3f4){
_421-=_3ed;
_3e3.y-=_3ed;
for(var col=0;col<_3f3;col++){
var _424=_3f0[col][_3f2-1];
for(var row=_3f2-1;row>0;row--){
_3f0[col][row]=_3f0[col][row-1];
_3f0[col][row].y=row*_3ed;
_3f0[col][row].div.style.top=_3f0[col][row].y+"px";
}
_3f0[col][0]=_424;
_3f0[col][0].y=0;
_3f0[col][0].row-=_3f2;
_3f0[col][0].div.style.top="0px";
requestTile(_3f0[col][0].id,_3f0[col][0].col,_3f0[col][0].row);
}
}else{
if(_421<-_3ed-_3f4){
_421+=_3ed;
_3e3.y+=_3ed;
for(var col=0;col<_3f3;col++){
var _426=_3f0[col][0];
for(var row=0;row<_3f2-1;row++){
_3f0[col][row]=_3f0[col][row+1];
_3f0[col][row].y=row*_3ed;
_3f0[col][row].div.style.top=_3f0[col][row].y+"px";
}
_3f0[col][_3f2-1]=_426;
_3f0[col][_3f2-1].y=(_3f2-1)*_3ed;
_3f0[col][_3f2-1].row+=_3f2;
_3f0[col][_3f2-1].div.style.top=_3f0[col][_3f2-1].y+"px";
requestTile(_3f0[col][_3f2-1].id,_3f0[col][_3f2-1].col,_3f0[col][_3f2-1].row);
}
}
}
_3f9.x+=_41f;
_3f9.y+=_420;
_3f7=_3d2.MAP_MIN_X-(_3f9.x-_3ff)*_3ee[_3ef];
_3f8=_3d2.MAP_MAX_Y+(_3f9.y-_400)*_3ee[_3ef];
_3e3.x=_422;
_3e3.y=_421;
_3e3.div.style.top=_421+"px";
_3e3.div.style.left=_422+"px";
layerFinishMove();
_3e4=false;
return true;
}else{
return false;
}
}
function setDragCenter(newX,newY){
var x=Number(newX);
var y=Number(newY);
if(_3fb){
_3e0=Math.round(_3de+(x-_3f7)/_3ee[_3ef]);
_3df=Math.round(_3dd-(y-_3f8)/_3ee[_3ef]);
_3da.style.left=_3e0+"px";
_3da.style.top=_3df+"px";
}
}
function redraw(){
if(_3fb){
for(var i=0;i<_3f5.length;i++){
_3f5[i].redraw();
}
}
}
function mapDoubleClick(_42c){
if(!_3e5&&_3fb){
if(_3d4!=null){
_3d4.stopCentering();
}
var ev=util.getEvent(_42c);
var _42e=util.inObjectXY(ev,_3e2);
var newX=_3f7+(_42e.x-_3ff)*_3ee[_3ef];
var newY=_3f8-(_42e.y-_400)*_3ee[_3ef];
if(_3d4!=null){
var info=map.getInfo();
var _432=Math.abs(_42e.x-_3ff)*_3ee[_3ef]/_3ee[info.zoom];
var _433=Math.abs(_42e.y-_400)*_3ee[_3ef]/_3ee[info.zoom];
if(_432<info.width/2&&_433<info.height/2){
_3d4.startCenteringCoordinate(newX,newY);
}else{
map.setCenter(newX,newY);
}
}else{
map.setCenter(newX,newY);
}
util.stopPropagation(ev);
}
}
function pressMoveFrame(_434){
var ev=util.getEvent(_434);
if(!_3e7&&!_3e5&&_3fb){
if(_3d4!=null){
_3d4.stopCentering();
}
_3e7=true;
var _436=util.inObjectXY(ev,_3e2);
_3e2.style.cursor=_3d2.PAN_CURSOR_STYLE;
_3ec=new Point(_436.x,_436.y);
_3ea=DocumentMouseMoveEvent.addEvent(moveMoveFrame);
_3eb=DocumentMouseUpEvent.addEvent(releaseMoveFrame);
_3da.onmousedown=null;
}
util.stopPropagation(ev);
}
function releaseMoveFrame(_437){
if(!_3e5&&_3fb){
var ev=util.getEvent(_437);
DocumentMouseUpEvent.deleteEvent(_3eb);
DocumentMouseMoveEvent.deleteEvent(_3ea);
_3ea=null;
_3eb=null;
_3e2.style.cursor="default";
if(_3e7){
_3e7=false;
var newX=_3f7-(_3de-_3e0)*_3ee[_3ef];
var newY=_3f8+(_3dd-_3df)*_3ee[_3ef];
map.setCenter(newX,newY);
_3e0=_3de;
_3df=_3dd;
_3da.style.left=_3e0+"px";
_3da.style.top=_3df+"px";
_3da.onmousedown=pressMoveFrame;
}
util.stopPropagation(ev);
if(util.fixIEmarking){
document.selection.empty();
}
}
}
function moveMoveFrame(_43b){
if(!_3e5&&_3fb){
var ev=util.getEvent(_43b);
var _43d=new Date();
var _43e=_43d.getTime();
if((_43e-_3e8)>_3e9){
_3e8=_43e;
var _43f=util.inObjectXY(ev,_3e2);
_3e0=_3de+_43f.x-_3ec.x;
_3df=_3dd+_43f.y-_3ec.y;
_3da.style.left=_3e0+"px";
_3da.style.top=_3df+"px";
}
util.stopPropagation(ev);
}
}
function pressViewer(_440){
var ev=util.getEvent(_440);
if(!_3e7&&!_3e5&&_3fb){
if(_3d4!=null){
_3d4.stopCentering();
}
_3e7=true;
var _442=util.inObjectXY(ev,_3e2);
_3e2.style.cursor=_3d2.PAN_CURSOR_STYLE;
_3ec=new Point(_442.x,_442.y);
_3fa=new Point(_442.x,_442.y);
_3ea=DocumentMouseMoveEvent.addEvent(moveViewer);
_3eb=DocumentMouseUpEvent.addEvent(releaseViewer);
_3e2.onmousedown=null;
}
util.stopPropagation(ev);
}
function releaseViewer(_443){
if(!_3e5&&_3fb){
var ev=util.getEvent(_443);
DocumentMouseUpEvent.deleteEvent(_3eb);
DocumentMouseMoveEvent.deleteEvent(_3ea);
_3ea=null;
_3eb=null;
_3e2.style.cursor="default";
if(_3e7){
_3e7=false;
_3de=_3e0;
_3dd=_3df;
_3d9.style.left=_3de+"px";
_3d9.style.top=_3dd+"px";
var newX=_3f7-(_3de-_3e0)*_3ee[_3ef];
var newY=_3f8+(_3dd-_3df)*_3ee[_3ef];
map.setCenter(newX,newY);
_3e2.onmousedown=pressViewer;
}
util.stopPropagation(ev);
if(util.fixIEmarking){
document.selection.empty();
}
}
}
function moveViewer(_447){
if(!_3e5&&_3fb){
var ev=util.getEvent(_447);
var _449=new Date();
var _44a=_449.getTime();
if((_44a-_3e8)>_3e9){
_3e8=_44a;
var _44b=util.inObjectXY(ev,_3e2);
if(moveMapDelta(_44b.x-_3fa.x,_44b.y-_3fa.y)){
_3fa.x=_44b.x;
_3fa.y=_44b.y;
}
_3de=_3e0+_44b.x-_3ec.x;
_3dd=_3df+_44b.y-_3ec.y;
_3d9.style.left=_3de+"px";
_3d9.style.top=_3dd+"px";
}
util.stopPropagation(ev);
}
}
function setZoom(_44c){
var _44d=Number(_44c);
if(_3fb){
if(_44d>=_3d2.MAP_MIN_ZOOM&&_44d<=_3d2.MAP_MAX_ZOOM){
if(_3d4!=null){
_3d4.stopCentering();
}
var _44c=_44d;
var _44e=false;
var _44f=map.getWidth()*_3ee[map.getZoom()];
var _450=_3d7*_3d2.INDEXMAP_ZOOM_MAPSIZE/100;
for(;_44c<_3d2.MAP_MAX_ZOOM&&!_44e;){
_44e=_44f/_3ee[_44c]<_450;
if(!_44e){
_44c++;
}
}
if(_3ef!=_44c){
_3ef=_44c;
_3fc=_3ed*_3ee[_3ef];
setCenter(_3f7,_3f8);
}
setZoomframeDimension();
return 0;
}else{
return 1;
}
}else{
return 0;
}
}
function indexMapHide(_451){
_3fb=_451;
if(_451){
var info=map.getInfo();
setZoom(map.zoom);
setCenter(info.centerX,info.centerY);
redraw();
}else{
}
}
function setTimer(_453,_454){
if(timerId>0){
clearTimeout(timerId);
}
timerId=_453;
timerCount=_454;
}
function layerFinishMove(){
for(var i=0;i<_3f5.length;i++){
_3f5[i].finishMove();
}
}
function requestTile(id,col,row){
for(var i=0;i<_3f5.length;i++){
_3f5[i].imageRequest(id,_3ef,col,row);
}
}
function setZoomframeDimension(){
_3db=Math.round(map.getWidth()*_3ee[map.getZoom()]/_3ee[_3ef]);
_3dc=Math.round(map.getHeight()*_3ee[map.getZoom()]/_3ee[_3ef]);
_3de=Math.round((_3d7-_3db)/2);
_3dd=Math.round((_3d8-_3dc)/2);
_3d9.style.width=_3db+"px";
_3d9.style.height=_3dc+"px";
_3d9.style.left=_3de+"px";
_3d9.style.top=_3dd+"px";
_3e0=_3de;
_3df=_3dd;
_3da.style.width=_3db+"px";
_3da.style.height=_3dc+"px";
_3da.style.left=_3e0+"px";
_3da.style.top=_3df+"px";
}
}
function MapPanControl(){
var _45a="map_pan";
var _45b=52;
var _45c=52;
var _45d=null;
var map=null;
var _45f=0.25;
var _460=false;
var _461=false;
var _462=0;
var _463=0;
var _464=null;
var _465=null;
var _466=50;
var _467=0;
var _468=0;
this.start=start;
this.setLayout=setLayout;
function start(_469){
map=_469;
_45f=map.settings.PAN_FACTOR;
_466=map.settings.PAN_SPEED;
_45d=util.createElement("div");
var _46a=map.getMapNode();
var _46b=util.createElement("div");
_46a.appendChild(_46b);
_46b.className=_45a+"_background";
_46a.appendChild(_45d);
_45d.className=_45a;
_45d.style.width=_45b+"px";
_45d.style.height=_45c+"px";
_45d.onmousedown=startPan;
_45d.onmouseout=releasePan;
}
function setLayout(_46c,_46d,_46e){
_45c=_46d;
_45b=_46c;
_45a=_46e;
}
function startPan(_46f){
if(!_461&&!map.getBlock()){
_461=true;
map.setBlock(true);
var ev=util.getEvent(_46f);
var _471=util.inObjectXY(ev,_45d);
_462=-Math.ceil((_471.x-_45b/2)*_45f);
_463=-Math.ceil((_471.y-_45c/2)*_45f);
_468=1000;
moveMapTimer();
_464=DocumentMouseMoveEvent.addEvent(changePanDirection);
_465=DocumentMouseUpEvent.addEvent(releasePan);
_45d.onmouseout=releasePan;
_45d.onmousedown=null;
util.stopPropagation(ev);
}
}
function changePanDirection(_472){
if(_461){
var ev=util.getEvent(_472);
var _474=util.inObjectXY(ev,_45d);
_462=-Math.ceil((_474.x-_45b/2)*_45f);
_463=-Math.ceil((_474.y-_45c/2)*_45f);
_468=1000;
util.stopPropagation(ev);
}
}
function releasePan(){
if(_461){
if(_467>0){
clearTimeout(_467);
}
_468=0;
DocumentMouseUpEvent.deleteEvent(_465);
DocumentMouseMoveEvent.deleteEvent(_464);
_464=null;
_465=null;
_45d.onmousedown=startPan;
_461=false;
map.setBlock(false);
map.moveMapDeltaFinished();
}
}
function moveMapTimer(){
if(_467>0){
clearTimeout(_467);
}
_468--;
map.moveMapDelta(_462,_463);
if(_468>0){
_467=setTimeout(function(){
moveMapTimer();
},_466);
}
}
}
function MapSmoothMove(){
var map=null;
var _476=false;
var _477=15;
var _478=0;
var _479=0;
var _47a=0;
var _47b=0;
var _47c=0;
var _47d=0;
var _47e=40;
var _47f=0;
var _480=0;
var _481=new Date();
this.start=start;
this.startCentering=startCentering;
this.startCenteringCoordinate=startCenteringCoordinate;
this.stopCentering=stopCentering;
function start(_482){
map=_482;
}
function startCentering(_483){
if(_476){
stopCentering();
}
if(!_476){
_476=true;
_481=new Date();
_47a=0;
_47b=0;
_478=((map.getWidth()/2)-_483.mouseOnMapX);
_479=((map.getHeight()/2)-_483.mouseOnMapY);
_47c=_483.centerX-_478*map.settings.scales[_483.zoom];
_47d=_483.centerY+_479*map.settings.scales[_483.zoom];
_480=_477;
moveMapTimer(1);
}
}
function startCenteringCoordinate(newX,newY){
var x=Number(newX);
var y=Number(newY);
if(_476){
stopCentering();
}
if(!_476){
_47c=x;
_47d=y;
_47a=0;
_47b=0;
_476=true;
_481=new Date();
var info=map.getInfo();
_478=(info.centerX-x)/map.settings.scales[info.zoom];
_479=(y-info.centerY)/map.settings.scales[info.zoom];
_480=_477;
moveMapTimer(1);
}
}
function stopCentering(){
if(_47f>0){
clearTimeout(_47f);
}
if(_476){
map.moveMapDeltaFinished();
}
_476=false;
_47c=0;
_47d=0;
}
function moveMapTimer(_489){
if(_47f>0){
clearTimeout(_47f);
}
if(_480<_489){
_489=_480;
}
var _48a=_481.getTime();
var dx=Math.round(_489*(_478-_47a)/(_480));
var dy=Math.round(_489*(_479-_47b)/(_480));
_47a+=dx;
_47b+=dy;
map.moveMapDelta(dx,dy);
_480-=_489;
if(_480>0){
var _48d=_47e-(_481.getTime()-_48a);
if(_48d>0){
_47f=setTimeout(function(){
moveMapTimer(1);
},_47e);
}else{
moveMapTimer(2);
}
}else{
if(_47c!=0&&_47d!=0){
map.moveMapDeltaXY(_47c,_47d);
}
stopCentering();
}
}
}
function MapScaleBar(){
var map=null;
var _48f=null;
var _490=null;
var _491=null;
var _492="map_scalebar";
var _493=22;
var _494=157;
var _495=null;
var _496=null;
var _497=null;
var _498=null;
var _499=0;
var _49a=null;
var _49b=0;
var _49c=0;
var _49d=0;
var _49e=0;
var _49f=1;
var _4a0=1;
var _4a1=null;
var _4a2=null;
var _4a3=false;
var _4a4=false;
var _4a5=0;
var _4a6="0px";
var _4a7="0px";
var _4a8=null;
var _4a9=null;
var _4aa=-15;
var _4ab=15;
var _4ac=null;
var _4ad=null;
this.start=start;
this.setLayout=setLayout;
this.setZoom=setZoom;
this.getPseudoZoomStatus=getPseudoZoomStatus;
this.releaseZoom=releaseZoom;
function start(_4ae,_4af){
map=_4ae;
_490=_4af;
_498=map.settings.scales;
_4aa=map.settings.SCALEBAR_TOOLTIPS_OFF_X;
_4ab=map.settings.SCALEBAR_TOOLTIPS_OFF_Y;
if(map.settings.SCALEBAR_TOOLTIPS.length>0){
_497=map.settings.SCALEBAR_TOOLTIPS;
}
_48f=map.getMapNode();
var _4b0=util.createElement("div");
_48f.appendChild(_4b0);
var _4b1=_4b0.offsetLeft;
_4b0.className=_492+"_background";
var _4b2=util.createElement("div");
_48f.appendChild(_4b2);
_4b2.className=_492;
var _4b3=util.createElement("img");
_4b2.appendChild(_4b3);
_4b3.src=map.settings.MAP_IMAGEPATH+"/scalebar_plus.gif";
_4b3.className=_492+"_plus";
_4b3.onclick=zoomPlusOne;
_495=util.createElement("img");
_4b2.appendChild(_495);
_495.src=map.settings.MAP_IMAGEPATH+"/scalebar_bar.gif";
_495.className=_492+"_plus";
_495.onclick=zoomBarClick;
var _4b4=util.createElement("img");
_4b2.appendChild(_4b4);
_4b4.src=map.settings.MAP_IMAGEPATH+"/scalebar_minus.gif";
_4b4.className=_492+"_minus";
_4b4.onclick=zoomMinusOne;
_496=util.createElement("div");
_48f.appendChild(_496);
_496.className=_492+"_slider";
_496.onmousedown=pressZoom;
if(_497!=null){
_4a8=util.createElement("div");
_4a8.className=_492+"_tooltip";
_4a8.style.visibility="hidden";
_48f.appendChild(_4a8);
_496.onmouseover=sliderMouseover;
_496.onmouseout=hideTooltip;
_495.onmousemove=barMouseover;
_495.onmouseout=hideTooltip;
}
_499=_4b0.offsetTop+_493;
_496.style.top=_499+"px";
_49c=map.settings.MAP_MAX_ZOOM-map.settings.MAP_MIN_ZOOM+1;
_49b=_494/(_49c-1);
}
function setLayout(_4b5,_4b6,_4b7){
_492=_4b5;
_493=_4b6;
_494=_4b7;
}
function setZoom(_4b8){
_496.style.top=(_499+Math.ceil(_49b*(_4b8-map.settings.MAP_MIN_ZOOM)))+"px";
}
function sliderMouseover(_4b9){
if(!map.getDragStatus()){
var _4ba=map.getZoom();
setTooltipText(_4b9,_4ba);
}
}
function barMouseover(_4bb){
if(!map.getDragStatus()){
var ev=util.getEvent(_4bb);
var _4bd=util.inObjectXY(ev,_495);
var _4be=_4bd.y;
if(_4be<0){
_4be=0;
}else{
if(_4be>_494){
_4be=_494;
}
}
var _4bf=Math.floor((_4be/_49b)+map.settings.MAP_MIN_ZOOM);
setTooltipText(_4bb,_4bf);
}
}
function hideTooltip(){
if(_497!=null&&_4a8!=null&&!_4a4){
_4a8.style.visibility="hidden";
}
}
function setTooltipText(_4c0,_4c1){
if(_497!=null&&!_4a4){
var ev=util.getEvent(_4c0);
var _4c3=util.inObjectXY(ev,_48f);
if(_4a9!=null){
_4a8.removeChild(_4a9);
}
_4a9=document.createTextNode(_497[_4c1]);
_4a8.appendChild(_4a9);
_4a8.style.visibility="visible";
_4a8.style.top=(_4c3.y+_4ab)+"px";
_4a8.style.left=(_4c3.x+_4aa)+"px";
}
}
function getPseudoZoomStatus(){
return _4a3;
}
function zoomPlusOne(){
if(!_4a4&&!map.getBlock()){
map.setZoom(map.getZoom()-1);
setZoom(map.getZoom());
}
}
function zoomMinusOne(){
if(!_4a4&&!map.getBlock()){
map.setZoom(map.getZoom()+1);
setZoom(map.getZoom());
}
}
function zoomBarClick(_4c4){
if(!_4a4&&!map.getBlock()){
var ev=util.getEvent(_4c4);
var _4c6=util.inObjectXY(ev,_495);
var _4c7=_4c6.y;
if(_4c7>=0&&_4c7<=_494){
var _4c8=Math.round(_4c7/_49b)+map.settings.MAP_MIN_ZOOM;
map.setZoom(_4c8);
setZoom(map.getZoom());
}
util.stopPropagation(ev);
}
}
function pressZoom(_4c9){
if(!_4a4&&!map.getBlock()){
_4a4=true;
map.setBlock(true);
_4a2=map.getTiles();
_4a0=_4a2.length;
_49f=_4a2[0].length;
_4a1=map.getTileContainer();
_49d=map.getWidth()/2;
_49e=map.getHeight()/2;
_4a6=_4a1.div.style.left;
_4a7=_4a1.div.style.top;
var ev=util.getEvent(_4c9);
_49a=util.inObjectXY(ev,_496);
var _4cb=0;
for(var node=_495;node;node=node.offsetParent){
_4cb+=node.offsetTop;
}
_495.bartop=_4cb;
setTooltipText(_4c9,map.getZoom());
_4ac=DocumentMouseMoveEvent.addEvent(pseudoZoom);
_4ad=DocumentMouseUpEvent.addEvent(releaseZoom);
_496.onmousedown=null;
util.stopPropagation(ev);
if(_490!=null){
if(_490.getVisibility()){
_491=_490.getMarkers();
var _4cd=_4a2[0][0].col;
var _4ce=_4a2[0][0].row;
for(var id=0;id<_491.length;id++){
if(_491[id]!=null&&_491[id].shown){
var _4d0=map.calcMapTileCoords(_491[id].x,_491[id].y,map.getZoom());
_491[id].baseCol=_4d0.col-_4cd;
_491[id].baseRow=_4d0.row-_4ce;
_491[id].baseLeft=_4d0.left+_491[id].offsetX;
_491[id].baseTop=_4d0.top+_491[id].offsetY;
}
}
}
}
}
}
function releaseZoom(){
if(_4a4){
DocumentMouseUpEvent.deleteEvent(_4ad);
DocumentMouseMoveEvent.deleteEvent(_4ac);
_4ac=null;
_4ad=null;
for(var col=0;col<_4a0;col++){
for(var row=0;row<_49f;row++){
_4a2[col][row].div.style.height=map.settings.MAP_TILE_SIZE+"px";
_4a2[col][row].div.style.width=map.settings.MAP_TILE_SIZE+"px";
_4a2[col][row].div.style.left=(col*map.settings.MAP_TILE_SIZE)+"px";
_4a2[col][row].div.style.top=(row*map.settings.MAP_TILE_SIZE)+"px";
}
}
_4a1.div.style.left=_4a6;
_4a1.div.style.top=_4a7;
_491=null;
var _4d3=Math.floor(_4a5/_49b+0.5)+map.settings.MAP_MIN_ZOOM;
setZoom(_4d3);
map.setBlock(false);
map.setZoom(_4d3);
_496.onmousedown=pressZoom;
hideTooltip();
if(util.fixIEmarking){
document.selection.empty();
}
_4a4=false;
}
}
function pseudoZoom(_4d4){
var ev=util.getEvent(_4d4);
if(!_4a3&&_4a4){
_4a3=true;
var _4d6=util.inObjectXY(ev,_495);
var _4d7=_4d6.y;
if(_4d7<0){
_4d7=0;
}else{
if(_4d7>_494){
_4d7=_494;
}
}
_4a5=_4d7;
_496.style.top=(_4d7-_49a.y+_499)+"px";
if(_4a8!=null){
_4a8.style.top=(_4d7+_499+_4ab)+"px";
}
var _4d8=_498[map.getZoom()];
var _4d9=(_4a5/_49b)+map.settings.MAP_MIN_ZOOM;
var _4da=Math.floor(_4d9);
var _4db=_498[_4da];
if(_4d9!=_4da){
_4db+=(_498[_4da+1]-_498[_4da])*(_4d9-_4da);
if(_4a8!=null){
if(_4a9!=null){
_4a8.removeChild(_4a9);
}
_4a9=document.createTextNode(_497[_4da]);
_4a8.appendChild(_4a9);
}
}
var _4dc=_4d8/_4db;
var _4dd=Math.round(map.settings.MAP_TILE_SIZE*_4dc);
var _4de=Math.round(_4a1.x+(-_4a1.x+_49d)*(1-_4dc));
var _4df=Math.round(_4a1.y+(-_4a1.y+_49e)*(1-_4dc));
_4a1.div.style.left=_4de+"px";
_4a1.div.style.top=_4df+"px";
for(var col=0;col<_4a0;col++){
for(var row=0;row<_49f;row++){
_4a2[col][row].div.style.height=_4dd+"px";
_4a2[col][row].div.style.width=_4dd+"px";
_4a2[col][row].div.style.left=(col*_4dd)+"px";
_4a2[col][row].div.style.top=(row*_4dd)+"px";
}
}
if(_491!=null){
for(var id=0;id<_491.length;id++){
if(_491[id]!=null&&_491[id].shown){
var _4e3=map.calcMapTileCoords(_491[id].x,_491[id].y,map.getZoom());
var left=_491[id].baseCol*_4dd+Math.round(_491[id].baseLeft*_4dc)+_4de;
var top=_491[id].baseRow*_4dd+Math.round(_491[id].baseTop*_4dc)+_4df;
_491[id].div.style.left=left+"px";
_491[id].div.style.top=top+"px";
}
}
}
if(util.fixIEmarking){
document.selection.empty();
}
_4a3=false;
}
util.stopPropagation(ev);
}
}
function MapMenu(){
var div=null;
var left=0;
var top=0;
var _4e9=null;
var _4ea=null;
var _4eb=new Array();
var _4ec="";
this.show=show;
this.start=start;
this.hide=hide;
this.addMapMenuItem=addMapMenuItem;
this.deleteMapMenuItem=deleteMapMenuItem;
function start(_4ed,map){
_4ec=_4ed;
div=util.createElement("div");
div.className=_4ed;
div.onmouseout=hideOnOut;
div.onclick=util.stopPropagation;
div.onmousedown=util.stopPropagation;
div.onmouseup=util.stopPropagation;
div.onmousemove=util.stopPropagation;
var _4ef=map.getActiveSurface();
_4ef.appendChild(div);
}
function addMapMenuItem(_4f0,_4f1,_4f2,_4f3){
var id=_4f0;
if(id==null){
id=util.getFreeIndex(_4eb);
}
_4eb[id]=util.createElement("a");
_4eb[id].menuItemId=id;
_4eb[id].onclick=new callCallback(id);
_4eb[id].setAttribute("href","javascript: util.voidFunction();");
_4eb[id].callback=_4f2;
if(_4f1!=null&&_4f1!=""){
var _4f5=document.createTextNode(_4f1);
_4eb[id].appendChild(_4f5);
}
div.appendChild(_4eb[id]);
if(_4f3!=null){
for(var i=0;i<_4f3.length;i++){
_4eb[id].setAttribute(_4f3[i].attributename,_4f3[i].attributevalue);
}
}
return _4eb[id];
}
function deleteMapMenuItem(item){
div.removeChild(item);
_4eb[item.menuItemId]=null;
return 0;
}
function callCallback(id){
return function(_4f9){
hide();
_4eb[id].callback(id,_4e9,_4ea,0);
};
}
function show(_4fa){
left=_4fa.mouseOnMapX-8;
top=_4fa.mouseOnMapY-8;
_4e9=_4fa.mouseCoordX;
_4ea=_4fa.mouseCoordY;
div.style.visibility="visible";
div.style.left=(left)+"px";
div.style.top=(top)+"px";
}
function hide(){
div.style.visibility="hidden";
}
function hideOnOut(_4fb){
var ev=util.getEvent(_4fb);
if(util.leavingObject(ev,div)){
div.style.visibility="hidden";
}
}
}
function MapMeter(){
var map=null;
var _4fe="";
var _4ff="";
var _500=null;
var _501="";
this.set=set;
this.update=update;
this.start=start;
function start(_502,_503,type){
map=_502;
_4ff=_503.MAP_INI_ZOOM;
_4fe=type;
_501=_503.MAP_IMAGEPATH;
_500=util.createElement("img");
var _505=map.getTileBackground();
_505.appendChild(_500);
_500.className=_503.MAP_CSS_BASE+"_meter";
util.loadPngImage(_500,_501+"/"+_4fe+"/meter"+_4ff);
}
function set(type,zoom){
if(type!=null){
_4fe=type;
}
if(zoom!=null){
_4ff=zoom;
}
util.loadPngImage(_500,_501+"/"+_4fe+"/meter"+_4ff);
}
function update(){
_4ff=map.getZoom();
util.loadPngImage(_500,_501+"/"+_4fe+"/meter"+_4ff);
}
}
function PrintMenu(_508){
var map=null;
var _50a=null;
var _50b=null;
var _50c=null;
var menu=null;
var _50e=null;
var _50f=false;
var _510=null;
var _511=null;
var _512=null;
var _513=null;
var _514=Array();
var _515=0;
var _516=false;
var _517=null;
var _518=null;
var _519=null;
this.start=start;
this.getDialog=function(){
return _50e;
};
this.getPrintButton=function(){
return _519;
};
this.getUserDiv=function(){
return _518;
};
this.setFormatSize=setFormatSize;
this.setPrintParameters=function(_51a){
_517=_51a;
};
this.getPrintParameters=function(){
return _517;
};
this.setPrintCallback=function(func){
_512.onclick=func;
};
this.setCloseCallback=function(func){
_513.onclick=func;
};
this.getCurrentFormat=function(){
return _514[_515];
};
this.updateZoom=updateZoom;
this.getPreviewInfo=getPreviewInfo;
this.getMapPrintXML=getMapPrintXML;
this.getMapPrintURL=getMapPrintURL;
this.hide=function(_51d){
_511.hide(_51d);
};
this.show=function(_51e){
_511.show(_51e);
};
function start(_51f,_520,_521){
map=_51f;
_50a=_521;
_50b=_520;
var _522=map.getMapNode();
menu=util.createElement("div");
_522.appendChild(menu);
menu.className=_508.PRINT_MENU_CSS_BASE;
_50c=util.createElement("div");
menu.appendChild(_50c);
_50c.className=_508.PRINT_MENU_CSS_BASE+"_item";
_50c.onclick=util.stopPropagation;
_50c.oncontextmenu=util.stopPropagation;
_50c.onmousedown=util.stopPropagation;
_50c.ondblclick=util.stopPropagation;
var _523=util.createElement("div");
_50c.appendChild(_523);
_519=util.createElement("div");
_519.appendChild(document.createTextNode(_508.PRINT_MENU_BUTTON));
_50c.appendChild(_519);
menu.appendChild(_50c);
_523.className=_508.PRINT_MENU_CSS_BASE+"_item_bg";
_519.className=_508.PRINT_MENU_CSS_BASE+"_item_text";
_50e=util.createElement("div");
_50e.className=_508.PRINT_MENU_CSS_BASE+"_dialog";
_50e.style.visibility="hidden";
if(_508.PRINT_MENU_FORMATS!=null){
var form=util.createElement("form");
form.setAttribute("method","post");
for(var i=0;i<_508.PRINT_MENU_FORMATS.length;i++){
var div=util.createElement("div");
var _527=null;
if(util.isIE){
if(i==0){
_527=util.createElement("<input type=\"radio\" name=\"PrintMenuTypeSetting\" checked=\"checked\" />");
}else{
_527=util.createElement("<input type=\"radio\" name=\"PrintMenuTypeSetting\"  />");
}
}else{
_527=util.createElement("input");
_527.type="radio";
_527.name="PrintMenuTypeSetting";
_527.checked=i==0;
}
if(_50a!=null){
_527.onclick=getSetPreviewFrameFunction(i);
}
_514[i]={type:_508.PRINT_MENU_FORMATS[i].type,width:_508.PRINT_MENU_FORMATS[i].width,height:_508.PRINT_MENU_FORMATS[i].height};
div.appendChild(_527);
div.appendChild(document.createTextNode(_508.PRINT_MENU_FORMATS[i].label));
form.appendChild(div);
}
_50e.appendChild(form);
}
_518=util.createElement("div");
_50e.appendChild(_518);
var _528=util.createElement("div");
_513=util.createElement("input");
_513.setAttribute("type","Button");
_513.setAttribute("value",_508.PRINT_MENU_BUTTON_CLOSE);
_528.appendChild(_513);
_512=util.createElement("input");
_512.setAttribute("type","Button");
_512.setAttribute("value",_508.PRINT_MENU_BUTTON_PRINT);
_528.appendChild(_512);
_50e.appendChild(_528);
if(_50a!=null){
if(!_50a.getVisibility()){
_50a.show();
}
_510=util.createElement("div");
_510.className=_508.PRINT_MENU_CSS_BASE+"_previewframe";
_510.style.visibility="hidden";
setPreviewFrameSize(0);
var _529=_50a.getActiveSurface();
_529.appendChild(_510);
}
_522.appendChild(_50e);
_511=new visualFx.shrinkHiding(_519,_50e,null,null,true,null,50,10,showPrintMenu);
_513.onclick=_511.hide;
_512.onclick=requestPrintPreview;
}
function getSetPreviewFrameFunction(_52a){
return function(){
return setPreviewFrameSize(_52a);
};
}
function setFormatSize(_52b,_52c,_52d){
var _52e=-1;
for(var i=0;i<_514.length&&_52e==-1;i++){
if(_514[i].type==_52b){
_514[i].width=_52c;
_514[i].height=_52d;
_52e=i;
}
}
if(_52e==-1){
return 1;
}else{
if(_50f&&_52e==_515){
setPreviewFrameSize(_515);
}
return 0;
}
}
function updateZoom(){
setPreviewFrameSize(_515);
}
function setPreviewFrameSize(_530){
if(_510!=null){
var _531=_508.scales[map.getZoom()]/_508.scales[_50a.getZoom()];
var _532=Math.round(_514[_530].width*_531);
var _533=Math.round(_514[_530].height*_531);
_510.style.width=_532+"px";
_510.style.height=_533+"px";
_510.style.left=Math.round((_50a.getWidth()-_532)/2)+"px";
_510.style.top=Math.round((_50a.getHeight()-_533)/2)+"px";
}
_515=_530;
}
function showPrintMenu(_534){
_50f=_534;
if(_50f){
if(_50a!=null){
if(!_50a.getVisibility()){
_50a.show();
}
_510.style.visibility="visible";
}
}else{
if(_50a!=null){
_510.style.visibility="hidden";
}
}
}
function getMapPrintXML(){
return _50b.getMapPrintXML(_514[_515].width,_514[_515].height,null,null,null,null,_517);
}
function getMapPrintURL(_535){
_50b.getMapPrintURL(_535,_514[_515].width,_514[_515].height,null,null,null,null,_517);
}
function requestPrintPreview(){
if(!_516){
_516=true;
_50b.getMapPrintURL(showPrintPreview,_514[_515].width,_514[_515].height,null,null,null,null,_517);
}
}
function showPrintPreview(url){
var _537=window.open(url,"Print","menubar=yes,toolbar=yes,resizable=yes,scrollbars=yes");
_516=false;
}
function getPreviewInfo(){
var _538=_508.scales[map.getZoom()]/_508.scales[_50a.getZoom()];
var _539=Math.round(_514[_515].width*_538);
var _53a=Math.round(_514[_515].height*_538);
return {"frameWidth":_539,"frameHeight":_53a,"indexMapZoom":_50a.getZoom(),"mapZoom":map.getZoom()};
}
}
function MapCopyright(){
var map=null;
var _53c="";
var _53d="";
var _53e=null;
var _53f="";
this.set=set;
this.update=update;
this.start=start;
function start(_540,_541,type){
map=_540;
_53d=_541.MAP_INI_ZOOM;
_53c=type;
_53f=_541.MAP_IMAGEPATH;
_53e=util.createElement("img");
var _543=map.getTileBackground();
_543.appendChild(_53e);
_53e.className=_541.MAP_CSS_BASE+"_copyright";
util.loadPngImage(_53e,_53f+"/"+_53c+"/copyright"+_53d);
}
function set(type,zoom){
if(type!=null){
_53c=type;
}
if(zoom!=null){
_53d=zoom;
}
util.loadPngImage(_53e,_53f+"/"+_53c+"/copyright"+_53d);
}
function update(){
_53d=map.getZoom();
util.loadPngImage(_53e,_53f+"/"+_53c+"/copyright"+_53d);
}
}
function NaviciAjaxConfiguration(){
this.LANGUAGE="fi";
this.IE_FIX_CSS="styles/ie_specials.css";
this.SERVER_SIDE_FILE="ajaxRequest.php";
this.MAP_START_X=0;
this.MAP_START_Y=0;
this.MAP_MIN_X=0;
this.MAP_MAX_X=0;
this.MAP_MIN_Y=0;
this.MAP_MAX_Y=0;
this.scales=new Array();
this.availableImages=new Array();
this.MAP_TILE_SIZE=256;
this.MAP_MAX_ZOOM=0;
this.MAP_MIN_ZOOM=0;
this.MAP_INI_ZOOM=0;
this.MAP_IMAGEPATH="images";
this.MAP_SMOOTHMOVE=true;
this.CREATE_MAP_METER=true;
this.CREATE_MAP_COPYRIGHT=true;
this.MAP_FIXEDSIZE=false;
this.MAP_WIDTH=600;
this.MAP_HEIGHT=400;
this.MAP_MARGIN_RIGHT=15;
this.MAP_MARGIN_BOTTOM=10;
this.MAP_AREA="MapArea";
this.MAP_CSS_BASE="map_image";
this.CREATE_MAP_SCALEBAR=true;
this.SCALEBAR_CSS_BASE="map_scalebar";
this.SCALEBAR_TOP=22;
this.SCALEBAR_LENGTH=157;
this.SCALEBAR_TOOLTIPS=new Array();
this.SCALEBAR_TOOLTIPS_OFF_X=-5;
this.SCALEBAR_TOOLTIPS_OFF_Y=15;
this.CREATE_MAP_PAN=true;
this.PAN_CSS_BASE="map_pan";
this.PAN_WIDTH=52;
this.PAN_HIGHT=52;
this.PAN_FACTOR=0.25;
this.PAN_SPEED=50;
this.CREATE_MAP_MENU=true;
this.CREATE_TYPE_MENU=true;
this.CREATE_PRINT_MENU=true;
this.PRINT_MENU_BUTTON="Print";
this.PRINT_MENU_BUTTON_PRINT="Print";
this.PRINT_MENU_BUTTON_CLOSE="Close";
this.PRINT_MENU_FORMATS=Array();
this.PRINT_MENU_FORMATS[0]={type:"Portrait",width:535,height:782,label:"Portrait"};
this.PRINT_MENU_FORMATS[1]={type:"Landscape",width:782,height:535,label:"Landscape"};
this.PRINT_MENU_CSS_BASE="map_printmenu";
this.PAN_CURSOR_STYLE="pointer";
this.LAYERS=new Array();
this.POI_SERVICE="navici_poi";
this.CREATE_INDEXMAP=true;
this.INDEXMAP_WIDTH=250;
this.INDEXMAP_HEIGHT=200;
this.INDEXMAP_ZOOM_MAPSIZE=60;
this.INDEXMAP_CSS_BASE="indexmap_image";
this.POPUP_CSS_BASE="map_popup";
this.POPUP_DYNAMIC_POSITION=true;
this.POPUP_BACKGROUND_IMAGE="images/pois_bg";
this.POPUP_WIDTH=238;
this.POPUP_HEIGHT=291;
}
function NaviciAjaxApi(){
var _546="1.3.2";
var _547="fi";
var map=null;
var _549=null;
var _54a=null;
var _54b=null;
var _54c=null;
var _54d=null;
var _54e=null;
var _54f=null;
var _550=null;
var _551=null;
var _552=null;
var _553=null;
var _554=null;
var _555=null;
var _556=null;
var _557=null;
var _558=null;
var _559=null;
var _55a=null;
var _55b=null;
var _55c=null;
var _55d=null;
var _55e=null;
this.start=start;
this.getVersion=function(){
return _546;
};
this.setLanguage=function(_55f){
_547=_55f;
};
this.getLanguage=function(){
return _547;
};
this.setMapSize=function(_560,_561,newX,newY){
return map.setSize(_560,_561,newX,newY);
};
this.setMapCenter=setMapCenter;
this.setMapZoom=function(zoom){
return map.setZoom(zoom);
};
this.getMapZoom=function(){
return map.getZoom();
};
this.getMapInfos=function(){
return map.getInfo();
};
this.getMap=function(){
return map;
};
this.getMapPrintMenu=function(){
return _55d;
};
this.getLayerManager=function(){
return _54a;
};
this.getIndexMap=function(){
return _558;
};
this.setMapType=function(type){
return _54a.setMapType(type);
};
this.getMapType=function(){
return _54a.getCurrentType();
};
this.addMapTypeChangeCallback=function(func){
return _54a.addTypeChangeCallback(func);
};
this.deleteMapTypeChangeCallback=function(id){
return _54a.deleteTypeChangeCallback(id);
};
this.clearDynamicLayer=function(){
return _54a.clearLayer("Dynamic");
};
this.redrawDynamicLayer=function(){
return _54a.redrawLayer("Dynamic");
};
this.setDynamicLayerVisibility=function(_568){
return _54a.setLayerVisibility("Dynamic",_568);
};
this.addDynamicLayerObject=addDynamicLayerObject;
this.deleteDynamicLayerObject=deleteDynamicLayerObject;
this.getMapPrintXML=function(_569,_56a,type,zoom,x,y,_56f){
return _54a.getMapPrintXML(_569,_56a,type,zoom,x,y,_56f);
};
this.getMapPrintURL=function(_570,_571,_572,type,zoom,x,y,_577){
return _54a.getMapPrintURL(_570,_571,_572,type,zoom,x,y,_577);
};
this.addLayerMarker=addLayerMarker;
this.addLayerMarkerImage=addLayerMarkerImage;
this.deleteLayerMarker=deleteLayerMarker;
this.addDivMarker=addDivMarker;
this.deleteDivMarker=deleteDivMarker;
this.searchRoute=function(id,_579,_57a,_57b){
return _552.getRoute(id,_579,_547,_57a,_57b);
};
this.getRouteVisibility=function(id,_57d){
return _552.getRouteVisibility(id,_57d);
};
this.setRouteVisibility=function(id,_57f,_580){
return _552.setRouteVisibility(id,_57f,_580);
};
this.getRouteCount=function(id){
return _552.getRouteCount(id);
};
this.deleteRoute=function(id){
_552.deleteRoute(id);
};
this.addMapMenuItem=function(id,_584,_585,_586){
return _554.addMapMenuItem(id,_584,_585,_586);
};
this.deleteMapMenuItem=function(item){
return _554.deleteMapMenuItem(item);
};
this.getAddressByKey=getAddressByKey;
this.getAddressByObject=getAddressByObject;
this.getAddressByCoordinates=getAddressByCoordinates;
this.getPoisByCoordinates=function(id,x,y,_58b,_58c,_58d,_58e){
return _551.getPois(id,x,y,_58b,_547,_58c,_55e.POI_SERVICE,_58d,_58e);
};
this.startPoiManager=startPoiManager;
this.getPoiManager=function(){
return _55c;
};
this.setPoiVisibility=setPoiVisibility;
this.getPoiPopupFormatter=function(){
return _55b;
};
this.setPoiPopupFormatter=function(_58f){
_55b=_58f;
};
this.getMapPopupManager=function(){
return _55a;
};
this.setMapPopupManager=function(_590){
_55a=_590;
};
function start(_591){
_55e=_591;
_547=_55e.LANGUAGE;
if(_55e.IE_FIX_CSS!=null&&util.isIE){
util.loadCssFile(_55e.IE_FIX_CSS);
}
_549=new AjaxObject(_55e.SERVER_SIDE_FILE);
if(!_55e.MAP_FIXEDSIZE){
var _592=util.objectXY(util.attach(_55e.MAP_AREA));
_55e.MAP_WIDTH=util.getWindowWidth()-_592.x-_55e.MAP_MARGIN_RIGHT;
_55e.MAP_HEIGHT=util.getWindowHeight()-_592.y-_55e.MAP_MARGIN_BOTTOM;
}
map=new Map(_55e);
_54a=new LayerManager(this,_55e,false);
_54a.start(_549,map);
_54c=_54a.getLayer("Dynamic");
if(_54c!=null){
_553=new LayerMarker(_54c);
_559=new PoisOnLayer(_54c);
}
_54e=new DivMarkerLayer();
map.addLayer(_54e);
_54a.addDivLayer(_54e);
_552=new RouteRequests(_549);
_549.addRequestObject(_552);
_552.start(_54c);
if(_55e.MAP_SMOOTHMOVE){
_54d=new MapSmoothMove();
_54d.start(map);
map.addDoubleClickCallback(_54d.startCentering);
map.addZoomChangeCallback(_54d.stopCentering);
map.addMapMouseDownCallback(_54d.stopCentering);
map.addClickCallback(_54d.stopCentering);
}else{
map.addDoubleClickCallback(function(_593){
map.setCenter(_593.mouseCoordX,_593.mouseCoordY);
});
}
map.start(_55e.MAP_START_X,_55e.MAP_START_Y,_55e.MAP_INI_ZOOM);
if(_55e.CREATE_TYPE_MENU){
_54a.createMenu();
}
if(_55e.CREATE_MAP_SCALEBAR){
_557=new MapScaleBar();
_557.setLayout(_55e.SCALEBAR_CSS_BASE,_55e.SCALEBAR_TOP,_55e.SCALEBAR_LENGTH);
_557.start(map,_54e);
_557.setZoom(_55e.MAP_INI_ZOOM);
map.addZoomChangeCallback(function(_594){
_557.setZoom(_594.zoom);
});
}
if(_55e.CREATE_MAP_PAN){
var _595=new MapPanControl();
_595.setLayout(_55e.PAN_WIDTH,_55e.PAN_HIGHT,_55e.PAN_CSS_BASE);
_595.start(map);
}
if(_55e.CREATE_INDEXMAP){
_558=new IndexMap(_55e);
_54b=new LayerManager(this,_55e,true);
_54b.start(_549,_558);
_558.start(map,_54a.getCurrentType());
map.addMapDraggedCallback(function(_596){
_558.setDragCenter(_596.centerX,_596.centerY);
});
map.addMapMovedCallback(function(_597){
_558.setCenter(_597.centerX,_597.centerY);
});
map.addZoomChangeCallback(function(_598){
_558.setZoom(_598.zoom);
});
_54a.addTypeChangeCallback(_54b.setMapType);
}
if(_55e.CREATE_PRINT_MENU){
_55d=new PrintMenu(_55e);
_55d.start(map,_54a,_558);
map.addZoomChangeCallback(_55d.updateZoom);
}
if(_55e.CREATE_MAP_MENU){
_554=new MapMenu();
_554.start("map_menu",map);
map.addClickCallback(_554.show);
}
if(_55e.CREATE_MAP_METER){
_555=new MapMeter();
_555.start(map,_55e,_54a.getCurrentType());
map.addZoomChangeCallback(_555.update);
_54a.addTypeChangeCallback(_555.set);
}
if(_55e.CREATE_MAP_COPYRIGHT){
_556=new MapCopyright();
_556.start(map,_55e,_54a.getCurrentType());
map.addZoomChangeCallback(_556.update);
_54a.addTypeChangeCallback(_556.set);
}
_54f=new Geocoding();
_54f.start(_549);
_550=new GeocodingReversed();
_550.start(_549);
_551=new GeocodingReversedPoi();
_551.start(_549);
_55a=new MapPopupManager(this,_55e);
_55b=new PoiPopupFormatter();
}
function getAddressByCoordinates(id,x,y,_59c,_59d,_59e){
var id=_550.getAddress(id,x,y,_547,_59c,_59d,_59e);
_549.sendRequest();
return id;
}
function getAddressByKey(id,key,_5a1,_5a2,_5a3){
var id=_54f.getAddress(id,key,_547,_5a1,_5a2,_5a3);
_549.sendRequest();
return id;
}
function getAddressByObject(id,_5a5,_5a6){
var id=_54f.getAddressByObject(id,_5a5,_5a6);
_549.sendRequest();
return id;
}
function addDynamicLayerObject(xml){
var _5a8=_54a.getLayer("Dynamic");
if(_5a8==null){
return null;
}else{
return _5a8.addImageLayerObject(xml);
}
}
function deleteDynamicLayerObject(id){
var _5aa=_54a.getLayer("Dynamic");
if(_5aa==null){
return 1;
}else{
return _5aa.deleteImageLayerObject(id);
}
}
function addLayerMarker(type,x,y,_5ae,_5af){
if(_553!=null){
return _553.addMarker(type,x,y,_5ae,_5af);
}else{
return null;
}
}
function addLayerMarkerImage(x,y,_5b2,_5b3){
if(_553!=null){
return _553.addMarkerImage(x,y,_5b2,_5b3);
}else{
return null;
}
}
function deleteLayerMarker(id){
if(_553!=null){
return _553.deleteMarker(id);
}else{
return 1;
}
}
function addDivMarker(_5b5,x,y,_5b8,_5b9,_5ba,_5bb){
if(_54e!=null){
return _54e.addMarker(_5b5,x,y,_5b8,_5b9,_5ba,_5bb);
}else{
return null;
}
}
function deleteDivMarker(div){
if(_54e!=null){
return _54e.deleteMarker(div);
}else{
return 1;
}
}
function setPoiVisibility(_5bd,_5be,_5bf,_5c0){
if(_559!=null){
return _559.setPoiVisibility(_55e.POI_SERVICE,_5bd,_5be,_5bf,_5c0);
}else{
return 1;
}
}
function getVisiblePoistypes(){
if(_559!=null){
return _559.getVisiblePois;
}else{
return null;
}
}
function startPoiManager(_5c1,_5c2,_5c3){
if(_559!=null){
_55a.setTitle(_5c2);
_55c=new PoiManager(this,_55a,_55b,_559.getVisiblePois,_5c1,_5c3);
return 0;
}else{
return 1;
}
}
function setMapCenter(x,y){
if(_54d!=null){
var info=map.getInfo();
var _5c7=Math.abs((x-info.centerX)/_55e.scales[info.zoom]);
var _5c8=Math.abs((y-info.centerY)/_55e.scales[info.zoom]);
if(_5c7<info.width/2&&_5c8<info.height/2){
_54d.startCenteringCoordinate(x,y);
return 0;
}else{
return map.setCenter(x,y);
}
}else{
return map.setCenter(x,y);
}
}
}

