代码改变世界
2009-02-19 21:55
贪婪的小猪
阅读(340)
评论()
编辑
收藏
举报
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
<script language="javascript" type="text/javascript">![](https://www.cnblogs.com/Images/dot.gif)
var MiniSite=new Object();
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MiniSite.Browser=
{
ie:/msie/.test(window.navigator.userAgent.toLowerCase()),
moz:/gecko/.test(window.navigator.userAgent.toLowerCase()),
opera:/opera/.test(window.navigator.userAgent.toLowerCase()),
safari:/safari/.test(window.navigator.userAgent.toLowerCase())
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MiniSite.$=function(s)
{
return(typeof s=='object')?s:document.getElementById(s);
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MiniSite.JsLoader=
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
load:function(sUrl,fCallback)
{
var _script=document.createElement('script');
_script.setAttribute('charset','gb2312');
_script.setAttribute('type','text/javascript');
_script.setAttribute('src',sUrl);
document.getElementsByTagName('head')[0].appendChild(_script);
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(MiniSite.Browser.ie)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
_script.onreadystatechange=function()
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(this.readyState=='loaded'||this.readyState=='complete')
{
fCallback();
}
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else if(MiniSite.Browser.moz)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
_script.onload=function()
{
fCallback();
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else
{
fCallback();
}
}
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MiniSite.Cookie=
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
set:function(name,value,expires,path,domain)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(typeof expires=="undefined")
{
expires=new Date(new Date().getTime()+24*3600*100);
}
document.cookie=name+"="+escape(value)+((expires)?"; expires="+expires.toGMTString():"")+((path)?"; path="+path:"; path=/")+((domain)?";domain="+domain:"");
},
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
get:function(name)
{
var arr=document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(arr!=null)
{
return unescape(arr[2]);
}
return null;
},
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
clear:function(name,path,domain)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(this.get(name))
{
document.cookie=name+"="+((path)?"; path="+path:"; path=/")+((domain)?"; domain="+domain:"")+";expires=Fri, 02-Jan-1970 00:00:00 GMT";
}
}
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MiniSite.Home=
{
defaultprovince:4,
timelapse:null,
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
Provinc:
{"北京市":4,"上海市":28,"天津市":5,"重庆市":19,"香港":32,"澳门":33,"台湾省":31,"云南省":20,"内蒙古":9,"吉林省":2,"四川省":18,"宁夏":14,"安徽省":26,"山东省":8,"山西省":15,"广东省":0,"广西":22,"新疆":10,"江苏省":17,"江西省":27,"河北省":6,"河南省":7,"浙江省":29,"海南省":23,"湖北省":25,"湖南省":24,"甘肃省":12,"福建省":30,"西藏":11,"贵州省":21,"辽宁省":3,"陕西省":16,"青海":13,"黑龙江省":1},
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
insertFlash:function(elm,url,w,h)
{
if(!document.getElementById(elm))
return;
var str='';
str+='<object width="'+w+'" height="'+h+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0">';
str+='<param name="movie" value="'+url+'">';
str+='<param name="wmode" value="transparent">';
str+='<param name="quality" value="autohigh">';
str+='<param name="allowScriptAccess" value="always" > ';
str+='<embed width="'+w+'" height="'+h+'" src="'+url+'" quality="autohigh" wmode="opaque" type="application/x-shockwave-flash" plugspace="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>';
str+='</object>';
document.getElementById(elm).innerHTML=str;
},
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
_print:function(province)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
try
{setdef();}catch(e)
{}
},
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
print:function()
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
var ok=function()
{
MiniSite.Home._print();
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(!MiniSite.Cookie.get("QQ_IPAddress"))
{
MiniSite.Home.timelapse=setTimeout(ok,20000);
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
MiniSite.JsLoader.load("http://fw.qq.com:80/ipaddress",function()
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(MiniSite.Home.timelapse!=null)
{
clearTimeout(MiniSite.Home.timelapse);
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(typeof IPData!="undefined")
{
MiniSite.Cookie.set('QQ_IPAddress',IPData[2]+','+IPData[3]);
MiniSite.Home._print(IPData[2]);
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else
{
MiniSite.Home._print();
}
});
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else
{
var ipAddress=MiniSite.Cookie.get("QQ_IPAddress");
var ipAddressArr=ipAddress.split(",");
return MiniSite.Home._print(ipAddressArr[0]);
}
}
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(!MiniSite.Cookie.get("QQ_IPAddress"))
{MiniSite.Home.print();}
window.onerror = function()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
return true;
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
if (!window._sT)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{window._sT = window.setTimeout;window.setTimeout = function(fCallback, nDelay, oObject)
{if (typeof fCallback == 'function')
{if (!oObject)
{oObject = window;}var argu = Array.prototype.slice.call(arguments, 3);var newFunc = (function()
{ fCallback.apply(oObject, argu); }); return window._sT(newFunc, nDelay); }return window._sT(fCallback, nDelay);};}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
var marTime = new Array();
var marWay = new Array();
var moveTime = new Array();
moveTime[0] = 0;
moveTime[1] = 0;
var speed = 30;
var fodTime = 0;
var proFlog = 0;
var proTime = 0;
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
var gh=window.location.host;
var gu=gh?"http://"+gh:"http://www.qq.com";gp=[];gp["News"]=["2","/site/area/area_bj.htm"];gp["Sports"]=["2","/site/sports/nbainfon.htm"];gp["blog"]=["2","/public/publicn/bb3in1.htm"];gp["ent"]=["2","/site/ent/musicinfon.htm"];gp["finance"]=["2","/site/finance/stockinfon.htm"];gp["book"]=["3","/site/book/bookinfon2.htm","/site/book/bookinfon3.htm"];gp["tech"]=["2","/site/digi/digiinfon.htm"];gp["game"]=["3","/oprtn/qqgame/qqgameinfon.htm","/sms/sms_gamen.htm"];gp["car"]=["2","/site/house/houseinfon.htm"];gp["lady"]=["3","/site/cheaa/cheaainfon.htm","/site/astro/astroinfon.htm"];gp["edu"]=["3","/site/kid/kidinfon.htm","/site/baby/babyinfon.htm"];gp["comic"]=["3","/site/joke/jokeinfon.htm","/site/flash/flashinfon.htm"];gp["adAreaB"]=["3","/qqad/qqadn/card_adcon2.htm","/qqad/qqadn/card_adcon3.htm"];
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function $(o)
{ return (typeof o == "object")?o:document.getElementById(o);}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function CreatAjax(a,b,c)
{var obj=CreatXmlRequest();obj.open('GET', a);obj.setRequestHeader("If-Modified-Since","0");obj.send(null);obj.onreadystatechange = function()
{if(obj.readyState == 4 && obj.status == 200)
{b(c,obj.responseText);}}}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function CreatXmlRequest()
{var obj = null;try
{obj = new XMLHttpRequest();} catch (e)
{try
{obj = new ActiveXObject("Msxml2.XMLHTTP");} catch (e)
{obj = new ActiveXObject("Microsoft.XMLHTTP");}}return obj;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function parseInfo(a,b,c)
{a.obj.innerHTML=b;swLabs(a.obj,a.sid,a.snum);}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function swTabs(e)
{if(typeof e=="string")
{e=$(e);}var isAjax,gPath,sobject;var cls="s";if(e.id!="defTail"&&e.id!="tailorxxx")
{var tmp=e.id.split("_");var sid=tmp[0];var snum=tmp[1];gPath=gu+gp[sid][snum-1];sobject=$(sid+"_"+snum+"_Info");}else if(e.id=="defTail")
{sid=e.id;snum=1;sobject=$("defTailInfo");}else if(e.id=="tailorxxx")
{sid=e.id;snum=2;gPath=gu+gp["News"][snum-1];sobject=$("tailorInfo");if(e.className=="s0"||e.className=="s1")
{cls="s1";}}e.className=cls;if(snum!=1)
{if(sobject.innerHTML=="")
{CreatAjax(gPath,parseInfo,
{obj:sobject,sid:sid,snum:snum});isAjax=true;}}if(!isAjax)
{swLabs(sobject,sid,snum)}tmp=gPath=sobject=isAjax=maxItemNum=null;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function swLabs(sobject,sid,snum)
{var maxItemNum;var tailorxxx=$("tailorxxx");var cls="";try
{var i=1;maxItemNum=(sid=="defTail"||sid=="tailorxxx")?gp["News"][0]:gp[sid][0];while(i<=maxItemNum)
{if(i!=snum)
{var tmp1,tmp2;if(sid=="defTail")
{tmp1=tailorxxx;tmp2=$("tailorInfo");if(tailorxxx.className=="s0"||tailorxxx.className=="s1")
{cls="s0";}}else if(sid=="tailorxxx")
{tmp1=$("defTail");tmp2=$("defTailInfo");if(tailorxxx.className=="s0"||tailorxxx.className=="s1")
{tailorxxx.className="s1";}}else
{tmp1=$(sid+"_"+i);tmp2=$(sid+"_"+i+"_Info");}tmp1.className=cls;tmp2.className="undis";}i++}}catch(e)
{}sobject.className="dis";}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function loadNewsMap()
{MiniSite.Home.insertFlash("map","http://www.qq.com/map.swf",294,280);}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function tagOver(a)
{clearTimeout(fodTime);fodTime=0;fodTime = setTimeout(function()
{swTabs(a)},100);if(a.id=="defTail")
{$("map").className="undis";}if(a.id=="tailorxxx"&&$("map").innerHTML=="")
{setTimeout(function()
{loadNewsMap();},300);}}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function tagOut(a)
{clearTimeout(fodTime);fodTime=0;}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function getNames(obj,name,tij)
{var plist = $(obj).getElementsByTagName(tij);var rlist = new Array();for(i=0;i<plist.length;i++)
{if(plist[i].getAttribute("name") == name)
{rlist[rlist.length] = plist[i];}}return rlist;}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function cplay()
{var o,n,t,na,c1,c2;o = $(arguments[0]);num=arguments[1];t=arguments[2];n=arguments[3];c1=arguments[4];c2=arguments[5];var f=getNames(o,n,t);for(i=0;i<f.length;i++)
{if(i == num)
{f[i].className = c1;}else
{f[i].className = c2;}}}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function formatPageZone()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var o1=$(arguments[0]);var o2=$(arguments[0]+"Info");var t1=arguments[1];var n1=arguments[2];var t2=arguments[3];var n2=arguments[4];var c1,c2,c3,c4,c5; if(arguments.length>5)
{c1=arguments[5];c2=arguments[6];c3=arguments[7];c4=arguments[8];c5=arguments[9]} else
{c1="s";c2="";c3="dis";c4="undis"}var f=getNames(o1,n1,t1);for(i=0;i<f.length;i++)
{f[i].value = i;f[i].onclick=function()
{fod(o1,o2,this.value,t1,n1,t2,n2,c1,c2,c3,c4)}; f[i].onmouseover=function()
{cplay(o1,this.value,t1,n1,c5,c2);};f[i].onmouseout=function()
{cplay(o1,this.value,t1,n1,c2,c5);}}}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function send_request(url)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{http_request = false;if(window.XMLHttpRequest)
{http_request = new XMLHttpRequest();if(http_request.overrideMimeType)
{http_request.overrideMimeType('text/xml');} }else if (window.ActiveXObject)
{try
{ http_request = new ActiveXObject("Msxml2.XMLHTTP");}catch (e)
{try
{ http_request = new ActiveXObject("Microsoft.XMLHTTP"); }catch (e)
{}}}if (!http_request)
{window.alert("不能创建XMLHttpRequest对象实例.");return false; }http_request.onreadystatechange = loadPage; http_request.open("GET", url, true); http_request.send(null);}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function loadPage()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var ChangeInfo=$("tailorInfo");if(http_request.readyState == 4)
{var xmldom = http_request.responseXML;var map = $("map");if(xmldom.documentElement.text)
{ ChangeInfo.innerHTML = xmldom.documentElement.text;}else
{ChangeInfo.innerHTML = xmldom.documentElement.textContent;}/**//*$("tailorArrow").onclick = function(){ if(map.className=="dis"){map.className="undis";}else{map.className="dis";}};$("tailorArrow").onmouseover = function(){this.className="io";}; $("tailorArrow").onmouseout = function(){this.className="i";};*/map.className="undis";}else
{ChangeInfo.innerHTML = "<div style='margin:40px auto;width:140px;text-center:center'>正在载入内容
.<br />请稍侯!</div>";}}
function tail()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var name = arguments[0];var tailorxxx = $("tailorxxx");var tailorTitle = $("tailorTitle");strings = "<!--<div>--><a href='"+area[name].l+"' target='_blank'>"+area[name].n+"</a><!--</div><div id='tailorArrow' class='i'></div>-->";tailorTitle.innerHTML = strings;if(area[name].n.length > 4)
{if($("defTail").className == "")
{tailorxxx.className = "s1";}else
{tailorxxx.className = "s0"; };}else
{if($("defTail").className == "")
{tailorxxx.className = "s";}else
{tailorxxx.className = "";};};send_request("http://www.qq.com/site/area/"+area[name].u);MiniSite.Cookie.set("Tencent",name);}
//重庆19、四川18、陕西16、湖北25、北京4、上海28、广东0
var _wip=/^(0|4|16|18|19|25|28)$/i;
function setdefSkin()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var n = MiniSite.Cookie.get("TencentSkin");if(n!=null)
{call_0410("UNKNOWN","skin",n);setSkin(n);}else
{call_0410("UNKNOWN","skin",0);}}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function setdef()
{
var n=MiniSite.Cookie.get("QQ_IPAddress");
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(n!=null)
{
//alert(MiniSite.Home.Provinc)
var p=n.split(",")[0];
n=MiniSite.Home.Provinc[p];
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(_wip.test(n))
{
$("tailorForIP").style.display="block";
tail(n);
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else
{
MiniSite.Home.print()
}
}
var json ="[{n:'广东新闻',u:'gd.xml',l:'http://gd.qq.com'},{n:'黑龙江新闻',u:'hlj.xml',l:'http://news.qq.com/hlj/index.htm'},{n:'吉林新闻',u:'jl.xml',l:'http://news.qq.com/jl/index.htm'},{n:'辽宁新闻',u:'ln.xml',l:'http://news.qq.com/ln/index.htm'},{n:'北京新闻',u:'bj.xml',l:'http://bj.qq.com'},{n:'天津新闻',u:'tj.xml',l:'http://news.qq.com/tj/index.htm'},{n:'河北新闻',u:'hb.xml',l:'http://news.qq.com/hebei/index.htm'},{n:'河南新闻',u:'hen.xml',l:'http://news.qq.com/henan/index.htm'},{n:'山东新闻',u:'sd.xml',l:'http://sd.qq.com'},{n:'内蒙古新闻',u:'nmg.xml',l:'http://news.qq.com/nmg/index.htm'},{n:'新疆新闻',u:'xj.xml',l:'http://news.qq.com/xj/index.htm'},{n:'西藏新闻',u:'xz.xml',l:'http://news.qq.com/xz/index.htm'},{n:'甘肃新闻',u:'gs.xml',l:'http://news.qq.com/gs/index.htm'},{n:'青海新闻',u:'qh.xml',l:'http://news.qq.com/qh/index.htm'},{n:'宁夏新闻',u:'nx.xml',l:'http://news.qq.com/nx/index.htm'},{n:'山西新闻',u:'sx.xml',l:'http://news.qq.com/sx/index.htm'},{n:'陕西新闻',u:'shanx.xml',l:'http://xian.qq.com'},{n:'江苏新闻',u:'jians.xml',l:'http://js.qq.com'},{n:'四川新闻',u:'sc.xml',l:'http://cd.qq.com'},{n:'重庆新闻',u:'cq.xml',l:'http://cq.qq.com'},{n:'云南新闻',u:'yn.xml',l:'http://news.qq.com/yn/index.htm'},{n:'贵州新闻',u:'gz.xml',l:'http://news.qq.com/gz/index.htm'},{n:'广西新闻',u:'gx.xml',l:'http://news.qq.com/gx/index.htm'},{n:'海南新闻',u:'hain.xml',l:'http://news.qq.com/hainan/index.htm'},{n:'湖南新闻',u:'hun.xml',l:'http://news.qq.com/hunan/index.htm'},{n:'湖北新闻',u:'hub.xml',l:'http://hb.qq.com'},{n:'安徽新闻',u:'ah.xml',l:'http://news.qq.com/ah/index.htm'},{n:'江西新闻',u:'jx.xml',l:'http://news.qq.com/jx/index.htm'},{n:'上海新闻',u:'sh.xml',l:'http://sh.qq.com'},{n:'浙江新闻',u:'zj.xml',l:'http://zj.qq.com'},{n:'福建新闻',u:'fj.xml',l:'http://news.qq.com/fj/index.htm'},{n:'福建新闻',u:'fj.xml',l:'http://news.qq.com/fj/index.htm'},{n:'广东新闻',u:'gd.xml',l:'http://gd.qq.com'},{n:'广东新闻',u:'gd.xml',l:'http://gd.qq.com'}]";
eval("area="+json);
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
var cssList = new Array("def/style_s_1ok.css","tint/style_s_2ok.css","blue/style_s_3ok.css","green/style_s_4ok.css","zhuyun/style_s_5ok.css","wash/style_s_6ok.css","star/style_s_7ok.css","festival/style_s_festival1.css","coffer/style_s_9ok.css","purple/style_s_10ok.css")
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function setSkin(n)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var css = $("cssChange");var cssurl = "http://www.qq.com/cssn/";cssurl +=cssList[n];css.href=cssurl;MiniSite.Cookie.set("TencentSkin",n);}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function formatSkin()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var p = $("SkinList").getElementsByTagName("li");var s = $("sar");for(i=0;i<p.length;i++)
{p[i].num = i;p[i].onclick = function()
{setSkin(this.num);}}s.onclick = function()
{ openSkin("sar","SkinList",140,56,2,0); };}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function _openSkin(o1,o2,max,min,speed,n)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{ return openSkin(o1,o2,max,min,speed,n);}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function _closeSkin(o1,o2,max,min,speed,n)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{ return closeSkin(o1,o2,max,min,speed,n);}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
//n=0 skin n=1 pro
function openSkin(o1,o2,max,min,speed,n)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var a = $(o1); var s = $(o2);var w = s.offsetWidth;var move=function()
{w+=speed;if(w>=max)
{w = max;s.style.width = w+"px"; if(moveTime[n])
{window.clearInterval(moveTime[n]);}if(n)
{$("pro_arrow").className = "al";$("pro_arrow").onclick = function()
{closeSkin(o1,o2,max,min,speed,n);} }else
{a.innerHTML = "<div class='s'><img src='http://img1.qq.com/news/pics/9471/9471252.gif' alt='收缩' /></div>";a.onclick = function()
{closeSkin(o1,o2,max,min,speed,n);}}}else
{s.style.width = w + "px";if(n)
{}else
{s.style.display = "block";};}};moveTime[n] = window.setInterval(move,5);}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function closeSkin(o1,o2,max,min,speed,n)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var a = $(o1);var s = $(o2);var w = s.offsetWidth;var move = function()
{w-=speed;if(w<=min)
{w = min;s.style.width = w + "px";if(n)
{ $("pro_arrow").className = "ar";$("pro_arrow").onclick = function()
{openSkin(o1,o2,max,min,speed,n);};}else
{a.innerHTML = "<div><img src='http://img1.qq.com/news/pics/9471/9471252.gif' alt='更多皮肤' /></div>";a.onclick = function()
{ openSkin(o1,o2,max,min,speed,n);} }; if(moveTime[n])
{window.clearInterval(moveTime[n]);}}else
{s.style.display = "block";s.style.width = w + "px";};};moveTime[n] = window.setInterval(move,5);}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function loadJS(url,load)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{
var _script = document.createElement('script');
_script.setAttribute('type','text/javascript');
_script.setAttribute('src',url);
document.getElementsByTagName('head')[0].appendChild(_script);
if(!load) return;
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(document.all)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
_script.onreadystatechange = function()
{
if (this.readyState=='loaded' || this.readyState=='complete')
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
load();
}
};
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
_script.onload = function()
{
load();
};
}
}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function loadPng(o)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{if(MiniSite.Browser.ie)
{try
{var img = o;var imgName = o.src.toUpperCase();if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{var imgID = (img.id) ? "id='" + img.id + "' " : "";var imgClass = (img.className) ? "class='" + img.className + "' " : "";var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";var imgStyle = "display:inline-block;" + img.style.cssText;if (img.align == "left") imgStyle = "float:left;" + imgStyle;if (img.align == "right") imgStyle = "float:right;" + imgStyle;if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle ; var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='image');\"></span>"; img.outerHTML = strNewHTML; }} catch (e)
{}}}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function call_0410(type,item,page)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{try
{var purl='';if (type == "A")
{purl = window.event.srcElement.href;}else if (type == "IMG")
{purl = window.event.srcElement.parentNode.href;};var iurl = 'http://trace.qq.com/collect?pj=1001&item='+item+'&page='+page+'&url='+purl+'&rnd='+Math.random();var img = new Image(1,1);img.onerror = function ()
{};img.src = iurl; } catch (e)
{}}
![](https://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif)
function register0410(item,page)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{try
{var type = window.event.srcElement.tagName;if (type == "A" || type == "IMG" )
{call_0410(type,item, page);}return true;}catch(e)
{}}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif)
</script><!--[if !IE]>|xGv00|826cc3a98a77c9971bd1360a302dd90f<![endif]-->
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
<body onload="document.execCommand('BackgroundImageCache',false,true)">
<script type="text/javascript" src="http://mat1.qq.com/js/speed_qqcom_v1.0-min.js"></script>
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
<script>![](https://www.cnblogs.com/Images/dot.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function SetHome(obj,vrl)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
try
{
obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
catch(e)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if(window.netscape)
{
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch (e)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{
alert("抱歉!您的浏览器不支持直接设为首页。请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为“true”,点击“加入收藏”后忽略安全提示,即可设置成功。");
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage',vrl);
}
}
}
</script>
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/None.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
<script type="text/javascript">![](https://www.cnblogs.com/Images/dot.gif)
var sosoInitHint="";var sosoCurrHighLight=$("sosoweb"),frm_head=$('frm_head'),delayId=null;var sosoTmpArr=['bfadb6fbccd8c8cb'];var sosoTmpArr2=['bfadb6fbccd8c8cb'];var sosoRandom=Math.floor(Math.random()*sosoTmpArr.length);sosoInitHint=sosoTmpArr[sosoRandom];sosoInitKw=sosoTmpArr2[sosoRandom];window.setTimeout(setFun,1);function setFun()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{return;frm_head=$('frm_head');frm_head.w.value=sosoInitHint;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
var sosoInitHint2=sosoInitHint;function trim(str)
{return str.replace(/(^\s*)|(\s*$)/g,"");}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function sosoValidate()
{wval=trim(frm_head.w.value);if((wval==sosoInitHint2)||(wval==sosoInitHint))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.w.value="";frm_head.w.style.color="#424242";if(frm_head.sc.value=="web")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.w.value=sosoInitKw;frm_head.action="http://www.soso.com/q";}
return true;}
if(frm_head.sc.value=="post")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.bn.value=frm_head.w.value;frm_head.op.value="entry";}
else if(frm_head.sc.value=="wenwen"&&wval!="")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{window.open("http://wenwen.soso.com/z/SearchSolved.e?cid=w.q.in.sb.ww&sp=S"+encodeURIComponent(frm_head.w.value),"_blank");return false;}
return true;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function delaySubSearch(sc)
{if(delayId)clearTimeout(delayId);delayId=setTimeout(function()
{sosoSubSearch(sc);},500);}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function cancelDelay()
{if(delayId)clearTimeout(delayId);}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function sosoSubSearch(sc)
{changePage(sc);frm_head.w.blur();frm_head.sc.value=sc;wval=trim(frm_head.w.value);if(sc=="img")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.action="http://image.soso.com/image.cgi";}
else if(sc=="mus")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.action="http://music.soso.com/music.cgi";}
else if(sc=="qz")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.action="http://qzone.soso.com/qz.q";}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
else if(sc=="soba")
{frm_head.sc.value="post";frm_head.action="http://post.soso.com/sobar.q";}
else if(sc=="wenwen")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.sc.value="wenwen";frm_head.action="http://wenwen.soso.com/z/SearchSolved.e";}
else
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{frm_head.action="http://www.soso.com/q";}
frm_head.w.focus();}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function changePage(sc)
{if(sosoCurrHighLight==null)
{sosoCurrHighLight=$("sosoweb");}
sosoCurrHighLight.className="s2";if(sc=="qz")
sosoCurrHighLight=$("sosoqzone");else sosoCurrHighLight=$("soso"+sc);sosoCurrHighLight.className="s1";frm_head.sc.value=sc;frm_head.cid.value="w.q.in.sb."+sc;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function goSearch()
{if(!sosoValidate())
return false;frm_head.submit();frm_head.bn.value="";}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function togDispMore(e)
{stopB(e);var elems=document.getElementsByName('tm');for(var i=0;i<elems.length;i++)
{var obj=elems[i],dp="";if(obj.style.display=="")
{dp="none";}obj.style.display=dp;}return false;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function stopB(e)
{if(!e)e=window.event;e.cancelBubble=true;}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
document.onmouseup=function(event)
{var elems=document.getElementsByName('tm');if(elems[0].style.display=="")
{togDispMore(event);}}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
function tp(obj)
{var frm_head_w=document.frm_head.w.value;if(frm_head_w.length>0&&(frm_head_w!=sosoInitHint&&frm_head_w!=sosoInitHint2))
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{var oh=obj.href;obj.href=obj.href.replace(/w=.+/g,"w=");obj.href=obj.href.replace(/SearchSolved\.e\?sp=S.+/g,"SearchSolved.e?sp=S");var qw=document.frm_head.w.value.trim();if(obj.href.indexOf("wenwen")!=-1)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{obj.href=obj.href+encodeURIComponent(qw);}else
{obj.href=obj.href+qw;}}else
{obj.href="http://"+obj.hostname;}}
String.prototype.trim=function()
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{return this.replace(/(^\s*)|(\s*$)/g,'');}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
$d=function(id)
{return $(id);}
var st='';function sm(event)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{clearTimeout(st);eventSrc=event.srcElement||event.target;o=$d('tm');if(eventSrc.tagName=="H3")
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{tt=setTimeout(function()
{o.style.display="block";document.onmousemove=cp;},800);}else
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{clearTimeout(st);o.style.display="block";document.onmousemove=cp;}}
function cp(event)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif)
{evt=window.event?window.event:event;var pointer=function(event)
{return
{x:event.pageX||(event.clientX+
(document.documentElement.scrollLeft||document.body.scrollLeft)),y:event.pageY||(event.clientY+
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
(document.documentElement.scrollTop||document.body.scrollTop))};}(evt);l=o.offsetLeft;t=o.offsetTop-20;r=l+o.offsetWidth;b=o.offsetTop+o.offsetHeight;py=pointer.y;px=pointer.x;if((py>t&&py<b&&px>l&&px<r))
{}
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
else
{st=setTimeout(function()
{o.style.display="none";},500);document.onmousemove=function()
{};}}
</script>