// This is a compressed version of the Pushpin JavaScript API. To see a version with licensing information, add 'cmp=false' as a parameter to this request. var isCSS,isW3C,isIE4,isNN4;function initDHTMLAPI(){if(document.images){isCSS=(document.body&&document.body.style)?true:false;isW3C=(isCSS&&document.getElementById)?true:false;isIE4=(isCSS&&document.all)?true:false;isNN4=(document.layers)?true:false;isIE6CSS=(document.compatMode&&document.compatMode.indexOf("CSS1")>=0)?true:false;}} function seekLayer(doc,name){var theObj;for(var i=0;i0){theObj=seekLayer(document.layers[i].document,name);}} return theObj;} function getRawObject(obj){var theObj;if(typeof obj=="string"){if(isW3C){theObj=document.getElementById(obj);}else if(isIE4){theObj=document.all(obj);}else if(isNN4){theObj=seekLayer(document,obj);}}else{theObj=obj;} return theObj;} function getObject(obj){var theObj=getRawObject(obj);if(theObj&&isCSS){theObj=theObj.style;} return theObj;} function shiftTo(obj,x,y){var theObj=getObject(obj);if(theObj){if(isCSS){var units=(typeof theObj.left=="string")?"px":0;theObj.left=x+units;theObj.top=y+units;}else if(isNN4){theObj.moveTo(x,y);}}} function shiftBy(obj,deltaX,deltaY){var theObj=getObject(obj);if(theObj){if(isCSS){var units=(typeof theObj.left=="string")?"px":0;theObj.left=getObjectLeft(obj)+deltaX+units;theObj.top=getObjectTop(obj)+deltaY+units;}else if(isNN4){theObj.moveBy(deltaX,deltaY);}}} function setZIndex(obj,zOrder){var theObj=getObject(obj);if(theObj){theObj.zIndex=zOrder;}} function setBGColor(obj,color){var theObj=getObject(obj);if(theObj){if(isNN4){theObj.bgColor=color;}else if(isCSS){theObj.backgroundColor=color;}}} function show(obj){var theObj=getObject(obj);if(theObj){theObj.visibility="visible";}} function hide(obj){var theObj=getObject(obj);if(theObj){theObj.visibility="hidden";}} function getObjectLeft(obj){var elem=getRawObject(obj);var result=0;if(document.defaultView){var style=document.defaultView;var cssDecl=style.getComputedStyle(elem,"");result=cssDecl.getPropertyValue("left");}else if(elem.currentStyle){result=elem.currentStyle.left;}else if(elem.style){result=elem.style.left;}else if(isNN4){result=elem.left;} return parseInt(result);} function getObjectTop(obj){var elem=getRawObject(obj);var result=0;if(document.defaultView){var style=document.defaultView;var cssDecl=style.getComputedStyle(elem,"");result=cssDecl.getPropertyValue("top");}else if(elem.currentStyle){result=elem.currentStyle.top;}else if(elem.style){result=elem.style.top;}else if(isNN4){result=elem.top;} return parseInt(result);} function getObjectWidth(obj){var elem=getRawObject(obj);var result=0;if(elem.offsetWidth){result=elem.offsetWidth;}else if(elem.clip&&elem.clip.width){result=elem.clip.width;}else if(elem.style&&elem.style.pixelWidth){result=elem.style.pixelWidth;} return parseInt(result);} function getObjectHeight(obj){var elem=getRawObject(obj);var result=0;if(elem.offsetHeight){result=elem.offsetHeight;}else if(elem.clip&&elem.clip.height){result=elem.clip.height;}else if(elem.style&&elem.style.pixelHeight){result=elem.style.pixelHeight;} return parseInt(result);} function getInsideWindowWidth(){if(window.innerWidth){return window.innerWidth;}else if(isIE6CSS){return document.body.parentElement.clientWidth;}else if(document.body&&document.body.clientWidth){return document.body.clientWidth;} return 0;} function getInsideWindowHeight(){if(window.innerHeight){return window.innerHeight;}else if(isIE6CSS){return document.body.parentElement.clientHeight;}else if(document.body&&document.body.clientHeight){return document.body.clientHeight;} return 0;} var aXmlHttp=new Array();var aXmlResponse=new Array();function xmlResult() {for(var i=0;i=0)?true:false;} this.domObj=this.getRawObject(szID);this.domObj.style.overflow='hidden';this.hideLayersOnMove=false;this.loadUnchecked=false;this.initializationState=0;this.bMouseDown=false;this.lastx=0;this.lasty=0;this.theInsideLayer=null;this.viewportWidth=safeParseInt(this.domObj.style.width);this.viewportHeight=safeParseInt(this.domObj.style.height);this.xOffset=0;this.yOffset=0;this.xOrigin=0;this.yOrigin=0;this.currentMap='';this.nWide=0;this.nHigh=0;this.nCurrentTop=0;this.nCurrentLeft=0;this.aPixel=new Image(1,1);this.imgErrors=new Array();this.aMaps=new Array();this.tileWidth=null;this.tileHeight=null;this.nBuffer=1;this.baseURL='';this.cellSize=null;this.gImageID=0;this.eventManager=new _eventManager();this.as=slideid=null;this.accelerationFactor=1;this.pixelsPerStep=30;this.timePerStep=25;this.isDirectTileAccess=null;this.server='';this.init="init.pl";this.tileURL=null;this.aObjects=[];this.aCanvases=[];this.layersHidden=false;this.aTools=[];for(var i=0;i0){theObj=this.seekLayer(document.layers[i].document,name);}} return theObj;} kaMap.prototype.getRawObject=function(obj){var theObj;if(typeof obj=="string"){if(this.isW3C){theObj=document.getElementById(obj);}else if(this.isIE4){theObj=document.all(obj);}else if(this.isNN4){theObj=seekLayer(document,obj);}}else{theObj=obj;} return theObj;} kaMap.prototype.getObject=function(obj){var theObj=this.getRawObject(obj);if(theObj&&this.isCSS){theObj=theObj.style;} return theObj;} kaMap.prototype.getObjectWidth=function(obj){var elem=this.getRawObject(obj);var result=0;if(elem.offsetWidth){result=elem.offsetWidth;}else if(elem.clip&&elem.clip.width){result=elem.clip.width;}else if(elem.style&&elem.style.pixelWidth){result=elem.style.pixelWidth;} return parseInt(result);} kaMap.prototype.getObjectHeight=function(obj){var elem=this.getRawObject(obj);var result=0;if(elem.offsetHeight){result=elem.offsetHeight;}else if(elem.clip&&elem.clip.height){result=elem.clip.height;}else if(elem.style&&elem.style.pixelHeight){result=elem.style.pixelHeight;} return parseInt(result);} kaMap.prototype.zoomTo=function(cgX,cgY) {var oMap=this.getCurrentMap();var inchesPerUnit=new Array(1,12,63360.0,39.3701,39370.1,4374754);var newScale;var bScaleChanged=false;if(arguments.length==3) {newScale=arguments[2];bScaleChanged=(newScale!=this.getCurrentScale);} else {newScale=this.getCurrentScale();} this.cellSize=newScale/(oMap.resolution*inchesPerUnit[oMap.units]);var nFactor=oMap.zoomToScale(newScale);this.setMapLayers();var cpX=cgX/this.cellSize;var cpY=cgY/this.cellSize;var vpLeft=Math.round(cpX-this.viewportWidth/2);var vpTop=Math.round(cpY+this.viewportHeight/2);var cTileX=Math.floor(cpX/this.tileWidth)*this.tileWidth;var cTileY=Math.floor(cpY/this.tileHeight)*this.tileHeight;var nTilesLeft=Math.ceil(this.viewportWidth/(2*this.tileWidth))*this.tileWidth;var nTilesUp=Math.ceil(this.viewportHeight/(2*this.tileHeight))*this.tileHeight;this.nCurrentLeft=cTileX-nTilesLeft;this.nCurrentTop=-1*(cTileY+nTilesUp);this.xOrigin=this.nCurrentLeft;this.yOrigin=this.nCurrentTop;this.theInsideLayer.style.left=-1*(vpLeft-this.xOrigin)+"px";this.theInsideLayer.style.top=(vpTop+this.yOrigin)+"px";var layers=oMap.getLayers();for(var k=0;k=oMap.aScales[i]) {break;} newScale=oMap.aScales[i];} if(arguments[4]) return newScale;this.cellSize=newScale/(oMap.resolution*inchesPerUnit[oMap.units]);var nFactor=oMap.zoomToScale(newScale);this.setMapLayers();var cpX=cgX/this.cellSize;var cpY=cgY/this.cellSize;var vpLeft=Math.round(cpX-this.viewportWidth/2);var vpTop=Math.round(cpY+this.viewportHeight/2);var cTileX=Math.floor(cpX/this.tileWidth)*this.tileWidth;var cTileY=Math.floor(cpY/this.tileHeight)*this.tileHeight;var nTilesLeft=Math.ceil(this.viewportWidth/(2*this.tileWidth))*this.tileWidth;var nTilesUp=Math.ceil(this.viewportHeight/(2*this.tileHeight))*this.tileHeight;this.nCurrentLeft=cTileX-nTilesLeft;this.nCurrentTop=-1*(cTileY+nTilesUp);this.xOrigin=this.nCurrentLeft;this.yOrigin=this.nCurrentTop;this.theInsideLayer.style.left=-1*(vpLeft-this.xOrigin)+"px";this.theInsideLayer.style.top=(vpTop+this.yOrigin)+"px";var layers=oMap.getLayers();for(var k=0;k0&&arguments[0]!='') {szURL=szURL+sep+"map="+arguments[0];sep="&";} if(arguments.length>1&&arguments[1]!='') {szURL=szURL+sep+"extents="+arguments[1];sep="&";} if(arguments.length>2&&arguments[2]!='') {szURL=szURL+sep+"centerPoint="+arguments[2];sep="&";} call(szURL,this,this.initializeCallback);return true;} kaMap.prototype.initializeCallback=function(szInit) {if(szInit.substr(0,1)!="/") {this.triggerEvent(KAMAP_ERROR,'ERROR: ka-Map! initialization '+'failed on the server. Message returned was:\n'+ szInit);return false;} eval(szInit);this.triggerEvent(KAMAP_INITIALIZED);this.initializationState=2;} kaMap.prototype.setBackgroundColor=function(color) {this.domObj.style.backgroundColor=color;return true;} kaMap.prototype.createLayers=function() {this.theInsideLayer=document.createElement('div');this.theInsideLayer.id='theInsideLayer';this.theInsideLayer.style.position='absolute';this.theInsideLayer.style.left='0px';this.theInsideLayer.style.top='0px';this.theInsideLayer.style.zIndex='1';this.theInsideLayer.kaMap=this;if(this.currentTool) this.theInsideLayer.style.cursor=this.currentTool.cursor;this.domObj.appendChild(this.theInsideLayer);this.domObj.kaMap=this;this.theInsideLayer.onmousedown=kaMap_onmousedown;this.theInsideLayer.onmouseup=kaMap_onmouseup;this.theInsideLayer.onmousemove=kaMap_onmousemove;this.theInsideLayer.onmouseover=kaMap_onmouseover;this.domObj.onmouseout=kaMap_onmouseout;this.theInsideLayer.onkeypress=kaMap_onkeypress;this.theInsideLayer.ondblclick=kaMap_ondblclick;this.theInsideLayer.onclick=kaMap_onclick;this.theInsideLayer.oncontextmenu=kaMap_oncontextmenu;this.theInsideLayer.onmousewheel=kaMap_onmousewheel;if(window.addEventListener&&navigator.product&&navigator.product=="Gecko") {this.domObj.addEventListener("DOMMouseScroll",kaMap_onmousewheel,false);} this.theInsideLayer.ondragstart=new Function([],'var e=e?e:event;e.cancelBubble=true;e.returnValue=false;return false;');} kaMap.prototype.initializeLayers=function(nFactor) {var deltaMouseX=this.nCurrentLeft+safeParseInt(this.theInsideLayer.style.left)-this.xOrigin;var deltaMouseY=this.nCurrentTop+safeParseInt(this.theInsideLayer.style.top)-this.yOrigin;var vpTop=this.nCurrentTop-deltaMouseY;var vpLeft=this.nCurrentLeft-deltaMouseX;var vpCenterX=vpLeft+this.viewportWidth/2;var vpCenterY=vpTop+this.viewportHeight/2;var currentTileX=Math.floor(vpCenterX/this.tileWidth)*this.tileWidth;var currentTileY=Math.floor(vpCenterY/this.tileHeight)*this.tileHeight;var tileDeltaX=currentTileX-this.nCurrentLeft;var tileDeltaY=currentTileY-this.nCurrentTop;var newVpCenterX=vpCenterX*nFactor;var newVpCenterY=vpCenterY*nFactor;var newTileX=Math.floor(newVpCenterX/this.tileWidth)*this.tileWidth;var newTileY=Math.floor(newVpCenterY/this.tileHeight)*this.tileHeight;var newCurrentLeft=newTileX-tileDeltaX;var newCurrentTop=newTileY-tileDeltaY;this.nCurrentLeft=newCurrentLeft;this.nCurrentTop=newCurrentTop;var newTilLeft=-newVpCenterX+this.viewportWidth/2;var newTilTop=-newVpCenterY+this.viewportHeight/2;var xOldOrigin=this.xOrigin;var yOldOrigin=this.yOrigin;this.xOrigin=this.nCurrentLeft;this.yOrigin=this.nCurrentTop;this.theInsideLayer.style.left=(newTilLeft+this.xOrigin)+"px";this.theInsideLayer.style.top=(newTilTop+this.yOrigin)+"px";var layers=this.aMaps[this.currentMap].getLayers();for(var k=0;kmap.nHigh)return 0;if(y<0)return 0;if(y>map.nHigh)return 0;var d=layer.domObj;var nbProcessed=0;for(var i=0;i<2;i++){direction=(direction+1)%4;for(var j=0;jnewHigh&&newHigh>3) this.removeRow();while(this.nWidenewWide&&newWide>3) this.removeColumn();var map=this.getCurrentMap();var layers=map.getLayers();for(var i=0;i=0;j--) {var top=this.nCurrentTop+(j*this.tileHeight);var left=this.nCurrentLeft+(this.nWide*this.tileWidth);var img=this.createImage(top,left,layers[i]);if(this.isIE4) img.style.filter="Alpha(opacity="+layers[i].opacity+")";if(j=0;j--) {var img=d.childNodes[((j+1)*this.nWide)-1];d.removeChild(img);img.onload=null;img.onerror=null;}} this.nWide=this.nWide-1;} kaMap.prototype.removeRow=function(layer) {if(this.nHigh<3) return;if(arguments.length==1)var layers=Array(layer);else var layers=this.aMaps[this.currentMap].getLayers();for(var i=0;i=0;j--) {var img=d.childNodes[((this.nHigh-1)*this.nWide)+j];d.removeChild(img);img.onload=null;img.onerror=null;}} this.nHigh=this.nHigh-1;} kaMap.prototype.hideLayers=function() {if(!this.hideLayersOnMove)return;if(this.layersHidden)return;var layers=this.aMaps[this.currentMap].getLayers();for(var i=0;iabsY?absX:absY;var steps=Math.floor(distance/this.pixelsPerStep);var dx=dy=0;if(steps>0) {dx=(x)/(steps*this.pixelsPerStep);dy=(y)/(steps*this.pixelsPerStep);} var remainderX=x-dx*steps*this.pixelsPerStep;var remainderY=y-dy*steps*this.pixelsPerStep;var px=py=0;var curspeed=this.accelerationFactor;var i=0;while(i0) {px+=this.as[i-1][0];py+=this.as[i-1][1];} var cx=px+Math.round(dx*this.pixelsPerStep);var cy=py+Math.round(dy*this.pixelsPerStep);this.as[i]=new Array(cx-px,cy-py);i++;} if(remainderX!=0||remainderY!=0) {this.as[i]=[remainderX,remainderY];} this.hideLayers();this.slideid=goQueueManager.enqueue(this.timePerStep,this,this.slide,[0]);} kaMap.prototype.slide=function(pos) {if(pos>=this.as.length){this.as=slideid=null;this.showLayers();this.triggerEvent(KAMAP_EXTENTS_CHANGED,this.getGeoExtents());return;} this.moveBy(this.as[pos][0],this.as[pos][1]);pos++;this.slideid=goQueueManager.enqueue(this.timePerStep,this,this.slide,[pos]);} kaMap_onkeypress=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onkeypress(e);} kaMap_onmousemove=function(e) {e=(e)?e:((event)?event:null);if(e.button==2) {this.kaMap.triggerEvent(KAMAP_CONTEXT_MENU);} if(this.kaMap.currentTool) this.kaMap.currentTool.onmousemove(e);} kaMap_onmousedown=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onmousedown(e);} kaMap_onmouseup=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onmouseup(e);} kaMap_onmouseover=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onmouseover(e);} kaMap_onmouseout=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onmouseout(e);} kaMap_oncontextmenu=function(e) {e=(e)?e:((event)?event:null);if(e.preventDefault)e.preventDefault();return false;} kaMap_onclick=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onclick(e);} kaMap_ondblclick=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.ondblclick(e);} kaMap_onmousewheel=function(e) {if(this.kaMap.currentTool) this.kaMap.currentTool.onmousewheel(e);} kaMap.prototype.cancelEvent=function(e) {e=(e)?e:((event)?event:null);e.returnValue=false;if(e.preventDefault)e.preventDefault();return false;} kaMap.prototype.registerTool=function(toolObj) {this.aTools.push(toolObj);} kaMap.prototype.activateTool=function(toolObj) {if(this.currentTool) {this.currentTool.deactivate();} this.currentTool=toolObj;if(this.theInsideLayer) this.theInsideLayer.style.cursor=this.currentTool.cursor;} kaMap.prototype.deactivateTool=function(toolObj) {if(this.currentTool==toolObj) this.currentTool=null;if(this.theInsideLayer) this.theInsideLayer.style.cursor='auto';} kaMap.prototype.checkWrap=function() {this.xOffset=safeParseInt(this.theInsideLayer.style.left)+this.nCurrentLeft-this.xOrigin;this.yOffset=safeParseInt(this.theInsideLayer.style.top)+this.nCurrentTop-this.yOrigin;while(this.xOffset>0) {this.wrapR2L();} while(this.xOffset<-(this.nBuffer*this.tileWidth)) {this.wrapL2R();} while(this.yOffset>-(this.nBuffer*this.tileHeight)) {this.wrapB2T();} while(this.yOffset<-(2*this.nBuffer*this.tileHeight)) {this.wrapT2B();} var layer=this.aMaps[this.currentMap].aLayers[0].domObj;var img=layer.childNodes[0].style;this.nCurrentTop=safeParseInt(img.top)+this.yOrigin;this.nCurrentLeft=safeParseInt(img.left)+this.xOrigin;} kaMap.prototype.wrapR2L=function() {this.xOffset=this.xOffset-(this.nBuffer*this.tileWidth);var layers=this.aMaps[this.currentMap].getLayers();for(var k=0;k=0;i--) {if(this.theInsideLayer.childNodes[i].className=='mapLayer') {this.theInsideLayer.childNodes[i].appended=false;this.theInsideLayer.removeChild(this.theInsideLayer.childNodes[i]);}} layers=oMap.getLayers();for(var i=0;inewHigh) this.removeRow(group);while(this.nWidenewWide) this.removeColumn(group);return true;} kaMap.prototype.createMapLayer=function(id) {var d=document.createElement('div');d.id=id;d.className='mapLayer';d.style.position='absolute';d.style.visibility='visible';d.style.left='0px';d.style.top='0px';d.style.width='3000px';d.style.height='3000px';d.appended=false;return d;} kaMap.prototype.addMapLayer=function(l) {var map=this.getCurrentMap();map.addLayer(l);this.setMapLayers();this.paintLayer(l);this.triggerEvent(KAMAP_LAYERS_CHANGED,this.currentMap);} kaMap.prototype.removeMapLayer=function(id) {var map=this.getCurrentMap();var layer=map.getLayer(id);if(!layer)return false;if(map.removeLayer(map.getLayer(id))){this.setMapLayers();this.triggerEvent(KAMAP_LAYERS_CHANGED,this.currentMap);}} kaMap.prototype.getCenter=function() {var deltaMouseX=this.nCurrentLeft-this.xOrigin+safeParseInt(this.theInsideLayer.style.left);var deltaMouseY=this.nCurrentTop-this.yOrigin+safeParseInt(this.theInsideLayer.style.top);var vpTop=this.nCurrentTop-deltaMouseY;var vpLeft=this.nCurrentLeft-deltaMouseX;var vpCenterX=vpLeft+this.viewportWidth/2;var vpCenterY=vpTop+this.viewportHeight/2;return new Array(vpCenterX,vpCenterY);} kaMap.prototype.getGeoExtents=function() {var minx=-1*(safeParseInt(this.theInsideLayer.style.left)-this.xOrigin)*this.cellSize;var maxx=minx+this.viewportWidth*this.cellSize;var maxy=(safeParseInt(this.theInsideLayer.style.top)-this.yOrigin)*this.cellSize;var miny=maxy-this.viewportHeight*this.cellSize;return[minx,miny,maxx,maxy];} kaMap.prototype.zoomIn=function() {this.zoomByFactor(this.aMaps[this.currentMap].zoomIn());} kaMap.prototype.zoomOut=function() {this.zoomByFactor(this.aMaps[this.currentMap].zoomOut());} kaMap.prototype.zoomToScale=function(scale) {this.zoomByFactor(this.aMaps[this.currentMap].zoomToScale(scale));} kaMap.prototype.zoomByFactor=function(nZoomFactor) {if(nZoomFactor==1) {this.triggerEvent(KAMAP_NOTICE,"NOTICE: changing to current scale aborted");return;} this.cellSize=this.cellSize/nZoomFactor;this.setMapLayers();this.initializeLayers(nZoomFactor);this.triggerEvent(KAMAP_SCALE_CHANGED,this.getCurrentScale());this.triggerEvent(KAMAP_MOVE);this.triggerEvent(KAMAP_EXTENTS_CHANGED,this.getGeoExtents());if(this.getCurrentMap().aLayers[0].legend!=null&&this.widgetIndicator) this.widgetIndicator.buildWidget();} kaMap.prototype.getCurrentScale=function() {return this.aMaps[this.currentMap].aScales[this.aMaps[this.currentMap].currentScale];} kaMap.prototype.setLayerQueryable=function(name,bQueryable) {this.aMaps[this.currentMap].setLayerQueryable(name,bQueryable);} kaMap.prototype.setLayerVisibility=function(name,bVisible) {if(!this.loadUnchecked&&bVisible){layer=this.aMaps[this.currentMap].getLayer(name);layer.visible=true;this.setMapLayers();this.aMaps[this.currentMap].setLayerVisibility(name,bVisible);this.paintLayer(layer);}else this.aMaps[this.currentMap].setLayerVisibility(name,bVisible);} kaMap.prototype.setLayerOpacity=function(name,opacity) {this.aMaps[this.currentMap].setLayerOpacity(name,opacity);} kaMap.prototype.registerEventID=function(eventID) {return this.eventManager.registerEventID(eventID);} kaMap.prototype.registerForEvent=function(eventID,obj,func) {return this.eventManager.registerForEvent(eventID,obj,func);} kaMap.prototype.deregisterForEvent=function(eventID,obj,func) {return this.eventManager.deregisterForEvent(eventID,obj,func);} kaMap.prototype.triggerEvent=function(eventID) {return this.eventManager.triggerEvent.apply(this.eventManager,arguments);} function safeParseInt(val) {return Math.round(parseFloat(val));} function _map(szName,groupName,szTitle,nCurrentScale,units,aszScales) {this.name=szName;this.groupName=groupName;this.title=szTitle;this.aScales=aszScales;this.currentScale=parseFloat(nCurrentScale);this.units=units;this.resolution=72;this.aLayers=[];this.defaultExtents=[];this.currentExtents=[];this.maxExtents=[];this.backgroundColor='#ffffff';this.version="0";this.aZoomTo=[];this.kaMap=null;} _map.prototype.addLayer=function(layer) {layer._map=this;layer.zIndex=this.aLayers.length;this.aLayers.push(layer);} _map.prototype.removeLayer=function(l) {var alayer=Array();for(i=0,a=0;i0) {nZoomFactor=this.aScales[this.currentScale]/this.aScales[this.currentScale-1];this.currentScale=this.currentScale-1;} return nZoomFactor;} _map.prototype.zoomToScale=function(scale) {var nZoomFactor=1;for(var i=0;i1) fixPNG(img);}} _layer.prototype.setVisibility=function(bVisible) {this.visible=bVisible;if(this.domObj) {this.domObj.style.visibility=bVisible?'visible':'hidden';this.domObj.style.display=bVisible?'block':'none';} for(var i=0;i1) fixPNG(img);}}} _layer.prototype.buildLayerList=function(scale){var layers="";if(this.mergedLayers.length>0){for(var i=0;i=scale){layers+=(this.legend&&this.mergedLayers[i].name=="pointline")?"t_pointline":this.mergedLayers[i].name;if(i==0&&this.legend!=null){var legendString="id_"+this.legend.indicator.id+".colors_"+this.legend.getColors().join(":")+".breaksdata_"+this.legend.getBreaks().replace(/,/g,":")+"."+this.legend.getBoundaryType().path;layers+=","+legendString;} layers+=",";}} layers=layers.substring(0,layers.length-1);} return layers;} _layer.prototype.buildTileURL=function(t,l,mapName,scale,force,group,layer,imageFormat) {var kamap=this._map.kaMap;var server=this.tileServers.isEmpty()==true?kamap.server:this.tileServers.next((t+l)/kamap.tileWidth);if(this._map.kaMap.isDirectTileAccess==true){var layers=this.buildLayerList(scale);var src="";if(scale&&layers!=""){var metaTop=Math.floor(t/1000)*1000;var metaLeft=Math.floor(l/1000)*1000;src=server +'/'+mapName +'/'+scale +'/'+layer +'/'+layers +'/meta_t'+metaTop +'/t'+metaTop+'l'+metaLeft +'/t'+t+'l'+l +'.'+'png' +'?maprev='+this._map.revision;} return src;}} function _eventManager() {this.events=[];this.lastEventID=0;} _eventManager.prototype.registerEventID=function(eventID) {var ev=new String(eventID);if(!this.events[eventID]) {this.events[eventID]=[];}} _eventManager.prototype.registerForEvent=function(eventID,obj,func) {var ev=new String(eventID);this.events[eventID].push([obj,func]);} _eventManager.prototype.deregisterForEvent=function(eventID,obj,func) {var ev=new String(eventID);var bResult=false;if(!this.events[eventID])return false;for(var i=0;i=0&&document.all&&this.db&&!this.op);this.iemac=!!(this.ie&&this.n.indexOf("mac")>=0);this.ie4=!!(this.ie&&!document.getElementById);this.n4=!!(document.layers&&typeof document.classes!="undefined");this.n6=!!(typeof window.getComputedStyle!="undefined"&&typeof document.createRange!="undefined");this.w3c=!!(!this.op&&!this.ie&&!this.n6&&document.getElementById);this.ce=!!(document.captureEvents&&document.releaseEvents);this.px=(this.n4||this.op6)?'':'px';this.tiv=this.w3c?40:10;} var dd=new WZDD();dd.Int=function(d_x,d_y) {return isNaN(d_y=parseInt(d_x))?0:d_y;};dd.getWndW=function() {return dd.Int((dd.db&&!dd.op&&!dd.w3c&&dd.db.clientWidth)?dd.db.clientWidth:(window.innerWidth||0));};dd.getWndH=function() {return dd.Int((dd.db&&!dd.op&&!dd.w3c&&dd.db.clientHeight)?dd.db.clientHeight:(window.innerHeight||0));};dd.getScrollX=function() {return dd.Int(window.pageXOffset||(dd.db?dd.db.scrollLeft:0));};dd.getScrollY=function() {return dd.Int(window.pageYOffset||(dd.db?dd.db.scrollTop:0));};dd.getPageXY=function(d_o) {if(dd.n4&&d_o) {dd.x=d_o.pageX||0;dd.y=d_o.pageY||0;} else {dd.x=dd.y=0;while(d_o) {dd.x+=dd.Int(d_o.offsetLeft);dd.y+=dd.Int(d_o.offsetTop);d_o=d_o.offsetParent||null;}}};dd.getCssXY=function(d_o) {if(d_o.div) {if(dd.n4) {d_o.cssx=d_o.div.x;d_o.cssy=d_o.div.y;} else if(dd.ie4) {d_o.cssx=d_o.css.pixelLeft;d_o.cssy=d_o.css.pixelTop;} else {d_o.css.left=d_o.css.top=0+dd.px;dd.getPageXY(d_o.div);d_o.cssx=d_o.x-dd.x;d_o.cssy=d_o.y-dd.y;d_o.css.left=d_o.cssx+dd.px;d_o.css.top=d_o.cssy+dd.px;}} else {d_o.cssx=0;d_o.cssy=0;}};dd.getImgW=function(d_o) {return d_o?dd.Int(d_o.width):0;};dd.getImgH=function(d_o) {return d_o?dd.Int(d_o.height):0;};dd.getDivW=function(d_o) {return dd.Int(dd.n4?(d_o.div?d_o.div.clip.width:0):d_o.div?(d_o.div.offsetWidth||d_o.css.pixelWidth||d_o.css.width||0):0);};dd.getDivH=function(d_o) {return dd.Int(dd.n4?(d_o.div?d_o.div.clip.height:0):d_o.div?(d_o.div.offsetHeight||d_o.css.pixelHeight||d_o.css.height||0):0);};dd.getWH=function(d_o) {d_o.w=dd.getDivW(d_o);d_o.h=dd.getDivH(d_o);if(d_o.css) {d_o.css.width=d_o.w+dd.px;d_o.css.height=d_o.h+dd.px;d_o.dw=dd.getDivW(d_o)-d_o.w;d_o.dh=dd.getDivH(d_o)-d_o.h;d_o.css.width=(d_o.w-d_o.dw)+dd.px;d_o.css.height=(d_o.h-d_o.dh)+dd.px;} else d_o.dw=d_o.dh=0;};dd.getCssProp=function(d_o,d_pn6,d_pstyle,d_pn4) {if(d_o&&dd.n6)return''+window.getComputedStyle(d_o,null).getPropertyValue(d_pn6);if(d_o&&d_o.currentStyle)return''+eval('d_o.currentStyle.'+d_pstyle);if(d_o&&d_o.style)return''+eval('d_o.style.'+d_pstyle);if(d_o&&dd.n4)return''+eval('d_o.'+d_pn4);return'';};dd.getDiv=function(d_x,d_d) {d_d=d_d||document;if(dd.n4) {if(d_d.layers[d_x])return d_d.layers[d_x];for(var d_i=d_d.layers.length;d_i--;) {var d_y=dd.getDiv(d_x,d_d.layers[d_i].document);if(d_y)return d_y;}} if(dd.ie)return d_d.all[d_x]||null;if(d_d.getElementById)return d_d.getElementById(d_x)||null;return null;};dd.getImg=function(d_o,d_nm,d_xy,d_w) {d_w=d_w||window;var d_img;if(document.images&&(d_img=d_w.document.images[d_nm])&&d_img.name==d_nm) {if(d_xy) {if(dd.n4) {dd.getPageXY(d_w);d_o.defx=d_img.x+dd.x;d_o.defy=d_img.y+dd.y;} else {dd.getPageXY(d_img);d_o.defx=dd.x;d_o.defy=dd.y;}} return d_img;} if(dd.n4)for(var d_i=d_w.document.layers.length;d_i--;) {var d_y=dd.getImg(d_o,d_nm,d_xy,d_w.document.layers[d_i]);if(d_y)return d_y;} return null;};dd.getParent=function(d_o,d_p) {if(dd.n4) {for(d_p,d_i=dd.elements.length;d_i--;) {if(!((d_p=dd.elements[d_i]).is_image)&&d_p.div&&(d_p.div.document.layers[d_o.name]||d_o.oimg&&d_p.div.document.images[d_o.oimg.name])) d_p.addChild(d_o,d_p.detach,1);}} else {d_p=d_o.is_image?dd.getImg(d_o,d_o.oimg.name):(d_o.div||null);while(d_p&&!!(d_p=d_p.offsetParent||d_p.parentNode||null)) {if(d_p.ddObj) {d_p.ddObj.addChild(d_o,d_p.ddObj.detach,1);break;}}}};dd.getCmd=function(d_o,d_cmd,d_cmdStr) {var d_i=d_o.id.indexOf(d_cmd),d_j,d_y=(d_i>=0)*1;if(d_y) {d_j=d_i+d_cmd.length;if(d_cmdStr)d_o.cmd+=d_o.id.substring(d_i,d_j);d_o.id=d_o.id.substring(0,d_i)+d_o.id.substring(d_j);} return d_y;};dd.getCmdVal=function(d_o,d_cmd,d_cmdStr,int0) {var d_i=d_o.id.indexOf(d_cmd),d_j,d_y=(d_o.id.indexOf(d_cmd)>=0)?dd.Int(d_o.id.substring(d_o.id.indexOf(d_cmd)+d_cmd.length)):int0?-1:0;if(!int0&&d_y||int0&&d_y>=0) {d_j=d_i+d_cmd.length+(""+d_y).length;if(d_cmdStr)d_o.cmd+=d_o.id.substring(d_i,d_j);d_o.id=d_o.id.substring(0,d_i)+d_o.id.substring(d_j);} return d_y;};dd.addElt=function(d_o,d_p) {dd.elements[d_o.name]=dd.elements[d_o.index=dd.elements.length]=d_o;if(d_p)d_p.copies[d_o.name]=d_p.copies[d_p.copies.length]=d_o;};dd.mkWzDom=function() {var d_o,d_i=dd.elements.length;while(d_i--)dd.getParent(dd.elements[d_i]);d_i=dd.elements.length;while(d_i--) {d_o=dd.elements[d_i];if(d_o.children&&!d_o.parent) {var d_j=d_o.children.length;while(d_j--) d_o.children[d_j].setZ(d_o.z+d_o.children[d_j].z,1);}}};dd.addProps=function(d_o) {var d_i,d_c;if(d_o.is_image) {d_o.div=dd.getDiv(d_o.id);if(d_o.div&&typeof d_o.div.style!="undefined")d_o.css=d_o.div.style;d_o.nimg=(dd.n4&&d_o.div)?d_o.div.document.images[0]:(document.images[d_o.id+'NImG']||null);if(d_o.nimg&&!d_o.noalt&&!dd.noalt) {d_o.nimg.alt=d_o.oimg.alt||'';if(d_o.oimg.title)d_o.nimg.title=d_o.oimg.title;} d_o.bgColor='';} else {d_o.bgColor=dd.getCssProp(d_o.div,'background-color','backgroundColor','bgColor').toLowerCase();if(dd.n6&&d_o.div) {if((d_c=d_o.bgColor).indexOf('rgb')>=0) {d_c=d_c.substring(4,d_c.length-1).split(',');d_o.bgColor='#';for(d_i=0;d_i';this.t_htm='
'+ this.htm+'<\/div>';} else {if(!!(this.div=dd.getDiv(this.id))&&typeof this.div.style!="undefined")this.css=this.div.style;dd.getWH(this);if(this.div) {this.div.ddObj=this;this.div.pos_rel=(""+(this.div.parentNode?this.div.parentNode.tagName:this.div.parentElement?this.div.parentElement.tagName:'').toLowerCase().indexOf('body')<0);} dd.getPageXY(this.div);this.defx=this.x=dd.x;this.defy=this.y=dd.y;dd.getCssXY(this);this.defz=dd.Int(dd.getCssProp(this.div,'z-index','zIndex','zIndex'));} this.defw=this.w||0;this.defh=this.h||0;} DDObj.prototype.moveBy=function(d_x,d_y,d_kds,d_o) {if(!this.div)return;this.x+=(d_x=dd.Int(d_x));this.y+=(d_y=dd.Int(d_y));if(!d_kds||this.is_image||this.parent!=this.defparent) {(d_o=this.css||this.div).left=(this.cssx+=d_x)+dd.px;d_o.top=(this.cssy+=d_y)+dd.px;} var d_i=this.children.length;while(d_i--) {if(!(d_o=this.children[d_i]).detached)d_o.moveBy(d_x,d_y,1);d_o.defx+=d_x;d_o.defy+=d_y;}};DDObj.prototype.moveTo=function(d_x,d_y) {this.moveBy(dd.Int(d_x)-this.x,dd.Int(d_y)-this.y);};DDObj.prototype.hide=function(d_m,d_o,d_p) {if(this.div&&this.visible) {d_p=this.css||this.div;if(d_m&&!dd.n4) {this.display=dd.getCssProp(this.div,"display","display","display");if(this.oimg) {this.oimg.display=dd.getCssProp(this.oimg,"display","display","display");this.oimg.style.display="none";} d_p.display="none";dd.recalc();} else d_p.visibility="hidden";} this.visible=false;var d_i=this.children.length;while(d_i--) if(!(d_o=this.children[d_i]).detached)d_o.hide(d_m);};DDObj.prototype.show=function(d_o,d_p) {if(this.div) {d_p=this.css||this.div;if(d_p.display&&d_p.display=="none") {d_p.display=this.display||"block";if(this.oimg)this.oimg.style.display=this.oimg.display||"inline";dd.recalc();} else d_p.visibility="visible";} this.visible=true;var d_i=this.children.length;while(d_i--) if(!(d_o=this.children[d_i]).detached)d_o.show();};DDObj.prototype.resizeTo=function(d_w,d_h,d_o) {if(!this.div)return;d_w=(this.w=dd.Int(d_w))-this.dw;d_h=(this.h=dd.Int(d_h))-this.dh;if(dd.n4) {this.div.resizeTo(d_w,d_h);if(this.is_image) {this.write('');(this.nimg=this.div.document.images[0]).src=this.src;}} else if(typeof this.css.pixelWidth!="undefined") {this.css.pixelWidth=d_w;this.css.pixelHeight=d_h;if(this.is_image) {(d_o=this.nimg.style).pixelWidth=d_w;d_o.pixelHeight=d_h;}} else {this.css.width=d_w+dd.px;this.css.height=d_h+dd.px;if(this.is_image) {(d_o=this.nimg).width=d_w;d_o.height=d_h;if(!d_o.complete)d_o.src=this.src;}}};DDObj.prototype.resizeBy=function(d_dw,d_dh) {this.resizeTo(this.w+dd.Int(d_dw),this.h+dd.Int(d_dh));};DDObj.prototype.swapImage=function(d_x,d_cp) {if(!this.nimg)return;this.nimg.src=d_x;this.src=this.nimg.src;if(d_cp) {var d_i=this.copies.length;while(d_i--) this.copies[d_i].src=this.copies[d_i].nimg.src=this.nimg.src;}};DDObj.prototype.setBgColor=function(d_x) {if(dd.n4&&this.div)this.div.bgColor=d_x;else if(this.css)this.css.background=d_x;this.bgColor=d_x;};DDObj.prototype.write=function(d_x,d_o) {this.text=d_x;if(!this.div)return;if(dd.n4) {(d_o=this.div.document).open();d_o.write(d_x);d_o.close();dd.getWH(this);} else if(!dd.op6) {this.css.height='auto';this.div.innerHTML=d_x;if(!dd.ie4)dd.recalc();if(dd.ie4||dd.n6)setTimeout('dd.recalc();',0);}};DDObj.prototype.copy=function(d_n,d_p) {if(!this.oimg)return;d_n=d_n||1;while(d_n--) {var d_l=this.copies.length,d_o=new DDObj(this.name+this.cmd,d_l+1);if(dd.n4) {d_o.id=(d_p=new Layer(d_o.w)).name;d_p.clip.height=d_o.h;d_p.visibility='show';(d_p=d_p.document).open();d_p.write(d_o.htm);d_p.close();} else if(dd.db.insertAdjacentHTML)dd.db.insertAdjacentHTML("AfterBegin",d_o.t_htm);else if(document.createElement&&dd.db&&dd.db.appendChild) {dd.db.appendChild(d_p=document.createElement('div'));d_p.innerHTML=d_o.htm;d_p.id=d_o.id;d_p.style.position='absolute';d_p.style.width=d_o.w+'px';d_p.style.height=d_o.h+'px';} else if(dd.db&&dd.db.innerHTML)dd.db.innerHTML+=d_o.t_htm;d_o.defz=this.defz+1+d_l;dd.addProps(d_o);d_o.original=this;dd.addElt(d_o,this);if(this.parent) {this.parent.addChild(d_o,this.detached);d_o.defparent=this.defparent;} d_o.moveTo(d_o.defx=this.defx,d_o.defy=this.defy);if(dd.n4)d_o.defsrc=d_o.src=this.defsrc;d_o.swapImage(this.src);}};DDObj.prototype.addChild=function(d_kd,detach,defp) {if(typeof d_kd!="object")d_kd=dd.elements[d_kd];if(d_kd.parent&&d_kd.parent==this||d_kd==this||!d_kd.is_image&&d_kd.defparent&&!defp)return;this.children[this.children.length]=this.children[d_kd.name]=d_kd;d_kd.detached=detach||0;if(defp)d_kd.defparent=this;else if(this==d_kd.defparent&&d_kd.is_image)dd.getImg(this,d_kd.oimg.name,1);if(!d_kd.defparent||this!=d_kd.defparent) {d_kd.defx=d_kd.x;d_kd.defy=d_kd.y;} if(!detach) {d_kd.defz=d_kd.defz+this.defz-(d_kd.parent?d_kd.parent.defz:0)+(!d_kd.is_image*1);d_kd.setZ(d_kd.z+this.z-(d_kd.parent?d_kd.parent.z:0)+(!d_kd.is_image*1),1);} if(d_kd.parent)d_kd.parent._removeChild(d_kd,1);d_kd.parent=this;};DDObj.prototype._removeChild=function(d_kd,d_newp) {if(typeof d_kd!="object")d_kd=this.children[d_kd];var d_oc=this.children,d_nc=new Array();for(var d_i=0;d_i0||dd.obj.maxoffr+1&&(d_y=dd.obj.defx+dd.obj.maxoffr)-d_x<0)?d_y:d_x);};dd.maxOffY=function(d_x,d_y) {return((dd.obj.maxofft+1&&(d_y=dd.obj.defy-dd.obj.maxofft)-d_x>0||dd.obj.maxoffb+1&&(d_y=dd.obj.defy+dd.obj.maxoffb)-d_x<0)?d_y:d_x);};dd.inWndW=function(d_x,d_y) {var d_wx=dd.getScrollX(),d_ww=dd.getWndW();return(((d_y=d_wx+2)-d_x>0)||((d_y=d_wx+d_ww+dd.obj.w-2)-d_x<0)?d_y:d_x);};dd.inWndH=function(d_x,d_y) {var d_wy=dd.getScrollY(),d_wh=dd.getWndH();return(((d_y=d_wy+2)-d_x>0)||((d_y=d_wy+d_wh+dd.obj.h-2)-d_x<0)?d_y:d_x);};dd.limW=function(d_w) {return((dd.obj.minw-d_w>0)?dd.obj.minw:(dd.obj.maxw>0&&dd.obj.maxw-d_w<0)?dd.obj.maxw:d_w);};dd.limH=function(d_h) {return((dd.obj.minh-d_h>0)?dd.obj.minh:(dd.obj.maxh>0&&dd.obj.maxh-d_h<0)?dd.obj.maxh:d_h);};function DDScroll() {if(!dd.obj||!dd.obj.scroll&&!dd.scroll||dd.op||dd.ie4||dd.whratio) {dd.scrx=dd.scry=0;return;} var d_bnd=0x1c,d_wx=dd.getScrollX(),d_wy=dd.getScrollY();if(dd.msmoved) {var d_ww=dd.getWndW(),d_wh=dd.getWndH(),d_y;dd.scrx=((d_y=dd.e.x-d_ww-d_wx+d_bnd)>0)?(d_y>>=2)*d_y:((d_y=d_wx+d_bnd-dd.e.x)>0)?-(d_y>>=2)*d_y:0;dd.scry=((d_y=dd.e.y-d_wh-d_wy+d_bnd)>0)?(d_y>>=2)*d_y:((d_y=d_wy+d_bnd-dd.e.y)>0)?-(d_y>>=2)*d_y:0;} if(dd.scrx||dd.scry) {window.scrollTo(d_wx+(dd.scrx=dd.obj.is_resized?dd.limW(dd.obj.w+dd.scrx)-dd.obj.w:dd.obj.vertical?0:(dd.maxOffX(dd.obj.x+dd.scrx)-dd.obj.x)),d_wy+(dd.scry=dd.obj.is_resized?dd.limH(dd.obj.h+dd.scry)-dd.obj.h:dd.obj.horizontal?0:(dd.maxOffY(dd.obj.y+dd.scry)-dd.obj.y)));dd.obj.is_dragged?dd.obj.moveTo(dd.obj.x+dd.getScrollX()-d_wx,dd.obj.y+dd.getScrollY()-d_wy):dd.reszTo(dd.obj.w+dd.getScrollX()-d_wx,dd.obj.h+dd.getScrollY()-d_wy);} dd.msmoved=0;window.setTimeout('DDScroll()',0x33);} function PICK(d_ev) {dd.e=new dd.evt(d_ev);if(dd.e.x>=dd.getWndW()+dd.getScrollX()||dd.e.y>=dd.getWndH()+dd.getScrollY())return true;var d_o,d_cmp=-1,d_i=dd.elements.length;while(d_i--) {d_o=dd.elements[d_i];if(dd.n4&&dd.e.but>1&&dd.e.src==d_o.oimg&&!d_o.clone)return false;if(d_o.visible&&dd.e.but<=1&&dd.e.x>=d_o.x&&dd.e.x<=d_o.x+d_o.w&&dd.e.y>=d_o.y&&dd.e.y<=d_o.y+d_o.h) {if(d_o.z>d_cmp&&dd.e.src.tag.indexOf('input')<0&&dd.e.src.tag.indexOf('textarea')<0&&dd.e.src.tag.indexOf('select')<0&&dd.e.src.tag.indexOf('option')<0) {d_cmp=d_o.z;dd.obj=d_o;}}} if(dd.obj) {if(dd.obj.nodrag)dd.obj=null;else {dd.e.e.cancelBubble=true;var d_rsz=dd.e.modifKey&&(dd.obj.resizable||dd.obj.scalable);if(dd.op&&!dd.op6) {(d_o=document.getElementById('OpBlUr')).style.pixelLeft=dd.e.x;d_o.style.pixelTop=dd.e.y;(d_o=d_o.children[0].children[0]).focus();d_o.blur();} else if(dd.ie&&!dd.ie4) {if(document.selection&&document.selection.empty)document.selection.empty();dd.db.onselectstart=function() {event.returnValue=false;};} if(d_rsz) {dd.obj._setCrs('se-resize');dd.obj.is_resized=1;dd.whratio=dd.obj.scalable?dd.obj.defw/dd.obj.defh:0;if(dd.ie) {if(dd.ie4) {window.dd_x=dd.getScrollX();window.dd_y=dd.getScrollY();} setTimeout('if (dd.obj && document.selection && document.selection.empty)'+'{'+'document.selection.empty();'+'if (dd.ie4) window.scrollTo(window.dd_x, window.dd_y);'+'}',0);} dd.setEvtHdl(1,RESIZE);dd.reszTo(dd.obj.w,dd.obj.h);} else {dd.obj.is_dragged=1;dd.setEvtHdl(1,DRAG);} dd.setEvtHdl(2,DROP);dd.embedVis('hidden');dd.obj._setOpaRel(0.7);dd.obj.maximizeZ();dd.ofx=dd.obj.x+dd.obj.w-dd.e.x;dd.ofy=dd.obj.y+dd.obj.h-dd.e.y;if(window.my_PickFunc)my_PickFunc();DDScroll();return!(dd.obj.is_resized||dd.n4&&dd.obj.is_image||dd.n6||dd.w3c);}} if(dd.downFunc)return dd.downFunc(d_ev);return true;} function DRAG(d_ev) {if(!dd.obj||!dd.obj.visible)return true;if(dd.ie4||dd.w3c||dd.n6||dd.obj.children.length>0xf) {if(dd.wait)return false;dd.wait=1;setTimeout('dd.wait = 0;',dd.tiv);} dd.e=new dd.evt(d_ev);if(dd.ie&&!dd.e.but) {DROP(d_ev);return true;} dd.msmoved=1;dd.obj.moveTo(dd.obj.vertical?dd.obj.x:dd.maxOffX(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.w),dd.obj.horizontal?dd.obj.y:dd.maxOffY(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.h));if(window.my_DragFunc)my_DragFunc();return false;} function RESIZE(d_ev) {if(!dd.obj||!dd.obj.visible)return true;if(dd.wait)return false;dd.wait=1;setTimeout('dd.wait = 0;',dd.tiv);dd.e=new dd.evt(d_ev);if(dd.ie&&!dd.e.but) {DROP(d_ev);return true;} dd.msmoved=1;var d_w=dd.limW(dd.inWndW(dd.ofx+dd.e.x)-dd.obj.x),d_h;if(!dd.whratio)d_h=dd.limH(dd.inWndH(dd.ofy+dd.e.y)-dd.obj.y);else {d_h=dd.limH(dd.inWndH(Math.round(d_w/dd.whratio)+dd.obj.y)-dd.obj.y);d_w=Math.round(d_h*dd.whratio);} dd.reszTo(d_w,d_h);if(window.my_ResizeFunc)my_ResizeFunc();return false;} function DROP(d_ev) {if(dd.obj) {if(dd.obj.is_dragged) {if(!dd.obj.is_image)dd.getWH(dd.obj);} else if(dd.n4) {if(dd.obj.is_image) {dd.n4RectVis(0);dd.obj.resizeTo(dd.obj.w,dd.obj.h);}} if(!dd.n4&&!dd.op6||!dd.obj.is_image)dd.recalc();dd.setEvtHdl(1,dd.moveFunc);dd.setEvtHdl(2,dd.upFunc);if(dd.db)dd.db.onselectstart=null;dd.obj._setOpaRel(1.0);dd.obj._setCrs(dd.obj.cursor);dd.embedVis('visible');dd.obj._resetZ();if(window.my_DropFunc) {dd.e=new dd.evt(d_ev);my_DropFunc();} dd.msmoved=dd.obj.is_dragged=dd.obj.is_resized=dd.whratio=0;dd.obj=null;} dd.setEvtHdl(0,PICK);} function SET_DHTML() {var d_a=arguments,d_ai,d_htm='',d_o,d_i=d_a.length;while(d_i--) {if(dd.op6) {var d_t0=(new Date()).getTime();while((new Date()).getTime()-d_t0<0x99);} if(!(d_ai=d_a[d_i]).indexOf('c:'))dd.cursor=d_ai.substring(2);else if(d_ai==NO_ALT)dd.noalt=1;else if(d_ai==SCROLL)dd.scroll=1;else if(d_ai==RESET_Z)dd.re_z=1;else if(d_ai==RESIZABLE)dd.resizable=1;else if(d_ai==SCALABLE)dd.scalable=1;else if(d_ai==TRANSPARENT)dd.diaphan=1;else {d_o=new DDObj(d_ai);dd.addElt(d_o);d_htm+=d_o.t_htm||'';if(d_o.oimg&&d_o.cpy_n) {var d_j=0;while(d_j<\/div>\n':(dd.op&&!dd.op6)?'