var a,DB_mode=false;function DumpError(b){try{throw b;}catch(c){DumpException(c)}}
function DumpException(b,c){c="Javascript exception: "+(c?c:"")+" "+b;if(BR_AgentContains_("msie")&&!window.opera)c+=" "+b.name+": "+b.message+" ("+b.number+")";var d="";if(typeof b=="string")d=b+"\n";else for(var e in b)try{d+=e+": "+b[e]+"\n"}catch(g){}d+=DB_GetStackTrace(DumpException.caller);b=c+"\n"+d;if(DB_mode){try{var f=(new Date).getTime()-DB_starttime,h="["+f+"] "+HtmlEscape(b).replace(/\n/g,"<br>")+"<br>";h="<font color=#ff0000><b>Error: "+h+"</b></font>";DB_win.focus()}catch(j){}DB_WriteDebugHtml(h)}else typeof log!=
"undefined"&&log(HtmlEscape(b))}var function_name_re_=/function (\w+)/;
function DB_GetStackTrace(b){try{if(!(BR_AgentContains_("msie")&&!window.opera)&&!(BR_AgentContains_("safari")||BR_AgentContains_("konqueror"))&&BR_AgentContains_("mozilla"))return Error().stack;if(!b)return"";var c;var d=function_name_re_.exec(String(b));c=d?d[1]:"";c="- "+c+"(";for(d=0;d<b.arguments.length;d++){if(d>0)c+=", ";var e=String(b.arguments[d]);if(e.length>40)e=e.substr(0,40)+"...";c+=e}c+=")\n";c+=DB_GetStackTrace(b.caller);return c}catch(g){return"[Cannot get stack trace]: "+g+"\n"}}
var DB_starttime,DB_win=null,DB_winopening=false;
function DB_WriteDebugHtml(b){if(DB_mode)try{if((DB_win==null||DB_win.closed)&&!DB_winopening)try{DB_winopening=true;DB_win=window.open("","debug","width=700,height=500,toolbar=no,resizable=yes,scrollbars=yes,left=16,top=16,screenx=16,screeny=16");DB_win.blur();DB_win.document.open();DB_winopening=false;var c="<font color=#ff0000><b>To turn off this debugging window,hit 'D' inside the main caribou window, then close this window.</b></font><br>";DB_WriteDebugHtml(c)}catch(d){}DB_win.document.write(b);DB_win.scrollTo(0,
1E6)}catch(e){}};function BR_AgentContains_(b){if(b in BR_AgentContains_cache_)return BR_AgentContains_cache_[b];return BR_AgentContains_cache_[b]=navigator.userAgent.toLowerCase().indexOf(b)!=-1}var BR_AgentContains_cache_={},amp_re_=/&/g,lt_re_=/</g,gt_re_=/>/g;function HtmlEscape(b){if(!b)return"";return b.replace(amp_re_,"&amp;").replace(lt_re_,"&lt;").replace(gt_re_,"&gt;").replace(quote_re_,"&quot;")}var quote_re_=/\"/g;function forid_1(b){return document.getElementById(b)}
function forid_2(b){return document.all[b]}var forid=document.getElementById?forid_1:forid_2;function log(b){try{if(window.parent!=window&&window.parent.log){window.parent.log(window.name+"::"+b);return}}catch(c){}var d=forid("log");if(d){b="<p class=logentry><span class=logdate>"+new Date+"</span><span class=logmsg>"+b+"</span></p>";d.innerHTML=b+d.innerHTML}else window.status=b};function AS_Assert(){}AS_Assert.raise=function(b){if(typeof Error!="undefined")throw new Error(b||"Assertion Failed");else throw b;};AS_Assert.fail=function(b){b=b||"Assertion failed";typeof DumpError!="undefined"&&DumpError(b+"\n");AS_Assert.raise(b)};AS_Assert.isTrue=function(b,c){if(!b){if(c===undefined)c="Assertion failed";AS_Assert.fail(c)}};AS_Assert.equals=function(b,c,d){if(b!=c){if(d===undefined)d="AS_Assert.equals failed: <"+b+"> != <"+c+">";AS_Assert.fail(d)}};
AS_Assert.typeOf=function(b,c,d){if(typeof b!=c){if(b||b=="")try{if(c==AS_Assert.TYPE_MAP[typeof b]||b instanceof c)return}catch(e){}if(d===undefined){if(typeof c=="function")if(d=c.toString().match(/^\s*function\s+([^\s\{]+)/))c=d[1];d="AS_Assert.typeOf failed: <"+b+"> not typeof "+c}AS_Assert.fail(d)}};AS_Assert.TYPE_MAP={string:String,number:Number,"boolean":Boolean};
AS_Assert.numArgs=function(b,c){var d=AS_Assert.numArgs.caller;if(d&&d.arguments.length!=b){if(c===undefined)c=d.name+" expected "+b+" arguments  but received "+d.arguments.length;AS_Assert.fail(c)}};function Dom(b){this.doc=b||document;this.getElementById_=this.doc.getElementById?function(c){return this.doc.getElementById(c)}:function(c){return this.doc.all[c]}}Dom.prototype.$=function(b){return this.getElementById_(b)};Dom.prototype.create=function(b){return this.doc.createElement(b)};Dom.remove=function(b){AS_Assert.isTrue(b.parentNode);b.parentNode.removeChild(b)};Dom.insertAfter=function(b,c){AS_Assert.isTrue(c.parentNode);c.parentNode.insertBefore(b,c.nextSibling)};
Dom.insertBefore=function(b,c){AS_Assert.isTrue(c.parentNode);c.parentNode.insertBefore(b,c)};Dom.replace=function(b,c){AS_Assert.isTrue(c.parentNode);c.parentNode.replaceChild(b,c)};Dom.getInnerText=function(b){var c=[];Dom.getInnerTextHelp_(b,c);return c.join("")};Dom.getInnerTextHelp_=function(b,c){if(b.innerText)c.push(b.innerText);else if(b.data)c.push(b.data);else if(b.hasChildNodes())for(var d=b.firstChild;d;){arguments.callee(d,c);d=d.nextSibling}};var DM_GlobalDom=new Dom;
function $(b){return DM_GlobalDom.$(b)};var XH_ieProgId_,JSCompiler_inline_XH_ACTIVE_X_IDENTS_23=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"];
if(typeof XMLHttpRequest=="undefined"&&typeof ActiveXObject!="undefined"){for(var JSCompiler_inline_i$$19_24=0;JSCompiler_inline_i$$19_24<JSCompiler_inline_XH_ACTIVE_X_IDENTS_23.length;JSCompiler_inline_i$$19_24++){var JSCompiler_inline_candidate_25=JSCompiler_inline_XH_ACTIVE_X_IDENTS_23[JSCompiler_inline_i$$19_24];try{new ActiveXObject(JSCompiler_inline_candidate_25);XH_ieProgId_=JSCompiler_inline_candidate_25;break}catch(JSCompiler_inline_e$$11_26){}}if(!XH_ieProgId_)throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed.");
}function XH_XmlHttpGET(b,c,d){b.open("GET",c,true);b.onreadystatechange=d;try{b.send(null)}catch(e){log("XMLHttpSend failed "+e.toString()+"<br>"+e.stack);throw e;}};if("undefined"==typeof log)log=function(){};var ER_curPage_=1,ER_curQuery_=-1,ER_queries_,ER_linktexts_,ER_linkurls_,ER_udsLoaded_=false,ER_DOM_=new Dom,ER_NUM_RE=/\d+/g,ER_QUERY_RE=/_QUERY_/g,ER_RANK_RE=/_RANK_/g;function createElement(b,c,d){b=ER_DOM_.create(b);if(c!=null)b.id=c;if(d!=null)b.className=d;return b}
function ER_buildQueryList(b,c,d){var e=createElement("div","ql");for(b=b;b<c;b++){var g=createElement("div","q_"+b,"q_inactive");g.onclick=ER_onQueryClick;g.onmouseover=ER_highlightDiv;g.onmouseout=ER_unHightlightDiv;var f=createElement("span","q_rank","bottom_border l center c");f.appendChild(document.createTextNode(""+(b+1)));f.style.width="25px";g.appendChild(f);f=createElement("span","q_trend","bottom_border pd_6 l");if(ER_queries_[b][1]=="0")f.appendChild(createElement("div","nomove"));else if(ER_queries_[b][1]==
"1")f.appendChild(createElement("div","up"));else ER_queries_[b][1]=="-1"?f.appendChild(createElement("div","down")):f.appendChild(createElement("div","none"));f.style.width="22px";g.appendChild(f);f=createElement("a","q_title","bottom_border l color_2");f.appendChild(document.createTextNode(ER_queries_[b][0]));f.href="javascript:_ER_doDetailSearch("+b+");";f.style.width="245px";f.style.height="25px";g.appendChild(f);f=createElement("span","q_link","bottom_border l");var h=createElement("a",null,
"color_2");h.appendChild(document.createTextNode(ER_linktexts_[0]));h.href="javascript:_ER_doSearch(0,"+b+");";f.appendChild(h);f.appendChild(document.createTextNode(" | "));h=createElement("a",null,"color_2");h.appendChild(document.createTextNode(ER_linktexts_[1]));h.href="javascript:_ER_doSearch(1,"+b+");";f.appendChild(h);if(ER_queries_[b][2]!=""){h=createElement("a");h.appendChild(document.createTextNode(ER_linktexts_[2]));h.href="javascript:_ER_doSearch(2,"+b+");";f.appendChild(document.createTextNode(" | "));
f.appendChild(h)}if(ER_queries_[b][4]!=""){h=createElement("a");h.appendChild(document.createTextNode(ER_linktexts_[3]));h.href="javascript:_ER_doSearch(4,"+b+");";f.appendChild(document.createTextNode(" | "));f.appendChild(h)}g.appendChild(f);e.appendChild(g)}Dom.replace(e,$("ql"));ER_doDetailSearch(d)}
function ER_doDetailSearch(b){var c=b;if(b==null)c=ER_getQid();if(ER_curQuery_!=c){ER_updateIntro(c);ER_udsLoaded_?Z2_initializeAjaxSearchers(ER_queries_[c][0]):google.setOnLoadCallback(function(){ER_udsLoaded_=true;Z2_searchControl(ER_queries_[c][0])});ER_updateRelatedQueries(ER_queries_[c][0]);b=$("q_"+ER_curQuery_);if(b!=null){b.className="q_inactive";b.onmouseover=ER_highlightDiv;b.onmouseout=ER_unHightlightDiv}ER_curQuery_=c;b=$("q_"+ER_curQuery_);b.className="q_active";b.onmouseover=null;b.onmouseout=
null;ER_sendTracking("/rebang/tracking?type=uds")}}
function ER_updateIntro(b){var c=$("introtext");if(c!=null)if(ER_queries_[b][3]!=""){for(c.parentNode.style.display="";c.hasChildNodes();)c.removeChild(c.firstChild);c.appendChild(document.createTextNode(ER_queries_[b][3]));if(ER_queries_[b][2]!=""){var d=createElement("a",null,"gsc-trailing-more-results");d.innerHTML=_UDS_MSG_SEARCHCONTROL_SEE_MORE;d.href=ER_queries_[b][2];b=createElement("div",null,"gsc-trailing-more-results");b.appendChild(d);c.appendChild(b)}}else c.parentNode.style.display="none"}
function ER_updateRelatedQueries(b){var c=XH_ieProgId_?new ActiveXObject(XH_ieProgId_):new XMLHttpRequest;b="/rebang/relatedqueries?q="+encodeURIComponent(b);XH_XmlHttpGET(c,b,function(){if(c.readyState==4)if(c.status==200){$("rs").style.display="";$("rscontrol").innerHTML=c.responseText}else $("rs").style.display="none"})}function ER_getQid(){var b=document.location.search.substring(1);b=b.split("&");for(var c=0;c<b.length;c++){var d=b[c].split("=");if(d[0]=="qid")return d[1]}return 0}
function ER_switchQueryListPage(b){b=this.id.match(ER_NUM_RE);if(b!=ER_curPage_){$("querylist_align").style.height="0";$("result_align").style.height="0";b==1?ER_buildQueryList(0,25,0):ER_buildQueryList(25,ER_queries_.length,25);var c=$("ql_page_"+ER_curPage_);c.className="ql_page_inactive";c.onmouseover=ER_onMouseOver;c.onmouseout=ER_onMouseOut;ER_curPage_=b;c=$("ql_page_"+ER_curPage_);c.className="ql_page_active";c.onmouseover=null;c.onmouseout=null;c.style.textDecoration="none"}}
function ER_initExtendReading(b,c,d){ER_queries_=b;ER_linktexts_=c;ER_linkurls_=d;ER_loadExtendReading();google.setOnLoadCallback(function(){ER_udsLoaded_=true})}
function ER_loadExtendReading(){var b=ER_queries_;b[b.length-1]==null&&ER_queries_.pop();b=b.length;if(b<25)ER_buildQueryList(0,b);else{ER_buildQueryList(0,25);var c=$("ql_page"),d=createElement("span","ql_page_1","ql_page_active");d.onclick=_ER_switchQueryListPage;d.appendChild(document.createTextNode("1-25"));c.appendChild(d);c.appendChild(document.createTextNode(" | "));d=createElement("span","ql_page_2","ql_page_inactive");d.onclick=_ER_switchQueryListPage;d.appendChild(document.createTextNode("26-"+
b));d.onmouseover=ER_onMouseOver;d.onmouseout=ER_onMouseOut;c.appendChild(d)}}function ER_onMouseOver(){this.style.textDecoration="underline";this.style.cursor="pointer"}function ER_onMouseOut(){this.style.textDecoration="none"}function ER_doSearch(b,c){var d="";if(b>=2)d=ER_queries_[c][b];else{d=ER_linkurls_[b].replace(ER_QUERY_RE,encodeURIComponent(ER_queries_[c][0]));d=d.replace(ER_RANK_RE,""+c)}window.open(d,"newwindow")}
function ER_searchWeb(b){var c="";c=ER_linkurls_[0].replace(ER_QUERY_RE,encodeURIComponent(b));c=c.replace(ER_RANK_RE,"rs");window.open(c,"newwindow")}function ER_onQueryClick(){var b=this.id.match(ER_NUM_RE);ER_doDetailSearch(b)}function ER_highlightDiv(){this.className="q_highlight"}function ER_unHightlightDiv(){this.className="q_inactive"}
function ER_tracking(b,c){b=b?b:window.event;b=b.srcElement?b.srcElement:b.target;b=b.className;if(b!="gs-title")return true;ER_sendTracking("/rebang/tracking?type="+c)}function ER_sendTracking(b){try{var c=new Image;c.src=b;c.onload=function(){}}catch(d){}}var _ER_doDetailSearch=ER_doDetailSearch,_ER_switchQueryListPage=ER_switchQueryListPage,_ER_initExtendReading=ER_initExtendReading,_ER_doSearch=ER_doSearch,_ER_tracking=ER_tracking,_ER_searchWeb=ER_searchWeb,_ER_updateRelatedQueries=ER_updateRelatedQueries;var Z2_numSearches_=0;function Z2_initializeAjaxSearchers(b){Z2_searchControl(b)}function Z2_searchControl(b){Z2_searchControl.prototype.Z2_startSearch("web");Z2_searchControl.prototype.Z2_startSearch("news");Z2_numSearches_=2;var c=new GwebSearch;c.setSearchCompleteCallback(this,Z2_searchControl.prototype.Z2_searchComplete,["web",c,3]);c.execute(b);c=new GnewsSearch;c.setSearchCompleteCallback(this,Z2_searchControl.prototype.Z2_searchComplete,["news",c,4]);c.execute(b)}
Z2_searchControl.prototype.Z2_startSearch=function(b){b=document.getElementById(b+"control");b.firstChild&&b.removeChild(b.firstChild);b.innerHTML="Loading..."};
Z2_searchControl.prototype.Z2_searchComplete=function(b,c,d){var e=document.getElementById(b+"control");e.firstChild&&e.removeChild(e.firstChild);b=createDiv("","gsc-results gsc-"+b+"Result");b.setAttribute("style","display:block");e.appendChild(b);if(c.results&&c.results.length>0){e.parentNode.style.display="";d=d>c.results.length?c.results.length:d;for(e=0;e<d;e++){var g=createDiv("","gsc-result"),f=c.results[e];if(f.html){f=f.html.cloneNode(true);g.appendChild(f);b.appendChild(g)}}d=createDiv("",
"gsc-trailing-more-results");e=document.createElement("a");c=c.gwsUrl.replace(/source=uds/g,"source=billboard_site&sourceid=uds");c=c.replace(/.google.com/g,".google.cn");e.setAttribute("href",c);e.setAttribute("target","_blank");e.innerHTML="\u66f4\u591a\u7ed3\u679c";e.className="gsc-trailing-more-results";d.appendChild(e);b.appendChild(d)}else e.parentNode.style.display="none";Z2_numSearches_--;Z2_numSearches_==0&&adjustHeight()};
function createDiv(b,c){var d=document.createElement("div");if(b)d.innerHTML=b;if(c)d.className=c;return d}
function adjustHeight(){var b=$("querylist_panel"),c=$("result_panel"),d=$("querylist_align"),e=$("result_align");b=b.scrollHeight-d.scrollHeight;var g=c.scrollHeight-e.scrollHeight;c=0;c=b>g?b:g;if(c<675)c=675;if(c>g){g=c-g+"px";e.style.lineHeight=g;e.style.height=g;e.style.display=""}else{e.style.display="none";e.style.height="0"}if(c>b){g=c-b+"px";d.style.lineHeight=g;d.style.height=g;d.style.display=""}else{d.style.display="none";d.style.height="0"}};var goog=goog||{};goog.global=this;goog.DEBUG=true;goog.LOCALE="zh-CN";goog.evalWorksForGlobals_=null;goog.provide=function(b){goog.exportPath_(b)};goog.exportPath_=function(b,c,d){b=b.split(".");d=d||goog.global;!(b[0]in d)&&d.execScript&&d.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)if(!b.length&&goog.isDef(c))d[e]=c;else d=d[e]?d[e]:(d[e]={})};goog.getObjectByName=function(b,c){b=b.split(".");c=c||goog.global;for(var d;d=b.shift();)if(c[d])c=c[d];else return null;return c};
goog.globalize=function(b,c){c=c||goog.global;for(var d in b)c[d]=b[d]};goog.addDependency=function(){};goog.require=function(){};goog.useStrictRequires=false;goog.basePath="";goog.nullFunction=function(){};goog.identityFunction=function(){return arguments[0]};goog.abstractMethod=function(){throw Error("unimplemented abstract method");};goog.addSingletonGetter=function(b){b.getInstance=function(){return b.instance_||(b.instance_=new b)}};
goog.typeOf=function(b){var c=typeof b;if(c=="object")if(b){if(b instanceof Array||!(b instanceof Object)&&Object.prototype.toString.call(b)=="[object Array]"||typeof b.length=="number"&&typeof b.splice!="undefined"&&typeof b.propertyIsEnumerable!="undefined"&&!b.propertyIsEnumerable("splice"))return"array";if(!(b instanceof Object)&&(Object.prototype.toString.call(b)=="[object Function]"||typeof b.call!="undefined"&&typeof b.propertyIsEnumerable!="undefined"&&!b.propertyIsEnumerable("call")))return"function"}else return"null";
else if(c=="function"&&typeof b.call=="undefined")return"object";return c};goog.propertyIsEnumerableCustom_=function(b,c){if(c in b)for(var d in b)if(d==c&&Object.prototype.hasOwnProperty.call(b,c))return true;return false};goog.propertyIsEnumerable_=function(b,c){return b instanceof Object?Object.prototype.propertyIsEnumerable.call(b,c):goog.propertyIsEnumerableCustom_(b,c)};goog.isDef=function(b){return b!==undefined};goog.isNull=function(b){return b===null};
goog.isDefAndNotNull=function(b){return b!=null};goog.isArray=function(b){return goog.typeOf(b)=="array"};goog.isArrayLike=function(b){var c=goog.typeOf(b);return c=="array"||c=="object"&&typeof b.length=="number"};goog.isDateLike=function(b){return goog.isObject(b)&&typeof b.getFullYear=="function"};goog.isString=function(b){return typeof b=="string"};goog.isBoolean=function(b){return typeof b=="boolean"};goog.isNumber=function(b){return typeof b=="number"};
goog.isFunction=function(b){return goog.typeOf(b)=="function"};goog.isObject=function(b){b=goog.typeOf(b);return b=="object"||b=="array"||b=="function"};goog.getHashCode=function(b){if(b.hasOwnProperty&&b.hasOwnProperty(goog.HASH_CODE_PROPERTY_))return b[goog.HASH_CODE_PROPERTY_];b[goog.HASH_CODE_PROPERTY_]||(b[goog.HASH_CODE_PROPERTY_]=++goog.hashCodeCounter_);return b[goog.HASH_CODE_PROPERTY_]};goog.removeHashCode=function(b){"removeAttribute"in b&&b.removeAttribute(goog.HASH_CODE_PROPERTY_);try{delete b[goog.HASH_CODE_PROPERTY_]}catch(c){}};
goog.HASH_CODE_PROPERTY_="closure_hashCode_"+Math.floor(Math.random()*2147483648).toString(36);goog.hashCodeCounter_=0;goog.cloneObject=function(b){var c=goog.typeOf(b);if(c=="object"||c=="array"){if(b.clone)return b.clone.call(b);c=c=="array"?[]:{};for(var d in b)c[d]=goog.cloneObject(b[d]);return c}return b};
goog.bind=function(b,c){var d=c||goog.global;if(arguments.length>2){var e=Array.prototype.slice.call(arguments,2);return function(){var g=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(g,e);return b.apply(d,g)}}else return function(){return b.apply(d,arguments)}};goog.partial=function(b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=Array.prototype.slice.call(arguments);d.unshift.apply(d,c);return b.apply(this,d)}};
goog.mixin=function(b,c){for(var d in c)b[d]=c[d]};goog.now=Date.now||function(){return+new Date};
goog.globalEval=function(b){if(goog.global.execScript)goog.global.execScript(b,"JavaScript");else if(goog.global.eval){if(goog.evalWorksForGlobals_==null){goog.global.eval("var _et_ = 1;");if(typeof goog.global._et_!="undefined"){delete goog.global._et_;goog.evalWorksForGlobals_=true}else goog.evalWorksForGlobals_=false}if(goog.evalWorksForGlobals_)goog.global.eval(b);else{var c=goog.global.document,d=c.createElement("script");d.type="text/javascript";d.defer=false;d.appendChild(c.createTextNode(b));
c.body.appendChild(d);c.body.removeChild(d)}}else throw Error("goog.globalEval not available");};goog.typedef=true;goog.getCssName=function(b,c){b=b+(c?"-"+c:"");return goog.cssNameMapping_&&b in goog.cssNameMapping_?goog.cssNameMapping_[b]:b};goog.setCssNameMapping=function(b){goog.cssNameMapping_=b};goog.getMsg=function(b,c){c=c||{};for(var d in c)b=b.replace(new RegExp("\\{\\$"+d+"\\}","gi"),c[d]);return b};goog.exportSymbol=function(b,c,d){goog.exportPath_(b,c,d)};
goog.exportProperty=function(b,c,d){b[c]=d};goog.inherits=function(b,c){function d(){}d.prototype=c.prototype;b.superClass_=c.prototype;b.prototype=new d;b.prototype.constructor=b};
goog.base=function(b,c){var d=arguments.callee.caller;if(d.superClass_)return d.superClass_.constructor.apply(b,Array.prototype.slice.call(arguments,1));for(var e=Array.prototype.slice.call(arguments,2),g=false,f=b.constructor;f;f=f.superClass_&&f.superClass_.constructor)if(f.prototype[c]===d)g=true;else if(g)return f.prototype[c].apply(b,e);if(b[c]===d)return b.constructor.prototype[c].apply(b,e);else throw Error("goog.base called from a method of one name to a method of a different name");};
goog.MODIFY_FUNCTION_PROTOTYPES=true;
if(goog.MODIFY_FUNCTION_PROTOTYPES){Function.prototype.bind=function(b){if(arguments.length>1){var c=Array.prototype.slice.call(arguments,1);c.unshift(this,b);return goog.bind.apply(null,c)}else return goog.bind(this,b)};Function.prototype.partial=function(){var b=Array.prototype.slice.call(arguments);b.unshift(this,null);return goog.bind.apply(null,b)};Function.prototype.inherits=function(b){goog.inherits(this,b)};Function.prototype.mixin=function(b){goog.mixin(this.prototype,b)}};var GM_curQuery_=-1,GM_curCat_=-1,GM_msgs_,GM_stp_,GM_popupMenuShowed_=false,GM_NUM_RE=/\d+/g,GM_SOURCE_LINKS=[["\u8c37\u6b4c","http://www.google.cn"],["\u77ed\u8da3\u7f51","http://www.danqoo.com"]];
function GM_buildMsgList(b,c,d){b[b.length-1]==null&&b.pop();GM_msgs_=b;b=createElement("div","ql");for(var e=0;e<GM_msgs_.length;e++){var g=GM_msgs_[e][0];g=g.replace(/^\s*/,"").replace(/\s*$/,"");if(!(g.length<5)){g=createElement("div","q_"+e,"q_inactive");g.onclick=GM_onMsgClick;g.onmouseover=ER_highlightDiv;g.onmouseout=ER_unHightlightDiv;var f=createElement("span","q_rank","bottom_border l center c");f.appendChild(document.createTextNode(""+(e+c)));f.style.width="25px";f.style.height="50px";
g.appendChild(f);f=createElement("span","q_msg","bottom_border l");f.appendChild(document.createTextNode(GM_msgs_[e][0]));f.style.height="50px";g.appendChild(f);b.appendChild(g)}}Dom.replace(b,$("ql"));GM_activeMsg(d-c)}
function GM_activeMsg(b){if(GM_curQuery_!=b){var c=$("q_"+GM_curQuery_);if(c!=null){c.className="q_inactive";c.onmouseover=ER_highlightDiv;c.onmouseout=ER_unHightlightDiv}GM_curQuery_=b;c=$("q_"+GM_curQuery_);c.className="q_active";c.onmouseover=null;c.onmouseout=null;$("stp-hash").value=GM_msgs_[b][1];$("stp-text").value=GM_msgs_[b][0];$("stp-text-show").innerHTML=GM_msgs_[b][0];GM_reset();GM_stp_=new SendToPhoneClient("/sendtophone",new DefaultSTPResponseHandler);GM_stp_.get("rebang");b=parseInt(GM_msgs_[b][2]);
if(b==0)$("source-control").className="invisible";else{$("source-control").className="visible";$("source-link").innerHTML=GM_SOURCE_LINKS[b][0];$("source-link").href=GM_SOURCE_LINKS[b][1]}urchinTracker("/rebang/tracking/msg/selmsg?lable="+GM_curCat_+"&start="+GM_curQuery_)}}function GM_onMsgClick(){var b=this.id.match(GM_NUM_RE);GM_activeMsg(b)}
function GM_buildLabelList(b,c,d,e,g,f){GM_curCat_=g;b[b.length-1]==null&&b.pop();c[c.length-1]==null&&c.pop();d[d.length-1]==null&&d.pop();e[e.length-1]==null&&e.pop();var h=b.length;if(h>10)h=8;for(var j="",i=0;i<h;i++){j+='<div style="width:65px;text-align:center;" class="l cat_tab ';j+=f==c[i]?"cat_tab_active":"cat_tab_inactive";j+='">';j+=f==c[i]?b[i]:'<a href="/rebang/msg?label='+c[i]+'">'+b[i]+"</a>";j+="</div>"}for(i=h;i<b.length;i++)if(f==c[i]){j+='<div style="width:65px;text-align:center;" class="l cat_tab cat_tab_active">';
j+=b[i];j+="</div>";break}if(h<b.length){j+='<div style="width:65px;text-align:center;" class="l cat_tab cat_tab_inactive">';j+='<a id="more-menu" onclick="_GM_showPopupMenu();">\u66f4\u591a</a>';j+='<div id="popup-menu" style="visibility:hidden;z-index:1000; position:absolute; background:#FFF;border-style:solid; border-width:1px;border-color:#c9d7f1 #3366cc #3366cc #a2bae7;width:65px; text-align:left;">';for(i=h;i<b.length;i++)if(f!=c[i])j+='<div style="padding-left:10px"><a href="/rebang/msg?label='+
c[i]+'">'+b[i]+"</a></div>";j+="</div>";j+="</div>"}$("labels").innerHTML=j;if(d.length>0)$("sublabels").style.display="";else $("sublabels").style.display="none";j="";for(i=0;i<d.length;i++){if(j.length>0)j+='<div class="l" style="padding:0 10px;">|</div>';j+='<div style="text-align:center;" class="l">';j+=g==e[i]?d[i]:'<a href="/rebang/msg?label='+e[i]+'">'+d[i]+"</a>";j+="</div>"}$("sublabels").innerHTML=j}
function GM_showPopupMenu(){if(GM_popupMenuShowed_){var b=$("popup-menu");b.style.visibility="hidden"}else{b=$("more-menu");for(var c=0,d=0;b!=null;){d+=b.offsetTop;c+=b.offsetLeft;b=b.offsetParent}b=$("popup-menu");b.style.left=c;b.style.top=d;b.style.visibility=""}GM_popupMenuShowed_=!GM_popupMenuShowed_}
function GM_post(){GM_stp_=new SendToPhoneClient("/sendtophone",new DefaultSTPResponseHandler);$("stp-vc-sent").style.display="none";GM_stp_.post();urchinTracker("/rebang/tracking/msg/sendmsg?lable="+GM_curCat_+"&start="+GM_curQuery_)}
function GM_getVerificationCode(){var b=$("stp-number").value;if(b.match(/^(\+86)?1[\d]{10}$/)){GM_stp_=new SendToPhoneClient("/sendtophone",new DefaultSTPResponseHandler);$("stp-landing").style.display="none";$("stp-captcha").style.display="";$("cellphone-number").innerHTML=b;GM_stp_.get("verification");urchinTracker("/rebang/tracking/msg/getvc?lable="+GM_curCat_+"&start="+GM_curQuery_)}else{$("stp-error-mobile-user-id").style.display="";$("stp-error-mobile-user-id").innerHTML="\u8bf7\u8f93\u5165\u60a8\u7684\u624b\u673a\u53f7\u7801."}}
function GM_sendVerificationCode(){GM_stp_.sendVerificationCode();urchinTracker("/rebang/tracking/msg/sendvc?lable="+GM_curCat_+"&start="+GM_curQuery_)}
function GM_reset(){$("stp-landing").style.display="";$("stp-success").style.display="none";$("stp-vc-sent").style.display="none";$("stp-error-general").innerHTML="";$("stp-error-text-to-send").innerHTML="";$("stp-error-mobile-user-id").innerHTML="";$("stp-error-mobile-user-id-1").innerHTML="";$("stp-error-carrier").innerHTML="";$("stp-vc-error").innerHTML="";$("stp-captcha").style.display="none";$("stp-captcha-error").innerHTML="";$("stp-captcha-answer").value="";$("stp-captcha-image").src=""}
var _GM_buildMsgList=GM_buildMsgList,_GM_buildLabelList=GM_buildLabelList,_GM_post=GM_post,_GM_reset=GM_reset,_GM_sendVerificationCode=GM_sendVerificationCode,_GM_getVerificationCode=GM_getVerificationCode,_GM_showPopupMenu=GM_showPopupMenu;function SendToPhoneClient(b,c){this.url=b;this.responseHandler=c;this.elements={};for(var d in SendToPhoneClient.ElementId){b=document.getElementById(SendToPhoneClient.ElementId[d]);if(!b)throw new Error("Document must contain an element with id "+SendToPhoneClient.ElementId[d]);this.elements[SendToPhoneClient.ElementId[d]]=b}}SendToPhoneClient.ElementId={CLIENT:"stp-client",LANGUAGE:"stp-hl",LOCALE:"stp-gl",LANDING:"stp-landing",COMMON:"stp-common",CAPTCHA:"stp-captcha"};a=SendToPhoneClient.prototype;
a.makeServiceHandler=function(b){var c=this;b.onreadystatechange=function(){if(b.readyState==4){c.debug(b.responseText);var d=eval("("+b.responseText+")");if(d.success){c.responseHandler.onSuccess();urchinTracker("/rebang/tracking/msg/msgsendok")}else if(d.errorGeneral)c.responseHandler.onError(SendToPhoneClient.ErrorType.GENERAL,d.errorGeneralId,d.errorGeneral);else if(d.errorVerificationCode)c.responseHandler.onError(SendToPhoneClient.ErrorType.VERIFICATION_CODE,d.errorVerificationCodeId,d.errorVerificationCode);
else if(d.errorMobileUserId){c.responseHandler.onError(SendToPhoneClient.ErrorType.MOBILE_USER_ID,d.errorMobileUserIdId,d.errorMobileUserId);c.responseHandler.onError(SendToPhoneClient.ErrorType.MOBILE_USER_ID_1,d.errorMobileUserIdId,d.errorMobileUserId)}else if(d.errorTextToSend)c.responseHandler.onError(SendToPhoneClient.ErrorType.TEXT_TO_SEND,d.errorTextToSendId,d.errorTextToSend);else d.errorCarrier?c.responseHandler.onError(SendToPhoneClient.ErrorType.CARRIER,d.errorCarrierId,d.errorCarrier):
c.responseHandler.onLanding(c.createCaptcha(d),d.carrier,d.mobileUserId)}};return true};
a.makeSendVCServiceHandler=function(b){var c=this;b.onreadystatechange=function(){if(b.readyState==4){c.debug(b.responseText);var d=eval("("+b.responseText+")");if(d.success){_GM_reset();document.getElementById("stp-vc-sent").style.display="";urchinTracker("/rebang/tracking/msg/vcsendok")}else if(d.errorGeneral)c.responseHandler.onError(SendToPhoneClient.ErrorType.GENERAL,d.errorGeneralId,d.errorGeneral);else if(d.errorVerificationCode)c.responseHandler.onError(SendToPhoneClient.ErrorType.VERIFICATION_CODE,d.errorVerificationCodeId,
d.errorVerificationCode);else if(d.errorMobileUserId){c.responseHandler.onError(SendToPhoneClient.ErrorType.MOBILE_USER_ID,d.errorMobileUserIdId,"");c.responseHandler.onError(SendToPhoneClient.ErrorType.MOBILE_USER_ID_1,d.errorMobileUserIdId,d.errorMobileUserId)}else if(d.errorTextToSend)c.responseHandler.onError(SendToPhoneClient.ErrorType.TEXT_TO_SEND,d.errorTextToSendId,d.errorTextToSend);else d.errorCarrier?c.responseHandler.onError(SendToPhoneClient.ErrorType.CARRIER,d.errorCarrierId,d.errorCarrier):
c.responseHandler.onLanding(c.createCaptcha(d),d.carrier,d.mobileUserId)}};return true};
a.get=function(b){var c=this.createRequest();this.makeServiceHandler(c);var d=this.url;d+="?client="+escape(this.elements[SendToPhoneClient.ElementId.CLIENT].value);d+="&hl="+escape(this.elements[SendToPhoneClient.ElementId.LANGUAGE].value);d+="&gl="+escape(this.elements[SendToPhoneClient.ElementId.LOCALE].value);d+="&source="+escape(b);if(b=document.getElementById("stp-number"))d+="&mobile_user_id="+encodeURIComponent(b.value);c.open("GET",d,true);c.send(null)};
a.post=function(){var b=this.createRequest();this.makeServiceHandler(b);var c=this.getParameterString(SendToPhoneClient.ElementId.LANDING),d=encodeURIComponent(document.getElementById("stp-number").value);c=c.replace(/&from=[^&]*&/g,"&from="+d+"&");c+="&source=rebang";b.open("POST",this.url,true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.setRequestHeader("Content-length",c.length);b.setRequestHeader("Connection","close");b.send(c);this.responseHandler.onSubmit();return false};
a.sendVerificationCode=function(){var b=this.createRequest();this.makeSendVCServiceHandler(b);var c=this.getParameterString(SendToPhoneClient.ElementId.CAPTCHA);c=c+"&mobile_user_id="+encodeURIComponent(document.getElementById("cellphone-number").innerHTML)+"&from="+encodeURIComponent(document.getElementById("cellphone-number").innerHTML)+"&source=verification";b.open("POST",this.url,true);b.setRequestHeader("Content-type","application/x-www-form-urlencoded");b.setRequestHeader("Content-length",c.length);
b.setRequestHeader("Connection","close");b.send(c);this.responseHandler.onSubmit();return false};a.getParameterString=function(b){var c,d=[];c=this.elements[SendToPhoneClient.ElementId.COMMON];var e=c.getElementsByTagName("input");for(c=0;c<e.length;++c)d.push(e[c].name+"="+window.encodeURIComponent(e[c].value));c=this.elements[b];e=c.getElementsByTagName("input");for(c=0;c<e.length;++c)d.push(e[c].name+"="+window.encodeURIComponent(e[c].value));return d.join("&")};
a.createRequest=function(){try{if(typeof ActiveXObject!="undefined")return new ActiveXObject("Microsoft.XMLHTTP");else if(window.XMLHttpRequest)return new XMLHttpRequest}catch(b){}return null};a.createCaptcha=function(b){if(!b.urlCaptcha)return null;var c={};c.url=b.urlCaptcha;c.width=b.captchaWidth;c.height=b.captchaHeight;c.error=b.errorCaptcha;c.encryptedAnswer=b.encrypted_captcha_answer;return c};
SendToPhoneClient.ErrorType={CARRIER:"stp-error-carrier",GENERAL:"stp-error-general",MOBILE_USER_ID:"stp-error-mobile-user-id",MOBILE_USER_ID_1:"stp-error-mobile-user-id-1",TEXT_TO_SEND:"stp-error-text-to-send",VERIFICATION_CODE:"stp-vc-error"};SendToPhoneClient.prototype.debug=function(b){var c=document.getElementById("stp-json");if(c)c.innerHTML=b};
function DefaultSTPResponseHandler(){this.elements={};for(var b in DefaultSTPResponseHandler.ElementIds){var c=document.getElementById(DefaultSTPResponseHandler.ElementIds[b]);if(!c)throw new Error("Document must contain an element with id "+DefaultSTPResponseHandler.ElementId[b]);this.elements[DefaultSTPResponseHandler.ElementIds[b]]=c}}
DefaultSTPResponseHandler.ElementIds={CAPTCHA:"stp-captcha",CAPTCHA_ANSWER:"stp-encrypted-captcha-answer",CAPTCHA_ERROR:"stp-captcha-error",CAPTCHA_IMAGE:"stp-captcha-image",CARRIER:"stp-carrier",CARRIER_ERROR:SendToPhoneClient.ErrorType.CARRIER,CARRIERS:"stp-carriers",LANDING:"stp-landing",NUMBER:"stp-number",SUCCESS:"stp-success",GENERAL_ERROR:SendToPhoneClient.ErrorType.GENERAL,MOBILE_USER_ID_ERROR:SendToPhoneClient.ErrorType.MOBILE_USER_ID,TEXT_TO_SEND_ERROR:SendToPhoneClient.ErrorType.TEXT_TO_SEND};
DefaultSTPResponseHandler.prototype.onSuccess=function(){setDisplayStyle(this.elements[DefaultSTPResponseHandler.ElementIds.LANDING],"none");setDisplayStyle(this.elements[DefaultSTPResponseHandler.ElementIds.SUCCESS],"")};DefaultSTPResponseHandler.prototype.onError=function(b,c,d){if(b=document.getElementById(b)){b.innerHTML=d;b.style.display=""}};
DefaultSTPResponseHandler.prototype.onLanding=function(b,c,d){if(b){this.elements[DefaultSTPResponseHandler.ElementIds.CAPTCHA_IMAGE].src=b.url;this.elements[DefaultSTPResponseHandler.ElementIds.CAPTCHA_ANSWER].value=b.encryptedAnswer;if(b.error){c=this.elements[DefaultSTPResponseHandler.ElementIds.CAPTCHA_ERROR];c.innerHTML=b.error;setDisplayStyle(c,"")}}if(d)this.elements[DefaultSTPResponseHandler.ElementIds.NUMBER].value=d};
DefaultSTPResponseHandler.prototype.onSubmit=function(){for(var b in SendToPhoneClient.ErrorType){var c=document.getElementById(SendToPhoneClient.ErrorType[b]);setDisplayStyle(c,"none")}setDisplayStyle(this.elements[DefaultSTPResponseHandler.ElementIds.CAPTCHA_ERROR],"none")};function setDisplayStyle(b,c){if(b)b.style.display=c}window.SendToPhoneClient=SendToPhoneClient;window.DefaultSTPResponseHandler=DefaultSTPResponseHandler;var JSCompiler_inline_pSendToPhoneClient_70=SendToPhoneClient.prototype;
JSCompiler_inline_pSendToPhoneClient_70.post=JSCompiler_inline_pSendToPhoneClient_70.post;
