var _hostName = document.location.hostname;
var _temp=_hostName.split(".");
var _host=_temp[_temp.length-2]+"."+_temp[_temp.length-1];
document.domain=_host;
var _findHost="find."+document.domain;
if (!pipi) var pipi={};
if (!jse) var jse={};

pipi.s={
	showMark:function(_movId) {
		var _url="http://user."+document.domain+"/common/pingfen/"+Math.floor(_movId/1000)+"/"+_movId+".html";
		document.write("<iframe src=\""+_url+"\" id=\"pfifr\" name=\"pfifr\" height=\"110\" width=\"738\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"no\"></iframe>");
	},
	showReview:function(_movId) {
		var _url="http://user."+document.domain+"/common/liuyan/"+Math.floor(_movId/1000)+"/"+_movId+"_1.html";
		document.write("<iframe src=\""+_url+"\" id=\"plifr\" name=\"plifr\" width=\"738\" height=\"100%\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\" scrolling=\"no\"></iframe>");
	},
	setAutoComplete:function() {
		//var _findHost="find."+document.domain;
		jse.rcpProxy={
			_flag:false,
			_init:function(_proxyId,_url) {
				if (jse.rcpProxy._flag==false) {
					var _str="<iframe src='"+_url+"' frameborder='0' width='0' height='0' id='"+_proxyId+"' name='"+_proxyId+"'></iframe>";
					document.write(_str);
					jse.rcpProxy._flag=true;
				}
			}
		}
		jse.rcpProxy._init("autocomplete","http://"+_findHost+"/proxy.html");
		Ajax.getTransport=function() {
			with (window.frames["autocomplete"]) {
				return Try.these(
					function() {return new ActiveXObject('Msxml2.XMLHTTP')},
					function() {return new ActiveXObject('Microsoft.XMLHTTP')},
					function() {return new XMLHttpRequest()}
					) || false;
			}
		}
		try {
			new CAPXOUS.AutoComplete("search_keywords", function() {
				return "http://"+_findHost+"/suggest?q=" + this.text.value;
			});
		} catch(e) {}
	}
}