<!--
	function gb() {
		location.href="ht"+"tp://172.16.0.231";
	}

	function Score() {
		alert('非常好\n\n\n\n更多信息，请查看网站帮助!');
	}

	function StrCode(str)
	{
		if(encodeURIComponent) return encodeURIComponent(str);
		if(escape) return escape(str);
	}

	function ClickButton(e, buttonid, h)
	{
		var bt = document.getElementById(buttonid);
		if (bt != null)
		{
			if (typeof bt == 'object')
			{
				if(navigator.appName.indexOf("Netscape")>(-1))
				{
					if (e.keyCode == 13)
					{ 
						bt.click(); 
						return false; 
					} 
				} 
				if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
				{ 
					if (event.keyCode == 13)
					{
						bt.click();
						return false;
					}
				}
			}
		}
		else
		{
			return false;
		}
	}

	function SearchClass(city, sel1, sel2, sel3)
	{
		var selObj1 = document.getElementById(sel1);
		var selObj2 = document.getElementById(sel2);
		var selObj3 = document.getElementById(sel3);
		var selValue1 = selObj1.value;
		var selValue2 = selObj2.value;
		var selValue3 = selObj3.value;
		if ((selValue1 != "0") && (selValue2 == "0") && (selValue3 == "0"))
		{
			//location.href = "/cuisine/" + selValue1 + "/";
			location.href = "/cuisine/" + selValue1 + "/";
		}
		else if ((selValue1 == "0") && (selValue2 != "0") && (selValue3 == "0"))
		{
			if (selValue2.substring(0,1).toUpperCase() == "C")
			{
				//location.href = "/district/" + selValue2.replace("C","");
				location.href = "/district/" + selValue2.replace("C","") + "/";
			}
			else if (selValue2.substring(0,1).toUpperCase() == "B")
			{
				//location.href = "/bizarea/" + selValue2.replace("B","");
				location.href = "/bizarea/" + selValue2.replace("B","") + "/";
			}
		}
		else if ((selValue1 == "0") && (selValue2 == "0") && (selValue3 != "0"))
		{
			//location.href = "/deco/" + city + "_" + selValue3;
			location.href = "/deco/" + city + "_" + selValue3 + "/";
		}
		else
		{
			var searchURL = "/search/cid=" + city;
			if (selValue1 != "0")
			{
				searchURL += "&cuid=" + selValue1;
			}
			if (selValue2 != "0")
			{
				if (selValue2.substring(0,1).toUpperCase() == "C")
				{
					searchURL += "&did=" + selValue2.replace("C","");
				}
				else if (selValue2.substring(0,1).toUpperCase() == "B")
				{
					searchURL += "&baid=" + selValue2.replace("B","");
				}
			}
			if (selValue3 != "0")
			{
				searchURL += "&deid=" + selValue3;
			}
			location.href = searchURL;
			//location.href = searchURL + "/";
		}
		return false;
	}

	function SearchKeyword(city, txt)
	{
		var txtObj = document.getElementById(txt);
		var txtValue = txtObj.value;
		if (txtValue.length < 1 || txtValue.indexOf("请输入") > -1)
		{
			alert("请输入搜索关键字!");
			txtObj.focus();
		}
		else
		{
			//location.href = "/keyword" + city + "/" + txtValue;
			location.href = "/keyword/" + city + "/" + txtValue;
		}
		return false;
	}
	
	function MenuCityList(show,div,iframe,btn)
	{
		var objdiv = document.getElementById(div);
		var objiframe =  document.getElementById(iframe);
		var objbtn = document.getElementById(btn);
		var ie = (navigator.userAgent.indexOf("MSIE") > -1 && navigator.userAgent.indexOf("Opera") == -1)?true:false;
		var opera = (navigator.userAgent.indexOf("Opera") > -1)?true:false;
		var firefox = (navigator.userAgent.indexOf("Firefox") > -1)?true:false;
		if (show)
		{
			objdiv.style.display = "block";
			if (ie)
			{
				objiframe.style.display = "block";
			}
			objiframe.style.width = objdiv.offsetWidth;
			objiframe.style.height = objdiv.offsetHeight;
			objdiv.style.top = (objbtn.offsetTop + objbtn.offsetHeight - 2) + "px";
			objdiv.style.left = (objbtn.offsetLeft - 4) + "px";
			objiframe.style.top = objdiv.offsetTop + "px";
			objiframe.style.left = objdiv.offsetLeft + "px";
		}
		else
		{
			objiframe.style.display = "none";
			objdiv.style.display = "none";
		}
	}
	
	function Trim(s)
	{
		var m = s.match(/^\s*(\S+(\s+\S+)*)\s*$/);
		return (m == null) ? "" : m[1];
	}
	
	
	var ygPos=new function()
	{
		this.getPos=function(oEl)
		{
			var pos=[oEl.offsetLeft,oEl.offsetTop];
			var parent=oEl.offsetParent;
			var tmp=
			{
				x:null,y:null
			};
			if(parent!=oEl)
			{
				while(parent)
				{
					switch(browser)
					{
						case'ie':if(_getStyle(parent,'position')=='relative'&&_getStyle(oEl,'width')=='auto'&&!(_getStyle(oEl,'position')!='static'))
						{
							return[oEl.offsetLeft,oEl.offsetTop];
						}
						else if(_getStyle(parent,'width')!='auto'||_getStyle(oEl.parentNode,'position')!='static')
						{
							tmp.x=parseInt(_getStyle(parent,'borderLeftWidth'));
							tmp.y=parseInt(_getStyle(parent,'borderTopWidth'));
							if(!isNaN(tmp.x))pos[0]+=tmp.x;
							if(!isNaN(tmp.y))pos[1]+=tmp.y;
						}
						break;
						case'gecko':if(_getStyle(parent,'position')=='relative')
						{
							tmp.x=parseInt(_getStyle(parent,'border-left-width'));
							tmp.y=parseInt(_getStyle(parent,'border-top-width'));
							if(!isNaN(tmp.x))pos[0]+=tmp.x;
							if(!isNaN(tmp.y))pos[1]+=tmp.y;
						}
						break;
					}
					pos[0]+=parent.offsetLeft;
					pos[1]+=parent.offsetTop;
					parent=parent.offsetParent;
				}
			}
			if(browser=='ie'&&_getStyle(oEl,'width')!='auto'&&_getStyle(oEl.offsetParent,'width')=='auto'&&_getStyle(oEl.offsetParent,'position')=='relative')
			{
				parent=oEl.parentNode;
				while(parent.tagName!='HTML')
				{
					tmp.x=parseInt(_getStyle(parent,'marginLeft'));
					tmp.y=parseInt(_getStyle(parent,'paddingLeft'));
					if(!isNaN(tmp.x))pos[0]-=tmp.x;
					if(!isNaN(tmp.y))pos[0]-=tmp.y;
					parent=parent.parentNode;
				}
			}
			return pos;
		}
		
		,this.getX=function(oEl)
		{
			return this.getPos(oEl)[0];
		}
		
		this.getY=function(oEl)
		{
			return this.getPos(oEl)[1];
		}
		
		this.setPos=function(oEl,endPos)
		{
			var offset=[0,0];
			var delta=
			{
				x:0,y:0
			};
			var curStylePos=_getStyle(oEl,'position');
			if(curStylePos=='static')
			{
				oEl.style.position='relative';
				curStylePos='relative';
			}
			if(oEl.offsetWidth)
			{
				if(curStylePos=='relative')
				{
					offset=this.getPos(oEl);
					var tmp=
					{
						x:_getStyle(oEl,'left'),y:_getStyle(oEl,'top')
					};
					delta.x=(tmp.x&&tmp.x.indexOf('px')!=-1)?parseInt(tmp.x):0;
					delta.y=(tmp.y&&tmp.y.indexOf('px')!=-1)?parseInt(tmp.y):0;
				}
				else
				{
					offset=this.getPos(oEl.offsetParent);
					var tmp=
					{
						x:_getStyle(oEl,'margin-left'),y:_getStyle(oEl,'margin-top')
					};
					delta.x=(tmp.x&&tmp.x.indexOf('px')!=-1)?0-parseInt(tmp.x):0;
					delta.y=(tmp.y&&tmp.y.indexOf('px')!=-1)?0-parseInt(tmp.y):0;
				}
			}
			if(browser=='safari')
			{
				if(oEl.offsetParent&&oEl.offsetParent.tagName=='BODY')
				{
					if(_getStyle(oEl,'position')=='relative')
					{
						delta.x-=document.body.offsetLeft;
						delta.y-=document.body.offsetTop;
					}
					else if(_getStyle(oEl,'position')=='absolute'||_getStyle(oEl,'position')=='fixed')
					{
						delta.x+=document.body.offsetLeft;
						delta.y+=document.body.offsetTop;
					}
				}
			}
			if(endPos[0]!==null)oEl.style.left=endPos[0]-offset[0]+delta.x+'px';
			if(endPos[1]!==null)oEl.style.top=endPos[1]-offset[1]+delta.y+'px';
		}
		
		this.setX=function(oEl,x)
		{
			this.setPos(oEl,[x,null]);
		}
		
		this.setY=function(oEl,y)
		{
			this.setPos(oEl,[null,y]);
		}
		
		var _getStyle=function(oEl,property)
		{
			var dv=document.defaultView;
			if(oEl.style[property])return oEl.style[property];
			else if(oEl.currentStyle)
			{
				if(property.indexOf('-')!=-1)
				{
					property=property.split('-');
					property[1]=property[1].toUpperCase().charAt(0)+property[1].substr(1);
					property=property.join('');
				}
				if(oEl.currentStyle[property])return oEl.currentStyle[property];
			}
			else if(dv&&dv.getComputedStyle(oEl, '')&&dv.getComputedStyle(oEl,'').getPropertyValue(property))
			return dv.getComputedStyle(oEl,'').getPropertyValue(property);
			return null;
		}
		
		var _getBrowser=function()
		{
			var ua=navigator.userAgent.toLowerCase();
			if(ua.indexOf('opera')!=-1)
			return'opera';
			else if(ua.indexOf('msie')!=-1)
			return'ie';
			else if(ua.indexOf('safari')!=-1)
			return'safari';
			else if(ua.indexOf('gecko')!=-1)
			return'gecko';
			else
			return false;
		}
		
		var browser=_getBrowser();
	}


	function addEvent( obj, evType, fn, useCapture )
	{
		if ( obj.addEventListener )
		{
			obj.addEventListener( evType, fn, useCapture );
			return true;
		}
		if ( obj.attachEvent )
		{
			return obj.attachEvent( "on" + evType, fn );
		}
		alert( "Unable to add event listener for " + evType + " to " + obj.tagName );
	}
-->

