function xml(Lurl) {
	var xmlDom = null;
	try {
		xmlDom = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			xmlDom = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (oc) {
			xmlDom = null;
		}
	}

	if (!xmlDom && typeof XMLHttpRequest != "undefined") {
		xmlDom = new XMLHttpRequest();
	}

	xmlDom.open("GET", Lurl, false);
	xmlDom.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
	xmlDom.send(null);
	if (xmlDom.readyState == 4) {
		Lrtn = xmlDom.responseText;
		return unescape(Lrtn);
	}
}
//特用
	//fx_wall_contact
function contact_on(id) {
	document.getElementById(id+'contact').style.background = '#E0E0E0';
	display(id+'contact.action','block');
	vis(id+'contact.arrow','visible');
}
function contact_off(id) {
	if(document.getElementById(id+'echo').innerHTML==''){
	document.getElementById(id+'contact').style.background = '';
	display(id + 'contact.action', 'none');
	vis(id + 'contact.arrow', 'hidden');
	}
}
function fs_show_emotion_ceho(id,Lob,member_id) {
	document.getElementById(id).innerHTML ='';
	document.getElementById(id).innerHTML = xml('/mm/include/fx_echo.php?head_emotion_id='+Lob+'&member_id='+member_id+'&1='+Math.random());
	}
function fs_show_img(id,type,src){
	document.getElementById(id+'img').innerHTML ='';
	document.getElementById(id+'img').innerHTML = xml('mm/include/fx_img.php?emotion_type='+type+'&emotion_img='+src+'&emotion_id='+id+'&1='+Math.random());
}
function clear_show_img(id){
	document.getElementById(id).innerHTML ='';
}
	//fx_echo
function count_rwords(id){
	var txt=document.getElementById(id);
	var count=54-txt.value.length;
	if(count<0){
	txt.value = txt.value.slice(0,54);
	count=54-txt.value.length;
	}
	document.getElementById(id+'_count_words').innerHTML=count+'個字元';
}
function clear_echo(id){
	document.getElementById(id+'echo').innerHTML ='';
	contact_off(id);
}
function del_link(eid,Lmember_id,Lblog_member_id){
	if (!confirm('確定移除所選塗鴉?'))
		return;
	location.href="/include/updata_emotion_proc.php?Itodo=del_link&eid="+eid+"&Lmember_id="+Lmember_id+"&Lblog_member_id="+Lblog_member_id+"&1="+Math.random();
}
	//fx_pic_blog
function fs_show_album(Lmember_id) {
	document.getElementById("pic_blog").innerHTML ='';
	document.getElementById("pic_blog").innerHTML = xml('/mm/include/fx_pic_blog.php?Lmember_id='+Lmember_id+'&1='+Math.random());
}
function fs_show_album_pics(id,pwd){
	display('album_pics','block');
	document.getElementById('album_pics').innerHTML ='';
	document.getElementById('album_pics').innerHTML = xml('/mm/include/fx_album_pics.php?album_id='+id+'&pwd='+pwd+'&1='+Math.random());
}
//常用
function display(c, s) {
	document.getElementById(c).style.display = s;
}
function vis(c, s) {
	document.getElementById(c).style.visibility = s;
}
function c_pic(c, s) {
	document.getElementById(c).src=s;
}
function change_img(id,s){
	document.getElementById(id).style.background=s;
}
