String.prototype.trim = function() {
		return this.replace(/^\s+|\s+$/g,'');
	}
	function showid(id,isvisible)
	{
		if (isvisible == true)
		{
			getid(id).style.display='';
		}
		else
		{
			getid(id).style.display='none';
		}
	}
	function showmsg(id,Msg)
	{
		getid(id).innerHTML=Msg;		
	}
	function getid(id)
	{
		return document.getElementById(id);
	}
	function enable_id(id,is_enabled){
		if(is_enabled){
			getid(id).style.cssText="filter:alpha(opacity=100)";		
		}else{
			getid(id).style.cssText="filter:progid:DXImageTransform.Microsoft.BasicImage(grayScale=1)"; 
		}
	}
	function createXMLHttpRequest() {
		var request = false;
		if(window.XMLHttpRequest) {
			request = new XMLHttpRequest();
		} else if(window.ActiveXObject) {
			var versions = Array('Microsoft.XMLHTTP','MSXML.XMLHTTP','Microsoft.XMLHTTP','Msxml2.XMLHTTP.7.0','Msxml2.XMLHTTP.6.0','Msxml2.XMLHTTP.5.0','Msxml2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP');
			for(var i=0; i<versions.length; i++) {
				try {
					request = new ActiveXObject(versions[i]);
					if(request) {
						return request;
					}
				} catch(e) {
					continue;	
				}
			}
		}
		return request;
	}
	//refun ���?��
	function ajax_get(url,refun){		
		var req=createXMLHttpRequest();

		req.open("GET",url,true);
		req.onreadystatechange = function(){
			
			if(req.readyState == 4){
				if(req.status == 200){					
					refun(req.responseText);
				}
			}
		};
		req.setRequestHeader("Content-Type","text/html; encoding=utf-8");
		req.send(null);
	}
	
	function ajax_get2(url){
		var req=createXMLHttpRequest();
		req.open("GET",url,true);
		req.setRequestHeader("Content-Type","text/html; encoding=utf-8");
		req.send(null);
	}

//地址隐藏
function go_url(str,op_type){
	if(op_type==1){
    	window.open(str,'_blank');
	}else{
		window.location=str;
	}    
}

function copyToClipBoard(textarea_id){
	alert('do');
	var clipBoardContent=""; 
	clipBoardContent +=getid(textarea_id).value;
	//clipBoardContent =window.location;当前页面地址
	window.clipboardData.setData("Text",clipBoardContent);
	alert("已复制您的剪贴板");
}
