// Copyright(c) CyberMap Japan Corp. All rights reserved

var prefCode;
var ctyCode;

function MapionWDSocoDoco(skid){
	this.id=skid;
	this.grp="grp="+_grp;
	this.el=null;
	this.nl=null;
};


MapionWDSocoDoco.prototype.parse=function(el,nl){
var sd=this;var xmlhttp=AlpsUtil.getXMLHttp();
var e=document.getElementById(this.id);
if(!e)return;if(!xmlhttp)return;
var URL=_path_socodoco+"?"+sd.grp+"&el="+el+"&nl="+nl+"&xsl=mst_sokodoko";
xmlhttp.open("GET",URL,true);
if(_bi.type!=1) xmlhttp.overrideMimeType("application/xml");
 xmlhttp.setRequestHeader("Referer", location.href);
if(_bi.type==1) xmlhttp.setRequestHeader("Content-Type", "text/xml; charset=UTF-8;");
else xmlhttp.setRequestHeader("Content-Type", "application/application/x-www-form-urlencoded; charset=utf-8");
	xmlhttp.onreadystatechange=function(){
		if(xmlhttp.readyState==4){
var ad=(xmlhttp.responseText.toLowerCase().indexOf("span")>0)? xmlhttp.responseText : "";
e.innerHTML=ad;
sd.getShopcode(el,nl);
/*			var ad=xmlhttp.responseText;
			document.getElementById(sd.id).innerHTML=ad;
*/		}
	};
xmlhttp.send(null);};

MapionWDSocoDoco.prototype.getShopcode=function(el,nl){
	if(!document.getElementById("where")) return;
	if(document.getElementById("where")){
		var k_code=document.getElementById("where").getAttribute("admi2");
		var c_code=document.getElementById("where").getAttribute("admi3");
	}
	if(k_code) prefCode = k_code;
	if(c_code) ctyCode  = c_code;
	measureWidth();
	if(k_code) branchArea(k_code);
};

