收录查询

腾讯官方绿茶活动的JavaScript(head-3)

腾讯官方绿茶活动--Head(头部)第3段JavaScript代码(带行号)
地址:http://act.qzone.qq.com/uni-greentea/index.html

<script src="http://imgcache.qq.com/qzone/biz/comm/js/brand_release.js" type="text/javascript">
1
2window.vDebugOpt=false;var Browser=new Object();Browser.isIE=window.ActiveXObject ? true :

false;Browser.isIE7=Browser.isIE&&window.XMLHttpRequest;Browser.isMozilla=Browser.isIE?false:(typeof

document.implementation!='undefined')&&(typeof document.implementation.createDocument!='undefined')&&(typeof HTMLDocument!

='undefined');Browser.isFirefox=Browser.isIE?false:(navigator.userAgent.toLowerCase().indexOf("firefox")!=-

1);Browser.isSafari=Browser.isIE?false:(navigator.userAgent.toLowerCase().indexOf("safari")!=-

1);Browser.isOpera=Browser.isIE?false:(navigator.userAgent.toLowerCase().indexOf("opera")!=-1);function $(el){
3if(typeof el!='object'){
4ele=document.getElementById(el);return ele;}
5return el;}
6function $n(n){return document.getElementsByName(n);}
7var $A=Array.from=function(iterable){
8if(!iterable)return[];if(Object.isArray(iterable)){
9return iterable;}
10if(iterable.toArray){
11return iterable.toArray();}else{
12var results=[];for(var i=0,length=iterable.length; i<length; i++)
13results.push(iterable[i]);return results;}}
14Function.prototype.bind=function(){
15var __method=this,args=$A(arguments),object=args.shift();return function(){
16return __method.apply(object,args.concat($A(arguments)));}}
17Function.prototype.bindAsEventListener=function(thisObj){
18var __method=this,args=$A(arguments),thisObj=args.shift();return function(event){
19return __method.apply(thisObj,[(event||window.event)].concat(args).concat($A(arguments)));}}
20Object.extend=function(src,dest,override){
21for(var prop in src){
22if(typeof dest[prop]=='undefined'){
23dest[prop]=src[prop];}else if(override){
24dest[prop]=src[prop];}}}
25Object.clone=function(obj,preventName){
26if((typeof obj)=='object'){
27var res=(Object.isArray(obj)||!!obj.sort)?[]:{};for(var i in obj){
28if(i!=preventName)res[i]=Object.clone(obj[i],preventName);}
29return res;}else if((typeof obj)=='function'){
30return(new obj()).constructor;}
31return obj;}
32Object.each=function(obj,iterator){
33for(var ele in obj){
34iterator(obj[ele],ele);}}
35Object.extend({
36isString: function(o){
37return(typeof o!='undefined')&&(typeof(o)=='string'||!!o.toString);},
38isArray: function(o){
39return(typeof(o)=='object'&&(o instanceof Array));},
40isHashMap: function(o){
41return((o!==null)&&(typeof(o)=='object')&&o.constructor==Object);},
42isNode: function(o){
43if(typeof(Node)=='undefined'){
44Node=null;}
45try{
46if(!o||!((Node!=undefined&&o instanceof Node)||o.nodeName)){return false;}}catch(ignored){return false;}
47return true;},
48isValidXMLdom:function(o){
49if(!o){
50return false;}
51if(!o.xml){
52return false;}
53if(o.xml==""){
54return false;}
55if(!(/^<\?xml/.test(o.xml))){
56return false;}
57return true;},
58arg2arr: function(refArgs,start){
59if(typeof start=='undefined'){
60start=0;}return Array.prototype.slice.apply(refArgs,[start,refArgs.length]);},
61getObjByNameSpace: function(ns){
62if(typeof(ns)=='undefined')return ns;var l=ns.split(".");var r=window;try{
63for(var i=0,len=l.length; i<len;++i){
64r=r[l[i]];if(typeof(r)=='undefined')return void(0);}
65return r;}catch(ignore){
66return void(0);}},
67tryThese: function(){
68var res;for(var ii=0,len=arguments.length; ii<len; ii++){
69try{
70res=arguments[ii]();return res;}catch(ignore){}}
71return res;},
72chain: function(u,v){
73var calls=[];for(var ii=0,len=arguments.length; ii<len; ii++){
74calls.push(arguments[ii]);}
75return(function(){
76for(var ii=0,len=calls.length; ii<len; ii++){
77if(calls[ii]&&calls[ii].apply(null,arguments)===false){
78return false;}}
79return true;});}},Object);$break={};$continue={};Array.prototype.each=function(iterator){
80var index=0;try{
81for(var i=0,length=this.length; i<length; i++){
82iterator(this[i],index++);}}
83catch(e){
84if(e!=$break)throw e;}
85return this;}
86Array.prototype.include=function(object){
87var found=false;this.each(function(value){
88if(value==object){
89found=true;throw $break;}});return found;}
90Array.prototype.uniq=function(){
91var arr=[];var o=this;this.each(function(value){
92if(!arr.include(value)){
93arr.push(value);}});return arr;}
94String.prototype.left=function(len){
95if(isNaN(len)||len==null)
96len=this.length;else{
97if(parseInt(len)<0||parseInt(len)>this.length) {
98len=this.length;}}
99return this.substr(0,len);}
100String.prototype.right=function(len){
101if(isNaN(len)||len==null)
102len=this.length;else{
103if(parseInt(len)<0||parseInt(len)>this.length) {
104len=this.length;}}
105return this.substring(this.length-len,this.length);}
106String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");}
107String.prototype.ltrim=function(){return this.replace(/^\s+/g,"");}
108String.prototype.rtrim=function(){return this.replace(/\s+$/g,"");}
109String.prototype.getRealLength=function(){ return this.replace(/[^\x00-\xff]/g,"**").length;}
110String.prototype.HTML2Text=function(){
111var div_for_convert_html=document.createElement("DIV");with(div_for_convert_html){
112innerHTML=this.replace(/ /g,"<br>").replace(/ /g,"&nbsp;");return(Browser.isIE?innerText:textContent).replace(/

\xa0/g," ");};}
113String.prototype.Text2HTML=function(){
114var d=document.createElement("DIV");if(Browser.isIE){d.innerText=this;return d.innerHTML}
115d.textContent=this;return d.innerHTML.replace(/\x0a/g,"<br>").replace(/ /g,"&nbsp;")};String.prototype.encode=function(){
116return this.replace(/\?/g,'%3F').replace(/%/g,'%25').replace(/=/g,'%3D').replace(/&/g,'%26').replace(/\'/g,'%27').replace

(/\(/g,'%28').replace(/\)/g,'%29').replace(/\+/g,'%2B').replace(/ /g,'+').replace(/\//g,'%2F').replace(/\\/g,'%5C').replace

(/\r/g,'%0D').replace(/\n/g,'%0A')}
117var r=/([!-\/:-@[-`{-~])/g
118String.prototype.encode=function(){return this.replace(r,function(a){return "%"+a.charCodeAt(0).toString(16)}).replace(/

/g,"+")}
119String.prototype.decode=function(){
120return this.replace(/:/g,":").replace(/&quot;/g,"\"").replace(/(?:�?39;)|(?:&apos;)/g,"\'").replace

(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&").replace(/&#(\d+);/g,
121function($0,$1){
122var num=parseInt($1,10).toString(16);if(num.length>2){
123return unescape('%u'+num);}else{
124return decodeURI('%'+num);}}
125);};String.prototype.encode2=function(){return this.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace

(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.s2n=function(unit){
126if(!unit)
127unit="px";var re=new RegExp(unit+"$","i");return parseInt(this.replace(re,""),10);};CSS={
128getClassRegEx: function(className){
129var re=CSS.classNameCache[className];if(!re){
130re=new RegExp('(?:^|\\s+)'+className+'(?:\\s+|$)');CSS.classNameCache[className]=re;}
131return re;},
132convertHexColor: function(color){
133color=/^#/.test(color)? color.substr(1): color;var reColor=new RegExp("\\w{2}","ig");color=color.match(reColor);if(!

color||color.length<3){
134return[0,0,0]}
135var r=parseInt(color[0],16);var g=parseInt(color[1],16);var b=parseInt(color[2],16);return[r,g,b];},
136classNameCache :{},
137styleSheets:{},
138getStyleSheetById: function(id){
139try{
140return document.styleSheets[id]||DOM.get(id).sheet;}catch(e){
141return null}},
142getRulesBySheet: function(sheetId){
143var ss=CSS.getStyleSheetById(sheetId);if(ss){
144return ss.cssRules||ss.rules;}else{
145return null}},
146getRuleBySelector: function(sheetId,selector){
147var _ss=this.getStyleSheetById(sheetId);if(!_ss.cacheSelector){_ss.cacheSelector={}};if(_ss){
148var _rs=_ss.cssRules||_ss.rules;var re=new RegExp('^'+selector+'$',"i");var _cs=_ss.cacheSelector[selector];if

(_cs&&re.test(_rs[_cs].selectorText)){
149return _rs[_cs];}else{
150for(var i=0;i<_rs.length;i++){
151if(re.test(_rs[i].selectorText)){
152_ss.cacheSelector[selector]=i;return _rs[i];}}
153return null;}}else{
154return null;}},
155insertCSSLink: function(url){
156var cssLink=document.createElement

("link");cssLink.rel="stylesheet";cssLink.rev="stylesheet";cssLink.type="text/css";cssLink.media="screen";cssLink.href=url;do

cument.getElementsByTagName("head")[0].appendChild(cssLink);return cssLink.sheet||cssLink;},
157insertStyleSheet: function(sheetId){
158var ss=document.createElement("style");ss.id=sheetId;document.getElementsByTagName("head")[0].appendChild(cssLink);return

cssLink.sheet||cssLink;},
159removeStyleSheet: function(id){
160var _ss=this.getStyleSheetById(id);if(_ss){
161var own=_ss.owningElement||_ss.ownerNode;DOM.removeElement(own);}},
162hasClassName: function(elem,cname){
163return(elem&&cname)? new RegExp('\\b'+cname.trim()+'\\b').test(elem.className): false;},
164swapClassName: function(elements,class1,class2){
165function _swap(el,c1,c2){
166if(CSS.hasClassName(el,c1)){
167el.className=el.className.replace(c1,c2);}
168else if(CSS.hasClassName(el,c2)){
169el.className=el.className.replace(c2,c1);}}
170if(elements.constructor!=Array){
171elements=[elements];}
172for(var i=0,len=elements.length; i<len; i++){
173_swap(elements[i],class1,class2);}},
174replaceClassName: function(elements,sourceClass,targetClass){
175function _replace(el,c1,c2){
176if(CSS.hasClassName(el,c1)){
177el.className=el.className.replace(c1,c2);}}
178if(elements.constructor!=Array){
179elements=[elements];}
180for(var i=0,len=elements.length; i<len; i++){
181_replace(elements[i],sourceClass,targetClass);}},
182addClassName: function(elem,cname){
183if(elem&&cname){
184if(elem.className){
185if(CSS.hasClassName(elem,cname)){
186return false;}
187else{
188elem.className+=' '+cname.trim();return true;}}
189else{
190elem.className=cname;return true;}}
191else{
192return false;}},
193removeClassName: function(elem,cname){
194if(elem&&cname&&elem.className){
195var old=elem.className;elem.className=elem.className.replace(new RegExp('\\b'+cname.trim()+'\\b'),'').trim();return

elem.className!=old;}
196else{
197return false;}},
198toggleClassName: function(elem,cname){
199var r=this;if(r.hasClassName(elem,cname)){
200r.removeClassName(elem,cname);}
201else{
202r.addClassName(elem,cname);}}}
203DOM={
204getById: function(id){
205return document.getElementById(id);},
206getByName: function(n){
207return document.getElementsByName(n);},
208get: function(e){
209if(e&&(e.tagName||(typeof(e)=='object'))){
210return e;}
211return this.getById(e);},
212show : function(id){
213var el=DOM.get(id);if(el&&el.tagName){
214el.style.display='';}},
215hide : function(id){
216var el=DOM.get(id);if(el&&el.tagName){
217el.style.display='none';}},
218removeElement: function(el){
219if(el.removeNode){
220el.removeNode(true);}
221else{
222if(el.childNodes.length>0){
223for(var ii=el.childNodes.length-1; ii>=0; ii--){
224DOM.removeElement(el.childNodes[ii]);}}
225el.parentNode.removeChild(el);}
226el=null;return null;},
227searchElementByClassName: function(el,className){
228el=this.get(el);if(!el){return null}
229var re=CSS.getClassRegEx(className);while(el){
230if(re.test(el.className)){
231return el;}
232el=el.parentNode;}
233return null;},
234getElementsByClass : function(searchClass,node,tag){
235var classElements=new Array();if(!!node){
236node=DOM.get(node);if(!node){
237return classElements;}}else{
238node=document;}
239if(!tag)
240tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=CSS.getClassRegEx(searchClass);for(i=0 ;

i<elsLen; i++){
241if(pattern.test(els[i].className)){
242classElements.push(els[i]);}}
243return classElements;},
244createElementIn: function(tagName,el,insertFirst,attributes){
245tagName=tagName||"div";el=this.get(el)||document.body;var _doc=el.ownerDocument;var _e=_doc.createElement(tagName);if

(attributes){
246for(var k in attributes){
247if(/class/.test(k)){
248_e.className=attributes[k];}else if(/style/.test(k)){
249_e.style.cssText=attributes[k];}else{
250_e[k]=attributes[k];}}}
251if(insertFirst){
252el.insertBefore(_e,el.firstChild);}else{
253el.appendChild(_e);}
254return _e;},
255getStyle: function(el,property){
256el=this.get(el);var w3cMode=document.defaultView&&document.defaultView.getComputedStyle;var value="";switch(property){
257case "float":property=w3cMode?"cssFloat":"styleFloat";break;case "opacity":if(!w3cMode){
258var val=100;try{
259val=el.filters['DXImageTransform.Microsoft.Alpha'].opacity;}catch(e){
260try{
261val=el.filters('alpha').opacity;}catch(e){}}
262return val / 100;}}
263if(w3cMode){
264var computed=document.defaultView.getComputedStyle(el,'');if(computed){value=computed[property]}
265return el.style[property]||value;}else{
266return(el.style[property]||el.currentStyle[property])}},
267createNamedElement: function(type,name,doc){
268doc=doc||document;var element;try{
269element=doc.createElement('<'+type+' name="'+name+'">');}catch(ignore){}
270if(!element||!element.name){
271element=doc.createElement(type);element.name=name;}
272return element;},
273setStyle: function(el,property,value){
274el=this.get(el);if(!el){return false;}
275var w3cMode=document.defaultView&&document.defaultView.getComputedStyle;switch(property){
276case "float":property=w3cMode?"cssFloat":"styleFloat";case "opacity":if(!w3cMode){
277if(value>=1){
278el.style.filter="";return;}
279el.style.filter='alpha(opacity='+(value*100)+')';return true;}else{
280el.style[property]="";}
281default:
282if(typeof el.style[property]=="undefined"){return false}
283el.style[property]=value;return true;}},
284getPosition: function(el){
285var xy=DOM.getXY(el);var size=DOM.getSize(el);return{"top":xy[1],"left":xy[0],"width":size[0],"height":size[1]};},
286getXY: function(el){
287var _t=0;var _l=0;if(document.documentElement.getBoundingClientRect){
288var box=el.getBoundingClientRect();var oDoc=el.ownerDocument;_t=box.top-2+this.getScrollTop(oDoc);_l=box.left-

2+this.getScrollLeft(oDoc);}else{
289while(el.offsetParent){
290_t+=el.offsetTop;_l+=el.offsetLeft;el=el.offsetParent;}}
291return[_l,_t];},
292getSize: function(el){
293var _w=el.offsetWidth;var _h=el.offsetHeight;return[_w,_h];},
294setXY: function(el,x,y){
295el=this.get(el);var _ml=parseInt(this.getStyle(el,"marginLeft"))||0;var _mt=parseInt(this.getStyle(el,"marginTop"))

||0;this.setStyle(el,"left",parseInt(x)-_ml+"px");this.setStyle(el,"top",parseInt(y)-_mt+"px");},
296getScrollLeft: function(doc){
297doc=doc||document;return Math.max(doc.documentElement.scrollLeft,doc.body.scrollLeft);},
298getScrollTop: function(doc){
299doc=doc||document;return Math.max(doc.documentElement.scrollTop,doc.body.scrollTop);},
300getClientHeight: function(doc){
301doc=doc||document;return doc.compatMode=="CSS1Compat"?doc.documentElement.clientHeight:doc.body.clientHeight;},
302getClientWidth: function(doc){
303doc=doc||document;return doc.compatMode=="CSS1Compat"?doc.documentElement.clientWidth:doc.body.clientWidth;},
304setSize: function(el,width,height){
305el=this.get(el);var _wFix=/\d+([a-z%]+)/i.exec(width);_wFix=_wFix?_wFix[1]:"";var _hFix=/\d+([a-z%]+)/i.exec

(height);_hFix=_hFix?_hFix[1]:"";this.setStyle(el,"width",(!width||width<0||/auto/i.test(width))?"auto":(parseInt(width)+

(_wFix||"px")));this.setStyle(el,"height",(!height||height<0||/auto/i.test(height))?"auto":(parseInt(height)+

(_hFix||"px")));},
306getDocumentWindow: function(doc){
307_doc=doc||document;return _doc.parentWindow||_doc.defaultView;},
308XMLselectSingleNode:function(o,xpath){
309var x=DOM.XMLselectNodes(o,xpath)
310if(!x||x.length<1)return null;return x[0];},
311XMLselectNodes:function(o,xpath){
312var xpe=new XPathEvaluator();var nsResolver=xpe.createNSResolver(o.ownerDocument==null ?
313o.documentElement : o.ownerDocument.documentElement);var result=xpe.evaluate(xpath,o,nsResolver,0,null);var found=[];var

res;while(res=result.iterateNext()){
314found.push(res);}
315return found;}};var _CN=DOM.createNamedElement;var $c=DOM.getElementsByClass;var $n=DOM.getByName;var

removeNode=DOM.removeElement;EVENT={
316KEYS:{
317BACKSPACE: 8,
318TAB: 9,
319RETURN: 13,
320ESC: 27,
321SPACE: 32,
322LEFT: 37,
323UP: 38,
324RIGHT: 39,
325DOWN: 40,
326DELETE: 46},
327extendType: /(click|mousedown|mouseover|mouseup|mousemove|scroll|contextmenu)/i,
328addEvent: function(obj,eventType,fn,argArray){
329obj=DOM.get(obj);var cfn=fn;var res=false;if(!obj.eventsList){
330obj.eventsList={};}
331if(!obj.eventsList[eventType]){
332obj.eventsList[eventType]={};}
333if(EVENT.extendType.test(eventType)){
334argArray=argArray||[];cfn=function(e){
335fn.apply(null,([EVENT.getEvent(e)]).concat(argArray));};}
336if(obj.addEventListener){
337obj.addEventListener(eventType,cfn,false);res=true;}else if(obj.attachEvent){
338res=obj.attachEvent("on"+eventType,cfn);}else{
339res=false;}
340if(res){
341obj.eventsList[eventType][fn.toString()]=cfn;}
342return res;},
343removeEvent: function(obj,eventType,fn){
344var cfn=fn;var res=false;if(!cfn){
345res=EVENT.purgeEvent(obj,eventType);return res;}
346if(EVENT.extendType.test(eventType)&&obj.eventsList[eventType]&&obj.eventsList[eventType][fn.toString()]){
347cfn=obj.eventsList[eventType][fn.toString()];}
348if(obj.removeEventListener){
349obj.removeEventListener(eventType,cfn,false);res=true;}else if(obj.detachEvent){
350res=obj.detachEvent("on"+eventType,cfn);}else{
351alert("Error.");}
352if(res&&obj.eventsList[eventType]){
353delete obj.eventsList[eventType][fn.toString()];}
354return res;},
355purgeEvent:function(obj,type){
356if(obj.eventsList&&obj.eventsList[type]){
357for(var i in obj.eventsList[type]){
358if(obj.removeEventListener){
359obj.removeEventListener(type,obj.eventsList[type][i],false);}else if(obj.detachEvent){
360obj.detachEvent('on'+type,obj.eventsList[type][i]);}}}
361if(obj['on'+type]){
362obj['on'+type]=null;}},
363getEvent: function(evt){
364evt=evt||window.event;if(!evt&&!Browser.ie){
365var c=this.getEvent.caller;while(c){
366evt=c.arguments[0];if(evt&&Event==evt.constructor){
367break;}
368c=c.caller;}}
369return evt;},
370getButton: function(evt){
371var e=EVENT.getEvent(evt);if(!e){
372return-1}
373if(Browser.isIE){
374return e.button-Math.ceil(e.button/2);}else{
375return e.button;}},
376getTarget: function(evt){
377var e=EVENT.getEvent(evt);if(e){
378return e.target||e.srcElement;}else{
379return null;}},
380getcurrentTarget: function(evt){
381var e=EVENT.getEvent(evt);if(e){
382return document.activeElement||e.currentTarget;}else{
383return null;}},
384cancelBubble: function(evt){
385evt=EVENT.getEvent();if(!evt){return false}
386if(evt.stopPropagation){
387evt.stopPropagation();}else{
388if(!evt.cancelBubble){evt.cancelBubble=true;}}},
389preventDefault: function(evt){
390evt=EVENT.getEvent();if(!evt){return false}
391if(evt.preventDefault){
392evt.preventDefault();}else{
393evt.returnValue=false;}},
394mouseX: function(evt){
395evt=EVENT.getEvent();return evt.pageX||
396(evt.clientX+
397(document.documentElement.scrollLeft||document.body.scrollLeft));},
398mouseY: function(evt){
399evt=EVENT.getEvent();return evt.pageY||
400(evt.clientY+
401(document.documentElement.scrollTop||document.body.scrollTop));},
402bind: function(obj,method){
403var args=Array.prototype.slice.apply(arguments,[2,arguments.length]);return function(){
404var _obj=obj||this;var _args=args.slice();for(var jj=0; jj<arguments.length; jj++){
405_args.push(arguments[jj]);}
406if(typeof(method)=="string"){
407if(_obj[method]){
408return _obj[method].apply(_obj,_args);}}
409else{
410return method.apply(_obj,_args);}}}}
411EVENT.on=EVENT.addEvent;var addEvent=EVENT.addEvent;var removeEvent=EVENT.removeEvent;var getEvent=EVENT.getEvent;Event={
412observe: function(element,name,observer,useCapture){
413element=$(element);useCapture=useCapture||false;if(element.addEventListener){
414element.addEventListener(name,observer,useCapture);}else if(element.attachEvent){
415element.attachEvent('on'+name,observer);}},
416stopObserving: function(element,name,observer,useCapture){
417element=document.getElementById(element);useCapture=useCapture||false;if(element.removeEventListener){
418element.removeEventListener(name,observer,useCapture);}else if(element.detachEvent){
419try{
420element.detachEvent('on'+name,observer);}catch(e){}}}}
421function formatNumber(srcStr,nAfterDot){
422if(!srcStr)srcStr=0;var re=new RegExp("(\\d*)\\.(\\d*)")
423srcStr=String(srcStr);var m=srcStr.match(re);if(!m){
424srcStr+='.'
425srcStr+=new Array(nAfterDot+1).join("0")}else{
426var div=m[2].length-nAfterDot;if(div>=0)
427srcStr=srcStr.substr(0,srcStr.length-div);else{
428div=-div;srcStr+=new Array(div+1).join("0")}}
429return srcStr;}
430Number.prototype.format=function(nAfterDot){return formatNumber(this,nAfterDot)}
431function formatString(srcStr,len){
432if(!srcStr)return "";var re=new RegExp("[^\\x00-\\xff]|[\\x41-\\x5a]");var m=srcStr.split("");if(m){
433var i,j;for(i=0,j=0;i<len&&j<m.length;j++){
434if(m[j].match(re)){
435i+=2;}else i++;}
436if(j<m.length)
437return srcStr.substr(0,j)+'.';else
438return srcStr;}}
439String.prototype.format=function(len){return formatString(this,len)}
440Date.prototype.format=function(expression){
441var str=expression?expression:"YYYY-MM-DD hh:mm:ss";str=str.replace(/YYYY/g,this.getFullYear());str=str.replace

(/YY/g,this.getFullYear().toString().substr(2));str=str.replace(/MM/g,(this.getMonth()+1).fixDigit(2));str=str.replace

(/DD/g,this.getDate().fixDigit(2));str=str.replace(/hh/g,this.getHours().fixDigit(2));str=str.replace(/mm/g,this.getMinutes

().fixDigit(2));str=str.replace(/ss/g,this.getSeconds().fixDigit(2));return str;}
442Number.prototype.fixDigit=function(len){
443var fixLen=len-this.toString().length+1;return new Array(fixLen<0?0:fixLen).join("0")+this;}
444Number.prototype.getBitValue=function(i){
445return(this>>i&0x01);}
446Number.prototype.toDate=function(){
447var num=this;return new Date(num);}
448function htmlReplace(srcString){
449return srcString.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br/>").replace(/\"/g,"&quot;").replace

(/&/g,"&amp;");}
450function unReplaceStr(srcString){
451return srcString.replace(/&amp;/g,"&").replace(/-/g,"-").replace(/_/g,"_").replace(/?/g,"?").replace

(/=/g,"=").replace(/%/g,"%").replace(/:/g,":").replace(/ /g," ").replace(/@/g,".");}
452function scriptReplace(srcString){
453srcString=srcString.replace(/&#(\d+);?/g,function(a,b){return String.fromCharCode(b)}).replace(/&#x(\d+);?/ig,function

(a,b){return String.fromCharCode(parseInt(b,16))}).replace(/(\Won)(\w+\s*=)/ig,"$1<wbr>$2").replace(/(\Wexpres)

(sion\()/ig,"$1<wbr>$2").replace(/(\Wbehav)(ior\s*:)/ig,"$1<wbr>$2").replace(/(obj)(ect)/ig,"$1<wbr>$2").replace(/(scr)

(ipt)/ig,"$1<wbr>$2").replace(/(emb)(ed)/ig,"$1<wbr>$2").replace(/\n|\r/g,"<br>").replace(/\t/g," &nbsp; &nbsp;");return

srcString;}
454function vaildUrl(url){
455if(/javascript/ig.test(url))return false;if(/^http/ig.test(url)&&!(/^http:\/\/([\w\.]+)\.

(qq.com|paipai.com|soso.com)/ig.test(url)))return false;return true;}
456function scriptSearch(str){
457var reg=new RegExp("Location|onload|meta|iframe|cookie|craker|innerHTML|object|script","gi");var returnStr=str.match

(reg);return returnStr;}
458function setFileCookie(name,value,timeout,dm){
459var expires=new Date();if(!timeout)
460timeout=10*12*30*24*3600*1000;if(!dm)
461dm="qq.com";expires.setTime(expires.getTime()+timeout);document.cookie=name+"="+value+";expires="+expires.toGMTString()+";

path=/; domain="+dm;}
462function setCookie(name,value,path,domain){
463if(!path)
464path="/";if(!domain)
465domain="qq.com";document.cookie=name+"="+value+"; path="+path+"; domain="+domain;}
466function getCookie(name){
467var r=new RegExp("(^|;|\\s)"+name+"=([^;]*)(;|$)");var m=document.cookie.match(r);return(!m?"":m[2]);}
468function deleteCookie(name,path,domain){
469if(!path)
470path="/";if(!domain)
471domain="qq.com";document.cookie=name+"="+"; path="+path+"; domain="+domain+"; expires=Thu,1 Jan 1970 00:00:01 UTC";}
472var userData=function(){
473this.normalDB="defaultDB";this.error=false;if(Browser.isIE){
474var id="udLink";this.UD=$(id);if(!this.UD){
475this.UD=document.createElement("script");this.UD.id=id;document.getElementsByTagName("head")[0].appendChild(this.UD);try{
476UDiID=this.UD.addBehavior("#default#userdata");}catch(e){this.error=true;return;}}
477var expiresDate=new Date();expiresDate.setTime(expiresDate.getTime()

+12*30*24*3600*1000);this.UD.expires=expiresDate.toUTCString();}
478if(getCookie("userData")!=1){this.clear();}}
479userData.prototype.clear=function(sStoreName){
480if(this.error)return false;if(Browser.isIE){
481sStoreName=(!sStoreName)?this.normalDB:sStoreName;this.UD.load(sStoreName);this.UD.expires=new Date

(315532799000).toUTCString();this.UD.save(sStoreName);setFileCookie("userData",1,0,"qzone.qq.com");}}
482userData.prototype.remove=function(key,sStoreName){
483if(Browser.isIE){
484sStoreName=(!sStoreName)?this.normalDB:sStoreName;this.UD.setAttribute(key,null);this.UD.save(sStoreName);}else if

(window.sessionStorage){
485sessionStorage.removeItem(key);}}
486userData.prototype.save=function(key,value,sStoreName){
487if(this.error)return false;if(Browser.isIE){
488sStoreName=(!sStoreName)?this.normalDB:sStoreName;this.UD.setAttribute(key,value);this.UD.save(sStoreName);}else if

(window.sessionStorage){
489sessionStorage.setItem(key,value);}}
490userData.prototype.load=function(key,sStoreName){
491if(this.error)return false;if(Browser.isIE){sStoreName=(!sStoreName)?this.normalDB:sStoreName;this.UD.load

(sStoreName);return this.UD.getAttribute(key);}else if(window.sessionStorage){
492return sessionStorage.getItem(key);}}
493function copyToClip(text){
494if(Browser.isIE){
495clipboardData.setData("Text",text);alert("链接已经复制到剪贴板");}else{
496setClipboard(text);alert("链接已经复制到剪贴板");}}
497function setShareData(key,value){
498if(window._shareObjectReady){
499$("shareObject").set("seed",Math.random());$("shareObject").set(key,value);$("shareObject").flush();}}
500function getShareData(key){
501if(window._shareObjectReady)
502return $("shareObject").get(key);else
503return "";}
504function setClipboard(value,callback){
505buildShareObject();if(window._shareObjectReady){
506$("shareObject").setClipboard(value);if(callback){
507callback();}
508return;}
509setTimeout(function(){
510setClipboard(value,callback);},200);}
511function clearShareData(){
512if(window._shareObjectReady)
513$("shareObject").clear();}
514function getShareDataSize(){
515if(window._shareObjectReady)
516return $("shareObject").getSize();else
517return-1;}
518function getShareObjectPrefix(){
519window._shareObjectReady=true;return location.host.match(/\w+/)[0];}
520function buildShareObject(){
521if(flashVersion.major<8){
522window._shareObjectReady=false;return false;}
523if($('shareObject')){
524return;}
525var shareObjectDiv=document.createElement("div");document.body.appendChild

(shareObjectDiv);shareObjectDiv.innerHTML=insertFlash({
526src:"http://imgcache.qq.com/qzone/dataset/getset.swf",
527id:"shareObject",width:0,height:0,
528allowscriptaccess:"always"});}
529document.createElementByName=function(element,name){
530if(!name)return document.createElement(element);if(Browser.isIE){
531return document.createElement("<"+element+" name=\""+name+"\"/>");}else{
532element=document.createElement(element);element.name=name;return element;}}
533function removeElement(element){
534if((typeof element)=="string")
535element=$(element);if(!!element&&(typeof element)=="object"){
536element.parentNode.removeChild(element);}}
537function pickNumFromDom(path,o,type,attr){
538var tn;if(!type)
539type="n";try{
540if(/n/.test(type))
541tn=parseInt(o.selectSingleNode(path).text);else{
542if(path=="")
543tn=parseInt(o.getAttribute(attr));else
544tn=parseInt(o.selectSingleNode(path).getAttribute(attr));}
545if(isNaN(tn))
546tn=0;}
547catch(err){
548tn=0;}
549return tn;}
550function getElementInBody(id,tagName,insertFirst,parentNodeID,className,initCSSText){
551var e=$(id);if(!e){
552tagName=(!tagName)?"div":tagName;e=document.createElement(tagName);e.id=id;var parentNode=(!parentNodeID)?

document.body:$(parentNodeID)
553if(insertFirst)
554parentNode.insertBefore(e,parentNode.firstChild);else
555parentNode.appendChild(e);e.className=className?className:"";e.style.cssText=initCSSText?initCSSText:"";}
556parentNode=null;return e;}
557getPosition=DOM.getPosition;function contheight(sName){
558if(parent.$[sName]!=null){
559parent.$[sName].style.height=document.body.scrollHeight;}}
560function getFlashVersion(reqVer){
561var PlayerVersion=new swfVersion(0,0,0);if(navigator.plugins&&navigator.mimeTypes.length){
562var x=navigator.plugins['Shockwave Flash'];if(x&&x.description) {
563PlayerVersion=new swfVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split

("."));}}else{
564try{
565var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var i=3; axo!=null; i++){
566axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);PlayerVersion=new swfVersion([i,0,0]);}}catch(e){}
567if(reqVer&&PlayerVersion.major>reqVer.major){return PlayerVersion;}
568if(!reqVer||(reqVer.minor!=0||reqVer.rev!=0)&&PlayerVersion.major==reqVer.major||PlayerVersion.major!=6){
569try{PlayerVersion=new swfVersion(axo.GetVariable("$version").split(" ")[1].split(","));}catch(e){}}}
570return PlayerVersion;};function swfVersion(arrVersion){
571this.major=parseInt(arrVersion[0])||0;this.minor=parseInt(arrVersion[1])||0;this.rev=parseInt(arrVersion[2])

||0;this.version=arrVersion.toString();};var flashVersion=getFlashVersion();function fixWCO(){try

{$("myFrame").innerHTML="";}catch(e){}}
572function fixFlashBug(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};}
573function prepUnload(){
574fixWCO();fixFlashBug();}
575addEvent(window,"beforeunload",prepUnload);function insertFlash(flashArguments,requiredVersion){
576var params="",embedArgm="",objArgm="";for(k in flashArguments){
577switch(k){
578case "movie":continue;break;case "id":case "name":case "width":case "height":case "style":objArgm+=k+'=\''+flashArguments

[k]+'\' ';embedArgm+=k+'=\''+flashArguments[k]+'\' ';break;default:
579params+='<param name=\''+((k=="src")?"movie":k)+'\' value=\''+flashArguments[k]+'\' />';embedArgm+=k+'="'+flashArguments

[k]+'" ';}}
580if(requiredVersion){
581objArgm+='codeBase=\'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version='+requiredVersion+'\'

';}
582fixFlashBug();if(Browser.isIE)
583return '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '+objArgm+'>'+params+'</object>';else
584return '<embed '+embedArgm+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-

flash"></embed>'}
585function insertWMP(wmpArguments,mp9Upon,outputEmbed){
586var params="",objArgm="";for(k in wmpArguments){
587switch(k){
588case "id":case "width":case "height":case "style":objArgm+=k+'="'+wmpArguments[k]+'" ';break;case "src":if(outputEmbed)

objArgm+=k+'="'+wmpArguments[k]+'" ';break;default:
589if(outputEmbed)objArgm+=k+'="'+wmpArguments[k]+'" ';params+='<param name="'+k+'" value="'+wmpArguments[k]+'" />';}}
590if(mp9Upon=="auto"){
591mp9Upon=false;if(window.ActiveXObject){
592var clsId="{22D6F312-B0F6-11D0-94AB-0080C74C7E95}";with(document.body){
593addBehavior('#default#clientcaps');if(isComponentInstalled(clsId,"componentid")){
594mp9Upon=(getComponentVersion(clsId,"componentid").split(",")[0]>6.4)?true:false;}}}}
595if(mp9Upon){
596classId="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6";if(wmpArguments["src"]){
597params+='<param name="URL" value="'+wmpArguments["src"]+'" />';}}
598else{
599classId="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95";if(wmpArguments["src"]){
600params+='<param name="src" value="'+wmpArguments["src"]+'" />';}}
601if(outputEmbed)
602return '<embed '+objArgm+'></embed>';else
603return '<object classid="'+classId+'" '+objArgm+'>'+params+'</object>';}
604var preImg=[]
605function preImage(img){
606for(i=0;i<img.length;i++){
607preImg[preImg.length]=new Image();preImg[preImg.length-1].src=img[i];try{
608if(preImg[preImg.length-1].readyState=="complete"){return};}catch(e){}}}
609var _st=window.setTimeout;if(!window.setTimeout.constructor)
610window.setTimeout=function(fRef,mDelay){
611if(typeof fRef=='function'){
612var argu=Array.prototype.slice.call(arguments,2);var f=(function(){fRef.apply(null,argu);});return _st(f,mDelay);}
613return _st(fRef,mDelay);}
614var _int=window.setInterval;if(!window.setInterval.constructor)
615window.setInterval=function(fRef,mDelay){
616if(typeof fRef=='function'){
617var argu=Array.prototype.slice.call(arguments,2);var f=(function(){fRef.apply(null,argu);});return _int(f,mDelay);}
618return _int(fRef,mDelay);}
619if(Browser.isFirefox){
620XMLDocument.prototype.selectSingleNode=Element.prototype.selectSingleNode=function(xpath){
621var x=this.selectNodes(xpath)
622if(!x||x.length<1)return null;return x[0];}
623XMLDocument.prototype.selectNodes=Element.prototype.selectNodes=function(xpath){
624var xpe=new XPathEvaluator();var nsResolver=xpe.createNSResolver(this.ownerDocument==null ?
625this.documentElement : this.ownerDocument.documentElement);var result=xpe.evaluate(xpath,this,nsResolver,0,null);var

found=[];var res;while(res=result.iterateNext())
626found.push(res);return found;}
627XMLDocument.prototype.getOuterXML=Element.prototype.getOuterXML=function(){
628try{
629return new XMLSerializer().serializeToString(this);}catch(e){
630var d=document.createElement("div");d.appendChild(this.cloneNode(true));return d.innerHTML;}}
631XMLDocument.prototype.__proto__.__defineGetter__("xml",function(){
632try{
633return new XMLSerializer().serializeToString(this);}catch(ex){
634var d=document.createElement("div");d.appendChild(this.cloneNode(true));return

d.innerHTML;}});Element.prototype.__proto__.__defineGetter__("xml",function(){
635try{
636return new XMLSerializer().serializeToString(this);}catch(ex){
637var d=document.createElement("div");d.appendChild(this.cloneNode(true));return

d.innerHTML;}});XMLDocument.prototype.__proto__.__defineGetter__("text",function(){
638return this.firstChild.textContent});Element.prototype.__proto__.__defineGetter__("text",function(){
639return this.textContent});}
640function getParentByClass(source,className){
641while(source.offsetParent){
642if(source.className==className){
643return source;}
644source=source.offsetParent;}
645return null;}
646var blogStyleSheet=[];var insertCSSLink=CSS.insertCSSLink;function insertCSS(sheetIndex,selectorText,cssText){
647if(!blogStyleSheet[sheetIndex])blogStyleSheet[sheetIndex]=[];document.styleSheets[sheetIndex].addRule

(selectorText,"{"+cssText+"}",blogStyleSheet[sheetIndex].length);blogStyleSheet[sheetIndex].push

({selectorText:selectorText,cssText:cssText});}
648function updateCSS(sheetIndex,ruleId,cssText){
649var selectorText=blogStyleSheet[sheetIndex][ruleId].selectorText;blogStyleSheet[sheetIndex]

[ruleId].cssText=cssText;document.styleSheets[sheetIndex].removeRule(ruleId);document.styleSheets[sheetIndex].addRule

(selectorText,"{"+cssText+"}",ruleId);}
650function array_rand(src,len){
651var dest=[];for(var i=0; i<src.length;i++)dest.push(src[i]);if(len)
652len=Math.min(len,src.length);else
653len=src.length;for(var i=0;i<dest.length;i++){
654var index_to_change=Math.min(Math.round(Math.random()*dest.length),dest.length-1);var tmp=dest[i];dest[i]=dest

[index_to_change];dest[index_to_change]=tmp;}
655dest.length=len;return dest;}
656function logMsg(msg,logId,level){
657logId=logId||"logDiv";var logDiv=document.getElementById(logId);if(!logDiv){
658logDiv=document.createElement('div');logDiv.id=logId;logDiv.style.cssText="border: red 1px

solid";document.body.appendChild(logDiv);}
659var msgDiv=document.createElement('div');var levelCss={
6601: 'color: lightblue; text-align: center;',
6612: 'color: darkred; text-align: center;',
6623: 'color: red; text-align: center;'};level=level||2;msgDiv.style.cssText=levelCss

[level];msgDiv.innerHTML=msg;logDiv.appendChild(msgDiv);}
663<!--
664var r_index=/<%=index%>/g
665var r_text=/<%=text%>/g
666var r_attribute_global=/<%=@([^%]+)%>/g
667function FillDiv_Ex(divId,xDoc){
668var div;if(typeof(divId)=="object")
669div=divId;else
670div=document.getElementById(divId);if(!div){
671return;}
672var templetHTML;if(div.oldHTML){
673templetHTML=div.oldHTML;}else{
674var m=div.childNodes;var bHave=false;for(var i=0;i<m.length;i++){
675if('TEXTAREA'==m[i].tagName&&m[i].className=='template'){
676templetHTML=div.oldHTML=m[i].value;bHave=true;break;}}
677if(!bHave)
678templetHTML=div.oldHTML=div.innerHTML;}
679templetHTML=templetHTML.replace(/\[%/g,"<%").replace(/%\]/g,"%>").replace(/\{%/g,"<%").replace(/%\}/g,"%>").replace(/\<!-

-%/g,"<%").replace(/%-->/g,"%>")
680div.innerHTML=doDataFill_Ex(templetHTML,xDoc,0);div.style.display="";}
681function doDataFill_Ex(templetHTML,xDoc,xLevel){
682var stRegPrefix="<%repeat_"+xLevel+"\\s*match=\"([^\"]+)\"[^%]*%>";var stRegContent="<%repeat_"+xLevel+"[^>]*%>((.|\\n)+)

<%_repeat_"+xLevel+"%>";var r_repeat_match=new RegExp(stRegPrefix);var r_repeat_match_global=new RegExp(stRegPrefix,"g");var

r_repeat_content=new RegExp(stRegContent);var r_repeat_match_next_level=new RegExp("<%repeat_"+(xLevel+1)+" match=\"([^\"]+)

\"");if(templetHTML.match(r_repeat_match)==null){
683alert("没有找到节点<%repeat_"+(xLevel)+"%>");return;}
684var isXML=!!xDoc.xml;var arPrefix=templetHTML.match(r_repeat_match_global);var startPosition=0;for(var

i=0;i<arPrefix.length;i++){
685var st=arPrefix[i];var nodePath=st.replace(/^.*match=\"|\".*$/g,"");if(st.indexOf("callback")>0)
686var fnCallBack=eval(st.replace(/^.*callback=\"|\".*$/g,""));startPosition=templetHTML.indexOf(st);var

endPosition=templetHTML.indexOf("<%_repeat_"+xLevel+"%>",startPosition);var replaceContent=templetHTML.substring

(startPosition,endPosition+13)
687startPosition+=st.length;var repeatContent=templetHTML.substring(startPosition,endPosition);var nodes=isXML?

xDoc.selectNodes(nodePath):objSelectNodes(xDoc,nodePath);if(!nodes){
688alert("没有找到节点"+nodePath);return;}
689var arContent=[];var attributes=repeatContent.match(r_attribute_global);if(attributes==null)attributes=[];var

repeatStartIndex=0;var repeatTimes=nodes.length;if(st.indexOf("repeat_num")>0) {
690var repeatAttrContent=(st.replace(/^.*repeat_num=\"*|\".*$/g,""));var repeatArry=repeatAttrContent.split(",");if

(repeatArry.length==2){
691if(repeatArry[1]>0&&repeatArry[1]<=nodes.length)
692repeatTimes=parseInt(repeatArry[1]);if(repeatArry[0]>=0&&repeatArry[0]<nodes.length){
693repeatStartIndex=parseInt(repeatArry[0]);}else{
694repeatTimes=0;}}else{
695if(repeatArry[0]>0&&repeatArry[0]<=nodes.length)
696repeatTimes=parseInt(repeatArry[0]);}}
697for(var j=repeatStartIndex;j<repeatTimes;j++){
698var node=nodes[j];var content=repeatContent;if(repeatContent.match(r_repeat_match_next_level)!=null)
699content=doDataFill_Ex(repeatContent,node,xLevel+1)
700var s=content.replace(r_index,(j+1));for(var k=0;k<attributes.length;k++){
701var tmp=attributes[k].replace(/[^\w,\'\"\[\]\(\)]/g,"");var attrFunc;if(tmp.indexOf("[")>-1){
702attrFunc=tmp.replace(/(\w+\[)|(\]\w*)/g,"");}else{
703attrFunc="";}
704var attrTag=tmp.replace(/\[.*\]/g,"");var attrValue="";if(isXML){
705attrValue=node.getAttribute(attrTag);if(attrValue==null&&node.selectSingleNode(attrTag)!=null)
706attrValue=node.selectSingleNode(attrTag).text;}else{
707attrValue=node[attrTag];}
708if(attrValue==null){
709attrValue="";}
710if(attrValue!==""){
711if(attrFunc&&attrFunc!=""){
712attrFunc=attrFunc.replace("__INDEX__",(j+1)).replace("__VAR__",attrValue);try{
713attrValue=eval(attrFunc);}
714catch(e){
715attrValue="";}}}
716s=s.replace(attributes[k],attrValue);}
717arContent[j]=s;if(fnCallBack)fnCallBack(node,arContent,j);}
718templetHTML=templetHTML.replace(replaceContent,arContent.join(""));}
719return templetHTML;}
720function doFill(templetHTML,xDoc,xLevel,bOptimize){
721xLevel=(typeof(xLevel)=='undefined')? 0 : xLevel;if(!xDoc){
722return '';}
723var r_index=/<%=index%>/g;var r_text=/<%=text%>/g;var r_attribute_global=/<%=@([#~&\w]+)%>/g;var r_escape_text=/<%=#text%

>/g;var r_plain_text=/<%=~text%>/g;var r_entity_text=/<%=&text%>/g;var isXML=!!xDoc.xml;var stRegPrefix="<%

repeat_"+xLevel+"\\s*match=\"([^\"]+)\"[^%]*%>";var stRegContent="<%repeat_"+xLevel+"[^>]*%>((.|\\n)+)<%_repeat_"+xLevel+"%

>";var r_repeat_match=new RegExp(stRegPrefix);var r_repeat_match_global=new RegExp(stRegPrefix,"g");var r_repeat_content=new

RegExp(stRegContent);var r_repeat_match_next_level=new RegExp("<%repeat_"+(xLevel+1)+" match=\"([^\"]+)\"");if

(templetHTML.match(r_repeat_match)==null){
724rt.error("没有找到节点<%repeat_"+(xLevel)+"%>");return '';}
725var arPrefix=templetHTML.match(r_repeat_match_global);var startPosition=0;for(var i=0; i<arPrefix.length; i++){
726var st=arPrefix[i];var nodePath=st.replace(/^.*match=\"|\".*$/g,"");if(st.indexOf("preCallback")>0)var fnPreCallBack=eval

(st.replace(/^.*preCallback=\"|\".*$/g,""));if(st.indexOf("callback")>0)var fnCallBack=eval(st.replace

(/^.*callback=\"|\".*$/g,""));startPosition=templetHTML.indexOf(st);var endPosition=templetHTML.indexOf("<%

_repeat_"+xLevel+"%>",startPosition);var replaceContent=templetHTML.substring

(startPosition,endPosition+13);startPosition+=st.length;var repeatContent=templetHTML.substring

(startPosition,endPosition);var nodes=isXML ? xDoc.selectNodes(nodePath): objSelectNodes(xDoc,nodePath);var arContent=[];var

repeatTimes=nodes.length;if(st.indexOf("repeat_num")>0){
727var sTimes=st.replace(/^.*repeat_num=\"|\".*$/g,"");if(!isNaN(sTimes)){
728repeatTimes=Math.min(repeatTimes,parseInt(sTimes,10));}}
729for(var j=0; j<repeatTimes; j++){
730var node=nodes[j];if(fnPreCallBack)fnPreCallBack(node,j);var content=repeatContent;if(repeatContent.match

(r_repeat_match_next_level)!=null){
731content=doFill(repeatContent,node,xLevel+1,bOptimize);}
732var st=isXML ? node.text : node;var s=content.replace(r_index,(j+1));if(typeof st=="string"){
733s=s.replace(r_text,st);if(r_escape_text.test(s))s=s.replace(r_escape_text,escape(st));if(r_plain_text.test(s))s=s.replace

(r_plain_text,st.replace(/[\r\n\t'"]/g," "));if(r_entity_text.test(s))s=s.replace(r_entity_text,st.Text2HTML());}
734if(0==j){
735var attributes=content.match(r_attribute_global);if(attributes==null){
736attributes=[];}else if(bOptimize){
737var tempArray=[],oPushed={};for(var m=0,mLen=attributes.length; m<mLen; m++){
738if(m==0||!oPushed[attributes[m]]){
739tempArray.push(attributes[m]);oPushed[attributes[m]]=true;}}
740attributes=tempArray.sort().reverse();}}
741for(var k=0; k<attributes.length; k++){
742var attrTag=attributes[k].replace(/\W/g,"");var attrValue=isXML ? nodes[j].getAttribute(attrTag): nodes[j][attrTag];if

(attrValue==null&&isXML&&nodes[j].selectSingleNode(attrTag)!=null)attrValue=nodes[j].selectSingleNode(attrTag).text;if

(attrValue==null)attrValue="";attrValue=attrValue.toString();if(/@#/.test(attributes[k]))attrValue=escape(attrValue);if

(/@~/.test(attributes[k]))attrValue=attrValue.replace(/[\r\n\t'"]/g," ");if(/@&/.test(attributes[k]))

attrValue=attrValue.Text2HTML();var reg=new RegExp(attributes[k],"g");s=s.replace(reg,attrValue.replace(/\$/g,"$$$$"));}
743arContent[j]=s;if(fnCallBack)fnCallBack(node,arContent,j);}
744templetHTML=templetHTML.replace(replaceContent,arContent.join(""));}
745return templetHTML;}
746function objSelectNodes(obj,oPath){
747if(/^\//.test(oPath))oPath=oPath.substr(1);var a=oPath.split("/");var f=a.shift();if(f){
748var o=obj[f];}else{
749var o=obj;}
750if(!o)return[];if(!o.sort)o=[o];if(a.length==0) return o;var subPath=a.join("/");var result=[];for(var

i=0;i<o.length;i++){
751var a=objSelectNodes(o[i],subPath);if(a&&a.length>0)
752result=result.concat(a);}
753return result;}
754function objSelectSingleNode(obj,oPath){
755var o=objSelectNodes(obj,oPath);return(o.length>=1)?(o[0]):(null);}
756function objectClone(obj){
757if((typeof obj)===(typeof null)){
758var res=(!obj.sort)?{}:[];for(var i in obj)
759res[i]=objectClone(obj[i]);return res;}
760return obj;}
761function jsonInit(url,errCallBack){
762var s=document.createElement("SCRIPT");document.getElementsByTagName("HEAD")[0].appendChild(s);s.src=url;if(errCallBack){
763s.onerror=errCallBack;if(!!document.all){
764s.onreadystatechange=function(){
765s.onreadystatechange=null;if(this.readyState=="loaded")
766setTimeout(errCallBack,2000);}}}
767return s;}
768function loadJsonData(xID,url,callback,errcallback,refresh,charset,callbackFunctionName){
769if(typeof(top.g_JData)!="object"){
770top.g_JData=[];}
771if(!refresh&&top.g_JData[xID]&&!top.g_JData[xID].error){
772callback(top.g_JData[xID]);return;}
773charset=charset?charset:"GB2312";var cFN=callbackFunctionName?callbackFunctionName:"JsonCallback";if(!!document.all){
774var df=document.createDocumentFragment();df[cFN]=function(data){
775s.onreadystatechange=null;df=null;top.g_JData[xID]=data;try{
776if(callback)callback(data);}catch(e){
777if(e.number==-2146823277)return;status=e.message;setTimeout("status=''",3000);}}
778var s=df.createElement("SCRIPT");s.charset=charset;df.appendChild(s);s.onreadystatechange=function(){
779if(s.readyState=="loaded"){
780s.onreadystatechange=null;df=null;try{
781if(errcallback)errcallback({error:{msg:"服务器繁忙,请稍后再试.",type:900}});}catch(e){
782if(e.number!=-2146823277)
783status=e.message;setTimeout("status=''",3000);}}}
784s.src=url;}else{
785var frm=document.createElement("iframe");frm.style.width=frm.style.height=frm.style.borderWidth="0";var

dout='<html><head><meta http-equiv="Content-type" content="text/html; charset='+charset+'"

/></head><body><script>document.domain="'+document.domain+'";function '+cFN+'(o){frameElement.callback(o);}<\/script><script

src="'+url+'" charset="'+charset+'"><\/script><script>setTimeout

(frameElement.errorCallback,50);<\/script></body></html>';frm.callback=function(data){
786top.g_JData[xID]=data;callback(data);frm.callback=null;frm.src="about:blank"
787removeElement(frm);frm=null;}
788frm.errorCallback=errcallback;if(Browser.isOpera){
789frm.src="javascript:'"+dout+"'";document.body.appendChild(frm);}else{
790document.body.appendChild(frm);frm.contentWindow.document.open('text/html');frm.contentWindow.document.write

(dout);frm.contentWindow.document.close();}}}
791JsLoader=function(){
792this.loaded=false;this.debug=true;this.onload=function(){};this.onerror=function(){};}
793JsLoader.scriptId=1;JsLoader.prototype.load=function(src,doc,charset){
794var sId=JsLoader.scriptId;JsLoader.scriptId++;var o=this;setTimeout(function(){
795o._load2.apply(o,[sId,src,doc,charset]);o=null;},0);}
796JsLoader.prototype._load2=function(sId,src,doc,charset){
797_doc=doc||document;charset=charset||"gb2312";var _ie=Browser.isIE;var _js=_doc.createElement("script");Event.observe(_js,

(_ie ? "readystatechange" : "load"),
798(function(o){
799if(_ie){
800return(function(){
801if(/(complete|loaded)/.test(_js.readyState)){
802o.onload();if(!o.debug){
803dom.removeElement(_js);}
804_js=null;}});}else{
805return(function(){
806o.onload();if(!o.debug){
807dom.removeElement(_js);}
808_js=null;});}})(this));if(!_ie){
809Event.observe(_js,(_ie ? "readystatechange" : "load"),
810(function(o){
811return(function(){
812o.onerror();if(!o.debug){
813dom.removeElement(_js);}
814_js=null;});})(this)
815);}
816_js.id="js_"+sId;_js.defer=true;_js.charset=charset;_js.src=src;_doc.getElementsByTagName("head")[0].appendChild(_js);}
817FormSender=function(actionURL,method,data,charset){
818this.name="_fpInstence_"+FormSender.counter;FormSender.instance[this.name]

=this;FormSender.counter++;this.method=method||"POST";this.uri=actionURL;this.data=(Object.isHashMap(data)||typeof(data)

=='string')? data :

null;this.proxyURL='http://imgcache.qq.com/qzone/v5/toolpages/fp_gbk.html';this._sender=null;this.onSuccess=function()

{};this.onError=function(){};};var ua={};FormSender.instance={};FormSender.counter=0;FormSender._errCodeMap={
819999 :{
820msg : 'Connection or Server error'}};FormSender.prototype.send=function(){
821if(this.method=='POST'&&this.data==null){
822return false;}
823function clear(o){
824o._sender=o._sender.callback=o._sender.errorCallback=o._sender.onreadystatechange=null;if

(Browser.isSafari||Browser.isOpera){
825setTimeout('removeNode($("_fp_frm_'+o.name+'"))',50);}else{
826removeNode($("_fp_frm_"+o.name));}}
827if(this._sender===null||this._sender===void(0)){
828var sender=document.createElement

("iframe");sender.id="_fp_frm_"+this.name;sender.style.width=sender.style.height=sender.style.borderWidth="0";sender.style.di

splay="none";document.body.appendChild(sender);sender.callback=(function(o){
829clearInterval(interval);clear(this);this.onSuccess(o);}).bind(this);sender.errorCallback=(function(o){
830clearInterval(interval);clear(this);this.onError(o);}).bind(this);if(typeof sender.onreadystatechange!='undefined'){
831sender.onreadystatechange=(function(){
832if(this._sender.readyState=='complete'&&this._sender.submited){
833clear(this);this.onError(FormSender._errCodeMap[999]);}}).bind(this);}
834else{
835var interval=setInterval((function(){
836try{
837var _t=this._sender.contentWindow.location.href;if(_t.indexOf(this.uri)==0){
838clear(this);this.onError(FormSender._errCodeMap[999]);clearInterval(interval);}}catch(err){
839clear(this);this.onError(FormSender._errCodeMap[999]);clearInterval(interval);}}).bind(this),100);}
840this._sender=sender;}
841this._sender.src=this.proxyURL;return true;};FormSender.prototype.destroy=function(){
842var n=this.name;delete FormSender.instance[n]._sender;FormSender.instance[n]._sender=null;delete FormSender.instance

[n];FormSender.counter--;return null;};var PostLoader={};PostLoader.onload=function(framename){
843var frame=$(framename);try{
844eval("varname="+frame.contentWindow.name);}catch(e){
845window.status=e.message;}
846PostLoader[framename].callback(varname);frame.onload=null;removeElement(frame);PostLoader[framename]=null;return;}
847function loadPostJson(callback,framename,charset){
848var charset=charset?charset:"utf-8";PostLoader[framename]={}
849PostLoader[framename].callback=callback;var i=document.createElement

("IFRAME");i.name=framename;i.id=framename;i.charset=charset;i.onload=PostLoader.onload.bind

(i,framename);document.body.appendChild(i);var str='<iframe id="'+framename+'" name="'+framename+'" charset="'+charset+'"

onload="javascript: PostLoader.onload(\''+framename+'\')"></frame>';i.outerHTML=str;return true;}
850function loadJsonStr(xID,url,callback,errcallback,refresh,charset,varname){
851charset=charset?charset:"utf-8";var cFN="JsonCallback";varname=varname?varname:"RESULT";if(!!document.all){
852var df=document.createDocumentFragment();df[cFN]=function(){
853try{
854if((df[varname]==undefined)&&errcallback){
855errcallback();return;}
856if(callback){
857callback(df[varname]);}}catch(e){
858if(e.number==-2146823277)return;status=e.message;setTimeout("status=''",3000);}
859s.onreadystatechange=null;df=null;}
860df[varname]=null;var s=df.createElement("SCRIPT");s.charset=charset;df.appendChild(s);s.onreadystatechange=function(){
861if(s.readyState=="loaded"){
862df[cFN]();}}
863s.src=url;}else{
864var i=document.createElement("IFRAME");i.style.display="none";i.callback=function(data){
865callback(data);i.callback=null;i.src="about:blank"
866removeElement(i);i=null;};i.errcallback=errcallback;i.src="javascript:\"<script src='"+url+"'

charset='"+charset+"'><\/script><script> try{if("+varname+"){frameElement.callback(eval("+varname+"))}}catch(e)

{frameElement.errcallback({error:{msg:\\\"服务器繁忙,请稍后再试 \\\",type:900}})}<\/script>\"";document.body.appendChild

(i);}}
867var callBackHsmp=new Array();function loadXMLAsyncNoCache(xID,xUrl,callback,err_callback,data,returnType){return

loadXMLAsync(xID,xUrl,callback,err_callback,true,data,returnType);};function LoadXMLDataEx

(itemno,url,callback,err_callback,data){return loadXMLAsync(itemno,url,callback,err_callback,false,data);};function

loadXMLAsync(xID,xUrl,callback,err_callback,nocache,data,returnType){
868var m=xUrl.match(/(^http:\/\/([a-z,A-Z,0-9,\-,_,\.]+\.qq\.com)\/)/);if(!m){alert("不能访问非qq.com域的资源");return;}
869var domain=m[0];var host=m[2];var proxyPageURL=domain+"proxy.html";if(domain=="http://imgcache.qq.com/")
870proxyPageURL="http://imgcache.qq.com/qzone/proxy.html";var f=document.getElementsByTagName("iframe");for(var

i=0;i<f.length;i++){
871var isRightProxy=false;try{isRightProxy=f[i].src.indexOf(proxyPageURL)==0}catch(e){}
872if(isRightProxy){
873if(!callBackHsmp[host]&&typeof callBackHsmp[host]!="undefined"){
874frames[i].loadXMLAsync(xID,xUrl,callback,err_callback,nocache,data,returnType);}else{
875if(typeof callBackHsmp[host]=="undefined")callBackHsmp[host]=[];callBackHsmp[host][callBackHsmp[host].length]={
876"callback":callback,
877"xID":xID,
878"xUrl":xUrl,
879"err_callback":err_callback,
880"nocache":nocache,
881"data":data,
882"returnType":returnType};}
883return;}}
884if(!callBackHsmp[host]){
885callBackHsmp[host]=[{
886"callback":callback,
887"xID":xID,
888"xUrl":xUrl,
889"err_callback":err_callback,
890"nocache":nocache,
891"data":data,
892"returnType":returnType}];createProxy(proxyPageURL);}};function createProxy(src){
893var f=document.getElementsByTagName("iframe");for(var i=0;i<f.length;i++)
894if(f[i].src.indexOf(src)!=-1)return;var i=document.createElement("iframe");var proxyDiv=document.getElementById

("proxy");if(!proxyDiv){
895document.body.insertBefore(i,null);}else{
896document.getElementById("proxy").appendChild(i);}
897i.width=0;i.height=0;i.src=src;i=null;}
898function getXMLDOM(){
899if(!Browser.isIE)return null;var xmldomversions=

['MSXML2.DOMDocument.5.0','MSXML2.DOMDocument.4.0','MSXML2.DOMDocument.3.0','MSXML2.DOMDocument','Microsoft.XMLDOM'];for(var

i=xmldomversions.length-1;i>=0;i--)
900try{
901return new ActiveXObject(xmldomversions[i]);}catch(e){}
902return null;}
903function getXMLHTTP(){
904if(window.XMLHttpRequest)return new XMLHttpRequest();if(Browser.isIE){
905var xmlhttpversions=

['MSXML2.XMLHTTP.5.0','MSXML2.XMLHTTP.4.0','MSXML2.XMLHTTP.3.0','MSXML2.XMLHTTP','Microsoft.XMLHTTP'];for(var

i=xmlhttpversions.length-1;i>=0;i--){
906try{
907return new ActiveXObject(xmlhttpversions[i]);}catch(e){}};var s="对不起,您浏览器设置不支持QQ空间打开,请尝试在IE菜单中打

开\n“工具”-“Internet选项”-“安全”-“自定义级别”,将\n“对标记为可安全执行脚本的ActiveX控件执行脚本”和\n“运行ActiveX控

件和插件”\n这两项选项更改为“允许”,再重新打开空间。";if(document.cookie.indexOf("xmlhttp_fail")>-1)
908alert(s);status=s;for(var i=1;i<32;i++){
909setTimeout("status=\""+s.substring(0,123).replace(/\n/g,"").substr(i)+"\"",i*300+3000);}
910document.cookie="xmlhttp_fail=prompted";return null;}}
911function parseXML(st){
912if(Browser.isIE){
913var result=getXMLDOM();result.loadXML(st);}else{
914var parser=new DOMParser();var result=parser.parseFromString(st,"text/xml");}
915return result;}
916function getElementText(doc,xpath){
917var retval="";if(!doc)return "";var v=doc.selectSingleNode(xpath);if(v)retval=v.text;return retval;}
918function getSubNodeText(xmlnode,subnodename){
919with(xmlnode){
920try{
921return selectSingleNode(subnodename).text;}catch(e){
922return "";}}}
923function getAlbumDialog(){
924document.domain="qq.com";var val;var obj=window;val=showModalDialog

("http://imgcache.qq.com/qzone/biz/comm/web/act_pic_upload.html",obj,"dialogWidth:380px;dialogHeight:400px;status:no;help:no"

);if(!val)return false;return val;}
925function getAlbumDialog2(callback){
926var dislogCssId='_act_dialog_css';var dialogCss=CSS.getStyleSheetById(dislogCssId);if(!dialogCss){
927var dialogCss=CSS.insertCSSLink("http://imgcache.qq.com/ACT/act_common/css/dialog.css");dialogCss.id=dislogCssId;if

(dialogCss.ownerNode){
928dialogCss.ownerNode.id=dislogCssId;}}
929document.domain="qq.com";var d1=Window.create("http://imgcache.qq.com/qzone/biz/comm/web/photoalbum

/actPicture2.html",450,400);d1.setProp('opacity',20);d1.setModel(true);d1.setProp('title',' 相册选择');d1.show

();window.photoAlbumSelectClose=function(returnValue){
930d1.close();callback(returnValue);}}
931function getFriendDialog(uin,maxcount){
932document.domain="qq.com";maxcount=maxcount||1;uin=uin+"";var reQQ=/^[1-9]\d{4,10}$/;if(!reQQ.test(uin)&&uin!=""){
933return false;}
934var qq_data=showModalDialog("http://imgcache.qq.com/qzone/biz/comm/web/friend/friendsSelect.html?

uin="+uin+"&maxcount="+maxcount,"","dialogHeight: 430px; dialogWidth: 400px;status:no");if(!qq_data)return false;return

qq_data;}
935function getFriendDialog2(uin,maxcount,callback){
936var dislogCssId='_act_dialog_css';var dialogCss=CSS.getStyleSheetById(dislogCssId);if(!dialogCss){
937var dialogCss=CSS.insertCSSLink("http://imgcache.qq.com/ACT/act_common/css/dialog.css");dialogCss.id=dislogCssId;if

(dialogCss.ownerNode){
938dialogCss.ownerNode.id=dislogCssId;}}
939document.domain="qq.com";maxcount=maxcount||1;uin=uin+"";var reQQ=/^[1-9]\d{4,10}$/;if(!reQQ.test(uin)&&uin!=""){
940return false;}
941var d1=Window.create("http://imgcache.qq.com/qzone/biz/comm/web/friend /friendsSelect1.html?

uin="+uin+"&maxcount="+maxcount,450,400); d1.setProp('opacity',20);d1.setModel(true);d1.setProp('title','好友选择 ');d1.show

();window.frindSelectClose=function(returnValue){
942d1.close();callback(returnValue);}}
943function getVideoDialog(){
944document.domain="qq.com";var val;var val=showModalDialog

("http://video.qq.com/v1/qzone/insert","","dialogWidth:535px;dialogHeight:500px;status:no;help:no");if(!val)return

false;return val;}
945function sendQzoneMsgDialog(uin,title,content){
946document.domain="qq.com";uin=uin+"";var reQQ=/^[1-9]\d{4,10}$/;if(!reQQ.test(uin)&&uin!=""){
947return false;}
948title=encodeURIComponent(title+"");content=encodeURIComponent(content+"");showModalDialog

('http://imgcache.qq.com/qzone/biz/comm/web/msg/msg_editor.html?para='+uin+'|'+title+'|'+content,"","dialogHeight: 400px;

dialogWidth: 600px;status:no");return true;}
949function sendQzoneMsg(uin,title,content){
950var dislogCssId='_act_dialog_css';var dialogCss=CSS.getStyleSheetById(dislogCssId);if(!dialogCss){
951var dialogCss=CSS.insertCSSLink("http://imgcache.qq.com/ACT/act_common/css/dialog.css");dialogCss.id=dislogCssId;if

(dialogCss.ownerNode){
952dialogCss.ownerNode.id=dislogCssId;}}
953document.domain="qq.com";title=encodeURIComponent(title);content=encodeURIComponent(content);var d1=Window.create

('http://imgcache.qq.com/qzone/biz/comm/web/msg /msg_editor1.html?para='+uin+'|'+title+'|'+content,600,400); d1.setProp

('opacity',20);d1.setModel(true);d1.setProp('title','影集选择 ');d1.show();}
954function setHomePage(obj,url){
955if(!document.all){
956if(window.netscape){
957try{
958netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");}
959catch(e){
960alert("此操作被浏览器拒绝!\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]

设置为'true'");}}
961var prefs=Components.classes['@mozilla.org/preferences-service;1'].getService

(Components.interfaces.nsIPrefBranch);prefs.setCharPref('browser.startup.homepage',url);}else{
962obj.style.behavior='url(#default#homepage)';obj.setHomePage(url);}}
963function checksearch(obj,defaultWords,n){
964if(n==0&&obj.value==defaultWords){obj.value="";obj.style.cssText="color:#3C3C3C";}
965if(n==1){
966if(obj.value==defaultWords){obj.value="";}
967obj.style.cssText="color:#3C3C3C";}
968if(n==2&&obj.value==""){obj.value=defaultWords;obj.style.cssText="color:#C9C9C9";}
969if(n==3){
970if(obj.value!=""){obj.value="";}
971obj.style.cssText="color:#3C3C3C";}}
972function entryTextTips(o,divId,maxlength){
973var len=o.value.length;if(len>maxlength)o.value=o.value.substr(0,maxlength);else{
974var div;if(typeof(divId)=="object")
975div=divId;else
976div=document.getElementById(divId);if(div){
977div.innerHTML='已输入'+o.value.length+'个字(最多'+maxlength+'字)'}}}
978function textTypeTip(o,tipDiv,maxlength){
979Event.observe(o,'keyup',entryTextTips.bind(null,$(o),tipDiv,maxlength));Event.observe(o,'keydown',entryTextTips.bind

(null,$(o),tipDiv,maxlength));Event.observe(o,'keypress',entryTextTips.bind(null,$(o),tipDiv,maxlength));}
980function tab(containId,tabTId,hlClass,tabCtag,tabCClass,tabCallBack,defTab,tsTag){
981var container=$(containId);var tabts=$(tabTId).getElementsByTagName(tsTag ? tsTag : 'a');var tabcs=new Array();var

tlength=tabts.length;var cChilds=$A(container.childNodes);cChilds.each(function(child,index){
982if(child.tagName&&child.tagName.toLowerCase()==tabCtag&&(CSS.hasClassName(child,tabCClass))){
983tabcs.push(child);}});var dipTab=function(e,tn){
984if(tabts.length==0){
985window.status='do not find any tab head element for '+container.id;return;}
986if(tabcs.length==0){
987window.status='do not find any tab body element for '+container.id;return;}
988for(i=0; i<tlength; i++){
989var tabn=tabts[i];var rp=new RegExp(hlClass+"$");tabn.className=tabn.className.replace(rp,'');tabcs

[i].style.display='none';}
990tabts[tn].className+=hlClass;tabcs[tn].style.display='';if(tabCallBack){
991tabCallBack(tn);}}
992defTab=defTab||0;dipTab(null,defTab);for(i=0; i<tlength; i++){
993Event.observe(tabts[i],'click',dipTab.bindAsEventListener(null,i));}}
994function adjustSize(obj,w,h,openWindows){
995obj.onload=null;if(w<=0||h<=0)return;var img=new Image();img.src=obj.src;var w0=img.width,h0=img.height,r=false;if

((w0/h0)>(w/h)){
996if(w0>w){
997obj.style.width=w+"px";obj.style.height=w*(h0/w0)+"px"
998r=true;}else{
999obj.style.width=w0+"px";obj.style.height=h0+"px"}}else{
1000if(h0>h){
1001obj.style.height=h+"px";obj.style.width=h*(w0/h0)+"px"
1002r=true;}else{
1003obj.style.width=w0+"px";obj.style.height=h0+"px"}}
1004if(openWindows&&r){
1005obj.style.cursor="pointer";obj.title="点击预览原图";obj.onclick=function(){
1006window.open(obj.src);}}}
1007function fixImgSize(obj,w,h,openWindows){
1008obj.onload=null;if(w<=0||h<=0)return;var img=new Image();img.src=obj.src;var w0=img.width,h0=img.height,r=false;if

((w0/h0)>(w/h)){
1009obj.style.width=w+"px";obj.style.height=w*(h0/w0)+"px"
1010r=true;}else{
1011obj.style.height=h+"px";obj.style.width=h*(w0/h0)+"px"
1012r=true;}
1013if(openWindows&&r){
1014obj.style.cursor="pointer";obj.title="点击预览原图";obj.onclick=function(){
1015window.open(obj.src);}}}
1016function scaleImage(mid,width,height){
1017img=$(mid);if(img.complete){
1018adjustSize(img,width,height);return;}
1019img.onload=function(){
1020adjustSize(img,width,height);};}
1021function openInNew(url,target){
1022target=target||'_blank';var a=document.createElement

('a');a.href=url;a.target=target;a.style.diaplay='none';document.body.appendChild(a);try{
1023a.click();}catch(e){
1024var evt=document.createEvent("MouseEvents");evt.initEvent("click",true,true);a.dispatchEvent(evt);window.open(url);}
1025document.body.removeChild(a);}
1026function showPageList(curPage,totalPage,pagesPerList,linkFormat,styleObj,delimiter){
1027if(curPage<1||totalPage<=1||curPage>totalPage)
1028return "";if(!styleObj){
1029styleObj=

{};styleObj.textClass='page_text';styleObj.preClass='page_pre';styleObj.nextClass='page_next';styleObj.curPageClass='page_cur

';styleObj.otherPageClass='page_other';styleObj.jumpClass='page_jump'
1030styleObj.inputClass='page_enter';styleObj.pageClass='page_page';styleObj.submitClass='page_submit'}
1031if(!delimiter)delimiter=" ";var m=[];var startPageNo=curPage-parseInt(pagesPerList/2)<1?1:curPage-parseInt

(pagesPerList/2);var endPageNo=startPageNo+pagesPerList-1>totalPage ? totalPage : startPageNo+pagesPerList-1;var

count=endPageNo-startPageNo+1;startPageNo=count!=pagesPerList?(startPageNo-(pagesPerList-

count)):startPageNo;startPageNo=startPageNo<1?1:startPageNo;var prePageNo=curPage>1 ? curPage-1 : 1;var

nextPageNo=curPage<totalPage ? curPage+1 : totalPage;var reg=new RegExp("{no}","g");var url;var i;m[m.length]='<P>';m

[m.length]='<SPAN class="'+styleObj.textClass+'">第'+curPage+'/'+totalPage+'页</SPAN& gt;'
1032if(1==curPage){
1033m[m.length]='<A class="'+styleObj.preClass+'" title="上一页" href="###" onclick="return false">上一页</A>'+delimiter;}

else{
1034url=linkFormat.replace(reg,prePageNo);m[m.length]='<A class="'+styleObj.preClass+'" title="上一页" href="'+url+'">上一页

</A>'+delimiter;}
1035for(i=startPageNo;i<=endPageNo;i++) {
1036url=linkFormat.replace(reg,i);if(i==curPage){
1037m[m.length]='<SPAN class="'+styleObj.curPageClass+'">'+i+'</SPAN>'+delimiter;}
1038else
1039m[m.length]='<A class="'+styleObj.otherPageClass+'" title="'+i+'" href="'+url+'">'+i+'</A>'+delimiter;}
1040if(totalPage==curPage){
1041m[m.length]='<A class="'+styleObj.nextClass+'" title="下一页" href="#" onclick="return false">下一页</A>';}else{
1042url=linkFormat.replace(reg,nextPageNo);m[m.length]='<A class="'+styleObj.nextClass+'" title="下一页" href="'+url+'">下一

页</A>';}
1043var linkstr=linkFormat.replace(/'|"/g,"\\'");m[m.length]='<SPAN class="'+styleObj.jumpClass+'">'+'跳到'+'</SPAN>';m

[m.length]='& lt;SPAN class="'+styleObj.inputClass+'">';m[m.length]='<INPUT onkeyup="if(event.keyCode==13)goPage

('+curPage+',this.value,'+totalPage+',\''+linkstr+'\');">'
1044m[m.length]='</SPAN>'
1045m[m.length]='<SPAN class="'+styleObj.pageClass+'">'
1046m[m.length]='页';m[m.length]='</SPAN>'
1047m[m.length]='<SPAN class="'+styleObj.submitClass+'">';m[m.length]='<INPUT onclick="goPage

('+curPage+',this.parentNode.previousSibling.previousSibling.firstChild.value,'+totalPage+',\''+linkstr+'\');" type="button"

value="GO">'
1048m[m.length]='</SPAN>';m[m.length]='</P>';return m.join("");}
1049function goPage(curPage,enterPage,totalPage,linkFormat){
1050var re=new RegExp("^\\s*[1-9]\\d*\\s*$");if(!re.test(enterPage)){
1051alert("输入页码必须为正整数");return false;}
1052enterPage=parseInt(enterPage);if(enterPage>totalPage||enterPage<=0){
1053alert("输入页码范围不正确");return false;}
1054if(curPage==enterPage){
1055return false;}
1056var reg=new RegExp("{no}","g");linkFormat=linkFormat.replace(reg,enterPage);if(linkFormat.indexOf("javascript")!=-1){
1057var sFun=linkFormat.split(":");if(sFun.length>0)
1058eval(sFun[1]);return;}else{
1059location.href=linkFormat;return;}}
1060function pgvThisPage(curdomain,curUrl,pgvSrc){
1061var url=pgvSrc||'http://pingjs.qq.com/ping.js';var s=document.createElement("SCRIPT");var pgvpagefun=function(){
1062if(typeof(pgvMain)=='function'){
1063pvCurDomain=curdomain||"act.qzone.qq.com";if(curUrl){
1064pvCurUrl=curUrl;}
1065pgvMain();}}
1066s.onreadystatechange=pgvpagefun;document.body.appendChild(s);s.src=url;}
1067addEvent(window,'load',function(){pgvThisPage()});function showFlashAlbum(callback,conf){
1068var dislogCssId='_act_dialog_css';var dialogCss=CSS.getStyleSheetById(dislogCssId);if(!dialogCss){
1069var dialogCss=CSS.insertCSSLink("http://imgcache.qq.com/ACT/act_common/css/dialog.css");dialogCss.id=dislogCssId;if

(dialogCss.ownerNode){
1070dialogCss.ownerNode.id=dislogCssId;}}
1071var qq=getQQNum();document.domain='qq.com';top.g_iUin=qq;if(!top.g_XDoc){
1072top.g_XDoc={};}
1073var url='http://imgcache.qq.com/qzone/biz/comm/web/flashalbum/flashphoto.htm';if(conf.mid&&conf.name){
1074var name=encodeURIComponent(conf.name);url+="?mid="+conf.mid+"&name="+name;}
1075var d1=Window.create(url,500,300);d1.setProp('opacity',20); d1.setModel(true);d1.setProp('title','影集选择 ');d1.show

();window.closeFlashAlbumPopup=function(){
1076d1.close();var fp=top.g_XDoc['selectVphoto'];if(fp&&fp.length==3){
1077var fid=fp[0];var qq=fp[2];var furl='http://imgcache.qq.com/qzone/client/photo/swf/vphoto.swf?

uin='+qq+'&fid='+fid;fp.push(furl);}
1078callback(top.g_XDoc['selectVphoto']);}}
1079var Vphoto={
1080getList:function(uin,callback,refresh){
1081document.domain='qq.com'
1082if(typeof(top.g_XDoc)!="object"){
1083top.g_XDoc=[];}
1084var xID='Vphoto'+uin;var xUrl='http://photo.qq.com/cgi-bin/common/cgi_flash_list?uin='+uin;var o=this;refresh=(refresh!

=undefined)?refresh:false;loadXMLAsync(xID,xUrl,o.doList.bind(this,callback),o.doList.bind(this,callback),refresh);},
1085doList:function(callback,obj){
1086if(typeof(obj)!="object"){
1087obj={error:{type:500,msg:"服务器忙,请稍候再试",errcode:500}}
1088callback(obj);return;}
1089var data={};var xmlObj=obj.responseXML;var nodes=xmlObj.selectNodes("/data/flash");if(nodes){
1090for(var i=0;i<nodes.length;i++){
1091var id=parseInt(nodes[i].selectSingleNode("id").text);data[id]={};data[id]["time"]=nodes[i].selectSingleNode

("time").text;data[id]["name"]=nodes[i].selectSingleNode("name").text;data[id]["desc"]=nodes[i].selectSingleNode

("desc").text;data[id]["url"]=nodes[i].selectSingleNode("url").text;data[id]["fbit"]=nodes[i].selectSingleNode

("fbit").text;}}
1092callback(data);}}
1093function modelwnd(divid,opacity,zIndex){
1094divid=divid||'mod_wnd';var ifrId='ifr_'+divid ;zIndex=zIndex||900;var divE=document.getElementById(divid);if

(divE==undefined){
1095var iframeWidth=Math.max(screen.width,document.body.scrollWidth);var iframeHeight=Math.max

(screen.height,document.body.scrollHeight);var opacity=opacity||40;var mopacity=opacity/100;var divE=document.createElement

('div');divE.id=divid;divE.style.position="absolute";DOM.setStyle(divE,'opacity',mopacity);DOM.setStyle

(divE,'backgroundColor','black');divE.style.top="0px";divE.style.left="0px";divE.style.width=iframeWidth+"px";divE.style.heig

ht=iframeHeight+"px";divE.style.zIndex=zIndex;divE.innerHTML='<div style="position: absolute; left: 0px; height: 0px; width:

100%; height: 100%;"></div><iframe scrolling="No" id="'+ifrId+'" style="z-index:-1; background: black; width: 100%; height:

100%;" border="0" frameborder="0" src=""></iframe>';document.body.appendChild(divE);}
1096divE.style.display="block";}
1097function hiddenModelWnd(divid){
1098divid=divid||'mod_wnd';var e=document.getElementById(divid);if(e==undefined){return;}
1099e.style.display="none";}
1100function centerElement(el){
1101el=DOM.get(el);var scrollTop=DOM.getScrollTop();var scrollLeft=DOM.getScrollLeft();var clientWidth=DOM.getClientWidth

();var clientHeight=DOM.getClientHeight();var width=el.clientWidth;var

height=el.clientHeight;el.style.position="absolute";el.style.left=(scrollLeft+(clientWidth/2-width/2))+"px";el.style.top=

(scrollTop+(clientHeight/2-height/2))+"px";}
1102function clearSelect(id){
1103var sObj=DOM.get(id);if((sObj==undefined)||(sObj.tagName.toUpperCase()!="SELECT")){
1104return false;}
1105for(var i=sObj.length;i>=0;i--){
1106sObj.options[i]=null;}
1107return true;}
1108function setSelect(id,v){
1109var sObj=$(id);if((sObj==undefined)||(sObj.tagName.toUpperCase()!="SELECT")){
1110return false;}
1111for(var i=0; i<sObj.length; i++){
1112if(sObj.options[i].value==v){
1113sObj.options[i].selected=true;}}
1114return true;}
1115function addSelectItem(id,txt,val,selected){
1116var sObj=$(id);if((sObj==undefined)||(sObj.tagName.toUpperCase()!="SELECT")){
1117return false;}
1118selected=selected||false;var opt=new Option(txt,val,false,false);sObj.options[sObj.options.length]

=opt;opt.selected=selected;return true;}
1119function getSingleSelectValueById(id){
1120var sObj=$(id);if((sObj==undefined)||(sObj.tagName.toUpperCase()!="SELECT")){
1121return false;}
1122return sObj.options[sObj.selectedIndex].value;}
1123function GuideBanner(containID,styleObject,speed){
1124this.navigateValues=[];this.containObject=document.getElementById

(containID);this.mainElement=null;this.navElement=null;this.imageContainElement=null;this.guideId=containID+"_banner";this.ta

rget="_blank";this.speed=speed||100;this._timerId="_"+this.guideId+"_timer";this._currentFrame=0;this._navButtons=[];window

[this._timerId]=0;if(!styleObject){
1125styleObject={};styleObject.containClass="banner"
1126styleObject.navClass="banner_nav"
1127styleObject.numberClass="number"
1128styleObject.textClass="newtab"
1129styleObject.selectedClass="selectedClass"
1130styleObject.contentClass="banner_content"}
1131this._styleObject=styleObject;}
1132GuideBanner.prototype.build=function(){
1133this.mainElement=document.createElement

("div");this.mainElement.className=this._styleObject.containClass;this.containObject.appendChild

(this.mainElement);this._buildNav();this.play(this._currentFrame);}
1134GuideBanner.prototype.addData=function(url,imageUrl,description,clickCallback,customArgument){
1135this.navigateValues.push({url:url,imageUrl:imageUrl,description:description,clickCallback:clickCallback?

clickCallback:null,customArgument:customArgument?customArgument:{}});return this.navigateValues.length-1;}
1136GuideBanner.prototype._buildNav=function(){
1137this.navElement=document.createElement

("p");this.navElement.className=this._styleObject.navClass;this.mainElement.appendChild

(this.navElement);this.imageContainElement=document.createElement("div");this.mainElement.appendChild

(this.imageContainElement);var arrHTML=[];var o=this;for(var i=0;i<this.navigateValues.length;i++){
1138var _tmpA=document.createElement("A");var customString=[];_tmpA.style.cursor="pointer";with(_tmpA){
1139href=this.navigateValues[i].url;title=this.navigateValues[i].description;target=this.target;innerHTML=['<span

class="'+this._styleObject.numberClass+'">',(i+1),'</span><span

class="'+this._styleObject.textClass+'">',title,'</span>'].join("");}
1140for(var k in this.navigateValues[i].customArgument){
1141_tmpA.setAttribute(k,this.navigateValues[i].customArgument[k]);customString.push(k+'="'+this.navigateValues

[i].customArgument[k]+'" ');}
1142_tmpA.setAttribute("navId",i);this._addEvent(_tmpA,"click",this.navigateValues[i].clickCallback);this._addEvent

(_tmpA,"mouseover",function(e){o._overNavButton.call(o,e)});this._addEvent(_tmpA,"mouseout",function(e){o._outNavButton.call

(o,e)});this.navElement.appendChild(_tmpA);this._navButtons.push(_tmpA);arrHTML.push('<div id="'+(this.guideId+"_i"+i)+'"

class="'+this._styleObject.contentClass+'" style=" display:none;"><a id="'+(this.guideId+"_a"+i)+'" target="'+this.target+'"

href="'+this.navigateValues[i].url+'" '+customString.join("")+'><img src="'+this.navigateValues[i].imageUrl+'"

/></a></div>');}
1143this.imageContainElement.innerHTML=arrHTML.join("");}
1144GuideBanner.prototype._overNavButton=function(e){
1145clearTimeout(window[this._timerId]);var navObject=window.event?event.srcElement:e.target;if(navObject.tagName=="SPAN"){
1146navObject=navObject.parentNode;}
1147var navId=navObject.getAttribute("navId");this.play(navId,true);}
1148GuideBanner.prototype._outNavButton=function(e){
1149var o=this;clearTimeout(window[this._timerId]);window[this._timerId]=setTimeout(function(e){o.playNext.call

(o,e)},this.speed);}
1150GuideBanner.prototype.play=function(frame,noLoop){
1151var o=this;clearTimeout(window[this._timerId]);this._hiddenCurrentFrame();var imgItem=document.getElementById

(this.guideId+"_i"+frame);imgItem.style.display="";if(!this.navigateValues[frame]._attachReady){
1152this._addEvent(imgItem,"click",this.navigateValues[frame].clickCallback);this._addEvent(imgItem,"mouseover",function()

{o.stop.call(o)});this._addEvent(imgItem,"mouseout",function(){o.play.call(o,o._currentFrame)});this.navigateValues

[frame]._attachReady=true;}
1153this._navButtons[frame].className=this._styleObject.selectedClass;this._currentFrame=frame;if(!noLoop){
1154window[this._timerId]=setTimeout(function(e){o.playNext.call(o,e)},this.speed);}}
1155GuideBanner.prototype.stop=function(){
1156clearTimeout(window[this._timerId]);}
1157GuideBanner.prototype.playNext=function(){
1158var _nextFrame=this._currentFrame+1;if(_nextFrame>this.navigateValues.length-1){
1159_nextFrame=0;}
1160this.play(_nextFrame);}
1161GuideBanner.prototype._hiddenCurrentFrame=function(){
1162var imgItem=document.getElementById(this.guideId+"_i"+this._currentFrame);imgItem.style.display="none";this._navButtons

[this._currentFrame].className="";}
1163GuideBanner.prototype._addEvent=function(obj,evenTypeName,fn){
1164if(!fn)return;if(obj.addEventListener){
1165obj.addEventListener(evenTypeName,fn,true);return true;}else if(obj.attachEvent){
1166return obj.attachEvent("on"+evenTypeName,fn);}else{
1167return false;}}
1168var verifyCounter=[];function VerifyImage(eleID,x,y){
1169var c=verifyCounter.length;this.timeout=null;this.ipt=null;if(!eleID)
1170this.eleID=eleID="verifyIMG_"+c;this.od=document.createElement("div");with(this.od){
1171style.position="absolute";style.backgroundColor="#505050";style.border="solid 1px

#545454";style.padding="3px";style.zIndex="5000";id=eleID+"_anchor";}
1172this.templete=('<img id="'+eleID+'" onclick="getVerify(\''+eleID+'\','+c+')" style="cursor:pointer;margin-bottom:5px"

src="http://ptlogin2.qq.com/getimage?aid=8000107&sds={{_random_}}" alt="获取中..." title="点击更换" width="130" height="53"

/><br /><span onclick="getVerify(\''+eleID+'\','+c+')" style="color:white;cursor:pointer">看不清楚?换一个</span>');

this.seed=Math.random();this.appended=false;verifyCounter[c]=this;}
1173VerifyImage.prototype.showMe=function(x,y){
1174with(this.od){
1175style.top=(y-85)+"px";style.left=(x+1)+"px";}
1176if(!this.appended){
1177document.body.appendChild(this.od);}
1178this.od.innerHTML=this.templete.replace(/\{\{_random_\}\}/g,this.seed);this.od.style.display="";}
1179VerifyImage.prototype.killMe=function(){
1180this.od.style.display="none";}
1181VerifyImage.prototype.change=function(){
1182var o=$(this.eleID);this.seed=Math.random();o.src="http://ptlogin2.qq.com/getimage?aid=8000107&sds="+this.seed;}
1183function getVerify(s,n){
1184clearTimeout(verifyCounter[n].timeout);verifyCounter[n].change();if(verifyCounter[n].ipt){
1185verifyCounter[n].ipt.value="";verifyCounter[n].ipt.focus();}}
1186function focusGetVerify(o){
1187var pos=getPosition(o);var e=(verifyCounter.length>0)?(verifyCounter[0]):(new VerifyImage());e.seed=Math.random

();e.ipt=o;e.showMe(pos.left,pos.top);o.value="";}
1188function hiddenVerify(isImme){
1189if(!verifyCounter[0])
1190return;if(!isImme)
1191verifyCounter[0].timeout=setTimeout(function(){verifyCounter[0].killMe()},500);else
1192verifyCounter[0].killMe();}
1193function setVerify(inputId){
1194var verInput=$(inputId);verInput.onfocus=focusGetVerify.bind(null,verInput);verInput.onblur= hiddenVerify;}
1195function Marqueeu(aContainer,slider,config){
1196var o=this;this.eleContainer=aContainer;this.eleSlider=slider;this.eleClone=null;this.timer=null;this.stoped=false;var

defConfig={};defConfig.direct="lr"
1197defConfig.isVertical=false;defConfig.speed=10;defConfig.def_tgt='_blank';if(config){
1198Object.extend(config,defConfig,true);}
1199this.config=defConfig;if(!this.config.isVertical){
1200this.offset='offsetWidth';this.scroll='scrollLeft';}else{
1201this.offset='offsetHeight';this.scroll='scrollTop';}}
1202Marqueeu.prototype.initialize=function(){
1203var o=this;this.eleClone=this.eleSlider.cloneNode(true);var eleBak=this.eleSlider.cloneNode

(true);this.eleSlider.parentNode.appendChild(this.eleClone);this.eleSlider.parentNode.appendChild

(eleBak);this.eleContainer.onmouseover=function(e){o.pause.call(o,e)};this.eleContainer.onmouseout=function(e)

{o.stoped=false;o.play.call(o,e)};this.play();}
1204Marqueeu.prototype.play=function(){
1205if(this.stoped){return;}
1206var o=this;if(this.config.direct=='rl'){
1207if(this.eleClone[this.offset]-this.eleContainer[this.scroll]<=0)
1208this.eleContainer[this.scroll]-=this.eleSlider[this.offset];else{
1209this.eleContainer[this.scroll]++;}}else{
1210if(this.eleContainer[this.scroll]<=0)
1211this.eleContainer[this.scroll]+=this.eleClone[this.offset];else{
1212this.eleContainer[this.scroll]--;}}
1213this.timer=setTimeout(function(e){o.play.call(o,e)},this.config.speed);}
1214Marqueeu.prototype.pause=function(){
1215window.clearTimeout(this.timer);this.stoped=true;}
1216var PollPlay=function(pullNum,pollTime,dealFun)

{this.isPlaying=true;this.currPoll=1;this.pullNum=pullNum;this.dealFun=dealFun;this.pollTime=pollTime;this.timer;}
1217PollPlay.prototype.pollPlay=function(){var poller=this;this.timer=setTimeout(function(){poller.pollPlay

();},this.pollTime);if(this.isPlaying){this.currPoll=this.currPoll % this.pullNum+1;this.dealFun(this.currPoll);}}
1218PollPlay.prototype.setCurrentPoll=function(num){this.currPoll=num;}
1219PollPlay.prototype.stopPlay=function(){this.isPlaying=false;if(this.timer!=null){clearTimeout(this.timer);}}
1220PollPlay.prototype.continuePlay=function(cur){this.stopPlay();cur=parseInt(cur);if(!isNaN(cur)){
1221this.setCurrentPoll(cur);}
1222this.isPlaying=true;var poller=this;this.timer=setTimeout(function(){poller.pollPlay();},this.pollTime);}
1223var PPollPlay=function(polls,pollTime,dealFun){
1224this.polls=polls;this.isPlaying=true;this.frun=true;this.curPoll=0;this.prePoll=0;this.dealFun=dealFun;this.pollTime=poll

Time;this.timer;this.onpause=function(){};this.oncontinue=function(){};this.pollArr={};for(var team in polls){
1225var tconfig=polls[team]
1226var tname=tconfig['tag'];var tmembers=[];var tchilds=$(team).childNodes;var tlen=tchilds.length;for(var i=0; i<tlen;

i++){
1227var tchild=tchilds[i];if(tchild.tagName&&(tchild.tagName.toLowerCase()==tname)){
1228tmembers.push(tchild);tchild.onmouseover=this.pause.bind(this,(tmembers.length-

1));tchild.onmouseout=this.continuePlay.bind(this);}}
1229this.pollArr[team]=tmembers;this.pollNum=tmembers.length;}
1230this.preset();}
1231PPollPlay.prototype.preset=function(){
1232for(var team in this.pollArr) {
1233var tconfig=this.polls[team];var hclass=tconfig['hclass'];var dclass=tconfig['dclass'];var tmembers=this.pollArr

[team];tmembers[0].className=dclass;for(var i=1; i<this.pollNum; i++) {
1234tmembers[i].className=hclass;}}}
1235PPollPlay.prototype.pollPlay=function(){
1236var poller=this;this.timer=setTimeout(function(){poller.pollPlay();},this.pollTime);if(this.isPlaying&&!this.frun){
1237this.prePoll=this.curPoll;this.curPoll=(this.curPoll+1)% this.pollNum ;this.setCurrentState(this.curPoll);}else{
1238this.frun=false;}}
1239PPollPlay.prototype.setCurrentState=function(num){
1240var poller=this;for(var team in poller.pollArr){
1241var tconfig=this.polls[team];var hclass=tconfig['hclass'];var dclass=tconfig['dclass'];var tmembers=poller.pollArr

[team];tmembers[this.prePoll].className=hclass;tmembers[this.curPoll].className=dclass;}}
1242PPollPlay.prototype.setCurPoll=function(num){
1243var cur=parseInt(num);if(!isNaN(cur)){
1244this.prePoll=this.curPoll;this.curPoll=num;this.setCurrentState(num);}}
1245PPollPlay.prototype.setNextFrame=function(){
1246this.prePoll=this.curPoll;this.curPoll=(this.curPoll+1)% this.pollNum ;this.setCurrentState(this.curPoll);}
1247PPollPlay.prototype.setPreFrame=function(){
1248this.prePoll=this.curPoll;this.curPoll=(this.pollNum+this.curPoll-1)% this.pollNum ;this.setCurrentState(this.curPoll);}
1249PPollPlay.prototype.pause=function(cur){
1250this.isPlaying=false;this.setCurPoll(cur);if(this.timer){
1251clearTimeout(this.timer);}
1252this.onpause.bind(this)();}
1253PPollPlay.prototype.continuePlay=function(){
1254this.isPlaying=true;if(this.timer){
1255clearTimeout(this.timer);}
1256var poller=this;this.timer=setTimeout(function(){poller.pollPlay();},this.pollTime);this.oncontinue.bind(this)();}
1257function dragable(elementHeader,element){
1258this.header=DOM.get(elementHeader);this.obj=DOM.get(element);this.header.onmousedown=this.start.bind(this);DOM.setStyle

(this.header,'cursor','move');this.onDragStart=new Function();this.onDragEnd=new Function();this.onDrag=new Function();}
1259dragable.prototype.start=function(event){
1260var element=this.obj;element.style.position='absolute';event=EVENT.getEvent(event);if(EVENT.getButton(event)!=0){
1261return true ;}
1262this.onDragStart();if(document.body.setCapture){
1263document.body.setCapture();}
1264this.offsetLeft=element.offsetLeft;this.offsetTop=element.offsetTop;this.mouseoffsetX=event.clientX-

this.offsetLeft;this.mouseoffsetY=event.clientY-this.offsetTop;document.body.onmouseup=null;document.onmouseup=this.end.bind

(this);document.onmousemove=this.drag.bind(this);return false ;}
1265dragable.prototype.drag=function(event){
1266event=EVENT.getEvent(event);if(EVENT.getButton()!=0){
1267return this.end();}
1268var element=this.obj;var _clientX=event.clientX;var _clientY=event.clientY;var newX,newY;newX=_clientX-

this.mouseoffsetX;newY=_clientY-this.mouseoffsetY;if(newY<0)newY=0;if(newX<0)newX=0;var mH=Math.max(DOM.getClientHeight

(),document.body.scrollHeight);var mW=Math.max(DOM.getClientWidth(),document.body.scrollWidth);if

((newY+element.offsetHeight)>mH)newY=mH-element.offsetHeight;if((newX+element.offsetWidth)>mW)newX=mW-

element.offsetWidth;element.style.left=newX+"px";element.style.top=newY+"px";this.onDrag(newX,newY);EVENT.preventDefault

(event);return false;}
1269dragable.prototype.end=function(event){
1270event=EVENT.getEvent(event);EVENT.cancelBubble();if(document.body.releaseCapture){
1271document.body.releaseCapture();}
1272document.onmousemove=null;document.onmouseup=null;var _onDragEndFuc=this.onDragEnd();return _onDragEndFuc;}
1273Window={
1274items :[],
1275_lastFocus : null,
1276create : function(src,width,height){
1277var id=this.items.length;var item=new DlgItem(id);item.init(width,height);item.setProp('src',src);this.items.push

(item);return item;},
1278get : function(id){
1279return this.items[id];}}
1280DlgItem=function(id){
1281this.id=id;this._tpl='\
1282<div class="layer_global_title" id="dialog_head_{id}">\
1283<span class="title">\
1284<SPAN id="dialog_title_{id}">{title}</SPAN>\
1285</span>\
1286<button id="dialog_button_0" title="关闭" onclick="Window.get({id}).close();"></button>\
1287</div>\
1288<div class="layer_global_cont" id="dialog_content_{id}" style="float: left; position: relative; left: 0; top: 0; padding:

0; margin: 0; ">\
1289<div id="iframe_drag_mask_{id}" style="background: yellow; z-index:-2; width: 100%; height: 90%; position: absolute;

left:0; top: 0px;"></div>\
1290<iframe style="width: 100%; height: 100%; border: 0;" scrolling="no" frameborder="0" src="{src}"></iframe>\
1291</div>\
1292';this._id='dialog_item_'+id;this.maskId='model_mask_'+id;this.headId='dialog_head_'+id;this.titleId='dialog_title_'+id;t

his.dragMaskId='iframe_drag_mask_'+id;this.dialogContId='dialog_content_'+id;this._drag=null;this.onclose=function()

{};this.onunload=function(){};this.opt={
1293model: false,
1294title: '温馨提示',
1295zIndex : 400,
1296opacity : 40};this.zIndex=this.opt.zIndex+this.id+20;}
1297DlgItem.prototype.init=function(width,height){
1298var item=DOM.get(this._id);if(!item){
1299item=document.createElement

('div');item.id=this._id;item.className='layer_global';item.style.display='none';item.style.zIndex=this.zIndex;item.style.wid

th=width+"px";item.style.height=height+"px";document.body.appendChild(item);}
1300this.width=width;this.height=height;this.item=item;this.item.innerHTML="";}
1301DlgItem.prototype._getFillArr=function(){
1302return{
1303'title' : this.opt.title,
1304'src' : this.opt.src,
1305'id' : this.id};}
1306DlgItem.prototype.fillcontent=function(){
1307var fills=this._getFillArr();var str=this._tpl;for(fill in fills) {
1308var reg=new RegExp('{'+fill+'}','gi')
1309str=str.replace(reg,fills[fill]);}
1310DOM.get(this._id).innerHTML=str;}
1311DlgItem.prototype.setProp=function(prop,value){
1312this.opt[prop]=value;}
1313DlgItem.prototype.setTitle=function(title){
1314this.setProp('title',title);}
1315DlgItem.prototype.setSrc=function(src){
1316this.setProp('src',src);}
1317DlgItem.prototype.setModel=function(model){
1318this.setProp('model',model);}
1319DlgItem.prototype.show=function(){
1320this.fillcontent();DOM.show(this._id);DOM.setStyle(this.dragMaskId,'opacity',0);this._drag=new dragable

(this.headId,this._id);this._drag.onDragStart=(function(){
1321DOM.setStyle(this.dragMaskId,'zIndex',2) ;}).bind(this);this._drag.onDragEnd=(function(){
1322DOM.setStyle(this.dragMaskId,'zIndex',-2) ;}).bind(this);var item=this;var dialogCont=DOM.get

(this.dialogContId);dialogCont.style.height=(this.height-25)+"px";dialogCont.style.width=this.width+"px";centerElement

(this._id);EVENT.addEvent(this._id,'mousedown',this.focus.bind(this));this.focus();if(this.opt.model){
1323var mid=this.maskId;var opacity=this.opt.opacity;var zIndex=this.zIndex-3;modelwnd(mid,opacity,zIndex);}}
1324DlgItem.prototype.hide=function(){
1325DOM.hide(this._id);if(this.opt.model){
1326hiddenModelWnd(this.maskId);}
1327this.onunload();}
1328DlgItem.prototype.focus=function(){
1329if(Window._lastFocus){
1330Window._lastFocus.blur();}
1331DOM.setStyle(this._id,'zIndex',this.zIndex+5000);DOM.setStyle(this.maskId,'zIndex',this.zIndex+5000-

1);Window._lastFocus=this;}
1332DlgItem.prototype.blur=function(){
1333DOM.setStyle(this._id,'zIndex',this.zIndex);DOM.setStyle(this.maskId,'zIndex',this.zIndex-1);}
1334DlgItem.prototype.close=function(){
1335this.hide();this.onclose();}
1336var location_array=new Array();location_array[0]='请选择';location_array[11]='北京'; location_array[31]='上

海';location_array[44]='广东';location_array[34]='安徽'; location_array[50]='重庆';location_array[35]='福建';location_array

[46]='海南'; location_array[13]='河北';location_array[41]='河南';location_array[23]='黑龙江 ';location_array[42]='湖

北';location_array[43]='湖南';location_array[62]='甘肃 ';location_array[45]='广西';location_array[52]='贵州';location_array

[22]='吉林 ';location_array[36]='江西';location_array[32]='江苏';location_array[21]='辽宁 ';location_array[15]='内蒙

古';location_array[64]='宁夏';location_array[63]='青海';location_array[37]='山东';location_array[14]='山西';location_array

[61]='陕西';location_array[51]='四川';location_array[12]='天津';location_array[54]='西藏';location_array[65]='新

疆';location_array[53]='云南';location_array[33]='浙江';location_array[71]='台湾';location_array[81]='香港';location_array

[82]='澳门';var sublocation_array=new Array();sublocation_array[0]=new Array();sublocation_array[11]=new Array

();sublocation_array[12]=new Array();sublocation_array[13]=new Array();sublocation_array[14]=new Array();sublocation_array

[15]=new Array();sublocation_array[21]=new Array();sublocation_array[22]=new Array();sublocation_array[23]=new Array

();sublocation_array[31]=new Array();sublocation_array[32]=new Array();sublocation_array[33]=new Array();sublocation_array

[34]=new Array();sublocation_array[35]=new Array();sublocation_array[36]=new Array();sublocation_array[37]=new Array

();sublocation_array[41]=new Array();sublocation_array[42]=new Array();sublocation_array[43]=new Array();sublocation_array

[44]=new Array();sublocation_array[45]=new Array();sublocation_array[46]=new Array();sublocation_array[50]=new Array

();sublocation_array[51]=new Array();sublocation_array[52]=new Array();sublocation_array[53]=new Array();sublocation_array

[54]=new Array();sublocation_array[61]=new Array();sublocation_array[62]=new Array();sublocation_array[63]=new Array

();sublocation_array[64]=new Array();sublocation_array[65]=new Array();sublocation_array[71]=new Array();sublocation_array

[81]=new Array();sublocation_array[82]=new Array();sublocation_array[0][0]='请选择';sublocation_array[11][1100]='请选择';

sublocation_array[11][1101]='东城';sublocation_array[11][1102]='西城'; sublocation_array[11][1103]='崇文';sublocation_array

[11][1104]='宣武'; sublocation_array[11][1105]='朝阳';sublocation_array[11][1106]='丰台'; sublocation_array[11][1107]='石景山

';sublocation_array[11][1108]='海淀'; sublocation_array[11][1109]='门头沟';sublocation_array[11][1111]='房山';

sublocation_array[11][1112]='通州';sublocation_array[11][1113]='顺义'; sublocation_array[11][1121]='昌平';sublocation_array

[11][1124]='大兴'; sublocation_array[11][1126]='平谷';sublocation_array[11][1127]='怀柔'; sublocation_array[11][1128]='密

云';sublocation_array[11][1129]='延庆'; sublocation_array[12][1200]='请选择';sublocation_array[12][1201]='和平';

sublocation_array[12][1202]='河东';sublocation_array[12][1203]='河西'; sublocation_array[12][1204]='南开';sublocation_array

[12][1205]='河北'; sublocation_array[12][1206]='红桥';sublocation_array[12][1207]='塘沽'; sublocation_array[12][1208]='汉

沽';sublocation_array[12][1209]='大港'; sublocation_array[12][1210]='东丽';sublocation_array[12][1211]='西青';

sublocation_array[12][1212]='津南';sublocation_array[12][1213]='北辰'; sublocation_array[12][1221]='宁河';sublocation_array

[12][1222]='武清'; sublocation_array[12][1223]='静海';sublocation_array[12][1224]='宝坻'; sublocation_array[12][1225]='蓟

县';sublocation_array[13][1300]='请选择'; sublocation_array[13][1301]='石家庄';sublocation_array[13][1302]='唐山';

sublocation_array[13][1303]='秦皇岛';sublocation_array[13][1304]='邯郸'; sublocation_array[13][1305]='邢

台';sublocation_array[13][1306]='保定'; sublocation_array[13][1307]='张家口';sublocation_array[13][1308]='承德';

sublocation_array[13][1309]='沧州';sublocation_array[13][1310]='廊坊'; sublocation_array[13][1311]='衡水';sublocation_array

[14][1400]='请选择'; sublocation_array[14][1401]='太原';sublocation_array[14][1402]='大同'; sublocation_array[14][1403]='阳泉

';sublocation_array[14][1404]='长治'; sublocation_array[14][1405]='晋城';sublocation_array[14][1406]='朔州';

sublocation_array[14][1407]='晋中';sublocation_array[14][1408]='运城'; sublocation_array[14][1409]='忻州';sublocation_array

[14][1410]='临汾'; sublocation_array[14][1411]='吕梁';sublocation_array[15][1500]='请选择'; sublocation_array[15][1501]='呼和

浩特';sublocation_array[15][1502]='包头'; sublocation_array[15][1503]='乌海';sublocation_array[15][1504]='赤峰';

sublocation_array[15][1505]='通辽';sublocation_array[15][1506]='鄂尔多斯'; sublocation_array[15][1507]='呼伦贝

尔';sublocation_array[15][1508]='巴彦淖尔'; sublocation_array[15][1509]='乌兰察布';sublocation_array[15][1522]='兴安';

sublocation_array[15][1525]='锡林郭勒';sublocation_array[15][1529]='阿拉善'; sublocation_array[21][2100]='请选

择';sublocation_array[21][2101]='沈阳'; sublocation_array[21][2102]='大连';sublocation_array[21][2103]='鞍山';

sublocation_array[21][2104]='抚顺';sublocation_array[21][2105]='本溪'; sublocation_array[21][2106]='丹东';sublocation_array

[21][2107]='锦州'; sublocation_array[21][2108]='营口';sublocation_array[21][2109]='阜新'; sublocation_array[21][2110]='辽

阳';sublocation_array[21][2111]='盘锦'; sublocation_array[21][2112]='铁岭';sublocation_array[21][2113]='朝阳';

sublocation_array[21][2114]='葫芦岛';sublocation_array[22][2200]='请选择'; sublocation_array[22][2201]='长

春';sublocation_array[22][2202]='吉林'; sublocation_array[22][2203]='四平';sublocation_array[22][2204]='辽源';

sublocation_array[22][2205]='通化';sublocation_array[22][2206]='白山'; sublocation_array[22][2207]='松原';sublocation_array

[22][2208]='白城'; sublocation_array[22][2224]='延边';sublocation_array[23][2300]='请选择'; sublocation_array[23][2301]='哈尔

滨';sublocation_array[23][2302]='齐齐哈尔'; sublocation_array[23][2303]='鸡西';sublocation_array[23][2304]='鹤岗';

sublocation_array[23][2305]='双鸭山';sublocation_array[23][2306]='大庆'; sublocation_array[23][2307]='伊

春';sublocation_array[23][2308]='佳木斯'; sublocation_array[23][2309]='七台河';sublocation_array[23][2310]='牡丹江';

sublocation_array[23][2311]='黑河';sublocation_array[23][2312]='绥化'; sublocation_array[23][2327]='大兴安

岭';sublocation_array[31][3100]='请选择'; sublocation_array[31][3101]='黄浦';sublocation_array[31][3102]='南区';

sublocation_array[31][3103]='卢湾';sublocation_array[31][3104]='徐汇'; sublocation_array[31][3105]='长宁';sublocation_array

[31][3106]='静安'; sublocation_array[31][3107]='普陀';sublocation_array[31][3108]='闸北'; sublocation_array[31][3109]='虹

口';sublocation_array[31][3110]='杨浦'; sublocation_array[31][3112]='闵行';sublocation_array[31][3113]='宝山';

sublocation_array[31][3114]='嘉定';sublocation_array[31][3115]='浦东新区'; sublocation_array[31][3116]='金

山';sublocation_array[31][3117]='松江'; sublocation_array[31][3125]='南汇';sublocation_array[31][3126]='奉贤';

sublocation_array[31][3129]='青浦';sublocation_array[31][3130]='崇明'; sublocation_array[32][3200]='请选

择';sublocation_array[32][3201]='南京'; sublocation_array[32][3202]='无锡';sublocation_array[32][3203]='徐州';

sublocation_array[32][3204]='常州';sublocation_array[32][3205]='苏州'; sublocation_array[32][3206]='南通';sublocation_array

[32][3207]='连云港'; sublocation_array[32][3208]='淮安';sublocation_array[32][3209]='盐城'; sublocation_array[32][3210]='扬州

';sublocation_array[32][3211]='镇江'; sublocation_array[32][3212]='泰州';sublocation_array[32][3213]='宿迁';

sublocation_array[33][3300]='请选择';sublocation_array[33][3301]='杭州'; sublocation_array[33][3302]='宁

波';sublocation_array[33][3303]='温州'; sublocation_array[33][3304]='嘉兴';sublocation_array[33][3305]='湖州';

sublocation_array[33][3306]='绍兴';sublocation_array[33][3307]='金华'; sublocation_array[33][3308]='衢州';sublocation_array

[33][3309]='舟山'; sublocation_array[33][3310]='台州';sublocation_array[33][3311]='丽水'; sublocation_array[34][3400]='请选择

';sublocation_array[34][3401]='合肥'; sublocation_array[34][3402]='芜湖';sublocation_array[34][3403]='蚌埠';

sublocation_array[34][3404]='淮南';sublocation_array[34][3405]='马鞍山'; sublocation_array[34][3406]='淮

北';sublocation_array[34][3407]='铜陵'; sublocation_array[34][3408]='安庆';sublocation_array[34][3410]='黄山';

sublocation_array[34][3411]='滁州';sublocation_array[34][3412]='阜阳'; sublocation_array[34][3413]='宿州';sublocation_array

[34][3414]='巢湖'; sublocation_array[34][3415]='六安';sublocation_array[34][3416]='亳州'; sublocation_array[34][3417]='池

州';sublocation_array[34][3418]='宣城'; sublocation_array[35][3500]='请选择';sublocation_array[35][3501]='福州';

sublocation_array[35][3502]='厦门';sublocation_array[35][3503]='莆田'; sublocation_array[35][3504]='三明';sublocation_array

[35][3505]='泉州'; sublocation_array[35][3506]='漳州';sublocation_array[35][3507]='南平'; sublocation_array[35][3508]='龙

岩';sublocation_array[35][3509]='宁德'; sublocation_array[36][3600]='请选择';sublocation_array[36][3601]='南昌';

sublocation_array[36][3602]='景德镇';sublocation_array[36][3603]='萍乡'; sublocation_array[36][3604]='九

江';sublocation_array[36][3605]='新余'; sublocation_array[36][3606]='鹰潭';sublocation_array[36][3607]='赣州';

sublocation_array[36][3608]='吉安';sublocation_array[36][3609]='宜春'; sublocation_array[36][3610]='抚州';sublocation_array

[36][3611]='上饶'; sublocation_array[37][3700]='请选择';sublocation_array[37][3701]='济南'; sublocation_array[37][3702]='青岛

';sublocation_array[37][3703]='淄博'; sublocation_array[37][3704]='枣庄';sublocation_array[37][3705]='东营';

sublocation_array[37][3706]='烟台';sublocation_array[37][3707]='潍坊'; sublocation_array[37][3708]='济宁';sublocation_array

[37][3709]='泰安'; sublocation_array[37][3710]='威海';sublocation_array[37][3711]='日照'; sublocation_array[37][3712]='莱

芜';sublocation_array[37][3713]='临沂'; sublocation_array[37][3714]='德州';sublocation_array[37][3715]='聊城';

sublocation_array[37][3716]='滨州';sublocation_array[37][3717]='菏泽'; sublocation_array[41][4100]='请选

择';sublocation_array[41][4101]='郑州'; sublocation_array[41][4102]='开封';sublocation_array[41][4103]='洛阳';

sublocation_array[41][4104]='平顶山';sublocation_array[41][4105]='安阳'; sublocation_array[41][4106]='鹤

壁';sublocation_array[41][4107]='新乡'; sublocation_array[41][4108]='焦作';sublocation_array[41][4109]='濮阳';

sublocation_array[41][4110]='许昌';sublocation_array[41][4111]='漯河'; sublocation_array[41][4112]='三门

峡';sublocation_array[41][4113]='南阳'; sublocation_array[41][4114]='商丘';sublocation_array[41][4115]='信阳';

sublocation_array[41][4116]='周口';sublocation_array[41][4117]='驻马店'; sublocation_array[41][4118]='济

源';sublocation_array[42][4200]='请选择'; sublocation_array[42][4201]='武汉';sublocation_array[42][4202]='黄石';

sublocation_array[42][4203]='十堰';sublocation_array[42][4205]='宜昌'; sublocation_array[42][4206]='襄樊';sublocation_array

[42][4207]='鄂州'; sublocation_array[42][4208]='荆门';sublocation_array[42][4209]='孝感'; sublocation_array[42][4210]='荆

州';sublocation_array[42][4211]='黄冈'; sublocation_array[42][4212]='咸宁';sublocation_array[42][4213]='随州';

sublocation_array[42][4228]='恩施';sublocation_array[42][4229]='仙桃'; sublocation_array[42][4230]='潜江';sublocation_array

[42][4231]='天门'; sublocation_array[42][4232]='神农架';sublocation_array[43][4300]='请选择'; sublocation_array[43][4301]='长

沙';sublocation_array[43][4302]='株洲'; sublocation_array[43][4303]='湘潭';sublocation_array[43][4304]='衡阳';

sublocation_array[43][4305]='邵阳';sublocation_array[43][4306]='岳阳'; sublocation_array[43][4307]='常德';sublocation_array

[43][4308]='张家界'; sublocation_array[43][4309]='益阳';sublocation_array[43][4310]='郴州'; sublocation_array[43][4311]='永州

';sublocation_array[43][4312]='怀化'; sublocation_array[43][4313]='娄底';sublocation_array[43][4331]='湘西';

sublocation_array[44][4400]='请选择';sublocation_array[44][4401]='广州'; sublocation_array[44][4402]='韶

关';sublocation_array[44][4403]='深圳'; sublocation_array[44][4404]='珠海';sublocation_array[44][4405]='汕头';

sublocation_array[44][4406]='佛山';sublocation_array[44][4407]='江门'; sublocation_array[44][4408]='湛江';sublocation_array

[44][4409]='茂名'; sublocation_array[44][4412]='肇庆';sublocation_array[44][4413]='惠州'; sublocation_array[44][4414]='梅

州';sublocation_array[44][4415]='汕尾'; sublocation_array[44][4416]='河源';sublocation_array[44][4417]='阳江';

sublocation_array[44][4418]='清远';sublocation_array[44][4419]='东莞'; sublocation_array[44][4420]='中山';sublocation_array

[44][4451]='潮州'; sublocation_array[44][4452]='揭阳';sublocation_array[44][4453]='云浮'; sublocation_array[45][4500]='请选择

';sublocation_array[45][4501]='南宁'; sublocation_array[45][4502]='柳州';sublocation_array[45][4503]='桂林';

sublocation_array[45][4504]='梧州';sublocation_array[45][4505]='北海'; sublocation_array[45][4506]='防城

港';sublocation_array[45][4507]='钦州'; sublocation_array[45][4508]='贵港';sublocation_array[45][4509]='玉林';

sublocation_array[45][4510]='百色';sublocation_array[45][4511]='贺州'; sublocation_array[45][4512]='河池';sublocation_array

[45][4513]='来宾'; sublocation_array[45][4514]='崇左';sublocation_array[46][4600]='请选择'; sublocation_array[46][4601]='海口

';sublocation_array[46][4602]='三亚'; sublocation_array[46][4603]='五指山';sublocation_array[46][4604]='琼海';

sublocation_array[46][4605]='儋州';sublocation_array[46][4606]='文昌'; sublocation_array[46][4607]='万宁';sublocation_array

[46][4608]='东方'; sublocation_array[50][5000]='请选择';sublocation_array[50][5001]='万州'; sublocation_array[50][5002]='涪陵

';sublocation_array[50][5003]='渝中'; sublocation_array[50][5004]='大渡口';sublocation_array[50][5005]='江北';

sublocation_array[50][5006]='沙坪坝';sublocation_array[50][5007]='九龙坡'; sublocation_array[50][5008]='南

岸';sublocation_array[50][5009]='北碚'; sublocation_array[50][5010]='万盛';sublocation_array[50][5011]='双桥';

sublocation_array[50][5012]='渝北';sublocation_array[50][5013]='巴南'; sublocation_array[50][5021]='长寿';sublocation_array

[50][5022]='綦江'; sublocation_array[50][5023]='潼南';sublocation_array[50][5024]='铜梁'; sublocation_array[50][5025]='大

足';sublocation_array[50][5026]='荣昌'; sublocation_array[50][5027]='璧山';sublocation_array[50][5028]='梁平';

sublocation_array[50][5029]='城口';sublocation_array[50][5030]='丰都'; sublocation_array[50][5031]='垫江';sublocation_array

[50][5032]='武隆'; sublocation_array[50][5033]='忠县';sublocation_array[50][5034]='开县'; sublocation_array[50][5035]='云

阳';sublocation_array[50][5036]='奉节'; sublocation_array[50][5037]='巫山';sublocation_array[50][5038]='巫溪';

sublocation_array[50][5039]='黔江';sublocation_array[50][5040]='石柱'; sublocation_array[50][5041]='秀山';sublocation_array

[50][5042]='酉阳'; sublocation_array[50][5043]='彭水';sublocation_array[50][5081]='江津'; sublocation_array[50][5082]='合

川';sublocation_array[50][5083]='永川'; sublocation_array[50][5084]='南川';sublocation_array[51][5100]='请选择';

sublocation_array[51][5101]='成都';sublocation_array[51][5103]='自贡'; sublocation_array[51][5104]='攀枝

花';sublocation_array[51][5105]='泸州'; sublocation_array[51][5106]='德阳';sublocation_array[51][5107]='绵阳';

sublocation_array[51][5108]='广元';sublocation_array[51][5109]='遂宁'; sublocation_array[51][5110]='内江';sublocation_array

[51][5111]='乐山'; sublocation_array[51][5113]='南充';sublocation_array[51][5114]='眉山'; sublocation_array[51][5115]='宜

宾';sublocation_array[51][5116]='广安'; sublocation_array[51][5117]='达州';sublocation_array[51][5118]='雅安';

sublocation_array[51][5119]='巴中';sublocation_array[51][5120]='资阳'; sublocation_array[51][5132]='阿坝';sublocation_array

[51][5133]='甘孜'; sublocation_array[51][5134]='凉山';sublocation_array[52][5200]='请选择'; sublocation_array[52][5201]='贵阳

';sublocation_array[52][5202]='六盘水'; sublocation_array[52][5203]='遵义';sublocation_array[52][5204]='安顺';

sublocation_array[52][5222]='铜仁';sublocation_array[52][5223]='黔西南'; sublocation_array[52][5224]='毕

节';sublocation_array[52][5226]='黔东南'; sublocation_array[52][5227]='黔南';sublocation_array[53][5300]='请选择';

sublocation_array[53][5301]='昆明';sublocation_array[53][5303]='曲靖'; sublocation_array[53][5304]='玉溪';sublocation_array

[53][5305]='保山'; sublocation_array[53][5306]='昭通';sublocation_array[53][5307]='丽江'; sublocation_array[53][5308]='思

茅';sublocation_array[53][5309]='临沧'; sublocation_array[53][5323]='楚雄';sublocation_array[53][5325]='红河';

sublocation_array[53][5326]='文山';sublocation_array[53][5328]='西双版纳'; sublocation_array[53][5329]='大

理';sublocation_array[53][5331]='德宏'; sublocation_array[53][5333]='怒江傈';sublocation_array[53][5334]='迪庆';

sublocation_array[54][5400]='请选择';sublocation_array[54][5401]='拉萨'; sublocation_array[54][5421]='昌

都';sublocation_array[54][5422]='山南'; sublocation_array[54][5423]='日喀则';sublocation_array[54][5424]='那曲';

sublocation_array[54][5425]='阿里';sublocation_array[54][5426]='林芝'; sublocation_array[61][6100]='请选

择';sublocation_array[61][6101]='西安'; sublocation_array[61][6102]='铜川';sublocation_array[61][6103]='宝鸡';

sublocation_array[61][6104]='咸阳';sublocation_array[61][6105]='渭南'; sublocation_array[61][6106]='延安';sublocation_array

[61][6107]='汉中'; sublocation_array[61][6108]='榆林';sublocation_array[61][6109]='安康'; sublocation_array[61][6110]='商

洛';sublocation_array[62][6200]='请选择'; sublocation_array[62][6201]='兰州';sublocation_array[62][6202]='嘉峪关';

sublocation_array[62][6203]='金昌';sublocation_array[62][6204]='白银'; sublocation_array[62][6205]='天水';sublocation_array

[62][6206]='武威'; sublocation_array[62][6207]='张掖';sublocation_array[62][6208]='平凉'; sublocation_array[62][6209]='酒

泉';sublocation_array[62][6210]='庆阳'; sublocation_array[62][6211]='定西';sublocation_array[62][6212]='陇南';

sublocation_array[62][6229]='临夏';sublocation_array[62][6230]='甘南'; sublocation_array[63][6300]='请选

择';sublocation_array[63][6301]='西宁'; sublocation_array[63][6321]='海东';sublocation_array[63][6322]='海北';

sublocation_array[63][6323]='黄南';sublocation_array[63][6325]='海南'; sublocation_array[63][6326]='果洛';sublocation_array

[63][6327]='玉树'; sublocation_array[63][6328]='海西';sublocation_array[64][6400]='请选择'; sublocation_array[64][6401]='银川

';sublocation_array[64][6402]='石嘴山'; sublocation_array[64][6403]='吴忠';sublocation_array[64][6404]='固原';

sublocation_array[64][6405]='中卫';sublocation_array[65][6500]='请选择'; sublocation_array[65][6501]='乌鲁木

齐';sublocation_array[65][6502]='克拉玛依'; sublocation_array[65][6521]='吐鲁番';sublocation_array[65][6522]='哈密';

sublocation_array[65][6523]='昌吉';sublocation_array[65][6527]='博尔塔拉'; sublocation_array[65][6528]='巴音郭

楞';sublocation_array[65][6529]='阿克苏'; sublocation_array[65][6530]='克孜勒苏';sublocation_array[65][6531]='喀什';

sublocation_array[65][6532]='和田';sublocation_array[65][6540]='伊犁'; sublocation_array[65][6542]='塔城';sublocation_array

[65][6543]='阿勒泰'; sublocation_array[65][6544]='石河子';sublocation_array[65][6545]='阿拉尔'; sublocation_array[65][6546]='

图木舒克';sublocation_array[65][6547]='五家渠'; sublocation_array[71][7100]='请选择';sublocation_array[71][7101]='台北市';

sublocation_array[71][7102]='高雄市';sublocation_array[71][7103]='基隆市'; sublocation_array[71][7104]='台中

市';sublocation_array[71][7105]='台南市'; sublocation_array[71][7106]='新竹市';sublocation_array[71][7107]='嘉义市';

sublocation_array[71][7108]='台北县';sublocation_array[71][7109]='宜兰县'; sublocation_array[71][7110]='新竹

县';sublocation_array[71][7111]='桃园县'; sublocation_array[71][7112]='苗栗县';sublocation_array[71][7113]='台中县';

sublocation_array[71][7114]='彰化县';sublocation_array[71][7115]='南投县'; sublocation_array[71][7116]='嘉义

县';sublocation_array[71][7117]='云林县'; sublocation_array[71][7118]='台南县';sublocation_array[71][7119]='高雄县';

sublocation_array[71][7120]='屏东县';sublocation_array[71][7121]='台东县'; sublocation_array[71][7122]='花莲

县';sublocation_array[71][7123]='澎湖县'; sublocation_array[81][8100]='请选择';sublocation_array[81][8101]='中西区';

sublocation_array[81][8102]='东区';sublocation_array[81][8103]='九龙城区'; sublocation_array[81][8104]='观塘

区';sublocation_array[81][8105]='南区'; sublocation_array[81][8106]='深水区';sublocation_array[81][8107]='湾仔区';

sublocation_array[81][8108]='黄大仙区';sublocation_array[81][8109]='油尖旺区'; sublocation_array[81][8110]='离岛

区';sublocation_array[81][8111]='葵青区'; sublocation_array[81][8112]='北区';sublocation_array[81][8113]='西贡区';

sublocation_array[81][8114]='沙田区';sublocation_array[81][8115]='屯门区'; sublocation_array[81][8116]='大埔

区';sublocation_array[81][8117]='荃湾区'; sublocation_array[81][8118]='元朗区';sublocation_array[82][8200]='请选择';

sublocation_array[82][8201]='花地玛堂区';sublocation_array[82][8202]='圣安多尼堂区 ';sublocation_array[82][8203]='大堂

区';sublocation_array[82][8204]='望德堂区'; sublocation_array[82][8205]='风顺堂区';sublocation_array[82][8206]='嘉模堂区';

sublocation_array[82][8207]='圣方济各堂区';function areaCode2Str(code,delimiter){
1337code=code||0;var re=/^[1-9]\d{3}$/;if((code!=0)&&(!re.test(code))){
1338return "";}
1339var p=Math.floor(code/100);if(!location_array[p]||!sublocation_array[p][code]){
1340return ""}
1341if(!delimiter)delimiter=""
1342return(location_array[p]+delimiter+sublocation_array[p][code]);}
1343function areaSelectInit(p,c,sv){
1344if(!clearSelect(p)){
1345return false;}
1346sv=sv||0;var re=/^[1-9]\d{3}$/;if((sv!=0)&&(!re.test(sv))){
1347return false;}
1348var pv=Math.floor(sv/100);var key;for(key in location_array){
1349if(typeof(location_array[key])=="function")continue;if(pv==key){
1350addSelectItem(p,location_array[key],key,true);}else{
1351addSelectItem(p,location_array[key],key);}}
1352var subObj=sublocation_array[pv];for(key in subObj){
1353if(typeof(subObj[key])=="function")continue;if(sv==key){
1354addSelectItem(c,subObj[key],key,true);}else{
1355addSelectItem(c,subObj[key],key);}}
1356var sObj=$(p);if(window.attachEvent){
1357sObj.attachEvent('onchange',function(){setCity(p,c);});}else{
1358sObj.addEventListener('change',function(){setCity(p,c);},false);}
1359return true;}
1360function setCity(p,c,sv){
1361var v=getSingleSelectValueById(p);clearSelect(c);if(!v){
1362addSelectItem(c,"请选择","0");return false;}
1363var v=parseInt(v);var subObj=sublocation_array[v];if(subObj==undefined){
1364return false;}
1365sv=sv||(v*100);if(Math.floor(sv/100)!=v){
1366return false;}
1367for(var key in subObj){
1368if(typeof(subObj[key])=="function")continue;if(sv==key){
1369addSelectItem(c,subObj[key],key,true);}else{
1370addSelectItem(c,subObj[key],key);}}
1371return true;}
1372function getParameter(name,cancelBubble){
1373var r=new RegExp("(\\?|#|&)"+name+"=([^&#]*)(&|#|$)");var m=location.href.match(r);if((!m||m=="")&&!cancelBubble)

m=top.location.href.match(r);return(!m?"":m[2]);}
1374function c_qq(qq){
1375var reQQ=/^[1-9]\d{4,10}$/;return reQQ.test(qq);}
1376function getQQNum(is_community){
1377var zz_uin=getCookie("zzpaneluin");var cookie_uin=getCookie("uin");var uin=cookie_uin.replace(re=/^[o0]{0,}/,'');if(!

c_qq(zz_uin)){
1378document.cookie="zzpaneluin=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";document.cookie="zzpanelkey=;

expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";zz_uin=0;}
1379if(!c_qq(uin)){
1380document.cookie="uin=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";document.cookie="skey=;

expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";uin=0;}
1381if(zz_uin==0){
1382return uin;}
1383if(uin==0){
1384return(!!is_community)? 0 : zz_uin;}
1385if(zz_uin!=uin){
1386document.cookie="zzpaneluin=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";document.cookie="zzpanelkey=;

expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";document.cookie="uin=; expires=Thu,01-Jan-1970 00:00:01 GMT;

path=/; domain=qq.com";document.cookie="skey=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";return 0;}
1387return uin;}
1388function isLogon(){
1389return getQQNum()!=0;}
1390function reportSource(){
1391var src=getParameter('yktwcoa');src=parseInt(src);if(src<999999999&&src>100000000){
1392var csrc=parseInt(getCookie('yktwcoa'));if(csrc<999999999&&csrc>100000000){
1393return;}
1394document.cookie="yktwcoa="+src+"; path=/; domain="+ACT2_COMM.ACT_COOKIE_DOMAIN ;}}
1395function setInviteCode(){
1396var invcode=getParameter('invcode');if(invcode){
1397document.cookie="invcode="+invcode+"; path=/; domain="+ACT2_COMM.ACT_COOKIE_DOMAIN ;}}
1398var regData={};regData['race']=new Array();regData['race'][0]='请选择';regData['race'][1]='汉族';regData['race'] [2]='回

族';regData['race'][3]='藏族';regData['race'][4]='壮族';regData['race'] [5]='瑶族';regData['race'][6]='彝族';regData['race']

[7]='阿昌族'; regData['race'][8]='白族';regData['race'][9]='布依族';regData['race'][10]='傣族 ';regData['race'][11]='侗

族';regData['race'][12]='土家族';regData['race'] [13]='独龙族';regData['race'][14]='仡佬族';regData['race'][15]='哈尼族';

regData['race'][16]='基诺族';regData['race'][17]='景颇族';regData['race'] [18]='拉祜族';regData['race'][19]='黎族';regData

['race'][20]='傈僳族'; regData['race'][21]='珞巴族';regData['race'][22]='毛南族';regData['race'] [23]='门巴族';regData

['race'][24]='苗族';regData['race'][25]='仫佬族'; regData['race'][26]='纳西族';regData['race'][27]='怒族';regData['race']

[28]=' 普米族';regData['race'][29]='羌族';regData['race'][30]='畲族';regData['race'] [31]='水族 ';regData['race'][32]='维吾尔

族';regData['race'][33]='哈萨克族';regData['race'] [34]='塔塔尔族';regData['race'][35]='满族';regData['race'][36]='蒙古族';

regData['race'][37]='土族';regData['race'][38]='东乡族';regData['race'][39]=' 撒拉族';regData['race'][40]='保安族';regData

['race'][41]='鄂伦春族'; regData['race'][42]='鄂温克族';regData['race'][43]='达斡尔族';regData['race'] [44]='赫哲族';regData

['race'][45]='乌兹别克族';regData['race'][46]='柯尔克孜族'; regData['race'][47]='锡伯族';regData['race'][48]='裕固

族';regData['race'] [49]='朝鲜族 ';regData['race'][50]='布朗族';regData['race'][51]='德昂族';regData['race'] [52]='佤

族';regData['race'][53]='塔吉克族';regData['race'][54]='俄罗斯族 ';regData['race'][55]='高山族--台湾的原住民';regData

['race'][56]='京族'; regData['degree']=new Array();regData['degree'][0]='请选择';regData['degree'][1]='小学'; regData

['degree'][2]='初中';regData['degree'][3]='高中';regData['degree'] [4]='中专/技校';regData['degree'][5]='大专';regData

['degree'][6]='大学本科'; regData['degree'][7]='硕士';regData['degree'][8]='博士';regData['degree'] [9]='博士后';regData

['level']=new Array();regData['level'][0]='请选择';regData['level'][1]='母语'; regData['level'][2]='一般';regData['level']

[3]='良好';regData['level'][4]='流利';regData['language_level']=regData['level'];regData['sex']=new Array();regData['sex']

[0]='请选择';regData['sex'][1]='男';regData['sex'] [2]='女';regData['career']=new Array();regData['career'][0]='请选

择';regData['career'][1]='在校学生'; regData['career'][2]='工薪阶层';regData['career'][3]='企业白领'; regData['career'][4]='

家庭妇女';regData['career'][5]='公务员';regData['career'] [6]='自由职业人';regData['career'][7]='其他';regData['hobit']=new

Array();regData['hobit'][0]='请选择';regData['hobit'][1]='时尚/服饰'; regData['hobit'][2]='运动';regData['hobit'][3]='游

戏';regData['hobit'][4]='听音乐';regData['hobit'][5]='娱乐资讯';regData['hobit'][6]='美食'; regData['blood']=new Array

();regData['blood'][0]='请选择';regData['blood'][1]='A'; regData['blood'][2]='B';regData['blood'][3]='O';regData['blood'][4]

='AB';regData['astro']=new Array();regData['astro'][0]='请选择';regData['astro'][1]='白羊座'; regData['astro'][2]='金牛

座';regData['astro'][3]='双子座';regData['astro'] [4]='巨蟹座';regData['astro'][5]='狮子座';regData['astro'][6]='处女座';

regData['astro'][7]='天秤座';regData['astro'][8]='天蝎座';regData['astro'] [9]='射手座';regData['astro'][10]='摩羯

座';regData['astro'][11]='水瓶座'; regData['astro'][12]='双鱼座';function initSelect(sel,arr,skey){
1399clearSelect(sel);skey=skey||0;if(arr.constructor==Array){
1400arr.each(function(v,key){
1401if(skey==key){
1402addSelectItem(sel,v,key,true);}else{
1403addSelectItem(sel,v,key);}});}}
1404function initNumSelect(sel,begin,end,step,skey,null_value){
1405clearSelect(sel);null_value=null_value||0;step=step||1;addSelectItem(sel,'请选择',null_value,true);if(begin){
1406if(end>begin){
1407for(i=begin; i<=end; i=i+step){
1408if(skey==i){
1409addSelectItem(sel,i,i,true);}else{
1410addSelectItem(sel,i,i);}}}
1411else{
1412for(i=begin; i>=end; i=i-step){
1413if(skey==i){
1414addSelectItem(sel,i,i,true);}else{
1415addSelectItem(sel,i,i);}}}}}
1416function initDateSelect(year,month,day,minYear,maxYear) {
1417clearSelect(year);try{
1418minYear=minYear||1995;maxYear=maxYear||(new Date()).getYear();initNumSelect

(year,minYear,maxYear);$(year).onchange=function(){
1419var y=$(year).value;if(y==0){
1420clearSelect(month);initNumSelect(month,null);clearSelect(day);initNumSelect(day,null);}else{
1421clearSelect(month);initNumSelect(month,1,12);initNumSelect(day,null);}}}catch(e){}
1422try{
1423initNumSelect(month,null);$(month).onchange=function(){
1424var y=$(year).value;var m=$(month).value;if(m==0){
1425clearSelect(day);initNumSelect(day,null);return;}
1426if(m==12){
1427m=0;y++;}
1428var date=new Date(y,m,1);var nd=new Date(date.getTime()-1000);clearSelect(day);initNumSelect(day,1,nd.getDate());}}catch

(e){}
1429try{
1430initNumSelect(day,null);}catch(e){}}
1431function actFooter(){
1432var str='\
1433<div class="copyright">\
1434<p class="copy_link">\
1435<a href="http://www.tencent.com/" target="_blank">关于腾讯</a>&nbsp;\
1436<a href="http://www.tencent.com/index_e.shtml" target="_blank">AboutTencent</a>&nbsp; \
1437<a href="http://www.qq.com/contract.shtml" target="_blank">服务条款</a>&nbsp;\
1438<a href="http://www.tencent.com/adver/" target="_blank">广告服务</a>&nbsp;\
1439<a href="http://hr.tencent.com/" target="_blank">腾讯招聘</a>&nbsp;\
1440<a href="http://service.qq.com/" target="_blank">客服中心</a>&nbsp;\
1441<a href="http://www.qq.com/map/" target="_blank">网站导航</a>&nbsp;\
1442<a href="http://www.qq.com/copyright.shtml" target="_blank">版权保护投诉指引</a>\
1443</p>\
1444<strong>Copyright &copy; 1998-2009 Tencent. All Rights Reserved</strong>\
1445<p class="copy_end_link">腾讯公司&nbsp;\
1446<a href="http://www.tencent.com/law/mo_law.shtml?/law/copyright.htm" target="_blank">版权所有</a>\
1447</p>\
1448</div>\
1449';try{
1450$('footer').innerHTML=str;}catch(e){}}
1451function empty(v){
1452if(v==undefined||v==null||v=="")return true;return false;}
1453function getFileType(f){
1454if(f==undefined||f==null)return '';var idx=f.lastIndexOf(".");if(idx==-1){
1455return '';}
1456return f.substring(idx+1);}
1457var FormChecker={chkObjs :{},
1458errchkObj: null,
1459excludeObj:{},
1460eleTypes :{},
1461eleSpeOpt :{},
1462init: function(fid,chkEles,speOpts,isIniCheck){
1463for(var ele in chkEles){
1464FormChecker.addChkEle(ele,chkEles[ele],speOpts[ele]);}
1465this.form=$(fid);var fOldSubmit=this.form.onsubmit;var combSubmit=function(){
1466if(!FormChecker.chkElements()){
1467if(FormChecker.errchkObj){
1468var ele=FormChecker.errchkObj.id;try{
1469$(ele).focus();$(ele).select();}catch(e){}
1470var

tipDivMsg=FormChecker.errchkObj.errMsg;tipDivMsg=FormChecker.errchkObj.opts.attrs.page_tip||tipDivMsg;FormChecker.showErr

(tipDivMsg);FormChecker.errchkObj=null;}
1471return false;}
1472if(fOldSubmit){
1473return fOldSubmit();}};this.form.onsubmit=combSubmit;if(isIniCheck){
1474FormChecker.chkElements();}},
1475addChkEle: function(ele,type,speOpt){
1476if(window.vDebugOpt&&FormChecker.chkObjs[ele]){
1477logMsg("已经存在验证元素"+ele+',请检查是否多了验证id');}
1478FormChecker.eleTypes[ele]=type;FormChecker.eleSpeOpt[ele]=speOpt;var eleOpt=objectClone(FormChecker.eleOpts[type]);if

(speOpt){
1479Object.extend(speOpt,eleOpt.attrs,true);}
1480if(EleChecker.checkChkOpt(ele,eleOpt)){
1481FormChecker.chkObjs[ele]=new EleChecker.CheckEle(ele,eleOpt);EleChecker.removeFormatInfo(ele);}else{
1482FormChecker.chkObjs[ele]=0;}},
1483removeChkEle: function(ele){
1484if(window.vDebugOpt&&!FormChecker.chkObjs[ele]){
1485logMsg("欲删除的验证元素"+ele+"不存在");}
1486if(!FormChecker.chkObjs[ele]){
1487return;}
1488delete FormChecker.chkObjs[ele];},
1489setExclObj: function(arr){
1490arr.each(
1491function(v,index){
1492FormChecker.excludeObj[v]=true;if(FormChecker.chkObjs[v]){
1493FormChecker.chkObjs[v].ele_check=false;}}
1494);},
1495unsetExclObj: function(arr){
1496arr.each(
1497function(v,index){
1498FormChecker.excludeObj[v]=false;if(FormChecker.chkObjs[v]){
1499FormChecker.chkObjs[v].ele_check=true;}}
1500);},
1501addEleOpts: function(eleOpts){
1502Object.extend(eleOpts,FormChecker.eleOpts,true);},
1503chkElements: function(){
1504var allPass=true;FormChecker.errchkObj=null;for(var ele in FormChecker.chkObjs) {
1505if(FormChecker.excludeObj[ele]){
1506EleChecker.removeFormatInfo(ele);continue;}
1507chkObj=FormChecker.chkObjs[ele];if(chkObj==0){
1508var type=FormChecker.eleTypes[ele];var speOpt=FormChecker.eleSpeOpt[ele];FormChecker.addChkEle(ele,type,speOpt);}
1509var pass=FormChecker.chkElement(ele);allPass=allPass&&pass;}
1510return allPass;},
1511chkElement: function(eid){
1512var pass=true;var chkObj=FormChecker.chkObjs[eid];if(chkObj){
1513var ret=EleChecker.checkElement.bind(chkObj,null,eid)();if(!ret){
1514var id=chkObj.id;if(!FormChecker.errchkObj){
1515FormChecker.errchkObj=chkObj;}}
1516pass=pass&&ret;}
1517return pass;},
1518showErr : function(tipDivMsg){
1519var m1=MSG2.create(null,tipDivMsg,'5秒后自动关闭');m1.setTimeout(5000);m1.setIcon(2);m1.setModel(false);m1.setButton

([3]);m1.show();},
1520eleOpts:{
1521'number' :{
1522'input_type' : 'text',
1523'attrs' :{
1524'data_type' : 'number',
1525'check_length' : true,
1526'min_length' : 0,
1527'max_length' : 8,
1528'min_value' : 0,
1529'max_value' : 88888888,
1530'length_tip' : '请输入0-8个数字',
1531'err_tip' : '请输入0-8个数字',
1532'page_tip' : '请输入0-8个数字',
1533'is_null' : 0}},
1534'string' :{
1535'input_type' : 'text',
1536'attrs' :{
1537'data_type' : 'string',
1538'check_length' : true,
1539'min_length' : 0,
1540'max_length' : 128,
1541'length_tip' : '请正确输入,0-128个字',
1542'err_tip' : '请正确输入,0-128个字',
1543'page_tip' : '请按提示输入',
1544'is_null' : 0}},
1545'shortstring' :{
1546'input_type' : 'text',
1547'attrs' :{
1548'data_type' : 'string',
1549'check_length' : true,
1550'min_length' : 2,
1551'max_length' : 20,
1552'length_tip' : '请正确输入,2-20个字',
1553'err_tip' : '请正确输入,2-20个字',
1554'page_tip' : '请按提示输入',
1555'is_null' : 0}},
1556'longstring' :{
1557'input_type' : 'text',
1558'attrs' :{
1559'data_type' : 'string',
1560'check_length' : true,
1561'min_length' : 2,
1562'max_length' : 128,
1563'length_tip' : '请正确输入,2-128个字',
1564'err_tip' : '请正确输入,2-128个字',
1565'page_tip' : '请按提示输入',
1566'is_null' : 0}},
1567'notnullstring' :{
1568'input_type' : 'text',
1569'attrs' :{
1570'data_type' : 'string',
1571'err_tip' : '请输入',
1572'page_tip' : '请输入',
1573'is_null' : 1}},
1574'address' :{
1575'input_type' : 'text',
1576'attrs' :{
1577'data_type' : 'string',
1578'check_length' : true,
1579'min_length' : 2,
1580'max_length' : 128,
1581'length_tip' : '请输入地址,2-128个字',
1582'page_tip' : '请输入地址',
1583'is_null' : 0}},
1584'nickname' :{
1585'input_type' : 'text',
1586'attrs' :{
1587'data_type' : 'string',
1588'check_length' : true,
1589'min_length' : 0,
1590'max_length' : 20,
1591'length_tip' : '请输入0-20个字',
1592'err_tip' : '请输入0-20个字',
1593'is_null' : 1}},
1594'zip' :{
1595'input_type' : 'text',
1596'attrs' :{
1597'data_type' : 'zip',
1598'err_tip' : '请输入6位邮编',
1599'page_tip' : '请输入邮编',
1600'is_null' : 0}},
1601'province' :{
1602'input_type' : 'select',
1603'attrs' :{
1604'data_type' : 'province',
1605'is_null' : 1}},
1606'city' :{
1607'input_type' : 'select',
1608'attrs' :{
1609'data_type' : 'city',
1610'is_null' : 1}},
1611'select' :{
1612'input_type' : 'select',
1613'attrs' :{
1614'data_type' : 'select',
1615'null_value' : 0,
1616'is_null' : 1}},
1617'zeroselect' :{
1618'input_type' : 'select',
1619'attrs' :{
1620'data_type' : 'select',
1621'null_value' : 0,
1622'is_null' : 1}},
1623'email' :{
1624'input_type' : 'text',
1625'attrs' :{
1626'data_type' : 'email',
1627'err_tip' : '请输入正确的email',
1628'page_tip' : '请输入正确的email',
1629'is_null' : 0}},
1630'mobile' :{
1631'input_type' : 'text',
1632'attrs' :{
1633'data_type' : 'mobile',
1634'err_tip' : '请输入正确的手机号',
1635'page_tip' : '请输入正确的手机号',
1636'is_null' : 0}},
1637'localphone' :{
1638'input_type' : 'text',
1639'attrs' :{
1640'data_type' : 'localphone',
1641'page_tip' : '请输入正确的电话号码',
1642'err_tip' : '请输入正确的电话号码',
1643'is_null' : 0}},
1644'phone' :{
1645'input_type' : 'text',
1646'attrs' :{
1647'data_type' : 'telephone',
1648'check_length' : true,
1649'min_length' : 5,
1650'max_length' : 18,
1651'length_tip' : '请输入5-18个字',
1652'err_tip' : '请输入正确的电话号码',
1653'page_tip' : '请输入正确的电话号码',
1654'is_null' : 0}},
1655'telephone' :{
1656'input_type' : 'text',
1657'attrs' :{
1658'data_type' : 'telephone',
1659'check_length' : true,
1660'min_length' : 5,
1661'max_length' : 18,
1662'length_tip' : '请输入5-18个字',
1663'err_tip' : '请输入正确的电话号码',
1664'page_tip' : '请输入正确的电话号码',
1665'is_null' : 0}},
1666'image' :{
1667'input_type' : 'upload',
1668'attrs' :{
1669'data_type' : 'upload',
1670'file_type' : 'jpg|gif|png|jpeg',
1671'err_tip' : '*',
1672'page_tip' : '请上传符合格式的文件',
1673'is_null' : 0}},
1674'upload' :{
1675'input_type' : 'upload',
1676'attrs' :{
1677'data_type' : 'upload',
1678'file_type' : 'jpg|gif|png|jpeg',
1679'err_tip' : '*',
1680'page_tip' : '请上传符合格式的文件',
1681'is_null' : 0}},
1682'url' :{
1683'input_type' : 'text',
1684'attrs' :{
1685'data_type' : 'url',
1686'err_tip' : '请输入正确的链接地址',
1687'page_tip' : '请输入正确的链接地址',
1688'is_null' : 0}},
1689'idcard' :{
1690'input_type' : 'text',
1691'attrs' :{
1692'data_type' : 'idcard',
1693'err_tip' : '请输入正确的身份证号码',
1694'page_tip' : '请输入正确的身份证号码',
1695'is_null' : 0}},
1696'time' :{
1697'input_type' : 'text',
1698'attrs' :{
1699'data_type' : 'time',
1700'is_null' : 0}},
1701'date' :{
1702'input_type' : 'text',
1703'attrs' :{
1704'data_type' : 'date',
1705'is_null' : 0}},
1706'datetime' :{
1707'input_type' : 'text',
1708'attrs' :{
1709'data_type' : 'datetime',
1710'is_null' : 0}},
1711'qq' :{
1712'input_type' : 'text',
1713'attrs' :{
1714'data_type' : 'qq',
1715'err_tip' : 'QQ格式不正确',
1716'is_null' : 1}},
1717'qqs' :{
1718'input_type' : 'text',
1719'attrs' :{
1720'deal_func' : function checkQQs(e,v){
1721var rex=/^\d+(,\d+)*,?$/g;if(!rex.test(v)){
1722return "QQ号码格式不正确";}
1723return "";},
1724'is_null' : false}},
1725'checkbox' :{
1726'input_type' : 'checkbox',
1727'attrs' :{
1728'data_type' : 'checkbox',
1729'min_checked' : '2',
1730'max_checked' : '3',
1731'err_tip' : '请选择2-3个',
1732'is_null' : 0}},
1733'radio' :{
1734'input_type' : 'checkbox',
1735'attrs' :{
1736'data_type' : 'checkbox',
1737'min_checked' : '1',
1738'max_checked' : '3',
1739'err_tip' : '请选择',
1740'is_null' : 1}},
1741'hidden' :{
1742'input_type' : 'hidden',
1743'attrs' :{
1744'data_type' : 'string',
1745'check_length' : true,
1746'min_length' : 0,
1747'max_length' : 128,
1748'length_tip' : '请输入2-128个字',
1749'is_null' : 1}}}};var EleChecker={
1750CheckEle: function(el,opts){
1751el=$(el);if(!el){return;}
1752var

checkObj=this;this.id=el.id;this.opts=opts;this.ele_check=true;this.inputType=opts.input_type;this.dealFunc=opts.attrs.deal_f

unc ? opts.attrs.deal_func : EleChecker.dataFunc[opts.attrs.data_type];var info_div=opts.attrs.info_div;if(info_div){
1753var info=$(info_div);if(!info){
1754info=document.createElement('span');info.style.display='none';}
1755opts.attrs.info=info;el.info=info;}else{
1756info=EleChecker.getHintEle.bind(this)();if(info){
1757opts.attrs.info=info;el.info=info;}}
1758var inputType=opts.input_type;var needAttach=EleChecker.checkEvent[inputType];var attLength=needAttach.length;var

attrs=opts.attrs;for(var att in attrs){
1759el.setAttribute(att,attrs[att]);}
1760for(i=0;i<attLength; i++){
1761if(opts.input_type=='checkbox'){
1762var eleName=el.name;var checkboxs=document.getElementsByName(eleName);checkboxs=$A(checkboxs);checkboxs.each(function

(chkbox,index){
1763for(var att in attrs){
1764chkbox.setAttribute(att,attrs[att]);}
1765Event.observe(chkbox,needAttach[i],EleChecker.checkElement.bind(checkObj,null,chkbox));});}else{
1766Event.observe(el,needAttach[i],EleChecker.checkElement.bind(checkObj,null,el));}}
1767this.listeners=new Array();this.addListener=function(listener){
1768this.listeners.push(listener);};this.notifyListeners=function(){
1769for(var i=0; i<this.listeners.length; i++){
1770this.listeners[i]();}};},
1771checkChkOpt : function(el,opt){
1772if(!opt){
1773if(window.vDebugOpt){
1774logMsg(el+"不存在这样的约定类型");}
1775return false;}
1776var inputType=opt.input_type;var dealFunc=opt.attrs.deal_func ? opt.attrs.deal_func : EleChecker.dataFunc

[opt.attrs.data_type];var legal=true;if(!inputType){
1777legal=false;if(window.vDebugOpt){
1778logMsg(el+"找不到这样的输入类型");}}
1779if(!dealFunc){
1780legal=false;if(window.vDebugOpt){
1781logMsg(el+"没有这样的处理函数");}}
1782var ele=$(el);if(!ele){
1783legal=false;if(window.vDebugOpt){
1784logMsg(el+"没有这样的元素");}}
1785return legal;},
1786checkEvent:{
1787'text' :['keyup','focus','change','blur'],
1788'checkbox' :['click'],
1789'hidden' :['click'],
1790'upload' :['change'],
1791'select' :['change']},
1792dataFunc :{
1793string : checkString,
1794number : checkNumber,
1795zip : checkZip,
1796email : checkEmail,
1797mobile : checkMobilePhone,
1798phone : checkPhone,
1799localphone : checkPhone,
1800telephone : checktelephone,
1801idcard : checkIdCard,
1802time : checkTime,
1803datetime : checkDateTime,
1804date : checkDate,
1805qq : checkQQ,
1806ip : checkIP,
1807url : checkURL,
1808checkbox : checkCheckBox,
1809multiselect : checkMutiselect,
1810upload : checkUpload,
1811image : checkUpload,
1812select : checkSelect,
1813province : checkProvince,
1814city : checkCity},
1815showFormatInfo : function(e,msg){
1816e=$(e);if(!e){
1817return;}
1818var info=e.info;if(e.getAttribute("data_type")=='checkbox'){
1819var l=document.getElementsByName(e.name);var leInd=l.length-1;var le=l[leInd];if(le) {
1820e=le;}}
1821if(info==undefined||info==null){
1822e.info=document.createElement("span");e.info.className='reg_tip';e.info.style.zIndex=100;e.parentNode.insertBefore

(e.info,e.nextSibling);info=e.info;}
1823if(!!document.all){
1824info.innerText=msg;}else{
1825info.innerHTML=msg;}},
1826removeFormatInfo : function(e){
1827e=$(e);if(!e){
1828return;}
1829if(e.getAttribute("data_type")=='checkbox'){
1830var l=document.getElementsByName(e.name);var leInd=l.length-1;var le=l[leInd];if(le) {
1831e=le;}}
1832if(e.info==undefined||e.info==null)return;e.info.innerHTML="";},
1833checkElement : function(e,el){
1834var chkObj=this;el=$(el);if(!el||!chkObj.ele_check){
1835return true;}
1836if(el.getAttribute==undefined){
1837return true;}
1838var v=getValueOfElement(el);var bempty=false;if((v=="")||(typeof(v)=="object"&&v.length==0)){
1839bempty=true;}
1840var isnull=el.getAttribute("is_null");isnull=(isnull!='0')? isnull : 0;var errTip=chkObj.opts.attrs.err_tip ?

chkObj.opts.attrs.err_tip : "*";if(bempty){
1841if(!!isnull){
1842chkObj.errMsg=errTip;EleChecker.showFormatInfo(el,errTip);return 0;}else{
1843EleChecker.removeFormatInfo(el);}
1844return 1;}
1845var ret="";if(chkObj.dealFunc){
1846ret=chkObj.dealFunc(el,v)}
1847if(!empty(ret)){
1848var errTip=chkObj.opts.attrs.err_tip||ret;chkObj.errMsg=errTip;EleChecker.showFormatInfo(el,errTip);return 0;}
1849if(!!chkObj.opts.attrs.check_length){
1850ret=checkLength(el,v);if(ret==1){var lengthInfo=chkObj.opts.attrs.length_tip;EleChecker.showFormatInfo

(el,lengthInfo);return 0;}}
1851EleChecker.removeFormatInfo(el);chkObj.notifyListeners();return 1 ;},
1852getHintEle : function(){
1853var formrow='form_'+this.id;var hints=DOM.getElementsByClass('form_hint',formrow);return(hints&&hints[0])? hints[0]:

hints[0];}};function getValueOfElement(e){
1854if((e.tagName.toLowerCase()=="input")&&((e.type.toLowerCase()=="text")||(e.type.toLowerCase()=="file")||

(e.type.toLowerCase()=="password")||(e.type.toLowerCase()=="hidden"))){
1855return e.value;}else if(e.tagName.toLowerCase()=="textarea"){
1856return e.value;}else if(e.getAttribute("data_type")=='checkbox'){
1857var list=new Array();var l=document.getElementsByName(e.name);var j=0;for(var i=0; i<l.length;i++){
1858if(l[i].checked){
1859list[j]=l[i].value;j++;}}
1860return list;}else if((e.tagName.toLowerCase()=="select")&&e.multiple){
1861var list=new Array();var j=0;for(var i=0; i<e.options.length;i++){
1862if(e.options[i].selected){
1863list[j]=e.options[i].value;j++;}}
1864return list;}else if((e.tagName.toLowerCase()=="select")&&!e.multiple){
1865if(e.selectedIndex>=0) {
1866return e.options[e.selectedIndex].value;}}
1867return "";}
1868function setValueOfElement(e,v){
1869if((e.tagName.toLowerCase()=="input")&&((e.type.toLowerCase()=="text")||((e.type.toLowerCase()=="password")))) {
1870e.value=v;}else if(e.tagName.toLowerCase()=="textarea") {
1871e.innerText=v;}}
1872function checkUpload(e,v){
1873var file_type=e.getAttribute("file_type");if(file_type==undefined||file_type=="")return;var types=file_type.split

("|");if(types.length<=0){
1874return;}
1875var type=getFileType(v).trim().toUpperCase();var isSupport=false;for(var i=0; i<types.length;i++){
1876if(type==types[i].trim().toUpperCase()){
1877isSupport=true;break;}}
1878var preview_id=e.getAttribute("preview_id");if(preview_id!=undefined&&preview_id!=null){
1879var p=document.getElementById(preview_id);p.src=(isSupport?v : "");}
1880if(isSupport==false){
1881return "支持类型:"+file_type.toUpperCase()+".目前类型:"+type;}}
1882function checkLength(e,v){
1883var minlength=e.getAttribute("min_length");minlength=(!empty(minlength))? minlength : 0;var maxlength=e.getAttribute

("max_length");if(v.length<minlength||v.length>maxlength){
1884return 1;}
1885return 0;}
1886function checkProvince(e,v){
1887v=parseInt(v);if(v==0){
1888return "*";}}
1889function checkCity(e,v){
1890v=parseInt(v);if((v==0)||(v%100==0)){
1891return "*";}}
1892function checkSelect(e,v){
1893var null_value=e.getAttribute("null_value");var is_null=e.getAttribute('is_null');if(!is_null){
1894return "";}
1895if(v==undefined||v==""||v==null_value)return "*";}
1896function checkMutiselect(e,v){
1897var min_selected=e.getAttribute("min_selected");if(min_selected!=undefined&&(v==""||v.length<min_selected))return "最少选

择"+min_selected+"项";var max_selected=e.getAttribute("max_selected");if(max_selected!=undefined&&

(v==""||v.length>max_selected))return "最多选择"+max_selected+"项";}
1898function checkCheckBox(e,v){
1899var min_checked=e.getAttribute("min_checked");if(min_checked!=undefined&&(v==""||v.length<min_checked))return "最少选

择"+min_checked+"项";var max_checked=e.getAttribute("max_checked");if(max_checked!=undefined&&(v==""||v.length>max_checked))

return "最多选择"+max_checked+"项";}
1900function checkNumber(e,v){
1901var reInt=new RegExp("^[0-9]*$");if(!reInt.test(v))return "只能输入数字";var minValue=e.getAttribute("min_value");if

(minValue!=undefined&&parseInt(v)<parseInt(minValue))return "输入数不能<"+minValue+"";;var maxValue=e.getAttribute

("max_value");if(maxValue!=undefined&&parseInt(v)>parseInt(maxValue))return "输入数不能>"+maxValue+"";return "";}
1902function checkString(e,v){
1903return "";}
1904function checkZip(e,v){
1905var reZip=/^[0-9]\d{5}$/;return reZip.test(v)?"":"邮编不正确";}
1906function checkEmail(e,v){
1907var reEmail=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/;if(!reEmail.test(v))return "Email格式出错";}
1908function checkMobilePhone(e,v){
1909var reMP=/^((\(\d{2,3}\))|(\d{3}\-))?1[358]\d{9}$/;return reMP.test(v)?"":"手机号码不正确";}
1910function checkPhone(e,v){
1911var rePhone=/^((\(\d{2,3}\))|(\d{3}\-))?(\(0\d{2,3}\)|0\d{2,3}-)?[1-9]\d{6,7}(\-\d{1,4})?$/;return rePhone.test(v)?"":"格

式:区号-电话号码-分机号,区号和分机号可以不填";}
1912function checktelephone(e,v){
1913return checkPhone(e,v)&&checkMobilePhone(e,v);}
1914function checkIdCard(e,v){
1915var reID=/^\d{15}(\d{2}[xX0-9])?$/;return reID.test(v)?"":"身份证号不正确";}
1916function checkTime(e,v){
1917var reTime=/^((?:0[0-9])|(?:1[0-9])|(?:2[0-3])):([0-5][0-9]):([0-5][0-9])$/;return reTime.test(v)?"":"时间格式不正确";}
1918function checkDateTime(e,v){
1919var err="日期时间格式不正确";var reDateTime=/^([1-9]\d{3})-((?:0[1-9])|(?:10|11|12))-((?:0[1-9])|(?:[1-2][0-9])|(?:3[0-

1]))((?:0[0-9])|(?:1[0-9])|(?:2[0-3])):([0-5][0-9]):([0-5][0-9])$/
1920var m=v.match(reDateTime);if(!m)return err;var d=new Date(m[1],m[2]-1,m[3],m[4],m[5],m[6]);if(d.getFullYear()==m[1]&&

(d.getMonth()+1)==m[2]&&d.getDate()==m[3]
1921&&d.getHours()==m[4]&&d.getMinutes()==m[5]&&d.getSeconds()==m[6]){
1922return "";}
1923return err;}
1924function checkDate(e,v){
1925var err="日期格式不正确"
1926var reDate=/^([1-9]\d{3})-((?:0[1-9])|(?:10|11|12))(-((?:0[1-9])|(?:[1-2][0-9])|(?:3[0-1])))?$/;var m=v.match(reDate);if

(!m)return err;m[3]=m[3]? m[4]: 1;var d=new Date(m[1],m[2]-1,m[3]);if(d.getFullYear()==m[1]&&(d.getMonth()+1)==m[2]

&&d.getDate()==m[3]){
1927return "";}
1928return err;}
1929function checkQQ(e,v){var reQQ=/^[1-9]\d{4,11}$/;return reQQ.test(v)?"":"QQ格式不正确";}
1930function checkIP(e,v){var reIPV4=/^(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d{2}

|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d{2}|2[0-4]\d|25[0-5])$/;var reIPV6=/^([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]

{1,4}):([A- Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}):([A-Fa-f0-9]{1,4}): ([A-Fa-f0-9]{1,4})$/;return(reIPV4.test

(v)||reIPV6.test(v))?"":"IP格式不正确";}
1931function checkOnlyChinese(e,v){var reChn=/^[\u0391-\uFFE5]+$/;if(!reChn.test(v))return "只能输入中文字符";return "";}
1932function checkOnlyEnglish(e,v){var reEng=/^[A-Za-z]+$/;if(!reEng.test(v))return "只能输入英文字符";var

length=e.getAttribute("max_length");if(length!=undefined&&v.length>length)return "超过最大长度"+length+"字";return "";}
1933function checkURL(e,v){var reUrl=/^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^\"\"])*$/;if(!

reUrl.test(v))return "url格式不正确";}
1934var MSG={
1935msgObjs :{},
1936timers :{},
1937MsgObj : function(opt){
1938MSG.divInit[opt.msgType](opt);Object.extend(opt,this);},
1939showTipDiv: function(msgObj){
1940var divId=msgObj.msgId;var tipDiv=$(divId);try{
1941tipDiv.style.display="";}
1942catch(e){return;}
1943centerElement(tipDiv);if(msgObj.model){
1944modelwnd();}},
1945hideTipDiv: function(div){
1946var tipDiv=$(div);var msgObj=MSG.msgObjs[div];try{
1947tipDiv.style.display="none";}
1948catch(e){return;}
1949if(msgObj.model){
1950hiddenModelWnd();}
1951if(msgObj.aftHide){
1952msgObj.aftHide();}},
1953setMsgCont : function(msgObj,msg){
1954var contentDiv=$(msgObj.contentId);contentDiv.innerHTML=msg;},
1955showMsg : function(msgId,msgType,opts){
1956var msgTypeOpt={};Object.extend(MSG.msgTypeOpts[msgType],msgTypeOpt);var innerType=msgTypeOpt['msgType'];Object.extend

(MSG.msgTypeOpts[innerType],msgTypeOpt,true);if(opts){
1957Object.extend(opts,msgTypeOpt,true);}
1958if(!MSG.msgObjs[msgId]){
1959msgTypeOpt.msgId=msgId;MSG.msgObjs[msgId]=new MSG.MsgObj(msgTypeOpt);}
1960var msgObj=MSG.msgObjs[msgId];msgTypeOpt.msgId=msgObj.msgId;if(msgObj.setMsgCont){
1961msgObj.setMsgCont(msgTypeOpt);}
1962if(msgObj.showMsgDiv){
1963msgObj.showMsgDiv(msgObj);}else{
1964MSG.showTipDiv(msgObj);}},
1965msgTypeOpts :{
1966'pureMsg' :{
1967msgId: 'pureMsg',
1968msgType: 'pureMsg',
1969iconArr :{
19701: '<img src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/righticon.png" alt="操作成功" />',
19712: '<img src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/failicon.png" alt="操作失败" />'},
1972confirm: function(){
1973var msgId=this.msgId;MSG.hideTipDiv(msgId);},
1974close: function(){
1975var msgId=this.msgId;MSG.hideTipDiv(msgId);},
1976butArr :{
19771: '<a href="javascript: MSG.msgObjs[\'{msgid}\'].confirm();" title="确定" class="popbtn"><img

src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/popok.png" alt="确定" /></a>',
19782: '<a href="javascript: MSG.hideTipDiv(\'{msgId}\');" title="取消" class="popbtn"><img

src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/popcancle.png" alt="取消" /></a>',
19793: '<a href="javascript: MSG.msgObjs[\'{msgid}\'].close();" title="关闭" class="popbtn"><img

src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/popclose.png" alt="关闭" /></a>'},
1980setMsgCont : function(opt){
1981var msgId=opt.msgId;var msgIdEle=$(msgId);var icon=opt.iconArr[opt.iconId];var butns="";opt.butns.each(function(v,ind){
1982butns+=opt.butArr[v];});var innerstr='\
1983<iframe style="position: absolute; left: 0; top: 0; z-index:-1; filter: alpha(opacity=0); opacity: 0;"></iframe>\
1984<div class="pop_title">\
1985<strong class="popleft white">{title}</strong>\
1986<a href="javascript: MSG.hideTipDiv(\'{msgId}\');" title="关闭" class="popright">关闭</a>\
1987</div>\
1988<div class="pop_content">\
1989<p class="bold14px">{icon}{msg}</p>\
1990<p class="gray">{tip}</p>\
1991<p class="poplastline">\
1992{button}\
1993</p>\
1994</div>\
1995';innerstr=MSG.repPlacer(innerstr,'title',opt.title);innerstr=MSG.repPlacer

(innerstr,'tip',opt.tip);innerstr=MSG.repPlacer(innerstr,'msg',opt.msg);innerstr=MSG.repPlacer

(innerstr,'icon',icon);innerstr=MSG.repPlacer(innerstr,'button',butns);innerstr=MSG.repPlacer

(innerstr,'msgId',msgId);msgIdEle.innerHTML=innerstr;var iframe=msgIdEle.getElementsByTagName('iframe')

[0];iframe.style.width=msgIdEle.clientWidth+"px";iframe.style.height=msgIdEle.clientHeight+"px";},
1996butns :[1,2],
1997model: true,
1998iconId: 1,
1999title: '温馨提示',
2000msg: '操作成功',
2001tip: ''},
2002'timeoutTip' :{
2003msgId: 'timeoutTip',
2004msgType: 'pureMsg',
2005model: false,
2006timeout: 5000,
2007showMsgDiv: function(msgObj){
2008var msgId=msgObj.msgId;$(msgId).style.display='';centerElement(msgId);if(MSG.timers[msgId]){
2009clearTimeout(MSG.timers[msgId]);}
2010var timeout=msgObj.timeout||5000;MSG.timers[msgId]=setTimeout(function(){$(msgId).style.display='none';},timeout);}}},
2011divInit :{
2012'logDiv' : function(){
2013logId=logId||"logDiv";var logDiv=document.getElementById(logId);if(!logDiv){
2014logDiv=document.createElement('div');logDiv.id=logId;logDiv.style.cssText="border: red 1px

solid";document.body.appendChild(logDiv);}
2015var msgDiv=document.createElement('div');msgDiv.style.cssText='color: red; text-align:

center;';msgDiv.innerHTML=msg;logDiv.appendChild(msgDiv);},
2016'pureMsg' : function(opt){
2017var msgId=opt.msgId||"pureMsg";var msgIdEle=$(msgId);if(!msgIdEle){
2018msgIdEle=document.createElement

('div');msgIdEle.id=msgId;msgIdEle.style.position='absolute';msgIdEle.className='popbox';msgIdEle.style.zIndex=opt.zIndex||10

00;document.body.appendChild(msgIdEle);}}},
2019repPlacer : function(url,placer,value,hold){
2020var reg=new RegExp('{'+placer+'}','gi')
2021if(hold){
2022if(value&&value!=""){
2023value=placer+'='+value;}else{
2024value="";}}
2025if(!value){
2026value="";}
2027url=url.replace(reg,value);return url;}}
2028MSG2={
2029items :[],
2030_lastFocus : null,
2031create : function(title,msg,tip){
2032var popupCssId='_act_popup_css';var popCss=CSS.getStyleSheetById(popupCssId);if(!popCss){
2033var popCss=insertCSSLink("http://imgcache.qq.com/ACT/act_common/css/pop.css");popCss.id=popupCssId;if(popCss.ownerNode){
2034popCss.ownerNode.id=popupCssId;}}
2035var id=this.items.length;var opt={
2036'title' : title||'温馨提示',
2037'msg' : msg||'',
2038'tip' : tip||''}
2039var msg=new MsgItem(id,opt);msg.init();this.items.push(msg);return msg;},
2040get : function(id){
2041return this.items[id];}}
2042MsgItem=function(id,opt){
2043this.id=id;this._tpl='\
2044<iframe style="position: absolute; left: 0; top: 0; z-index:-1; filter: alpha(opacity=0); opacity: 0; width: 100%;

height: 100%;"></iframe>\
2045<div class="pop_title" id="msg_item_title_{id}">\
2046<strong class="popleft white">{title}</strong>\
2047<a href="javascript: MSG2.get(\'{id}\').hide();" title="关闭" class="popright">关闭</a>\
2048</div>\
2049<div class="pop_content">\
2050<p class="bold14px">{icon}{msg}</p>\
2051<p class="gray">{tip}</p>\
2052<p class="poplastline">\
2053{button}\
2054</p>\
2055</div>\
2056';this._id='msg_item_'+id;this.maskId='msg_item_model_mask_'+id;this.mastIfrId='ifr_'+this.maskId;this.titleId='msg_item_

title_'+id;this._drag=null;this.onconfirm=function(){};this.oncancel=function(){};this.onclose=function()

{};this.onunload=function(){};this.component={
2057iconArr :{
20581: '<img src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/righticon.png" alt="操作成功" />',
20592: '<img src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/failicon.png" alt="操作失败" />'},
2060butArr :{
20611: '<a href="javascript: MSG2.get({id}).confirm();" title="确定" class="popbtn"><img

src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/popok.png" alt="确定" /></a>',
20622: '<a href="javascript: MSG2.get({id}).cancel();" title="取消" class="popbtn"><img

src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/popcancle.png" alt="取消" /></a>',
20633: '<a href="javascript: MSG2.get(\'{id}\').close();" title="关闭" class="popbtn"><img

src="http://imgcache.qq.com/ACT/qzone_3years_080519/img/popclose.png" alt="关闭" /></a>'}};this.opt={
2064butns :[1,2],
2065model: true,
2066icon: 1,
2067title: '温馨提示',
2068msg: '操作成功',
2069tip: '',
2070zIndex : 500,
2071opacity : 40};Object.extend(opt,this.opt,true);this.zIndex=this.opt.zIndex+this.id+20;}
2072MsgItem.prototype.init=function(){
2073var msg=DOM.get(this._id);if(!msg){
2074this.msg=document.createElement

('div');this.msg.id=this._id;this.msg.className='popbox';this.msg.style.display='none';this.msg.style.zIndex=this.zIndex;docu

ment.body.appendChild(this.msg);}
2075this.msg=msg;}
2076MsgItem.prototype._getFillArr=function(){
2077var icon=this.component.iconArr[this.opt.icon];var butns="";var comp=this.component;this.opt.butns.each(function(v,ind){
2078butns+=comp.butArr[v];});return{
2079'icon' : icon,
2080'title' : this.opt.title,
2081'tip' : this.opt.tip,
2082'msg' : this.opt.msg,
2083'button' : butns,
2084'id' : this.id};}
2085MsgItem.prototype.fillcontent=function(){
2086var fills=this._getFillArr();var str=this._tpl;for(fill in fills) {
2087var reg=new RegExp('{'+fill+'}','gi')
2088str=str.replace(reg,fills[fill]);}
2089DOM.get(this._id).innerHTML=str;}
2090MsgItem.prototype.setProp=function(prop,value){
2091this.opt[prop]=value;}
2092MsgItem.prototype.setIcon=function(icon){
2093this.setProp('icon',icon);}
2094MsgItem.prototype.setButton=function(butns){
2095this.setProp('butns',butns);}
2096MsgItem.prototype.setTimeout=function(t){
2097this.setProp('timeout',t);}
2098MsgItem.prototype.setText=function(title,msg,tip){
2099if(title){
2100this.setProp('title',title);}
2101if(msg){
2102this.setProp('msg',msg);}
2103if(tip){
2104this.setProp('tip',tip);}}
2105MsgItem.prototype.setModel=function(model){
2106this.setProp('model',model);}
2107MsgItem.prototype.show=function(){
2108this.fillcontent();DOM.show(this._id);this._drag=new dragable(this.titleId,this._id);var msgitem=this;if

(this.opt.timeout){
2109setTimeout(msgitem.hide.bind(msgitem),this.opt.timeout);}
2110centerElement(this._id);EVENT.addEvent(this._id,'mousedown',this.focus.bind(this));this.focus();if(this.opt.model){
2111var mid=this.maskId;var opacity=this.opt.opacity;var zIndex=this.zIndex-1;modelwnd(mid,opacity,zIndex);}}
2112MsgItem.prototype.hide=function(){
2113DOM.hide(this._id);if(this.opt.model){
2114hiddenModelWnd(this.maskId);}
2115this.onunload();}
2116MsgItem.prototype.focus=function(){
2117if(MSG2._lastFocus){
2118MSG2._lastFocus.blur();}
2119DOM.setStyle(this._id,'zIndex',this.zIndex+5000);DOM.setStyle(this.maskId,'zIndex',this.zIndex+5000-

1);MSG2._lastFocus=this;}
2120MsgItem.prototype.blur=function(){
2121DOM.setStyle(this._id,'zIndex',this.zIndex);DOM.setStyle(this.maskId,'zIndex',this.zIndex-1);}
2122MsgItem.prototype.confirm=function(){
2123this.hide();this.onconfirm();}
2124MsgItem.prototype.close=function(){
2125this.hide();this.onclose();}
2126MsgItem.prototype.cancel=function(){
2127this.hide();this.oncancel();}
2128function getIndexPage(){
2129var url=window.location.href;var reg=/http:\/\/[^\/]*\/([^\/]*\/)+/;var matched=url.match(reg);var str="";if(matched){
2130str=matched[0];}
2131return str;}
2132function getActDomain(){
2133var url=window.location.href;var reg=/^(http:\/\/[^\/]*\/)/;var matched=url.match(reg);var str="";if(matched){
2134str=matched[1];}
2135return str;}
2136function getActCookieDomain(){
2137var url=window.location.href;var reg=/^http:\/\/([^\/]*)/;var matched=url.match(reg);var str="";if(matched){
2138str=matched[1];}
2139return str;}
2140ACT2_COMM={
2141INDEX_PAGE : getIndexPage(),
2142ACT_DOMAIN : getActDomain(),
2143ACT_STATIC : 'http://p5.qzone.qq.com/',
2144ACT_COOKIE_DOMAIN : getActCookieDomain()}
2145ACT2={
2146COOKIE_NICKNAME : 'etact_nickname',
2147COOKIE_UIN : 'etact_uin',
2148D_PROFILE_PAGE : ACT2_COMM.ACT_DOMAIN+'user/profile.php?callback&{act_id}&{qq}',
2149S_PROFILE_PAGE : ACT2_COMM.INDEX_PAGE+'user.html?{qq}',
2150S_REG_PAGE : ACT2_COMM.INDEX_PAGE+'reg.html',
2151D_REG_PRE_CHECK_URL : ACT2_COMM.ACT_DOMAIN+"user/precheck_reg.php?callback&act_id={actId}",
2152D_EDT_PRE_CHECK_URL : ACT2_COMM.ACT_DOMAIN+"user/precheck_edit.php?callback&act_id={actId}",
2153D_FANS_LIST : ACT2_COMM.ACT_DOMAIN+"vote/votefans.php?callback&act_id={actId}&player={player}",
2154S_PLAYER_LIST : ACT2_COMM.ACT_STATIC+'{actId}/{ord}_{direct}/{type_}{page}.js',
2155S_PLAYER_LIST_PAGE : ACT2_COMM.INDEX_PAGE+'playerlist.html?ord={ord}&direct={direct}&page={no}{&type}',
2156S_INDEX_DATA : ACT2_COMM.ACT_STATIC+'{actId}/index.js',
2157S_REC_DATA : ACT2_COMM.ACT_STATIC+'recommend/{actId}.js',
2158D_STATUS : ACT2_COMM.ACT_DOMAIN+'user/status.php?callback'}
2159ACT_LINKS={
2160'open_yellow' : 'http://paycenter.qq.com/home/?pageshow=&CacheTime=1229566315',
2161'open_qzone' : 'http://imgcache.qq.com/qzone/web/load2.htm'}
2162var GJsonDealFun={
2163DataGetter :{},
2164init:function(url,call_back,err_call_back,refresh){
2165this.url=url;this.call_back=call_back;this.err_call_back=err_call_back;if(refresh==undefined)
2166refresh=true;loadJsonData(url,url,function(obj){call_back(obj);},function(){},refresh,null);},
2167jsonCallBack:function(opt,obj){
2168if(obj.error&&(opt.errdeal!==false)){
2169if(opt.errfunDeal){
2170var errcode=obj.error.errcode;if(opt.errmap[errcode]){
2171opt.errmap[errcode](opt,obj);}else{
2172opt.errmap['default'](opt,obj);}
2173return;}
2174if(opt.handler_err&&opt.handler_err[obj.error.errcode]){
2175opt.handler_err[obj.error.errcode](opt,obj);return;}
2176if(handler_err[obj.error.errcode]){
2177handler_err[obj.error.errcode](opt,obj);}else{
2178var m1=MSG2.create(null,obj.error.msg,null);m1.setIcon(2);m1.setButton([3]);m1.show();}
2179return;}
2180if(opt.preDeal){
2181opt.preDeal(opt,obj);}
2182if(opt.dataDeal){
2183opt.dataDeal(opt,obj);}
2184if(opt.aftDeal){
2185opt.aftDeal(opt,obj);}},
2186opts:{
2187status :{
2188statusDiv : 'log_status',
2189dataDeal: function(opt,obj){
2190var login=false;var nickname="";if(obj.qq!=0){
2191login=true;nickname=obj.nickname;document.cookie=ACT2.COOKIE_NICKNAME+"="+encodeURIComponent(nickname)+"; path=/;

domain="+ACT2_COMM.ACT_COOKIE_DOMAIN ;document.cookie=ACT2.COOKIE_UIN+"="+obj.qq+"; path=/;

domain="+ACT2_COMM.ACT_COOKIE_DOMAIN ;}
2192opt.nickname=nickname;this.setStatusStr(login,nickname,opt);},
2193linkClass: 'cleft1',
2194setStatusStr : function(login,nickname,opt){
2195var linkClass=opt.linkClass;if(!login){
2196var str='您还没有<a href="javascript:window.top.qq_login_form(15000103,window.location.href);" class="'+linkClass+'">登录

</a>';}else{
2197var str='欢迎您&nbsp;'+nickname+'&nbsp;|&nbsp;<a href="javascript: iLogout()" class="'+linkClass+'">退出登录</a>';}
2198var logStatus=$(this.statusDiv);logStatus.innerHTML=str;if(opt.nickSpeDeal){
2199opt.nickSpeDeal(nickname);}},
2200doLogout : function(){
2201document.cookie = "uin=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";document.cookie = "skey=;

expires=Thu,01-Jan-1970 00:00:01 GMT; path=/; domain=qq.com";document.cookie = "zzpaneluin=; expires=Thu,01-Jan-1970 00:00:01

GMT; path=/; domain=qq.com";document.cookie = "zzpanelkey=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/;

domain=qq.com";document.cookie=ACT2.COOKIE_NICKNAME+"=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/;

domain="+ACT2_COMM.ACT_COOKIE_DOMAIN;document.cookie=ACT2.COOKIE_UIN+"=; expires=Thu,01-Jan-1970 00:00:01 GMT; path=/;

domain="+ACT2_COMM.ACT_COOKIE_DOMAIN;window.location.reload(true);},
2202loadData: function(opt){
2203window.iLogout=opt.doLogout;var nickname=getCookie(ACT2.COOKIE_NICKNAME,'/',ACT2_COMM.ACT_COOKIE_DOMAIN);var

uin=getCookie(ACT2.COOKIE_UIN,'/',ACT2_COMM.ACT_COOKIE_DOMAIN);var qq=getQQNum();if(qq==0){
2204this.setStatusStr(false,nickname,opt);}else if(qq!=uin||!nickname){
2205var url=ACT2.D_STATUS;GJsonDealFun.init(url,this.callBack.bind(this,opt),null,false);}else{
2206nickname=decodeURIComponent(nickname);this.setStatusStr(true,nickname,opt);}},
2207callBack: function(opt,obj){
2208GJsonDealFun.jsonCallBack(opt,obj);}},
2209index :{
2210divToFill:{
2211'reg_time' : 'reg_time_desc',
2212'sort0' : 'sort0_desc'},
2213preDeal: function(opt,obj){},
2214aftDeal: function(opt,obj){},
2215dataDeal: function(opt,obj){
2216var fillFun=function(field,ele){
2217if(obj.data[field]){
2218FillDiv_Ex(ele,obj.data[field])}};Object.each(this.divToFill,fillFun);Object.each(obj.data,function(fieldData,field){
2219var fdiv=field+'_indexdata';if(!opt.divToFill[fdiv]){
2220FillDiv_Ex(fdiv,obj.data[field]);}});},
2221loadData: function(opt){
2222var actId=this.actId;var url=ACT2.S_INDEX_DATA;var url=replPlacer(url,'actId',actId);GJsonDealFun.init

(url,this.callBack.bind(this,opt),null,false);},
2223callBack: function(opt,obj){
2224GJsonDealFun.jsonCallBack(opt,obj);}},
2225fanslist:{
2226divToFill:{
2227'faith' : 'faith_fans',
2228'news' : 'new_fans'},
2229dataDeal: function(opt,obj){
2230var fillFun=function(field,ele){
2231FillDiv_Ex(ele,obj.fans[field])};Object.each(opt.divToFill,fillFun);},
2232loadData: function(opt){
2233var player=getParameter('player');var qq=getParameter('qq');var player=player||qq;var

url='http://act.qzone.qq.com/vote/votefans.php?callback&act_id='+opt.actId+'&player='+player;GJsonDealFun.init

(url,this.callBack.bind(this,opt),null,false);},
2234callBack: function(opt,obj){
2235GJsonDealFun.jsonCallBack(opt,obj);}},
2236playerlist:{
2237divToFill:{
2238'mid_content' : 'data'},
2239ord : 'reg_time',
2240direct : 'desc',
2241linkFormat: ACT2.S_PLAYER_LIST_PAGE,
2242getLinkFormat: function(opt){
2243var ord=opt.ord;var direct=opt.direct;var type=opt.type;var linkFormat=opt.linkFormat;var url=replPlacer

(linkFormat,'ord',ord);url=replPlacer(url,'direct',direct);url=replPlacer(url,'&type',type,true);return url;},
2244dataDeal: function(opt,obj){
2245curpage=obj.info.curpage;totalpage=obj.info.totalpage;var linkFormat=opt.getLinkFormat

(opt);$("page").innerHTML=showPageList(curpage,totalpage,10,linkFormat,null);var fillFun=function(field,ele){
2246FillDiv_Ex(ele,obj[field])};Object.each(opt.divToFill,fillFun);},
2247getUrlParam : function(opt){
2248var ord=getParameter("ord")||opt.ord ;var direct=getParameter('direct')||opt.direct ;var type=getParameter('type')

||opt.type;opt.ord=ord;opt.direct=direct;opt.type=type;},
2249getDataUrl : function(opt){
2250opt.getUrlParam(opt);var page=getParameter('page');page=page||1;var

actId=this.actId;ord=opt.ord;direct=opt.direct;type=opt.type;var url=ACT2.S_PLAYER_LIST;url=replPlacer

(url,'actId',actId);url=replPlacer(url,'ord',ord);url=replPlacer(url,'direct',direct);url=replPlacer(url,'page',page);if

(type){
2251url=replPlacer(url,'type_',type+'_');}else{
2252url=replPlacer(url,'type_',type);}
2253return url;},
2254loadData: function(opt){
2255var url=opt.getDataUrl(opt);if(opt.preRequest){
2256opt.preRequest(opt);}
2257GJsonDealFun.init(url,this.callBack.bind(this,opt),null,false);},
2258callBack: function(opt,obj){
2259GJsonDealFun.jsonCallBack(opt,obj);}},
2260reg :{
2261needLogin:true,
2262getTitle: function(opt,obj){
2263return '注册成功 :)';},
2264getTip: function(opt,obj){
2265return '';},
2266onConfirm: function(opt,obj){
2267var url=replPlacer(ACT2.S_PROFILE_PAGE,'qq','');window.location=url;},
2268dataDeal: function(opt,obj){
2269var msg=opt.getTitle();var tip=opt.getTip();var m1=MSG2.create(null,msg,tip);m1.setIcon(1);m1.setButton

([1]);m1.onunload=opt.onConfirm.bind(this,opt,obj);m1.show();},
2270loadData : function(opt){
2271var optObj=this;window.jsonCallBack=function(obj){
2272try{
2273GJsonDealFun.jsonCallBack(optObj,obj);}catch(e){
2274status=e.message;setTimeout("status=''",6000);}}}},
2275vote :{
2276getTitle: function(opt,obj){},
2277getTip: function(opt,obj){
2278return '';},
2279onConfirm: function(opt,obj){
2280close_in_qzone();},
2281onClose: function(opt,obj){
2282window.location.reload();},
2283errdeal: false,
2284dataDeal: function(opt,obj){
2285if(obj.error){
2286var msg=obj.error.msg;var m1=MSG2.create(null,msg,null);m1.setIcon(2);m1.setButton([1]);m1.onunload=opt.onClose.bind

(this,opt,obj);m1.show();return;}
2287var msg='投票成功! :)';var m1=MSG2.create(null,msg,null);m1.setIcon(1);m1.setButton

([1,3]);m1.onunload=opt.onClose;m1.onconfirm=opt.onConfirm;m1.show();},
2288loadData : function(opt){
2289var optObj=this;window.jsonCallBack=function(obj){
2290GJsonDealFun.jsonCallBack(optObj,obj);}}},
2291precheck:{
2292needLogin:true,
2293precheckUrl : ACT2.D_REG_PRE_CHECK_URL,
2294getDataUrl : function(opt){
2295var url=replPlacer(opt.precheckUrl,'actId',opt.actId);url=url+"&"+new Date().getTime();return url;},
2296loadData : function(opt){
2297var url=this.getDataUrl(opt);GJsonDealFun.init(url,this.callBack.bind(this,opt),null,true);},
2298callBack: function(opt,obj){
2299GJsonDealFun.jsonCallBack(opt,obj);}},
2300profile :{
2301divToFill:{
2302'user_content' : 'data'},
2303dataDeal: function(opt,obj){
2304var fillFun=function(field,ele){
2305FillDiv_Ex(ele,[obj[field]]);};Object.each(opt.divToFill,fillFun);},
2306loadData: function(opt){
2307var qq=getParameter('qq');var url=replPlacer(ACT2.D_PROFILE_PAGE,'act_id',opt.actId,true);url=replPlacer

(url,'qq',qq,true);GJsonDealFun.init(url,this.callBack.bind(this,opt),null,false);},
2308callBack: function(opt,obj){
2309GJsonDealFun.jsonCallBack(opt,obj);}},
2310rec :{
2311divToFill:{
2312'recomm' : 'data'},
2313dataDeal: function(opt,obj){
2314var fillFun=function(field,ele){
2315if(obj.data[field]){
2316FillDiv_Ex(ele,obj.data[field]);}};Object.each(opt.divToFill,fillFun);Object.each(obj.data,function(fieldData,field){
2317var fdiv=field+'_recdata';if(!opt.divToFill[fdiv]){
2318FillDiv_Ex(fdiv,obj.data[field]);}});},
2319getDataUrl : function(opt){
2320var url=replPlacer(ACT2.S_REC_DATA,'actId',opt.actId);return url;},
2321loadData: function(opt){
2322var url=this.getDataUrl(opt);GJsonDealFun.init(url,this.callBack.bind(this,opt),null,true);},
2323callBack: function(opt,obj){
2324GJsonDealFun.jsonCallBack(opt,obj);}},
2325custom :{
2326request_url : "",
2327dataDeal: function(opt,obj){},
2328loadData: function(opt){
2329GJsonDealFun.init(this.getDataUrl ? this.getDataUrl(): this.request_url,this.callBack.bind(this,opt),null,true);},
2330callBack: function(opt,obj){
2331GJsonDealFun.jsonCallBack(opt,obj);}}},
2332handlePageData: function(actId,page,speOpt){
2333var opt={};Object.extend(GJsonDealFun.opts[page],opt,true);if(typeof speOpt=='object'){
2334Object.extend(speOpt,opt,true);}
2335opt.actId=actId;if(opt.needLogin&&!isLogon()){
2336qq_login_form(15000103,window.location);return false;}
2337opt.errmap={};opt.setErrFunc=function(ecodes,func){
2338ecodes.each(
2339function(v,index){
2340opt.errmap[v]=func;}
2341);}
2342opt.setErrFunc([4103,4505,4506,4600,4601,4602,4603,5001],ErrMap['gotoIndexPage']);opt.setErrFunc([4503],ErrMap

['gotoUserPage']);opt.setErrFunc([4501],ErrMap['showLogin']);opt.setErrFunc([4001],ErrMap['default']);opt.setErrFunc

(['default'],ErrMap['default']);if(opt.preloadData){
2343if(!opt.preloadData(opt)){
2344return false;}}
2345if(opt.loadData){
2346opt.loadData(opt);}
2347return true;}}
2348loadPageData=GJsonDealFun.handlePageData;var handler_err={
2349404 : function(opt,obj){},
23504001 : function(opt,obj){
2351showErr(obj);},
23524103 : function(opt,obj){
2353showErr(obj,ACT2_COMM.INDEX_PAGE)},
23544501 : function(opt,obj){
2355qq_login_form(15000103,window.location);},
23564502 : function(opt,obj){
2357var onconfirm=function(){
2358openInNew(ACT_LINKS.open_qzone);}
2359showErr(obj,ACT2_COMM.INDEX_PAGE,onconfirm);},
23604503 : function(opt,obj){
2361var url=replPlacer(ACT2.S_PROFILE_PAGE,'act_id',opt.actId,true);url=replPlacer(url,'qq','');showErr(obj,url)},
23624505 : function(opt,obj){
2363showErr(obj,ACT2_COMM.INDEX_PAGE)},
23644506: function(opt,obj){
2365showErr(obj,ACT2_COMM.INDEX_PAGE)},
23664511 : function(opt,obj){
2367var onconfirm=function(){
2368openInNew(ACT_LINKS.open_yellow);}
2369showErr(obj,ACT2_COMM.INDEX_PAGE,onconfirm);},
23704600: function(opt,obj){
2371var reg=new RegExp("^http:\/\/[^\/]+/[^\/]+\/?(([^\.]+)\.html?)?");var mat=window.location.href.match(reg);var

page='';if(mat[2]){
2372page=mat[2];}
2373if(page=='vote'){
2374var onconfirm=function(){
2375close_in_qzone();}
2376showErr(obj,ACT2_COMM.INDEX_PAGE,onconfirm);return;}
2377showErr(obj,ACT2_COMM.INDEX_PAGE)},
23784601: function(opt,obj){
2379handler_err[4600](opt,obj);},
23804602: function(opt,obj){
2381handler_err[4600](opt,obj);},
23824603: function(opt,obj){
2383handler_err[4600](opt,obj);},
23845001: function(opt,obj){
2385showErr(obj,ACT2_COMM.INDEX_PAGE)}}
2386var ErrMap={
2387'gotoIndexPage' : handler_err[4103],
2388'gotoUserPage' : handler_err[4503],
2389'showLogin' : handler_err[4501],
2390'default' : handler_err[4001]}
2391function showErr(obj,redrt,onconfirm){
2392var m1=MSG2.create(null,obj.error.msg,null);if(redrt){
2393m1.onunload=function(){
2394window.location=redrt;}}
2395if(onconfirm){
2396m1.onconfirm=onconfirm;}
2397m1.setIcon(2);m1.setButton([1]);m1.show();}
2398function indexErrPage(opt,obj){
2399obj.err={
2400'title' : null,
2401'msg' : obj.error.msg,
2402'tip' : null}
2403showErr(obj,ACT2_COMM.INDEX_PAGE)}
2404function replPlacer(url,placer,value,hold){
2405var reg=new RegExp('{'+placer+'}','gi')
2406if(hold){
2407if(value&&value!=""){
2408value=placer+'='+value;}else{
2409value="";}}
2410if(!value){
2411value="";}
2412url=url.replace(reg,value);return url;}
2413
2414
</script>
posted @ 2009-04-24 09:49  ->  阅读(1319)  评论(0)    收藏  举报