<!--
	//参数：
	//	url 链接地址
	//	target 目标frame，其中
	//		_top:表示主frame
	//		_blank:新窗口
	function openurl(url,target){
		if (target=='_top'){
			parent.location=url;
		}else if (target=='_blank'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=550,height=430');
			newwin.location=url;
			newwin.focus();
		}else if (target=='_blank1'){
			var newwin = window.open('','_blank','scrollbars=1,resizable=1,left=0,top=0,width=650,height=430');
			newwin.location=url;
			newwin.focus();
		}else if (target=='_blank2'){
			var newwin = window.open('','_blank','toolbar=1,location=1,status=1,menubar=1,scrollbars=1,resizable=1,left=0,top=0');
			newwin.location=url;
			newwin.focus();
		}else if (target=='_blank3'){
			var newwin = window.open('','_blank','scrollbars=no,resizable=no,left=0,top=0,width=790,height=550');
			newwin.location=url;
			newwin.focus();
		}else if (target=='chatroom'){
			var newwin = window.open('','searchWin','scrollbars=no,resizable=no,left=0,top=0,width=790,height=550');
			newwin.location=url;
			newwin.focus();
		}else if (target=='auction'){
			var newwin = window.open('','auction','scrollbars=1,resizable=1,left=0,top=0,width=800,height=600');
			newwin.location=url;
			newwin.focus();
		}else if (target=='small'){
			var newwin = window.open('','_blank','scrollbars=no,resizable=no,left=300,top=300,width=400,height=200');
			newwin.location=url;
			newwin.focus();
		}else{
			if (parent.frmaes != null){
				parent.frames(target).location=url;
			}else{
				this.location=url;
			}
		}
		return;
	}

	function newwindow(url) {
		window.open(url,"","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes")
		return false;
	}

/*
	function setCookie(name,runid){
		var the_cookie = name+"=runid:" + escape(runid);
		var today = new Date();
		var time = new Date(today.getYear(),today.getMonth(),today.getDate(),today.getHours(),today.getMinutes()+1,today.getSeconds());
	    var the_cookie_date = time.toGMTString();
		the_cookie = the_cookie + ";expires=" + the_cookie_date;
		document.cookie = the_cookie;
	}
*/
	function readCookie(name){
	  var the_cookie = "";
	  if(document.cookie != '')
	  		the_cookie = unescape(WM_getCookieValue(name));
	  var broken_cookie = the_cookie.split(":");
	  var the_runid_part = broken_cookie[1];
	  var broken_runid = the_runid_part.split(";");
	  var the_runid = broken_runid[0];
//	  alert("runid is: " + unescape(the_runid));
	  return the_runid;
	}
	
	function WM_getCookieValue(name){
		var firstChar, lastChar;
		var theBigCookie = document.cookie;
		firstChar = theBigCookie.indexOf(name);
		if(firstChar != -1){
			firstChar += name.length + 1;
			lastChar = theBigCookie.indexOf(';', firstChar);
			if(lastChar == -1)
				lastChar = theBigCookie.length;
			return theBigCookie.substring(firstChar, lastChar);
		}
		else{
			return 0;
		}
	}

	function MM_swapImgRestore() { //v3.0
	  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
	}

	//去掉字串左边的空格
	function lTrim(str)
	{
		if (str.charAt(0) == " ")
		{
		//如果字串左边第一个字符为空格
		str = str.slice(1);//将空格从字串中去掉
		//这一句也可改成 str = str.substring(1, str.length);
		str = lTrim(str); //递归调用
		}
		return str;
	}

	//去掉字串右边的空格
	function rTrim(str)
	{
		var iLength;

		iLength = str.length;
		if (str.charAt(iLength - 1) == " ")
		{
		//如果字串右边第一个字符为空格
		str = str.slice(0, iLength - 1);//将空格从字串中去掉
		//这一句也可改成 str = str.substring(0, iLength - 1);
		str = rTrim(str); //递归调用
		}
		return str;
	}

	//去掉字串两边的空格
	function trim(str)
	{
		return lTrim(rTrim(str));
	}
//-->
