function $(a){return document.getElementById(a)}var Spain_map=function(){this.initialize.apply(this,arguments)};Spain_map.prototype={province:{p01:{x:21,y:26},p02:{x:34,y:68},p03:{x:67,y:25},p04:{x:54,y:81},p05:{x:102,y:30},p06:{x:103,y:54},p07:{x:103,y:96},p08:{x:104,y:149},p09:{x:77,y:187},p10:{x:85,y:242},p11:{x:77,y:303},p12:{x:120,y:367},p13:{x:117,y:302},p14:{x:153,y:277},p15:{x:180,y:236},p16:{x:167,y:201},p17:{x:155,y:157},p18:{x:165,y:97},p19:{x:182,y:60},p20:{x:188,y:39},p21:{x:243,y:43},p22:{x:210,y:55},p23:{x:192,y:136},p24:{x:200,y:156},p25:{x:156,y:353},p26:{x:207,y:311},p27:{x:210,y:290},p28:{x:261,y:314},p29:{x:291,y:277},p30:{x:269,y:245},p31:{x:256,y:182},p32:{x:243,y:149},p33:{x:243,y:106},p34:{x:255,y:81},p35:{x:251,y:55},p36:{x:274,y:48},p37:{x:281,y:46},p38:{x:294,y:75},p39:{x:308,y:147},p40:{x:319,y:215},p41:{x:342,y:269},p42:{x:339,y:67},p43:{x:348,y:172},p44:{x:390,y:68},p45:{x:386,y:128},p46:{x:432,y:92},p47:{x:441,y:79},p48:{x:438,y:269},p49:{x:477,y:263},p50:{x:407,y:297},p51:{x:411,y:312},p52:{x:369,y:359},p53:{x:365,y:398},p54:{x:387,y:381},p55:{x:401,y:363},p56:{x:426,y:383},p57:{x:459,y:360},p58:{x:484,y:339}},xmlHttp:0,url:"/abroad/get_info.php",cur_a:0,cur_b:0,area:{},initialize:function(b,a){this.listBox=b;this.infoBox=a;this.addEvent()},init:function(c,a){this.imgCatch();for(var b=0;b<c.length;b++){c[b].par=this;c[b].p=c[b].getAttribute("rel");c[b].onmouseover=function(){a.src="/images/province/"+this.p+".gif";a.style.left=this.par.province[this.p].x+"px";a.style.top=this.par.province[this.p].y+"px";a.style.display="block"};c[b].onmouseout=function(){a.style.display="none"};c[b].sel=function(){this.nar=a.cloneNode(true);this.nar.src="/images/province/"+this.p+".gif";this.nar.style.left=this.par.province[this.p].x+"px";this.nar.style.top=this.par.province[this.p].y+"px";this.nar.style.display="block";this.par.infoBox.parentNode.appendChild(this.nar);this.par.cur_a=this};c[b].onclick=function(){if(this.par.cur_a==this){return}this.par.getInfo(this.p,this);this.blur()};this.area[c[b].p]=c[b]}if(window.XMLHttpRequest){this.xmlHttp=new XMLHttpRequest()}else{if(window.ActiveXObject){try{this.xmlHttp=new ActiveXObject("MSXML2.XMLHTTP")}catch(f){this.xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}}}if(location.hash){var d=location.hash.replace("#","");if(this.area[d]){this.getInfo(d,this.area.p24)}else{this.getInfo("p24",this.area.p24)}}else{this.getInfo("p24",this.area.p24)}},getInfo:function(a,c){if(this.xmlHttp.readyState){this.xmlHttp.abort()}var b=this;this.xmlHttp.open("post",this.url);this.xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=utf-8");this.xmlHttp.onreadystatechange=function(){b.visInfo(c)};this.xmlHttp.send("name="+encodeURIComponent(a))},visInfo:function(d){if(this.xmlHttp.readyState==4){if(this.xmlHttp.status==200){var b=this.xmlHttp.responseText;if(b==""){return alert("\u65e0\u76f8\u5173\u8d44\u6599\uff01")}this.listBox.innerHTML=b;var c=this.listBox.getElementsByTagName("a")[0];c.info=c.parentNode.getElementsByTagName("span")[0];var a=c.info.getAttribute("info");a=a=="#"?"":'<span style="text-align:right; text-indent:77px; padding-right:10px"><a href="'+a+'" target="_blank" class="ec_info" style="color:#00b2ed; text-decoration:underline">\u4e2d\u6587\u8be6\u7ec6\u4ecb\u7ecd</a></span>';this.infoBox.innerHTML="<span><h3>"+c.innerHTML.replace(/<br\s?\/?>/ig,"")+"</h3>"+c.info.innerHTML+a;if(this.cur_a){this.infoBox.parentNode.removeChild(this.cur_a.nar)}d.sel()}}this.addEvent()},addEvent:function(){var a=this.listBox.getElementsByTagName("a");for(var b=0;b<a.length;b++){a[b].par=this;a[b].info=a[b].parentNode.getElementsByTagName("span")[0];if(a[b].parentNode.tagName.toLowerCase()=="h2"){a[b].onclick=function(){if(this.par.cur_b==this){return}var c=this.info.getAttribute("info");c=c=="#"?"":'<span style="text-align:right; padding-right:10px"><a href="'+c+'" target="_blank" class="ec_info" style="color:#00b2ed; text-decoration:underline">\u4e2d\u6587\u8be6\u7ec6\u4ecb\u7ecd</a></span>';this.par.infoBox.innerHTML="<span><h3>"+this.innerHTML.replace(/<br\s?\/?>/ig,"")+"</h3>"+this.info.innerHTML+c;if(this.par.cur_b){this.par.cur_b.className=""}this.className="cur";this.par.cur_b=this;return false}}else{a[b].onclick=function(){if(this.par.cur_b==this){return}var c=this.info.getAttribute("info");c=c=="#"?"":'<span style="text-align:left; text-indent:77px; padding-right:10px"><a href="'+c+'" target="_blank" style="color:#00b2ed; text-decoration:underline" class="ec_info">\u4e2d\u6587\u8be6\u7ec6\u4ecb\u7ecd</a></span>';this.par.infoBox.innerHTML='<img src="'+this.info.getAttribute("img")+'" alt="'+this.info.innerHTML+'" /><div><h3>'+this.info.innerHTML+"</h3>\u5efa\u6821\u65f6\u95f4: "+this.info.getAttribute("ctime")+'&nbsp;&nbsp;\u5b98\u65b9\u7f51\u7ad9: <a href="'+this.info.getAttribute("home")+'" target="_blank">'+this.info.getAttribute("home")+"</a></div>"+c;if(this.par.cur_b){this.par.cur_b.className=""}this.className="cur";this.par.cur_b=this;return false}}}},imgCatch:function(){var b=[];for(var a=1;a<=59;a++){b[a]=new Image;b[a].src="/images/province/p"+a+".gif"}}};
