Letter.prototype={
	targetId:"",

	request:null,
	
	getChannelTO:function(targetId, headChar){
		alert(targetId);
		alert(headChar);
		this.targetId=targetId;
		var url="/djwebng/asych/headchar/"+headChar+"/";
		if(window.XMLHttpRequest) {
			this.request=new XMLHttpRequest();
		} else if(window.ActiveXObject) {
			this.request=new ActiveXObject("Microsoft.XMLHTTP");
		}
		if(this.request) {
			this.request.open("GET", url, true);
			this.request.onreadystatechange=this.callback();
			this.request.send(null);
		}
	},

	callback:function(){
		alert("callback");
		if(this.request.readyState == 4) {
			if(this.request.status == 200) {
				parseMessage();
			} else {
				alert("服务器处理异常！");
			}
		} else {
			alert("正在加载....");
		}
	},

	parseMessage:function() {
		alert("xxxxxxxxxxx");
		var content=this.request.responseText;
		alert(content);
		document.getElementById(this.targetId).innerHTML=content;
		alert("ok!");
	}
}

function Letter(){
}
var letter=new Letter();

function mouseover(targetId, headChar){
	document.getElementById("Layer1").style.display="block";
	letter.getChannelTO(targetId, headChar);
}

function mouseout(targetId){
	document.getElementById("Layer1").style.display="none";
	document.getElementById(targetId).innerHTML="";
}
