function DSXImageLoader(){
var _1=new Array;
var _2=0;
var _3={};
var _4=null;
this.getImage=function(_5){
return _3[_5];
};
this.addImage=function(_6){
for(var i=0;i<_1.length;i++){
if(_1[i]==_6){
return;
}
}
_1.push(_6);
};
var _8=function(_9){
_2++;
var _a=(_2==_1.length);
_4(_9,_a);
};
var _b=function(_c){
var _d=new Image();
_3[_c]=_d;
_d.onload=function(){
_8(_c);
};
_d.onerror=function(){
_8(_c);
};
_d.onabort=function(){
_8(_c);
};
_d.src=_c;
};
this.loadAll=function(cb){
_4=cb;
for(var i=0;i<_1.length;i++){
_b(_1[i]);
}
};
}
var cap_ie_png_fix;
function DSXCaps_init(){
cap_ie_png_fix=false;
if(navigator.appName=="Microsoft Internet Explorer"){
var ua=navigator.userAgent;
var re=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");
if(re.exec(ua)!=null){
var rv=parseFloat(RegExp.$1);
cap_ie_png_fix=(rv>=5.5);
}
}
}
function MMSSpriteManager(map){
this.sprites=[];
this.map=map;
var me=this;
GEvent.addListener(map,"zoomend",function(_15,_16){
me.onZoomEnd(_15,_16);
});
}
MMSSpriteManager.prototype.onZoomEnd=function(_17,_18){
for(var i=0;i<this.sprites.length;i++){
this.sprites[i].onZoomEnd(_17,_18);
}
};
MMSSpriteManager.prototype.createSprite=function(src,_1b){
var spr=new MMSSprite(this.map,src,_1b);
this.sprites[this.sprites.length]=spr;
return spr;
};
function MMSSprite(map,src,_1f){
var me=this;
this.himg=ldr.getImage(src);
this.map=map;
this.point=_1f;
this.opacity=100;
this.map_scale=1;
this.map_scale_level=mms_zoom;
this.user_scale=1;
this.handleX=0;
this.handleY=0;
}
MMSSprite.prototype=new GOverlay();
MMSSprite.prototype.onZoomEnd=function(_21,_22){
if(_22>this.map_scale_level){
this.map_scale=1;
while(_22>this.map_scale_level){
this.map_scale*=2;
_22--;
}
}else{
if(_22<this.map_scale_level){
this.map_scale=1;
while(_22<this.map_scale_level){
this.map_scale/=2;
_22++;
}
}else{
this.map_scale=1;
}
}
this.updateScale(this.user_scale,true);
};
MMSSprite.prototype.setScale=function(_23,_24){
if(_23==this.user_scale){
return;
}
this.user_scale=_23;
this.updateScale(_24);
};
MMSSprite.prototype.updateScale=function(_25){
var f=this.map_scale*this.user_scale;
var w=this.himg.width*f;
var h=this.himg.height*f;
if(cap_ie_png_fix){
this.div_img.style.width=w;
this.div_img.style.height=h;
}else{
this.div_.width=w;
this.div_.height=h;
}
this.handleX=w/2;
this.handleY=h/2;
if(_25){
this.redraw(true);
}
};
MMSSprite.prototype.setSrc=function(src){
this.himg=ldr.getImage(src);
if(cap_ie_png_fix){
var _2a=this.himg;
this.div_img.src=this.himg.src;
this.div_.innerHTML="<div style=\"width: "+_2a.width+"px;height:"+_2a.height+"px;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+"'"+_2a.src+"',sizingMethod='scale')"+"\"></div>";
this.div_img=this.div_.firstChild;
}else{
this.div_.src=this.himg.src;
}
};
MMSSprite.prototype.initialize=function(map){
var div;
var _2d=this.himg;
if(cap_ie_png_fix){
div=document.createElement("div");
div.innerHTML="<div style=\"width: "+_2d.width+"px;height:"+_2d.height+"px;filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+"'"+_2d.src+"',sizingMethod='scale')"+"\"></div>";
this.div_img=div.firstChild;
}else{
div=document.createElement("img");
div.src=this.himg.src;
div.width=_2d.width;
div.height=_2d.height;
}
div.style.position="absolute";
div.style.display="none";
map.getPane(G_MAP_FLOAT_SHADOW_PANE).appendChild(div);
this.map_=map;
this.div_=div;
this.onZoomEnd(map.getZoom(),map.getZoom());
};
MMSSprite.prototype.remove=function(){
this.div_.parentNode.removeChild(this.div_);
};
MMSSprite.prototype.copy=function(){
return new MMSSprite(this.map,this.himg.src,this.point);
};
MMSSprite.prototype.redraw=function(_2e){
var p=this.map_.fromLatLngToDivPixel(this.point);
var px=p.x-this.handleX;
var py=p.y-this.handleY;
this.div_.style.left=px+"px";
this.div_.style.top=py+"px";
};
MMSSprite.prototype.show=function(){
this.div_.style.display="";
};
MMSSprite.prototype.hide=function(){
this.div_.style.display="none";
};
MMSSprite.prototype.movePoint=function(_32){
var p=this.getPoint();
this.setPoint(new GLatLng(p.lat()+_32.lat(),p.lng()+_32.lng()));
};
MMSSprite.prototype.setPoint=function(_34){
this.point=_34;
this.redraw(true);
};
MMSSprite.prototype.setOpacity=function(_35){
if(_35==this.opacity){
return;
}
if(_35){
if(_35<0){
_35=0;
}
if(_35>100){
_35=100;
}
}
this.opacity=_35;
if(typeof (this.div_.style.filter)=="string"){
this.div_.style.filter="alpha(opacity:"+this.opacity+")";
}
if(typeof (this.div_.style.KHTMLOpacity)=="string"){
this.div_.style.KHTMLOpacity=this.opacity/100;
}
if(typeof (this.div_.style.MozOpacity)=="string"){
this.div_.style.MozOpacity=this.opacity/100;
}
if(typeof (this.div_.style.opacity)=="string"){
this.div_.style.opacity=this.opacity/100;
}
};
MMSSprite.prototype.getPoint=function(){
return this.point;
};
MMSSprite.prototype.U=function(){
return this.point;
};
MMSSprite.prototype.V=function(){
return this.point;
};
MMSSprite.prototype.W=function(){
return this.point;
};


