	function hiddenAllFeedBackForm(){
		var feedBackForm_array = document.getElementsByName("feedBackForm"); 
		for(i=0;i<feedBackForm_array.length;i++) 
		{
			feedBackForm_array[i].style.display = "none"; 
		}
	}
	
	function switchHide(ID){
		hiddenAllFeedBackForm();
		var obj=document.getElementById(ID);
		obj.style.display=(obj.style.display==""?"none":"");
	}
 
	///---- 插入表情js Start---- 
	function $getElementBy(id){return typeof id === 'string' ? document.getElementById(id) : id;}
	function addEvent(el, type, handler){if(el.attachEvent){el.attachEvent("on" + type, handler);}else if(el.addEventListener){el.addEventListener(type, handler, false);}}
	function removeEvent(el, type, handler){if(el.detachEvent){el.detachEvent('on' + type, handler);}else if(el.removeEventListener){el.removeEventListener(type, handler, false);}}

	var faceInited = false;
 
	//显示表情
	function showFace(txtDemoID,ev){
		$getElementBy(txtDemoID).onFocus=function(){var elem = $getElementBy(txtDemoID),range = getRange(elem);elem.setAttribute("range", range.join("|"));cancelEventBubble(arguments[0] || window.event);};
		$getElementBy(txtDemoID).onMouseup=function(){var elem = $getElementBy(txtDemoID),range = getRange(elem);elem.setAttribute("range", range.join("|"));cancelEventBubble(arguments[0] || window.event);};
		$getElementBy(txtDemoID).onkeyup=function(){var elem = $getElementBy(txtDemoID),range = getRange(elem);elem.setAttribute("range", range.join("|"));cancelEventBubble(arguments[0] || window.event);};
		$getElementBy(txtDemoID).onmousemove=function(){var elem = $getElementBy(txtDemoID),range = getRange(elem);elem.setAttribute("range", range.join("|"));cancelEventBubble(arguments[0] || window.event);};
		if(!faceInited){initFace(txtDemoID);}var facePanel= $getElementBy("facePanel");facePanel.style.display = "block";addEvent(document.body, 'click', hideFace);addEvent(facePanel, 'click', cancelEventBubble);cancelEventBubble(ev);
		var obj = $getElementBy("facePanel4"+txtDemoID);
		var topValue = obj.offsetTop;
		var leftValue = obj.offsetLeft;
		while(obj = obj.offsetParent)
		{
			topValue += obj.offsetTop;
			leftValue += obj.offsetLeft;
		}
		//topValue += obj.offsetTop;
		//leftValue += obj.offsetLeft;
		facePanel.style.left = leftValue+"px";
		facePanel.style.top = topValue+"px";
	}
 
	//隐藏表情
	function hideFace(){$getElementBy("facePanel").style.display = "none";removeEvent(document.body, 'click', hideFace);removeEvent($getElementBy("facePanel"), 'click', cancelEventBubble);$getElementBy("facePanel").style.position = "fixed";}
 
	//插入表情
	function insertFace(elem,txtDemoID){var txtElem = $getElementBy(txtDemoID),range = txtElem.getAttribute("range") ? txtElem.getAttribute("range").split("|") : [0, 0];var str_1 = txtElem.value.slice(0, range[0]);var str_2 = txtElem.value.slice(range[1]);txtElem.value = str_1 + elem.getAttribute("value") + str_2;if(!document.selection){txtElem.selectionStart = txtElem.value.length;txtElem.selectionEnd = txtElem.value.length;}else{var range = txtElem.createTextRange();range.collapse(1);range.moveStart("character", txtElem.value.length);range.moveEnd("character", txtElem.value.length);range.select();}txtElem.focus();}
 
	//取消事件冒泡
	function cancelEventBubble(ev){ev = ev || window.event;if(ev.stopPropagation){ev.stopPropagation();}else if(!ev.cancelBubble){ev.cancelBubble = true;}}

	//记录textarea的选区的start&end
	/*
	function savePos(){var elem = $("txtDemo"),range = getRange(elem);elem.setAttribute("range", range.join("|"));cancelEventBubble(arguments[0] || window.event);}
	!(function(){var txtElem = $("txtDemo");addEvent(txtElem, 'focus', savePos);addEvent(txtElem, 'mouseup', savePos);addEvent(txtElem, 'keyup', savePos);	addEvent(txtElem, 'mousemove', savePos);})();
	*/
 
	//初始化表情
	function initFace(txtDemoID){
		var faces = [{"icon":"\u8db3\u7403","value":"[\u8db3\u7403]","src":"basic\/football.gif"},{"icon":"\u54e8\u5b50","value":"[\u54e8\u5b50]","src":"basic\/shao.gif"},{"icon":"\u7ea2\u724c","value":"[\u7ea2\u724c]","src":"basic\/redcard.gif"},{"icon":"\u9ec4\u724c","value":"[\u9ec4\u724c]","src":"basic\/yellowcard.gif"},{"icon":"\u54c8\u54c8","value":"[\u54c8\u54c8]","src":"basic\/laugh.gif"},{"icon":"\u5475\u5475","value":"[\u5475\u5475]","src":"basic\/smile.gif"},{"icon":"\u6cea","value":"[\u6cea]","src":"basic\/cry.gif"},{"icon":"\u6c57","value":"[\u6c57]","src":"basic\/sweat.gif"},{"icon":"\u7231\u4f60","value":"[\u7231\u4f60]","src":"basic\/love.gif"},{"icon":"\u563b\u563b","value":"[\u563b\u563b]","src":"basic\/tooth.gif"},{"icon":"\u54fc","value":"[\u54fc]","src":"basic\/hate.gif"},{"icon":"\u5fc3","value":"[\u5fc3]","src":"basic\/heart.gif"},{"icon":"\u6655","value":"[\u6655]","src":"basic\/dizzy.gif"},{"icon":"\u6012","value":"[\u6012]","src":"basic\/angry.gif"},{"icon":"\u86cb\u7cd5","value":"[\u86cb\u7cd5]","src":"basic\/cake.gif"},{"icon":"\u82b1","value":"[\u82b1]","src":"basic\/flower.gif"},{"icon":"\u6293\u72c2","value":"[\u6293\u72c2]","src":"basic\/crazy.gif"},{"icon":"\u56f0","value":"[\u56f0]","src":"basic\/sleepy.gif"},{"icon":"\u5e72\u676f","value":"[\u5e72\u676f]","src":"basic\/cheer.gif"},{"icon":"\u592a\u9633","value":"[\u592a\u9633]","src":"basic\/sun.gif"},{"icon":"\u4e0b\u96e8","value":"[\u4e0b\u96e8]","src":"basic\/rain.gif"},{"icon":"\u4f24\u5fc3","value":"[\u4f24\u5fc3]","src":"basic\/sad.gif"},{"icon":"\u6708\u4eae","value":"[\u6708\u4eae]","src":"basic\/moon.gif"},{"icon":"\u732a\u5934","value":"[\u732a\u5934]","src":"basic\/pig.gif"},{"icon":"\u8721\u70db","value":"[\u8721\u70db]","src":"basic\/candle.gif"}];
		var imgURI = "face/";
		var tempArr = [];
		tempArr.push('<ul>');
		for(var i=0, len = faces.length; i<len; i++){
			tempArr.push([
			'<li><a href="javascript:;" hideFocus="true" onclick="insertFace(this,\''+txtDemoID+'\');return false;" value="' + faces[i].value + '" title="' + faces[i].icon + '"><img src="' + imgURI + faces[i].src + '" alt="' + faces[i].icon + '" /><span>&nbsp;</span></a></li>',
			].join(""));
		}
		tempArr.push('</ul>');
		$getElementBy("facePanel").innerHTML = tempArr.join("");
	}
 
	//获取选区
	function getRange(elem){var start = 0, end = 0;if(!document.selection) {start = elem.selectionStart;end = elem.selectionEnd;}else if(document.selection){var range = document.selection.createRange(),range_all = document.body.createTextRange(),i = 0;range_all.moveToElementText(elem); 	for(; range_all.compareEndPoints("StartToStart", range) < 0; start++) {range_all.moveStart('character', 1);}for(; i<start; i++) {if(elem.value.charAt(i) == "\n") {start++;}}range_all = document.body.createTextRange();range_all.moveToElementText(elem);for(;range_all.compareEndPoints('StartToEnd', range) < 0; end++) {range_all.moveStart('character', 1);}for(i=0; i <= end; i++){if(elem.value.charAt(i) == "\n") {end++;}}}return [start, end];}
	
	///---- 插入表情js End---- 