 //map png way
 var mapwaypngswitch="OFF";//开关
 var mapwaypng={mapobj:null,mapwaypngbox:null,init:function(){
					this.mapobj=_cqh_map;
					layerid[5]="mapd2";
					$(this.mapobj.document.getElementById(layerid[0])).append('<div id="mapd2" style="z-index:3;position:relative;left:0px;top:0px;width:0px;height:0px;"></div>');
					this.mwbox=this.mapobj.document.getElementById("mapd2");
					mapwaypngswitch="NO";
				//this.showpilpng();// load png
				},
				pngno:function(){ if(layerid[5]=="mapd2"){	this.showpilpng();	mapwaypngswitch="NO";}else { this.init(); this.pngno();}		},//NO
				off:function(){		mapwaypngswitch="OFF";		this.hidepilpng();	},//OFF
				showpilpng:function ()
				{	
					var lh= Math.floor((MapinitVO.rely-this.mapobj.MapWH[1]/2)/this.mapobj.picsize[1]);
					var hh= Math.floor((MapinitVO.relx-this.mapobj.MapWH[0]/2)/this.mapobj.picsize[0]);
					var shh = hh-this.mapobj.oHh-1;
					var slh = lh-this.mapobj.oLh-1;
					var _RBY= this.mapobj.MapWH[1]-parseInt(this.mapobj.CreateObjectData[9].style.top);
					var _RBX= this.mapobj.MapWH[0]-parseInt(this.mapobj.CreateObjectData[9].style.left);
					var picrow=0,pincol=0;
					var elm0,tempdom;
					var j=0,pici=0;
					//显示图片开始
					this.mapobj.BoolenData[3] = true; 
					//tempBoolen:控制地图加载进度条的控制
					var tempBoolen = false;
					window.scroll(0,0); 
					picrow=lh;
					this.hidepilpng();//先删除以前的数据
					while((this.mapobj.picsize[1]*(++slh)-this.mapobj.py)<_RBY)
					{
						shh = hh-this.mapobj.oHh-1;
						pincol=hh;
						while((this.mapobj.picsize[0]*(++shh)-this.mapobj.px)<_RBX)
						{
						 elm0 = this.mapobj.document.getElementById(this.mapobj.cqh_GetZoom()+','+pincol+','+picrow+'png');
						// alert();
						// alert(elm0);
						 if(!elm0)
						 {
							tempBoolen = true;
							tempdom = this.mapobj.document.createElement('IMG');
							tempdom.id= this.mapobj.cqh_GetZoom()+','+pincol+','+picrow+'png';
							
							//+new Date().getTime()http://mappic.d2d.cn/mappic/023/png/2/846/741.png
							tempdom["\x73\x72\x63"]="http://mappic.d2d.cn/mappic/023/png/"+this.mapobj.cqh_GetZoom()+"/"+pincol+"/"+picrow+".png";//MapinitVO["\x70\x69\x63\x50\x61\x74\x68"]+'\x2f'+cqh_GetZoom()+'\x2f'+pincol+'\x2f'+picrow+'\x2e\x6a\x70\x67';
							//alert(tempdom["\x73\x72\x63"]);
							//tempdom["\x73\x72\x63"]=this.mapobj.MapinitVO["\x70\x69\x63\x50\x61\x74\x68"]+'\x2f'+this.mapobj.cqh_GetZoom()+'\x2f'+pincol+'\x2f'+picrow+'\x2e\x6a\x70\x67';
							tempdom.style.position = 'absolute';
							tempdom.style.zIndex = 3;
							tempdom.style.left = (this.mapobj.picsize[0]*shh-this.mapobj.px)+'px';
							tempdom.style.top = (this.mapobj.picsize[1]*slh-this.mapobj.py)+'px';
							tempdom.width= this.mapobj.picsize[0];
							tempdom.height= this.mapobj.picsize[1];
							tempdom.onerror =function(){
									this.src="http://mappic.d2d.cn/mappic/023/png/1/1736/1499.png";
								};
							tempdom.onload=function(){mapwaypng.fixPNG(this);}//ie 6 png queast
							if(this.mapobj.browsertype==3)tempdom.onmousedown=this.mapobj.objmousedown;
							//pici++;
							//alert(this.mwbox.id);
							
							this.mwbox.appendChild(tempdom);
						//	alert(tempdom.id);
							tempdom=null;
							//if(this.mapobj._cqh_isOwnerPop!=0&&this.mapobj.cqh_GetZoom()<=6)this.mapobj.show_info_Cur({picxy:pincol+','+picrow});
							//else this.mapobj.EagleEye.Init();
							
						}
							
							this.mapobj.curID[j++]=pincol+','+picrow+'png';
							pincol++;
						}
							picrow++;
					}
					this.mapobj.curID.length=j;

					
					//显示结束
					this.mapobj.BoolenData[3] = false;
					//alert(123);
					//this.mapobj.clrEx();
					//this.mapobj.EagleEye.Set();	
					//window.setTimeout(function(){this.chkimg();},500);	
					
					//this.mapobj.DeleMapdata("dele_other");
					
				
					
				},
			hidepilpng:function()
				{
					if(layerid[5]=="mapd2"){
					$(this.mwbox).html("");
					}
				},
			fixPNG:function(myImage)// ie 6 png queast
			{
				var arVersion = navigator.appVersion.split("MSIE")
				var version = parseFloat(arVersion[1])
					if ((version >= 5.5) && (version < 7) && (document.body.filters))
					{
						var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
						var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
						var imgTitle = (myImage.title) ?
								   "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
						var imgStyle = "display:inline-block;" + myImage.style.cssText
						var strNewHTML = "<span " + imgID + imgClass + imgTitle
									  + " style=\"" + "width:" + myImage.width
									  + "px; height:" + myImage.height
									  + "px;" + imgStyle + ";"
									  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
									  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
						myImage.outerHTML = strNewHTML  

					}
				},
				mapbuttion:function(obj)
				{
					var showtempimage='<img  onload="parent.mapwaypng.fixPNG(this);" src="http://map.d2d.cn/images/map/road_show.png"  style="cursor:hand;width:60px;height:28px;" />';
					var hidetempimage='<img  onload="parent.mapwaypng.fixPNG(this);" src="http://map.d2d.cn/images/map/road_hide.png"  style="cursor:hand;width:60px;height:28px;" />'; 
				if(mapwaypngswitch=='OFF') {
						obj.innerHTML=hidetempimage;
						mapwaypng.pngno();
						}
				else{
						obj.innerHTML=showtempimage; 
						mapwaypng.off();
					}
				}


			};
