if (typeof arrBarDiv == 'object') {
} else {
	var arrBarDiv;
	arrBarDiv = new Array();
}

if (typeof arrListDiv == 'object') {
} else {
	var arrListDiv;
	arrListDiv = new Array();
}

if (typeof arrReq == 'Object') {
} else {
	var arrReq;
	arrReq = new Array();
}

if (typeof arrIndex == 'number') {
} else {
	var arrIndex = 0;
}

if (typeof window.common_createXMLHttpRequest == 'function') {
} else {
	function common_createXMLHttpRequest() {
	  var req;
	  if (window.ActiveXObject) {
			req = new ActiveXObject("Microsoft.XMLHTTP");
	  } else if (window.XMLHttpRequest) {
	    req = new XMLHttpRequest();
	  }
	  return req;
	}
}

if (typeof window.common_runAjax == 'function') {
} else {
	function common_runAjax(req, url, callback, method, aIndex, params, contentType) {
		var req = arrReq[aIndex];
		if(!method) {method='GET';}
		if(!contentType && method=='POST') {
			contentType = 'application/x-www-form-urlencoded';
		}
		if (callback) {
			req.onreadystatechange = function() { callback(aIndex); };
		}
		req.open(method,url);
		if (contentType){
			req.setRequestHeader('Content-Type',contentType);
		}
		req.send(params);
	}
}

if (typeof window.common_showfiles == 'function') {
} else {
	function common_showfiles(url, aIndex) {
//		document.getElementById(arrListDiv[aIndex]).innerHTML = '';
		document.getElementById(arrBarDiv[aIndex]).style.display = '';
		arrReq[aIndex]=common_createXMLHttpRequest();
		common_runAjax(arrReq[aIndex],url,common_showpass,'POST',aIndex);
	}
}

if (typeof window.common_showpass == 'function') {
} else {
	function common_showpass(aIndex){	
		var req = arrReq[aIndex];
		var str;
		if(req.readyState==4){
			if(req.status==200) {
				str=req.responseText;
				if(str!='') {
					document.getElementById(arrBarDiv[aIndex]).style.display = 'none';
					document.getElementById(arrListDiv[aIndex]).innerHTML = str;
				} else {
					document.getElementById(arrBarDiv[aIndex]).style.display = 'none';
//					document.getElementById(arrListDiv[aIndex]).innerHTML = '';
				}
			} else {
				document.getElementById(arrBarDiv[aIndex]).style.display = 'none';
//				document.getElementById(arrListDiv[aIndex]).innerHTML = '';
			}      
		}
	}
}

