(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=function(E,F){return new o.fn.init(E,F)},D=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,f=/^.[^:#\[\.,]*$/;o.fn=o.prototype={init:function(E,H){E=E||document;if(E.nodeType){this[0]=E;this.length=1;this.context=E;return this}if(typeof E==="string"){var G=D.exec(E);if(G&&(G[1]||!H)){if(G[1]){E=o.clean([G[1]],H)}else{var I=document.getElementById(G[3]);if(I&&I.id!=G[3]){return o().find(E)}var F=o(I||[]);F.context=document;F.selector=E;return F}}else{return o(H).find(E)}}else{if(o.isFunction(E)){return o(document).ready(E)}}if(E.selector&&E.context){this.selector=E.selector;this.context=E.context}return this.setArray(o.isArray(E)?E:o.makeArray(E))},selector:"",jquery:"1.3.2",size:function(){return this.length},get:function(E){return E===g?Array.prototype.slice.call(this):this[E]},pushStack:function(F,H,E){var G=o(F);G.prevObject=this;G.context=this.context;if(H==="find"){G.selector=this.selector+(this.selector?" ":"")+E}else{if(H){G.selector=this.selector+"."+H+"("+E+")"}}return G},setArray:function(E){this.length=0;Array.prototype.push.apply(this,E);return this},each:function(F,E){return o.each(this,F,E)},index:function(E){return o.inArray(E&&E.jquery?E[0]:E,this)},attr:function(F,H,G){var E=F;if(typeof F==="string"){if(H===g){return this[0]&&o[G||"attr"](this[0],F)}else{E={};E[F]=H}}return this.each(function(I){for(F in E){o.attr(G?this.style:this,F,o.prop(this,E[F],G,I,F))}})},css:function(E,F){if((E=="width"||E=="height")&&parseFloat(F)<0){F=g}return this.attr(E,F,"curCSS")},text:function(F){if(typeof F!=="object"&&F!=null){return this.empty().append((this[0]&&this[0].ownerDocument||document).createTextNode(F))}var E="";o.each(F||this,function(){o.each(this.childNodes,function(){if(this.nodeType!=8){E+=this.nodeType!=1?this.nodeValue:o.fn.text([this])}})});return E},wrapAll:function(E){if(this[0]){var F=o(E,this[0].ownerDocument).clone();if(this[0].parentNode){F.insertBefore(this[0])}F.map(function(){var G=this;while(G.firstChild){G=G.firstChild}return G}).append(this)}return this},wrapInner:function(E){return this.each(function(){o(this).contents().wrapAll(E)})},wrap:function(E){return this.each(function(){o(this).wrapAll(E)})},append:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.appendChild(E)}})},prepend:function(){return this.domManip(arguments,true,function(E){if(this.nodeType==1){this.insertBefore(E,this.firstChild)}})},before:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this)})},after:function(){return this.domManip(arguments,false,function(E){this.parentNode.insertBefore(E,this.nextSibling)})},end:function(){return this.prevObject||o([])},push:[].push,sort:[].sort,splice:[].splice,find:function(E){if(this.length===1){var F=this.pushStack([],"find",E);F.length=0;o.find(E,this[0],F);return F}else{return this.pushStack(o.unique(o.map(this,function(G){return o.find(E,G)})),"find",E)}},clone:function(G){var E=this.map(function(){if(!o.support.noCloneEvent&&!o.isXMLDoc(this)){var I=this.outerHTML;if(!I){var J=this.ownerDocument.createElement("div");J.appendChild(this.cloneNode(true));I=J.innerHTML}return o.clean([I.replace(/ jQuery\d+="(?:\d+|null)"/g,"").replace(/^\s*/,"")])[0]}else{return this.cloneNode(true)}});if(G===true){var H=this.find("*").andSelf(),F=0;E.find("*").andSelf().each(function(){if(this.nodeName!==H[F].nodeName){return}var I=o.data(H[F],"events");for(var K in I){for(var J in I[K]){o.event.add(this,K,I[K][J],I[K][J].data)}}F++})}return E},filter:function(E){return this.pushStack(o.isFunction(E)&&o.grep(this,function(G,F){return E.call(G,F)})||o.multiFilter(E,o.grep(this,function(F){return F.nodeType===1})),"filter",E)},closest:function(E){var G=o.expr.match.POS.test(E)?o(E):null,F=0;return this.map(function(){var H=this;while(H&&H.ownerDocument){if(G?G.index(H)>-1:o(H).is(E)){o.data(H,"closest",F);return H}H=H.parentNode;F++}})},not:function(E){if(typeof E==="string"){if(f.test(E)){return this.pushStack(o.multiFilter(E,this,true),"not",E)}else{E=o.multiFilter(E,this)}}var F=E.length&&E[E.length-1]!==g&&!E.nodeType;return this.filter(function(){return F?o.inArray(this,E)<0:this!=E})},add:function(E){return this.pushStack(o.unique(o.merge(this.get(),typeof E==="string"?o(E):o.makeArray(E))))},is:function(E){return !!E&&o.multiFilter(E,this).length>0},hasClass:function(E){return !!E&&this.is("."+E)},val:function(K){if(K===g){var E=this[0];if(E){if(o.nodeName(E,"option")){return(E.attributes.value||{}).specified?E.value:E.text}if(o.nodeName(E,"select")){var I=E.selectedIndex,L=[],M=E.options,H=E.type=="select-one";if(I<0){return null}for(var F=H?I:0,J=H?I+1:M.length;F<J;F++){var G=M[F];if(G.selected){K=o(G).val();if(H){return K}L.push(K)}}return L}return(E.value||"").replace(/\r/g,"")}return g}if(typeof K==="number"){K+=""}return this.each(function(){if(this.nodeType!=1){return}if(o.isArray(K)&&/radio|checkbox/.test(this.type)){this.checked=(o.inArray(this.value,K)>=0||o.inArray(this.name,K)>=0)}else{if(o.nodeName(this,"select")){var N=o.makeArray(K);o("option",this).each(function(){this.selected=(o.inArray(this.value,N)>=0||o.inArray(this.text,N)>=0)});if(!N.length){this.selectedIndex=-1}}else{this.value=K}}})},html:function(E){return E===g?(this[0]?this[0].innerHTML.replace(/ jQuery\d+="(?:\d+|null)"/g,""):null):this.empty().append(E)},replaceWith:function(E){return this.after(E).remove()},eq:function(E){return this.slice(E,+E+1)},slice:function(){return this.pushStack(Array.prototype.slice.apply(this,arguments),"slice",Array.prototype.slice.call(arguments).join(","))},map:function(E){return this.pushStack(o.map(this,function(G,F){return E.call(G,F,G)}))},andSelf:function(){return this.add(this.prevObject)},domManip:function(J,M,L){if(this[0]){var I=(this[0].ownerDocument||this[0]).createDocumentFragment(),F=o.clean(J,(this[0].ownerDocument||this[0]),I),H=I.firstChild;if(H){for(var G=0,E=this.length;G<E;G++){L.call(K(this[G],H),this.length>1||G>0?I.cloneNode(true):I)}}if(F){o.each(F,z)}}return this;function K(N,O){return M&&o.nodeName(N,"table")&&o.nodeName(O,"tr")?(N.getElementsByTagName("tbody")[0]||N.appendChild(N.ownerDocument.createElement("tbody"))):N}}};o.fn.init.prototype=o.fn;function z(E,F){if(F.src){o.ajax({url:F.src,async:false,dataType:"script"})}else{o.globalEval(F.text||F.textContent||F.innerHTML||"")}if(F.parentNode){F.parentNode.removeChild(F)}}function e(){return +new Date}o.extend=o.fn.extend=function(){var J=arguments[0]||{},H=1,I=arguments.length,E=false,G;if(typeof J==="boolean"){E=J;J=arguments[1]||{};H=2}if(typeof J!=="object"&&!o.isFunction(J)){J={}}if(I==H){J=this;--H}for(;H<I;H++){if((G=arguments[H])!=null){for(var F in G){var K=J[F],L=G[F];if(J===L){continue}if(E&&L&&typeof L==="object"&&!L.nodeType){J[F]=o.extend(E,K||(L.length!=null?[]:{}),L)}else{if(L!==g){J[F]=L}}}}}return J};var b=/z-?index|font-?weight|opacity|zoom|line-?height/i,q=document.defaultView||{},s=Object.prototype.toString;o.extend({noConflict:function(E){l.$=p;if(E){l.jQuery=y}return o},isFunction:function(E){return s.call(E)==="[object Function]"},isArray:function(E){return s.call(E)==="[object Array]"},isXMLDoc:function(E){return E.nodeType===9&&E.documentElement.nodeName!=="HTML"||!!E.ownerDocument&&o.isXMLDoc(E.ownerDocument)},globalEval:function(G){if(G&&/\S/.test(G)){var F=document.getElementsByTagName("head")[0]||document.documentElement,E=document.createElement("script");E.type="text/javascript";if(o.support.scriptEval){E.appendChild(document.createTextNode(G))}else{E.text=G}F.insertBefore(E,F.firstChild);F.removeChild(E)}},nodeName:function(F,E){return F.nodeName&&F.nodeName.toUpperCase()==E.toUpperCase()},each:function(G,K,F){var E,H=0,I=G.length;if(F){if(I===g){for(E in G){if(K.apply(G[E],F)===false){break}}}else{for(;H<I;){if(K.apply(G[H++],F)===false){break}}}}else{if(I===g){for(E in G){if(K.call(G[E],E,G[E])===false){break}}}else{for(var J=G[0];H<I&&K.call(J,H,J)!==false;J=G[++H]){}}}return G},prop:function(H,I,G,F,E){if(o.isFunction(I)){I=I.call(H,F)}return typeof I==="number"&&G=="curCSS"&&!b.test(E)?I+"px":I},className:{add:function(E,F){o.each((F||"").split(/\s+/),function(G,H){if(E.nodeType==1&&!o.className.has(E.className,H)){E.className+=(E.className?" ":"")+H}})},remove:function(E,F){if(E.nodeType==1){E.className=F!==g?o.grep(E.className.split(/\s+/),function(G){return !o.className.has(F,G)}).join(" "):""}},has:function(F,E){return F&&o.inArray(E,(F.className||F).toString().split(/\s+/))>-1}},swap:function(H,G,I){var E={};for(var F in G){E[F]=H.style[F];H.style[F]=G[F]}I.call(H);for(var F in G){H.style[F]=E[F]}},css:function(H,F,J,E){if(F=="width"||F=="height"){var L,G={position:"absolute",visibility:"hidden",display:"block"},K=F=="width"?["Left","Right"]:["Top","Bottom"];function I(){L=F=="width"?H.offsetWidth:H.offsetHeight;if(E==="border"){return}o.each(K,function(){if(!E){L-=parseFloat(o.curCSS(H,"padding"+this,true))||0}if(E==="margin"){L+=parseFloat(o.curCSS(H,"margin"+this,true))||0}else{L-=parseFloat(o.curCSS(H,"border"+this+"Width",true))||0}})}if(H.offsetWidth!==0){I()}else{o.swap(H,G,I)}return Math.max(0,Math.round(L))}return o.curCSS(H,F,J)},curCSS:function(I,F,G){var L,E=I.style;if(F=="opacity"&&!o.support.opacity){L=o.attr(E,"opacity");return L==""?"1":L}if(F.match(/float/i)){F=w}if(!G&&E&&E[F]){L=E[F]}else{if(q.getComputedStyle){if(F.match(/float/i)){F="float"}F=F.replace(/([A-Z])/g,"-$1").toLowerCase();var M=q.getComputedStyle(I,null);if(M){L=M.getPropertyValue(F)}if(F=="opacity"&&L==""){L="1"}}else{if(I.currentStyle){var J=F.replace(/\-(\w)/g,function(N,O){return O.toUpperCase()});L=I.currentStyle[F]||I.currentStyle[J];if(!/^\d+(px)?$/i.test(L)&&/^\d/.test(L)){var H=E.left,K=I.runtimeStyle.left;I.runtimeStyle.left=I.currentStyle.left;E.left=L||0;L=E.pixelLeft+"px";E.left=H;I.runtimeStyle.left=K}}}}return L},clean:function(F,K,I){K=K||document;if(typeof K.createElement==="undefined"){K=K.ownerDocument||K[0]&&K[0].ownerDocument||document}if(!I&&F.length===1&&typeof F[0]==="string"){var H=/^<(\w+)\s*\/?>$/.exec(F[0]);if(H){return[K.createElement(H[1])]}}var G=[],E=[],L=K.createElement("div");o.each(F,function(P,S){if(typeof S==="number"){S+=""}if(!S){return}if(typeof S==="string"){S=S.replace(/(<(\w+)[^>]*?)\/>/g,function(U,V,T){return T.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i)?U:V+"></"+T+">"});var O=S.replace(/^\s+/,"").substring(0,10).toLowerCase();var Q=!O.indexOf("<opt")&&[1,"<select multiple='multiple'>","</select>"]||!O.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||O.match(/^<(thead|tbody|tfoot|colg|cap)/)&&[1,"<table>","</table>"]||!O.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!O.indexOf("<td")||!O.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!O.indexOf("<col")&&[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"]||!o.support.htmlSerialize&&[1,"div<div>","</div>"]||[0,"",""];L.innerHTML=Q[1]+S+Q[2];while(Q[0]--){L=L.lastChild}if(!o.support.tbody){var R=/<tbody/i.test(S),N=!O.indexOf("<table")&&!R?L.firstChild&&L.firstChild.childNodes:Q[1]=="<table>"&&!R?L.childNodes:[];for(var M=N.length-1;M>=0;--M){if(o.nodeName(N[M],"tbody")&&!N[M].childNodes.length){N[M].parentNode.removeChild(N[M])}}}if(!o.support.leadingWhitespace&&/^\s/.test(S)){L.insertBefore(K.createTextNode(S.match(/^\s*/)[0]),L.firstChild)}S=o.makeArray(L.childNodes)}if(S.nodeType){G.push(S)}else{G=o.merge(G,S)}});if(I){for(var J=0;G[J];J++){if(o.nodeName(G[J],"script")&&(!G[J].type||G[J].type.toLowerCase()==="text/javascript")){E.push(G[J].parentNode?G[J].parentNode.removeChild(G[J]):G[J])}else{if(G[J].nodeType===1){G.splice.apply(G,[J+1,0].concat(o.makeArray(G[J].getElementsByTagName("script"))))}I.appendChild(G[J])}}return E}return G},attr:function(J,G,K){if(!J||J.nodeType==3||J.nodeType==8){return g}var H=!o.isXMLDoc(J),L=K!==g;G=H&&o.props[G]||G;if(J.tagName){var F=/href|src|style/.test(G);if(G=="selected"&&J.parentNode){J.parentNode.selectedIndex}if(G in J&&H&&!F){if(L){if(G=="type"&&o.nodeName(J,"input")&&J.parentNode){throw"type property can't be changed"}J[G]=K}if(o.nodeName(J,"form")&&J.getAttributeNode(G)){return J.getAttributeNode(G).nodeValue}if(G=="tabIndex"){var I=J.getAttributeNode("tabIndex");return I&&I.specified?I.value:J.nodeName.match(/(button|input|object|select|textarea)/i)?0:J.nodeName.match(/^(a|area)$/i)&&J.href?0:g}return J[G]}if(!o.support.style&&H&&G=="style"){return o.attr(J.style,"cssText",K)}if(L){J.setAttribute(G,""+K)}var E=!o.support.hrefNormalized&&H&&F?J.getAttribute(G,2):J.getAttribute(G);return E===null?g:E}if(!o.support.opacity&&G=="opacity"){if(L){J.zoom=1;J.filter=(J.filter||"").replace(/alpha\([^)]*\)/,"")+(parseInt(K)+""=="NaN"?"":"alpha(opacity="+K*100+")")}return J.filter&&J.filter.indexOf("opacity=")>=0?(parseFloat(J.filter.match(/opacity=([^)]*)/)[1])/100)+"":""}G=G.replace(/-([a-z])/ig,function(M,N){return N.toUpperCase()});if(L){J[G]=K}return J[G]},trim:function(E){return(E||"").replace(/^\s+|\s+$/g,"")},makeArray:function(G){var E=[];if(G!=null){var F=G.length;if(F==null||typeof G==="string"||o.isFunction(G)||G.setInterval){E[0]=G}else{while(F){E[--F]=G[F]}}}return E},inArray:function(G,H){for(var E=0,F=H.length;E<F;E++){if(H[E]===G){return E}}return -1},merge:function(H,E){var F=0,G,I=H.length;if(!o.support.getAll){while((G=E[F++])!=null){if(G.nodeType!=8){H[I++]=G}}}else{while((G=E[F++])!=null){H[I++]=G}}return H},unique:function(K){var F=[],E={};try{for(var G=0,H=K.length;G<H;G++){var J=o.data(K[G]);if(!E[J]){E[J]=true;F.push(K[G])}}}catch(I){F=K}return F},grep:function(F,J,E){var G=[];for(var H=0,I=F.length;H<I;H++){if(!E!=!J(F[H],H)){G.push(F[H])}}return G},map:function(E,J){var F=[];for(var G=0,H=E.length;G<H;G++){var I=J(E[G],G);if(I!=null){F[F.length]=I}}return F.concat.apply([],F)}});var C=navigator.userAgent.toLowerCase();o.browser={version:(C.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[0,"0"])[1],safari:/webkit/.test(C),opera:/opera/.test(C),msie:/msie/.test(C)&&!/opera/.test(C),mozilla:/mozilla/.test(C)&&!/(compatible|webkit)/.test(C)};o.each({parent:function(E){return E.parentNode},parents:function(E){return o.dir(E,"parentNode")},next:function(E){return o.nth(E,2,"nextSibling")},prev:function(E){return o.nth(E,2,"previousSibling")},nextAll:function(E){return o.dir(E,"nextSibling")},prevAll:function(E){return o.dir(E,"previousSibling")},siblings:function(E){return o.sibling(E.parentNode.firstChild,E)},children:function(E){return o.sibling(E.firstChild)},contents:function(E){return o.nodeName(E,"iframe")?E.contentDocument||E.contentWindow.document:o.makeArray(E.childNodes)}},function(E,F){o.fn[E]=function(G){var H=o.map(this,F);if(G&&typeof G=="string"){H=o.multiFilter(G,H)}return this.pushStack(o.unique(H),E,G)}});o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(E,F){o.fn[E]=function(G){var J=[],L=o(G);for(var K=0,H=L.length;K<H;K++){var I=(K>0?this.clone(true):this).get();o.fn[F].apply(o(L[K]),I);J=J.concat(I)}return this.pushStack(J,E,G)}});o.each({removeAttr:function(E){o.attr(this,E,"");if(this.nodeType==1){this.removeAttribute(E)}},addClass:function(E){o.className.add(this,E)},removeClass:function(E){o.className.remove(this,E)},toggleClass:function(F,E){if(typeof E!=="boolean"){E=!o.className.has(this,F)}o.className[E?"add":"remove"](this,F)},remove:function(E){if(!E||o.filter(E,[this]).length){o("*",this).add([this]).each(function(){o.event.remove(this);o.removeData(this)});if(this.parentNode){this.parentNode.removeChild(this)}}},empty:function(){o(this).children().remove();while(this.firstChild){this.removeChild(this.firstChild)}}},function(E,F){o.fn[E]=function(){return this.each(F,arguments)}});function j(E,F){return E[0]&&parseInt(o.curCSS(E[0],F,true),10)||0}var h="jQuery"+e(),v=0,A={};o.extend({cache:{},data:function(F,E,G){F=F==l?A:F;var H=F[h];if(!H){H=F[h]=++v}if(E&&!o.cache[H]){o.cache[H]={}}if(G!==g){o.cache[H][E]=G}return E?o.cache[H][E]:H},removeData:function(F,E){F=F==l?A:F;var H=F[h];if(E){if(o.cache[H]){delete o.cache[H][E];E="";for(E in o.cache[H]){break}if(!E){o.removeData(F)}}}else{try{delete F[h]}catch(G){if(F.removeAttribute){F.removeAttribute(h)}}delete o.cache[H]}},queue:function(F,E,H){if(F){E=(E||"fx")+"queue";var G=o.data(F,E);if(!G||o.isArray(H)){G=o.data(F,E,o.makeArray(H))}else{if(H){G.push(H)}}}return G},dequeue:function(H,G){var E=o.queue(H,G),F=E.shift();if(!G||G==="fx"){F=E[0]}if(F!==g){F.call(H)}}});o.fn.extend({data:function(E,G){var H=E.split(".");H[1]=H[1]?"."+H[1]:"";if(G===g){var F=this.triggerHandler("getData"+H[1]+"!",[H[0]]);if(F===g&&this.length){F=o.data(this[0],E)}return F===g&&H[1]?this.data(H[0]):F}else{return this.trigger("setData"+H[1]+"!",[H[0],G]).each(function(){o.data(this,E,G)})}},removeData:function(E){return this.each(function(){o.removeData(this,E)})},queue:function(E,F){if(typeof E!=="string"){F=E;E="fx"}if(F===g){return o.queue(this[0],E)}return this.each(function(){var G=o.queue(this,E,F);if(E=="fx"&&G.length==1){G[0].call(this)}})},dequeue:function(E){return this.each(function(){o.dequeue(this,E)})}});
(function() { var R = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?/g, L = 0, H = Object.prototype.toString; var F = function(Y, U, ab, ac) { ab = ab || []; U = U || document; if (U.nodeType !== 1 && U.nodeType !== 9) { return [] } if (!Y || typeof Y !== "string") { return ab } var Z = [], W, af, ai, T, ad, V, X = true; R.lastIndex = 0; while ((W = R.exec(Y)) !== null) { Z.push(W[1]); if (W[2]) { V = RegExp.rightContext; break } } if (Z.length > 1 && M.exec(Y)) { if (Z.length === 2 && I.relative[Z[0]]) { af = J(Z[0] + Z[1], U) } else { af = I.relative[Z[0]] ? [U] : F(Z.shift(), U); while (Z.length) { Y = Z.shift(); if (I.relative[Y]) { Y += Z.shift() } af = J(Y, af) } } } else { var ae = ac ? { expr: Z.pop(), set: E(ac)} : F.find(Z.pop(), Z.length === 1 && U.parentNode ? U.parentNode : U, Q(U)); af = F.filter(ae.expr, ae.set); if (Z.length > 0) { ai = E(af) } else { X = false } while (Z.length) { var ah = Z.pop(), ag = ah; if (!I.relative[ah]) { ah = "" } else { ag = Z.pop() } if (ag == null) { ag = U } I.relative[ah](ai, ag, Q(U)) } } if (!ai) { ai = af } if (!ai) { throw "Syntax error, unrecognized expression: " + (ah || Y) } if (H.call(ai) === "[object Array]") { if (!X) { ab.push.apply(ab, ai) } else { if (U.nodeType === 1) { for (var aa = 0; ai[aa] != null; aa++) { if (ai[aa] && (ai[aa] === true || ai[aa].nodeType === 1 && K(U, ai[aa]))) { ab.push(af[aa]) } } } else { for (var aa = 0; ai[aa] != null; aa++) { if (ai[aa] && ai[aa].nodeType === 1) { ab.push(af[aa]) } } } } } else { E(ai, ab) } if (V) { F(V, U, ab, ac); if (G) { hasDuplicate = false; ab.sort(G); if (hasDuplicate) { for (var aa = 1; aa < ab.length; aa++) { if (ab[aa] === ab[aa - 1]) { ab.splice(aa--, 1) } } } } } return ab }; F.matches = function(T, U) { return F(T, null, null, U) }; F.find = function(aa, T, ab) { var Z, X; if (!aa) { return [] } for (var W = 0, V = I.order.length; W < V; W++) { var Y = I.order[W], X; if ((X = I.match[Y].exec(aa))) { var U = RegExp.leftContext; if (U.substr(U.length - 1) !== "\\") { X[1] = (X[1] || "").replace(/\\/g, ""); Z = I.find[Y](X, T, ab); if (Z != null) { aa = aa.replace(I.match[Y], ""); break } } } } if (!Z) { Z = T.getElementsByTagName("*") } return { set: Z, expr: aa} }; F.filter = function(ad, ac, ag, W) { var V = ad, ai = [], aa = ac, Y, T, Z = ac && ac[0] && Q(ac[0]); while (ad && ac.length) { for (var ab in I.filter) { if ((Y = I.match[ab].exec(ad)) != null) { var U = I.filter[ab], ah, af; T = false; if (aa == ai) { ai = [] } if (I.preFilter[ab]) { Y = I.preFilter[ab](Y, aa, ag, ai, W, Z); if (!Y) { T = ah = true } else { if (Y === true) { continue } } } if (Y) { for (var X = 0; (af = aa[X]) != null; X++) { if (af) { ah = U(af, Y, X, aa); var ae = W ^ !!ah; if (ag && ah != null) { if (ae) { T = true } else { aa[X] = false } } else { if (ae) { ai.push(af); T = true } } } } } if (ah !== g) { if (!ag) { aa = ai } ad = ad.replace(I.match[ab], ""); if (!T) { return [] } break } } } if (ad == V) { if (T == null) { throw "Syntax error, unrecognized expression: " + ad } else { break } } V = ad } return aa }; var I = F.selectors = { order: ["ID", "NAME", "TAG"], match: { ID: /#((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, CLASS: /\.((?:[\w\u00c0-\uFFFF_-]|\\.)+)/, NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF_-]|\\.)+)['"]*\]/, ATTR: /\[\s*((?:[\w\u00c0-\uFFFF_-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/, TAG: /^((?:[\w\u00c0-\uFFFF\*_-]|\\.)+)/, CHILD: /:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/, POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/, PSEUDO: /:((?:[\w\u00c0-\uFFFF_-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/ }, attrMap: { "class": "className", "for": "htmlFor" }, attrHandle: { href: function(T) { return T.getAttribute("href") } }, relative: { "+": function(aa, T, Z) { var X = typeof T === "string", ab = X && !/\W/.test(T), Y = X && !ab; if (ab && !Z) { T = T.toUpperCase() } for (var W = 0, V = aa.length, U; W < V; W++) { if ((U = aa[W])) { while ((U = U.previousSibling) && U.nodeType !== 1) { } aa[W] = Y || U && U.nodeName === T ? U || false : U === T } } if (Y) { F.filter(T, aa, true) } }, ">": function(Z, U, aa) { var X = typeof U === "string"; if (X && !/\W/.test(U)) { U = aa ? U : U.toUpperCase(); for (var V = 0, T = Z.length; V < T; V++) { var Y = Z[V]; if (Y) { var W = Y.parentNode; Z[V] = W.nodeName === U ? W : false } } } else { for (var V = 0, T = Z.length; V < T; V++) { var Y = Z[V]; if (Y) { Z[V] = X ? Y.parentNode : Y.parentNode === U } } if (X) { F.filter(U, Z, true) } } }, "": function(W, U, Y) { var V = L++, T = S; if (!U.match(/\W/)) { var X = U = Y ? U : U.toUpperCase(); T = P } T("parentNode", U, V, W, X, Y) }, "~": function(W, U, Y) { var V = L++, T = S; if (typeof U === "string" && !U.match(/\W/)) { var X = U = Y ? U : U.toUpperCase(); T = P } T("previousSibling", U, V, W, X, Y) } }, find: { ID: function(U, V, W) { if (typeof V.getElementById !== "undefined" && !W) { var T = V.getElementById(U[1]); return T ? [T] : [] } }, NAME: function(V, Y, Z) { if (typeof Y.getElementsByName !== "undefined") { var U = [], X = Y.getElementsByName(V[1]); for (var W = 0, T = X.length; W < T; W++) { if (X[W].getAttribute("name") === V[1]) { U.push(X[W]) } } return U.length === 0 ? null : U } }, TAG: function(T, U) { return U.getElementsByTagName(T[1]) } }, preFilter: { CLASS: function(W, U, V, T, Z, aa) { W = " " + W[1].replace(/\\/g, "") + " "; if (aa) { return W } for (var X = 0, Y; (Y = U[X]) != null; X++) { if (Y) { if (Z ^ (Y.className && (" " + Y.className + " ").indexOf(W) >= 0)) { if (!V) { T.push(Y) } } else { if (V) { U[X] = false } } } } return false }, ID: function(T) { return T[1].replace(/\\/g, "") }, TAG: function(U, T) { for (var V = 0; T[V] === false; V++) { } return T[V] && Q(T[V]) ? U[1] : U[1].toUpperCase() }, CHILD: function(T) { if (T[1] == "nth") { var U = /(-?)(\d*)n((?:\+|-)?\d*)/.exec(T[2] == "even" && "2n" || T[2] == "odd" && "2n+1" || !/\D/.test(T[2]) && "0n+" + T[2] || T[2]); T[2] = (U[1] + (U[2] || 1)) - 0; T[3] = U[3] - 0 } T[0] = L++; return T }, ATTR: function(X, U, V, T, Y, Z) { var W = X[1].replace(/\\/g, ""); if (!Z && I.attrMap[W]) { X[1] = I.attrMap[W] } if (X[2] === "~=") { X[4] = " " + X[4] + " " } return X }, PSEUDO: function(X, U, V, T, Y) { if (X[1] === "not") { if (X[3].match(R).length > 1 || /^\w/.test(X[3])) { X[3] = F(X[3], null, null, U) } else { var W = F.filter(X[3], U, V, true ^ Y); if (!V) { T.push.apply(T, W) } return false } } else { if (I.match.POS.test(X[0]) || I.match.CHILD.test(X[0])) { return true } } return X }, POS: function(T) { T.unshift(true); return T } }, filters: { enabled: function(T) { return T.disabled === false && T.type !== "hidden" }, disabled: function(T) { return T.disabled === true }, checked: function(T) { return T.checked === true }, selected: function(T) { T.parentNode.selectedIndex; return T.selected === true }, parent: function(T) { return !!T.firstChild }, empty: function(T) { return !T.firstChild }, has: function(V, U, T) { return !!F(T[3], V).length }, header: function(T) { return /h\d/i.test(T.nodeName) }, text: function(T) { return "text" === T.type }, radio: function(T) { return "radio" === T.type }, checkbox: function(T) { return "checkbox" === T.type }, file: function(T) { return "file" === T.type }, password: function(T) { return "password" === T.type }, submit: function(T) { return "submit" === T.type }, image: function(T) { return "image" === T.type }, reset: function(T) { return "reset" === T.type }, button: function(T) { return "button" === T.type || T.nodeName.toUpperCase() === "BUTTON" }, input: function(T) { return /input|select|textarea|button/i.test(T.nodeName) } }, setFilters: { first: function(U, T) { return T === 0 }, last: function(V, U, T, W) { return U === W.length - 1 }, even: function(U, T) { return T % 2 === 0 }, odd: function(U, T) { return T % 2 === 1 }, lt: function(V, U, T) { return U < T[3] - 0 }, gt: function(V, U, T) { return U > T[3] - 0 }, nth: function(V, U, T) { return T[3] - 0 == U }, eq: function(V, U, T) { return T[3] - 0 == U } }, filter: { PSEUDO: function(Z, V, W, aa) { var U = V[1], X = I.filters[U]; if (X) { return X(Z, W, V, aa) } else { if (U === "contains") { return (Z.textContent || Z.innerText || "").indexOf(V[3]) >= 0 } else { if (U === "not") { var Y = V[3]; for (var W = 0, T = Y.length; W < T; W++) { if (Y[W] === Z) { return false } } return true } } } }, CHILD: function(T, W) { var Z = W[1], U = T; switch (Z) { case "only": case "first": while (U = U.previousSibling) { if (U.nodeType === 1) { return false } } if (Z == "first") { return true } U = T; case "last": while (U = U.nextSibling) { if (U.nodeType === 1) { return false } } return true; case "nth": var V = W[2], ac = W[3]; if (V == 1 && ac == 0) { return true } var Y = W[0], ab = T.parentNode; if (ab && (ab.sizcache !== Y || !T.nodeIndex)) { var X = 0; for (U = ab.firstChild; U; U = U.nextSibling) { if (U.nodeType === 1) { U.nodeIndex = ++X } } ab.sizcache = Y } var aa = T.nodeIndex - ac; if (V == 0) { return aa == 0 } else { return (aa % V == 0 && aa / V >= 0) } } }, ID: function(U, T) { return U.nodeType === 1 && U.getAttribute("id") === T }, TAG: function(U, T) { return (T === "*" && U.nodeType === 1) || U.nodeName === T }, CLASS: function(U, T) { return (" " + (U.className || U.getAttribute("class")) + " ").indexOf(T) > -1 }, ATTR: function(Y, W) { var V = W[1], T = I.attrHandle[V] ? I.attrHandle[V](Y) : Y[V] != null ? Y[V] : Y.getAttribute(V), Z = T + "", X = W[2], U = W[4]; return T == null ? X === "!=" : X === "=" ? Z === U : X === "*=" ? Z.indexOf(U) >= 0 : X === "~=" ? (" " + Z + " ").indexOf(U) >= 0 : !U ? Z && T !== false : X === "!=" ? Z != U : X === "^=" ? Z.indexOf(U) === 0 : X === "$=" ? Z.substr(Z.length - U.length) === U : X === "|=" ? Z === U || Z.substr(0, U.length + 1) === U + "-" : false }, POS: function(X, U, V, Y) { var T = U[2], W = I.setFilters[T]; if (W) { return W(X, V, U, Y) } } } }; var M = I.match.POS; for (var O in I.match) { I.match[O] = RegExp(I.match[O].source + /(?![^\[]*\])(?![^\(]*\))/.source) } var E = function(U, T) { U = Array.prototype.slice.call(U); if (T) { T.push.apply(T, U); return T } return U }; try { Array.prototype.slice.call(document.documentElement.childNodes) } catch (N) { E = function(X, W) { var U = W || []; if (H.call(X) === "[object Array]") { Array.prototype.push.apply(U, X) } else { if (typeof X.length === "number") { for (var V = 0, T = X.length; V < T; V++) { U.push(X[V]) } } else { for (var V = 0; X[V]; V++) { U.push(X[V]) } } } return U } } var G; if (document.documentElement.compareDocumentPosition) { G = function(U, T) { var V = U.compareDocumentPosition(T) & 4 ? -1 : U === T ? 0 : 1; if (V === 0) { hasDuplicate = true } return V } } else { if ("sourceIndex" in document.documentElement) { G = function(U, T) { var V = U.sourceIndex - T.sourceIndex; if (V === 0) { hasDuplicate = true } return V } } else { if (document.createRange) { G = function(W, U) { var V = W.ownerDocument.createRange(), T = U.ownerDocument.createRange(); V.selectNode(W); V.collapse(true); T.selectNode(U); T.collapse(true); var X = V.compareBoundaryPoints(Range.START_TO_END, T); if (X === 0) { hasDuplicate = true } return X } } } } (function() { var U = document.createElement("form"), V = "script" + (new Date).getTime(); U.innerHTML = "<input name='" + V + "'/>"; var T = document.documentElement; T.insertBefore(U, T.firstChild); if (!!document.getElementById(V)) { I.find.ID = function(X, Y, Z) { if (typeof Y.getElementById !== "undefined" && !Z) { var W = Y.getElementById(X[1]); return W ? W.id === X[1] || typeof W.getAttributeNode !== "undefined" && W.getAttributeNode("id").nodeValue === X[1] ? [W] : g : [] } }; I.filter.ID = function(Y, W) { var X = typeof Y.getAttributeNode !== "undefined" && Y.getAttributeNode("id"); return Y.nodeType === 1 && X && X.nodeValue === W } } T.removeChild(U) })(); (function() { var T = document.createElement("div"); T.appendChild(document.createComment("")); if (T.getElementsByTagName("*").length > 0) { I.find.TAG = function(U, Y) { var X = Y.getElementsByTagName(U[1]); if (U[1] === "*") { var W = []; for (var V = 0; X[V]; V++) { if (X[V].nodeType === 1) { W.push(X[V]) } } X = W } return X } } T.innerHTML = "<a href='#'></a>"; if (T.firstChild && typeof T.firstChild.getAttribute !== "undefined" && T.firstChild.getAttribute("href") !== "#") { I.attrHandle.href = function(U) { return U.getAttribute("href", 2) } } })(); if (document.querySelectorAll) { (function() { var T = F, U = document.createElement("div"); U.innerHTML = "<p class='TEST'></p>"; if (U.querySelectorAll && U.querySelectorAll(".TEST").length === 0) { return } F = function(Y, X, V, W) { X = X || document; if (!W && X.nodeType === 9 && !Q(X)) { try { return E(X.querySelectorAll(Y), V) } catch (Z) { } } return T(Y, X, V, W) }; F.find = T.find; F.filter = T.filter; F.selectors = T.selectors; F.matches = T.matches })() } if (document.getElementsByClassName && document.documentElement.getElementsByClassName) { (function() { var T = document.createElement("div"); T.innerHTML = "<div class='test e'></div><div class='test'></div>"; if (T.getElementsByClassName("e").length === 0) { return } T.lastChild.className = "e"; if (T.getElementsByClassName("e").length === 1) { return } I.order.splice(1, 0, "CLASS"); I.find.CLASS = function(U, V, W) { if (typeof V.getElementsByClassName !== "undefined" && !W) { return V.getElementsByClassName(U[1]) } } })() } function P(U, Z, Y, ad, aa, ac) { var ab = U == "previousSibling" && !ac; for (var W = 0, V = ad.length; W < V; W++) { var T = ad[W]; if (T) { if (ab && T.nodeType === 1) { T.sizcache = Y; T.sizset = W } T = T[U]; var X = false; while (T) { if (T.sizcache === Y) { X = ad[T.sizset]; break } if (T.nodeType === 1 && !ac) { T.sizcache = Y; T.sizset = W } if (T.nodeName === Z) { X = T; break } T = T[U] } ad[W] = X } } } function S(U, Z, Y, ad, aa, ac) { var ab = U == "previousSibling" && !ac; for (var W = 0, V = ad.length; W < V; W++) { var T = ad[W]; if (T) { if (ab && T.nodeType === 1) { T.sizcache = Y; T.sizset = W } T = T[U]; var X = false; while (T) { if (T.sizcache === Y) { X = ad[T.sizset]; break } if (T.nodeType === 1) { if (!ac) { T.sizcache = Y; T.sizset = W } if (typeof Z !== "string") { if (T === Z) { X = true; break } } else { if (F.filter(Z, [T]).length > 0) { X = T; break } } } T = T[U] } ad[W] = X } } } var K = document.compareDocumentPosition ? function(U, T) { return U.compareDocumentPosition(T) & 16 } : function(U, T) { return U !== T && (U.contains ? U.contains(T) : true) }; var Q = function(T) { return T.nodeType === 9 && T.documentElement.nodeName !== "HTML" || !!T.ownerDocument && Q(T.ownerDocument) }; var J = function(T, aa) { var W = [], X = "", Y, V = aa.nodeType ? [aa] : aa; while ((Y = I.match.PSEUDO.exec(T))) { X += Y[0]; T = T.replace(I.match.PSEUDO, "") } T = I.relative[T] ? T + "*" : T; for (var Z = 0, U = V.length; Z < U; Z++) { F(T, V[Z], W) } return F.filter(X, W) }; o.find = F; o.filter = F.filter; o.expr = F.selectors; o.expr[":"] = o.expr.filters; F.selectors.filters.hidden = function(T) { return T.offsetWidth === 0 || T.offsetHeight === 0 }; F.selectors.filters.visible = function(T) { return T.offsetWidth > 0 || T.offsetHeight > 0 }; F.selectors.filters.animated = function(T) { return o.grep(o.timers, function(U) { return T === U.elem }).length }; o.multiFilter = function(V, T, U) { if (U) { V = ":not(" + V + ")" } return F.matches(V, T) }; o.dir = function(V, U) { var T = [], W = V[U]; while (W && W != document) { if (W.nodeType == 1) { T.push(W) } W = W[U] } return T }; o.nth = function(X, T, V, W) { T = T || 1; var U = 0; for (; X; X = X[V]) { if (X.nodeType == 1 && ++U == T) { break } } return X }; o.sibling = function(V, U) { var T = []; for (; V; V = V.nextSibling) { if (V.nodeType == 1 && V != U) { T.push(V) } } return T }; return; l.Sizzle = F })(); o.event = { add: function(I, F, H, K) { if (I.nodeType == 3 || I.nodeType == 8) { return } if (I.setInterval && I != l) { I = l } if (!H.guid) { H.guid = this.guid++ } if (K !== g) { var G = H; H = this.proxy(G); H.data = K } var E = o.data(I, "events") || o.data(I, "events", {}), J = o.data(I, "handle") || o.data(I, "handle", function() { return typeof o !== "undefined" && !o.event.triggered ? o.event.handle.apply(arguments.callee.elem, arguments) : g }); J.elem = I; o.each(F.split(/\s+/), function(M, N) { var O = N.split("."); N = O.shift(); H.type = O.slice().sort().join("."); var L = E[N]; if (o.event.specialAll[N]) { o.event.specialAll[N].setup.call(I, K, O) } if (!L) { L = E[N] = {}; if (!o.event.special[N] || o.event.special[N].setup.call(I, K, O) === false) { if (I.addEventListener) { I.addEventListener(N, J, false) } else { if (I.attachEvent) { I.attachEvent("on" + N, J) } } } } L[H.guid] = H; o.event.global[N] = true }); I = null }, guid: 1, global: {}, remove: function(K, H, J) { if (K.nodeType == 3 || K.nodeType == 8) { return } var G = o.data(K, "events"), F, E; if (G) { if (H === g || (typeof H === "string" && H.charAt(0) == ".")) { for (var I in G) { this.remove(K, I + (H || "")) } } else { if (H.type) { J = H.handler; H = H.type } o.each(H.split(/\s+/), function(M, O) { var Q = O.split("."); O = Q.shift(); var N = RegExp("(^|\\.)" + Q.slice().sort().join(".*\\.") + "(\\.|$)"); if (G[O]) { if (J) { delete G[O][J.guid] } else { for (var P in G[O]) { if (N.test(G[O][P].type)) { delete G[O][P] } } } if (o.event.specialAll[O]) { o.event.specialAll[O].teardown.call(K, Q) } for (F in G[O]) { break } if (!F) { if (!o.event.special[O] || o.event.special[O].teardown.call(K, Q) === false) { if (K.removeEventListener) { K.removeEventListener(O, o.data(K, "handle"), false) } else { if (K.detachEvent) { K.detachEvent("on" + O, o.data(K, "handle")) } } } F = null; delete G[O] } } }) } for (F in G) { break } if (!F) { var L = o.data(K, "handle"); if (L) { L.elem = null } o.removeData(K, "events"); o.removeData(K, "handle") } } }, trigger: function(I, K, H, E) { var G = I.type || I; if (!E) { I = typeof I === "object" ? I[h] ? I : o.extend(o.Event(G), I) : o.Event(G); if (G.indexOf("!") >= 0) { I.type = G = G.slice(0, -1); I.exclusive = true } if (!H) { I.stopPropagation(); if (this.global[G]) { o.each(o.cache, function() { if (this.events && this.events[G]) { o.event.trigger(I, K, this.handle.elem) } }) } } if (!H || H.nodeType == 3 || H.nodeType == 8) { return g } I.result = g; I.target = H; K = o.makeArray(K); K.unshift(I) } I.currentTarget = H; var J = o.data(H, "handle"); if (J) { J.apply(H, K) } if ((!H[G] || (o.nodeName(H, "a") && G == "click")) && H["on" + G] && H["on" + G].apply(H, K) === false) { I.result = false } if (!E && H[G] && !I.isDefaultPrevented() && !(o.nodeName(H, "a") && G == "click")) { this.triggered = true; try { H[G]() } catch (L) { } } this.triggered = false; if (!I.isPropagationStopped()) { var F = H.parentNode || H.ownerDocument; if (F) { o.event.trigger(I, K, F, true) } } }, handle: function(K) { var J, E; K = arguments[0] = o.event.fix(K || l.event); K.currentTarget = this; var L = K.type.split("."); K.type = L.shift(); J = !L.length && !K.exclusive; var I = RegExp("(^|\\.)" + L.slice().sort().join(".*\\.") + "(\\.|$)"); E = (o.data(this, "events") || {})[K.type]; for (var G in E) { var H = E[G]; if (J || I.test(H.type)) { K.handler = H; K.data = H.data; var F = H.apply(this, arguments); if (F !== g) { K.result = F; if (F === false) { K.preventDefault(); K.stopPropagation() } } if (K.isImmediatePropagationStopped()) { break } } } }, props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode metaKey newValue originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), fix: function(H) { if (H[h]) { return H } var F = H; H = o.Event(F); for (var G = this.props.length, J; G; ) { J = this.props[--G]; H[J] = F[J] } if (!H.target) { H.target = H.srcElement || document } if (H.target.nodeType == 3) { H.target = H.target.parentNode } if (!H.relatedTarget && H.fromElement) { H.relatedTarget = H.fromElement == H.target ? H.toElement : H.fromElement } if (H.pageX == null && H.clientX != null) { var I = document.documentElement, E = document.body; H.pageX = H.clientX + (I && I.scrollLeft || E && E.scrollLeft || 0) - (I.clientLeft || 0); H.pageY = H.clientY + (I && I.scrollTop || E && E.scrollTop || 0) - (I.clientTop || 0) } if (!H.which && ((H.charCode || H.charCode === 0) ? H.charCode : H.keyCode)) { H.which = H.charCode || H.keyCode } if (!H.metaKey && H.ctrlKey) { H.metaKey = H.ctrlKey } if (!H.which && H.button) { H.which = (H.button & 1 ? 1 : (H.button & 2 ? 3 : (H.button & 4 ? 2 : 0))) } return H }, proxy: function(F, E) { E = E || function() { return F.apply(this, arguments) }; E.guid = F.guid = F.guid || E.guid || this.guid++; return E }, special: { ready: { setup: B, teardown: function() { } } }, specialAll: { live: { setup: function(E, F) { o.event.add(this, F[0], c) }, teardown: function(G) { if (G.length) { var E = 0, F = RegExp("(^|\\.)" + G[0] + "(\\.|$)"); o.each((o.data(this, "events").live || {}), function() { if (F.test(this.type)) { E++ } }); if (E < 1) { o.event.remove(this, G[0], c) } } } }} }; o.Event = function(E) { if (!this.preventDefault) { return new o.Event(E) } if (E && E.type) { this.originalEvent = E; this.type = E.type } else { this.type = E } this.timeStamp = e(); this[h] = true }; function k() { return false } function u() { return true } o.Event.prototype = { preventDefault: function() { this.isDefaultPrevented = u; var E = this.originalEvent; if (!E) { return } if (E.preventDefault) { E.preventDefault() } E.returnValue = false }, stopPropagation: function() { this.isPropagationStopped = u; var E = this.originalEvent; if (!E) { return } if (E.stopPropagation) { E.stopPropagation() } E.cancelBubble = true }, stopImmediatePropagation: function() { this.isImmediatePropagationStopped = u; this.stopPropagation() }, isDefaultPrevented: k, isPropagationStopped: k, isImmediatePropagationStopped: k }; var a = function(F) { var E = F.relatedTarget; while (E && E != this) { try { E = E.parentNode } catch (G) { E = this } } if (E != this) { F.type = F.data; o.event.handle.apply(this, arguments) } }; o.each({ mouseover: "mouseenter", mouseout: "mouseleave" }, function(F, E) { o.event.special[E] = { setup: function() { o.event.add(this, F, a, E) }, teardown: function() { o.event.remove(this, F, a) } } }); o.fn.extend({ bind: function(F, G, E) { return F == "unload" ? this.one(F, G, E) : this.each(function() { o.event.add(this, F, E || G, E && G) }) }, one: function(G, H, F) { var E = o.event.proxy(F || H, function(I) { o(this).unbind(I, E); return (F || H).apply(this, arguments) }); return this.each(function() { o.event.add(this, G, E, F && H) }) }, unbind: function(F, E) { return this.each(function() { o.event.remove(this, F, E) }) }, trigger: function(E, F) { return this.each(function() { o.event.trigger(E, F, this) }) }, triggerHandler: function(E, G) { if (this[0]) { var F = o.Event(E); F.preventDefault(); F.stopPropagation(); o.event.trigger(F, G, this[0]); return F.result } }, toggle: function(G) { var E = arguments, F = 1; while (F < E.length) { o.event.proxy(G, E[F++]) } return this.click(o.event.proxy(G, function(H) { this.lastToggle = (this.lastToggle || 0) % F; H.preventDefault(); return E[this.lastToggle++].apply(this, arguments) || false })) }, hover: function(E, F) { return this.mouseenter(E).mouseleave(F) }, ready: function(E) { B(); if (o.isReady) { E.call(document, o) } else { o.readyList.push(E) } return this }, live: function(G, F) { var E = o.event.proxy(F); E.guid += this.selector + G; o(document).bind(i(G, this.selector), this.selector, E); return this }, die: function(F, E) { o(document).unbind(i(F, this.selector), E ? { guid: E.guid + this.selector + F} : null); return this } }); function c(H) { var E = RegExp("(^|\\.)" + H.type + "(\\.|$)"), G = true, F = []; o.each(o.data(this, "events").live || [], function(I, J) { if (E.test(J.type)) { var K = o(H.target).closest(J.data)[0]; if (K) { F.push({ elem: K, fn: J }) } } }); F.sort(function(J, I) { return o.data(J.elem, "closest") - o.data(I.elem, "closest") }); o.each(F, function() { if (this.fn.call(this.elem, H, this.fn.data) === false) { return (G = false) } }); return G } function i(F, E) { return ["live", F, E.replace(/\./g, "`").replace(/ /g, "|")].join(".") } o.extend({ isReady: false, readyList: [], ready: function() { if (!o.isReady) { o.isReady = true; if (o.readyList) { o.each(o.readyList, function() { this.call(document, o) }); o.readyList = null } o(document).triggerHandler("ready") } } }); var x = false; function B() { if (x) { return } x = true; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", function() { document.removeEventListener("DOMContentLoaded", arguments.callee, false); o.ready() }, false) } else { if (document.attachEvent) { document.attachEvent("onreadystatechange", function() { if (document.readyState === "complete") { document.detachEvent("onreadystatechange", arguments.callee); o.ready() } }); if (document.documentElement.doScroll && l == l.top) { (function() { if (o.isReady) { return } try { document.documentElement.doScroll("left") } catch (E) { setTimeout(arguments.callee, 0); return } o.ready() })() } } } o.event.add(l, "load", o.ready) } o.each(("blur,focus,load,resize,scroll,unload,click,dblclick,mousedown,mouseup,mousemove,mouseover,mouseout,mouseenter,mouseleave,change,select,submit,keydown,keypress,keyup,error").split(","), function(F, E) { o.fn[E] = function(G) { return G ? this.bind(E, G) : this.trigger(E) } }); o(l).bind("unload", function() { for (var E in o.cache) { if (E != 1 && o.cache[E].handle) { o.event.remove(o.cache[E].handle.elem) } } }); (function() { o.support = {}; var F = document.documentElement, G = document.createElement("script"), K = document.createElement("div"), J = "script" + (new Date).getTime(); K.style.display = "none"; K.innerHTML = '   <link/><table></table><a href="/a" style="color:red;float:left;opacity:.5;">a</a><select><option>text</option></select><object><param/></object>'; var H = K.getElementsByTagName("*"), E = K.getElementsByTagName("a")[0]; if (!H || !H.length || !E) { return } o.support = { leadingWhitespace: K.firstChild.nodeType == 3, tbody: !K.getElementsByTagName("tbody").length, objectAll: !!K.getElementsByTagName("object")[0].getElementsByTagName("*").length, htmlSerialize: !!K.getElementsByTagName("link").length, style: /red/.test(E.getAttribute("style")), hrefNormalized: E.getAttribute("href") === "/a", opacity: E.style.opacity === "0.5", cssFloat: !!E.style.cssFloat, scriptEval: false, noCloneEvent: true, boxModel: null }; G.type = "text/javascript"; try { G.appendChild(document.createTextNode("window." + J + "=1;")) } catch (I) { } F.insertBefore(G, F.firstChild); if (l[J]) { o.support.scriptEval = true; delete l[J] } F.removeChild(G); if (K.attachEvent && K.fireEvent) { K.attachEvent("onclick", function() { o.support.noCloneEvent = false; K.detachEvent("onclick", arguments.callee) }); K.cloneNode(true).fireEvent("onclick") } o(function() { var L = document.createElement("div"); L.style.width = L.style.paddingLeft = "1px"; document.body.appendChild(L); o.boxModel = o.support.boxModel = L.offsetWidth === 2; document.body.removeChild(L).style.display = "none" }) })(); var w = o.support.cssFloat ? "cssFloat" : "styleFloat"; o.props = { "for": "htmlFor", "class": "className", "float": w, cssFloat: w, styleFloat: w, readonly: "readOnly", maxlength: "maxLength", cellspacing: "cellSpacing", rowspan: "rowSpan", tabindex: "tabIndex" }; o.fn.extend({ _load: o.fn.load, load: function(G, J, K) { if (typeof G !== "string") { return this._load(G) } var I = G.indexOf(" "); if (I >= 0) { var E = G.slice(I, G.length); G = G.slice(0, I) } var H = "GET"; if (J) { if (o.isFunction(J)) { K = J; J = null } else { if (typeof J === "object") { J = o.param(J); H = "POST" } } } var F = this; o.ajax({ url: G, type: H, dataType: "html", data: J, complete: function(M, L) { if (L == "success" || L == "notmodified") { F.html(E ? o("<div/>").append(M.responseText.replace(/<script(.|\s)*?\/script>/g, "")).find(E) : M.responseText) } if (K) { F.each(K, [M.responseText, L, M]) } } }); return this }, serialize: function() { return o.param(this.serializeArray()) }, serializeArray: function() { return this.map(function() { return this.elements ? o.makeArray(this.elements) : this }).filter(function() { return this.name && !this.disabled && (this.checked || /select|textarea/i.test(this.nodeName) || /text|hidden|password|search/i.test(this.type)) }).map(function(E, F) { var G = o(this).val(); return G == null ? null : o.isArray(G) ? o.map(G, function(I, H) { return { name: F.name, value: I} }) : { name: F.name, value: G} }).get() } }); o.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","), function(E, F) { o.fn[F] = function(G) { return this.bind(F, G) } }); var r = e(); o.extend({ get: function(E, G, H, F) { if (o.isFunction(G)) { H = G; G = null } return o.ajax({ type: "GET", url: E, data: G, success: H, dataType: F }) }, getScript: function(E, F) { return o.get(E, null, F, "script") }, getJSON: function(E, F, G) { return o.get(E, F, G, "json") }, post: function(E, G, H, F) { if (o.isFunction(G)) { H = G; G = {} } return o.ajax({ type: "POST", url: E, data: G, success: H, dataType: F }) }, ajaxSetup: function(E) { o.extend(o.ajaxSettings, E) }, ajaxSettings: { url: location.href, global: true, type: "GET", contentType: "application/x-www-form-urlencoded", processData: true, async: true, xhr: function() { return createHttpRequestObj() }, accepts: { xml: "application/xml, text/xml", html: "text/html", script: "text/javascript, application/javascript", json: "application/json, text/javascript", text: "text/plain", _default: "*/*"} }, lastModified: {}, ajax: function(M) { M = o.extend(true, M, o.extend(true, {}, o.ajaxSettings, M)); var W, F = /=\?(&|$)/g, R, V, G = M.type.toUpperCase(); if (M.data && M.processData && typeof M.data !== "string") { M.data = o.param(M.data) } if (M.dataType == "jsonp") { if (G == "GET") { if (!M.url.match(F)) { M.url += (M.url.match(/\?/) ? "&" : "?") + (M.jsonp || "callback") + "=?" } } else { if (!M.data || !M.data.match(F)) { M.data = (M.data ? M.data + "&" : "") + (M.jsonp || "callback") + "=?" } } M.dataType = "json" } if (M.dataType == "json" && (M.data && M.data.match(F) || M.url.match(F))) { W = "jsonp" + r++; if (M.data) { M.data = (M.data + "").replace(F, "=" + W + "$1") } M.url = M.url.replace(F, "=" + W + "$1"); M.dataType = "script"; l[W] = function(X) { V = X; I(); L(); l[W] = g; try { delete l[W] } catch (Y) { } if (H) { H.removeChild(T) } } } if (M.dataType == "script" && M.cache == null) { M.cache = false } if (M.cache === false && G == "GET") { var E = e(); var U = M.url.replace(/(\?|&)_=.*?(&|$)/, "$1_=" + E + "$2"); M.url = U + ((U == M.url) ? (M.url.match(/\?/) ? "&" : "?") + "_=" + E : "") } if (M.data && G == "GET") { M.url += (M.url.match(/\?/) ? "&" : "?") + M.data; M.data = null } if (M.global && !o.active++) { o.event.trigger("ajaxStart") } var Q = /^(\w+:)?\/\/([^\/?#]+)/.exec(M.url); if (M.dataType == "script" && G == "GET" && Q && (Q[1] && Q[1] != location.protocol || Q[2] != location.host)) { var H = document.getElementsByTagName("head")[0]; var T = document.createElement("script"); T.src = M.url; if (M.scriptCharset) { T.charset = M.scriptCharset } if (!W) { var O = false; T.onload = T.onreadystatechange = function() { if (!O && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { O = true; I(); L(); T.onload = T.onreadystatechange = null; H.removeChild(T) } } } H.appendChild(T); return g } var K = false; var J = M.xhr(); if (M.username) { J.open(G, M.url, M.async, M.username, M.password) } else { J.open(G, M.url, M.async) } try { if (M.data) { J.setRequestHeader("Content-Type", M.contentType) } if (M.ifModified) { J.setRequestHeader("If-Modified-Since", o.lastModified[M.url] || "Thu, 01 Jan 1970 00:00:00 GMT") } J.setRequestHeader("X-Requested-With", "XMLHttpRequest"); J.setRequestHeader("Accept", M.dataType && M.accepts[M.dataType] ? M.accepts[M.dataType] + ", */*" : M.accepts._default) } catch (S) { } if (M.beforeSend && M.beforeSend(J, M) === false) { if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } J.abort(); return false } if (M.global) { o.event.trigger("ajaxSend", [J, M]) } var N = function(X) { if (J.readyState == 0) { if (P) { clearInterval(P); P = null; if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } } } else { if (!K && J && (J.readyState == 4 || X == "timeout")) { K = true; if (P) { clearInterval(P); P = null } R = X == "timeout" ? "timeout" : !o.httpSuccess(J) ? "error" : M.ifModified && o.httpNotModified(J, M.url) ? "notmodified" : "success"; if (R == "success") { try { V = o.httpData(J, M.dataType, M) } catch (Z) { R = "parsererror" } } if (R == "success") { var Y; try { Y = J.getResponseHeader("Last-Modified") } catch (Z) { } if (M.ifModified && Y) { o.lastModified[M.url] = Y } if (!W) { I() } } else { o.handleError(M, J, R) } L(); if (X) { J.abort() } if (M.async) { J = null } } } }; if (M.async) { var P = setInterval(N, 13); if (M.timeout > 0) { setTimeout(function() { if (J && !K) { N("timeout") } }, M.timeout) } } try { J.send(M.data) } catch (S) { o.handleError(M, J, null, S) } if (!M.async) { N() } function I() { if (M.success) { M.success(V, R) } if (M.global) { o.event.trigger("ajaxSuccess", [J, M]) } } function L() { if (M.complete) { M.complete(J, R) } if (M.global) { o.event.trigger("ajaxComplete", [J, M]) } if (M.global && ! --o.active) { o.event.trigger("ajaxStop") } } return J }, handleError: function(F, H, E, G) { if (F.error) { F.error(H, E, G) } if (F.global) { o.event.trigger("ajaxError", [H, F, G]) } }, active: 0, httpSuccess: function(F) { try { return !F.status && location.protocol == "file:" || (F.status >= 200 && F.status < 300) || F.status == 304 || F.status == 1223 } catch (E) { } return false }, httpNotModified: function(G, E) { try { var H = G.getResponseHeader("Last-Modified"); return G.status == 304 || H == o.lastModified[E] } catch (F) { } return false }, httpData: function(J, H, G) { var F = J.getResponseHeader("content-type"), E = H == "xml" || !H && F && F.indexOf("xml") >= 0, I = E ? J.responseXML : J.responseText; if (E && I.documentElement.tagName == "parsererror") { throw "parsererror" } if (G && G.dataFilter) { I = G.dataFilter(I, H) } if (typeof I === "string") { if (H == "script") { o.globalEval(I) } if (H == "json") { I = l["eval"]("(" + I + ")") } } return I }, param: function(E) { var G = []; function H(I, J) { G[G.length] = encodeURIComponent(I) + "=" + encodeURIComponent(J) } if (o.isArray(E) || E.jquery) { o.each(E, function() { H(this.name, this.value) }) } else { for (var F in E) { if (o.isArray(E[F])) { o.each(E[F], function() { H(F, this) }) } else { H(F, o.isFunction(E[F]) ? E[F]() : E[F]) } } } return G.join("&").replace(/%20/g, "+") } }); var m = {}, n, d = [["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"], ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"], ["opacity"]]; function t(F, E) { var G = {}; o.each(d.concat.apply([], d.slice(0, E)), function() { G[this] = F }); return G } o.fn.extend({ show: function(J, L) { if (J) { return this.animate(t("show", 3), J, L) } else { for (var H = 0, F = this.length; H < F; H++) { var E = o.data(this[H], "olddisplay"); this[H].style.display = E || ""; if (o.css(this[H], "display") === "none") { var G = this[H].tagName, K; if (m[G]) { K = m[G] } else { var I = o("<" + G + " />").appendTo("body"); K = I.css("display"); if (K === "none") { K = "block" } I.remove(); m[G] = K } o.data(this[H], "olddisplay", K) } } for (var H = 0, F = this.length; H < F; H++) { this[H].style.display = o.data(this[H], "olddisplay") || "" } return this } }, hide: function(H, I) { if (H) { return this.animate(t("hide", 3), H, I) } else { for (var G = 0, F = this.length; G < F; G++) { var E = o.data(this[G], "olddisplay"); if (!E && E !== "none") { o.data(this[G], "olddisplay", o.css(this[G], "display")) } } for (var G = 0, F = this.length; G < F; G++) { this[G].style.display = "none" } return this } }, _toggle: o.fn.toggle, toggle: function(G, F) { var E = typeof G === "boolean"; return o.isFunction(G) && o.isFunction(F) ? this._toggle.apply(this, arguments) : G == null || E ? this.each(function() { var H = E ? G : o(this).is(":hidden"); o(this)[H ? "show" : "hide"]() }) : this.animate(t("toggle", 3), G, F) }, fadeTo: function(E, G, F) { return this.animate({ opacity: G }, E, F) }, animate: function(I, F, H, G) { var E = o.speed(F, H, G); return this[E.queue === false ? "each" : "queue"](function() { var K = o.extend({}, E), M, L = this.nodeType == 1 && o(this).is(":hidden"), J = this; for (M in I) { if (I[M] == "hide" && L || I[M] == "show" && !L) { return K.complete.call(this) } if ((M == "height" || M == "width") && this.style) { K.display = o.css(this, "display"); K.overflow = this.style.overflow } } if (K.overflow != null) { this.style.overflow = "hidden" } K.curAnim = o.extend({}, I); o.each(I, function(O, S) { var R = new o.fx(J, K, O); if (/toggle|show|hide/.test(S)) { R[S == "toggle" ? L ? "show" : "hide" : S](I) } else { var Q = S.toString().match(/^([+-]=)?([\d+-.]+)(.*)$/), T = R.cur(true) || 0; if (Q) { var N = parseFloat(Q[2]), P = Q[3] || "px"; if (P != "px") { J.style[O] = (N || 1) + P; T = ((N || 1) / R.cur(true)) * T; J.style[O] = T + P } if (Q[1]) { N = ((Q[1] == "-=" ? -1 : 1) * N) + T } R.custom(T, N, P) } else { R.custom(T, S, "") } } }); return true }) }, stop: function(F, E) { var G = o.timers; if (F) { this.queue([]) } this.each(function() { for (var H = G.length - 1; H >= 0; H--) { if (G[H].elem == this) { if (E) { G[H](true) } G.splice(H, 1) } } }); if (!E) { this.dequeue() } return this } }); o.each({ slideDown: t("show", 1), slideUp: t("hide", 1), slideToggle: t("toggle", 1), fadeIn: { opacity: "show" }, fadeOut: { opacity: "hide"} }, function(E, F) { o.fn[E] = function(G, H) { return this.animate(F, G, H) } }); o.extend({ speed: function(G, H, F) { var E = typeof G === "object" ? G : { complete: F || !F && H || o.isFunction(G) && G, duration: G, easing: F && H || H && !o.isFunction(H) && H }; E.duration = o.fx.off ? 0 : typeof E.duration === "number" ? E.duration : o.fx.speeds[E.duration] || o.fx.speeds._default; E.old = E.complete; E.complete = function() { if (E.queue !== false) { o(this).dequeue() } if (o.isFunction(E.old)) { E.old.call(this) } }; return E }, easing: { linear: function(G, H, E, F) { return E + F * G }, swing: function(G, H, E, F) { return ((-Math.cos(G * Math.PI) / 2) + 0.5) * F + E } }, timers: [], fx: function(F, E, G) { this.options = E; this.elem = F; this.prop = G; if (!E.orig) { E.orig = {} } } }); o.fx.prototype = { update: function() { if (this.options.step) { this.options.step.call(this.elem, this.now, this) } (o.fx.step[this.prop] || o.fx.step._default)(this); if ((this.prop == "height" || this.prop == "width") && this.elem.style) { this.elem.style.display = "block" } }, cur: function(F) { if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) { return this.elem[this.prop] } var E = parseFloat(o.css(this.elem, this.prop, F)); return E && E > -10000 ? E : parseFloat(o.curCSS(this.elem, this.prop)) || 0 }, custom: function(I, H, G) { this.startTime = e(); this.start = I; this.end = H; this.unit = G || this.unit || "px"; this.now = this.start; this.pos = this.state = 0; var E = this; function F(J) { return E.step(J) } F.elem = this.elem; if (F() && o.timers.push(F) && !n) { n = setInterval(function() { var K = o.timers; for (var J = 0; J < K.length; J++) { if (!K[J]()) { K.splice(J--, 1) } } if (!K.length) { clearInterval(n); n = g } }, 13) } }, show: function() { this.options.orig[this.prop] = o.attr(this.elem.style, this.prop); this.options.show = true; this.custom(this.prop == "width" || this.prop == "height" ? 1 : 0, this.cur()); o(this.elem).show() }, hide: function() { this.options.orig[this.prop] = o.attr(this.elem.style, this.prop); this.options.hide = true; this.custom(this.cur(), 0) }, step: function(H) { var G = e(); if (H || G >= this.options.duration + this.startTime) { this.now = this.end; this.pos = this.state = 1; this.update(); this.options.curAnim[this.prop] = true; var E = true; for (var F in this.options.curAnim) { if (this.options.curAnim[F] !== true) { E = false } } if (E) { if (this.options.display != null) { this.elem.style.overflow = this.options.overflow; this.elem.style.display = this.options.display; if (o.css(this.elem, "display") == "none") { this.elem.style.display = "block" } } if (this.options.hide) { o(this.elem).hide() } if (this.options.hide || this.options.show) { for (var I in this.options.curAnim) { o.attr(this.elem.style, I, this.options.orig[I]) } } this.options.complete.call(this.elem) } return false } else { var J = G - this.startTime; this.state = J / this.options.duration; this.pos = o.easing[this.options.easing || (o.easing.swing ? "swing" : "linear")](this.state, J, 0, 1, this.options.duration); this.now = this.start + ((this.end - this.start) * this.pos); this.update() } return true } }; o.extend(o.fx, { speeds: { slow: 600, fast: 200, _default: 400 }, step: { opacity: function(E) { o.attr(E.elem.style, "opacity", E.now) }, _default: function(E) { if (E.elem.style && E.elem.style[E.prop] != null) { E.elem.style[E.prop] = E.now + E.unit } else { E.elem[E.prop] = E.now } } } }); if (document.documentElement.getBoundingClientRect) { o.fn.offset = function() { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return o.offset.bodyOffset(this[0]) } var G = this[0].getBoundingClientRect(), J = this[0].ownerDocument, F = J.body, E = J.documentElement, L = E.clientTop || F.clientTop || 0, K = E.clientLeft || F.clientLeft || 0, I = G.top + (self.pageYOffset || o.boxModel && E.scrollTop || F.scrollTop) - L, H = G.left + (self.pageXOffset || o.boxModel && E.scrollLeft || F.scrollLeft) - K; return { top: I, left: H} } } else { o.fn.offset = function() { if (!this[0]) { return { top: 0, left: 0} } if (this[0] === this[0].ownerDocument.body) { return o.offset.bodyOffset(this[0]) } o.offset.initialized || o.offset.initialize(); var J = this[0], G = J.offsetParent, F = J, O = J.ownerDocument, M, H = O.documentElement, K = O.body, L = O.defaultView, E = L.getComputedStyle(J, null), N = J.offsetTop, I = J.offsetLeft; while ((J = J.parentNode) && J !== K && J !== H) { M = L.getComputedStyle(J, null); N -= J.scrollTop, I -= J.scrollLeft; if (J === G) { N += J.offsetTop, I += J.offsetLeft; if (o.offset.doesNotAddBorder && !(o.offset.doesAddBorderForTableAndCells && /^t(able|d|h)$/i.test(J.tagName))) { N += parseInt(M.borderTopWidth, 10) || 0, I += parseInt(M.borderLeftWidth, 10) || 0 } F = G, G = J.offsetParent } if (o.offset.subtractsBorderForOverflowNotVisible && M.overflow !== "visible") { N += parseInt(M.borderTopWidth, 10) || 0, I += parseInt(M.borderLeftWidth, 10) || 0 } E = M } if (E.position === "relative" || E.position === "static") { N += K.offsetTop, I += K.offsetLeft } if (E.position === "fixed") { N += Math.max(H.scrollTop, K.scrollTop), I += Math.max(H.scrollLeft, K.scrollLeft) } return { top: N, left: I} } } o.offset = { initialize: function() { if (this.initialized) { return } var L = document.body, F = document.createElement("div"), H, G, N, I, M, E, J = L.style.marginTop, K = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;" cellpadding="0" cellspacing="0"><tr><td></td></tr></table>'; M = { position: "absolute", top: 0, left: 0, margin: 0, border: 0, width: "1px", height: "1px", visibility: "hidden" }; for (E in M) { F.style[E] = M[E] } F.innerHTML = K; L.insertBefore(F, L.firstChild); H = F.firstChild, G = H.firstChild, I = H.nextSibling.firstChild.firstChild; this.doesNotAddBorder = (G.offsetTop !== 5); this.doesAddBorderForTableAndCells = (I.offsetTop === 5); H.style.overflow = "hidden", H.style.position = "relative"; this.subtractsBorderForOverflowNotVisible = (G.offsetTop === -5); L.style.marginTop = "1px"; this.doesNotIncludeMarginInBodyOffset = (L.offsetTop === 0); L.style.marginTop = J; L.removeChild(F); this.initialized = true }, bodyOffset: function(E) { o.offset.initialized || o.offset.initialize(); var G = E.offsetTop, F = E.offsetLeft; if (o.offset.doesNotIncludeMarginInBodyOffset) { G += parseInt(o.curCSS(E, "marginTop", true), 10) || 0, F += parseInt(o.curCSS(E, "marginLeft", true), 10) || 0 } return { top: G, left: F} } }; o.fn.extend({ position: function() { var I = 0, H = 0, F; if (this[0]) { var G = this.offsetParent(), J = this.offset(), E = /^body|html$/i.test(G[0].tagName) ? { top: 0, left: 0} : G.offset(); J.top -= j(this, "marginTop"); J.left -= j(this, "marginLeft"); E.top += j(G, "borderTopWidth"); E.left += j(G, "borderLeftWidth"); F = { top: J.top - E.top, left: J.left - E.left} } return F }, offsetParent: function() { var E = this[0].offsetParent || document.body; while (E && (!/^body|html$/i.test(E.tagName) && o.css(E, "position") == "static")) { E = E.offsetParent } return o(E) } }); o.each(["Left", "Top"], function(F, E) { var G = "scroll" + E; o.fn[G] = function(H) { if (!this[0]) { return null } return H !== g ? this.each(function() { this == l || this == document ? l.scrollTo(!F ? H : o(l).scrollLeft(), F ? H : o(l).scrollTop()) : this[G] = H }) : this[0] == l || this[0] == document ? self[F ? "pageYOffset" : "pageXOffset"] || o.boxModel && document.documentElement[G] || document.body[G] : this[0][G] } }); o.each(["Height", "Width"], function(I, G) { var E = I ? "Left" : "Top", H = I ? "Right" : "Bottom", F = G.toLowerCase(); o.fn["inner" + G] = function() { return this[0] ? o.css(this[0], F, false, "padding") : null }; o.fn["outer" + G] = function(K) { return this[0] ? o.css(this[0], F, false, K ? "margin" : "border") : null }; var J = G.toLowerCase(); o.fn[J] = function(K) { return this[0] == l ? document.compatMode == "CSS1Compat" && document.documentElement["client" + G] || document.body["client" + G] : this[0] == document ? Math.max(document.documentElement["client" + G], document.body["scroll" + G], document.documentElement["scroll" + G], document.body["offset" + G], document.documentElement["offset" + G]) : K === g ? (this.length ? o.css(this[0], J) : null) : this.css(J, typeof K === "string" ? K : K + "px") } })
})();//以前老的弹出窗口函数
function Old_ShowModalDialogInFrame(Url,arg,post)
{
    if (mynet_GetNavigator() == 'MSIE') {
        var ret;
        if (arg != null) {
            var now = new Date();
            Url = UrlEncode(Url);
            var isPost = (post != null && post == true) ? '&postdialogarguments=1' : '';
            ret = window.showModalDialog(
	    	    "/web/modaldialoginframe.aspx?t=" + now.toTimeString() + isPost + "&url=" + Url,
		        arg,
		        "unadorned:1; dialogWidth:1px; dialogHeight:1px; status:0; resizable:1");
        }
        else {
            var dialog = "/web/modaldialoginframe2.aspx?15";
            ret = window.showModalDialog(
    	        dialog,
	            Url,
	            "unadorned:1; dialogWidth:1px; dialogHeight:1px; status:0; resizable:1");
        }

        // Modified by yifan at 2005-11-28
        // If window return an object, it might cause an unknown exception
        // right in the comparation ret=="____mynet_closeforlogin".
        try {
            if (ret != null && ret == "____mynet_closeforlogin") {
                Url = window.location.href;
                window.navigate("/web/login.aspx?ReturnUrl=" + Url);
                ret = null;
            }
        }
        catch (e) {
        }

        return ret;
    }
    else {
        var openurl = Url;
        var ffarg = "menubar=no,toolbar=no,location=no,scrollbars=no,status=no,modal=yes";
        if (arg != null) {
            ffarg = ffarg + ',' + arg.replace(":", "=").replace(";", ",");
        }
        window.open(openurl, "", ffarg);
        return "";
        
    }
}
//windows对象操作函数

//Mynet弹出窗口
//para0:Url,弹出窗口Url;
//para1:arg,参数(eg:dialogHeight:440px;dialogWidth:600px;location=no;toolbar=no;status=no;resizable=no;scrollbars=no)
//para2:post,传递方法post=true时通过post方法传递到页面
//080522 createBy Mynet|signBy ls
function ShowModalDialogInFrame(Url, arg, post) {
   return  mynet_ShowModalDialog(Url, '', 300, 150);
}

//Mynet弹出窗口  登录框
//para0:登录完成后是否关闭当前登录窗口 是请传递 true,否则传false.
//chengfeng.sue
function ShowLoginDialog(closeCurrent) {
    var url = "/web/login.aspx?closeCurrent=" + closeCurrent + "&ReturnUrl=~/web/closedivdialog.htm";
    return mynet_ShowModalDialog(url, '', 300, 150);
}

function mynet_GetTopWin() {
    var topWinManager = null;
    var win = window.parent;
    //表示已经在Iframe里了，此时必须调用父窗口打开对话框
    while (win != null && win != win.parent) {
        win = win.parent;
    }
    if (win != null) {
        topWinManager = win._window;
    }
    else {
        topWinManager = _window;
     }
    topWinManager.ClassName = "VISTA";
    topWinManager.Timer = 0;

    return topWinManager;
}

//用来弹出DIV模拟对话框的函数。url,title,width,height参数和名称同义。buttons指窗口下方的按钮，可以定义上一步，下一步，确定，取消等
function mynet_ShowModalDialog(urlOrElementId, title, width, height, buttons,isIframeWin) {
    var topWinManager = mynet_GetTopWin();
     var content ;
    //默认是带Ｉｆｒａｍｅ的弹出窗
     if (isIframeWin == true || isIframeWin == null) {
         content = "[url]" + urlOrElementId;
     }
     else {
         content = "[id]" + urlOrElementId;//将页面某个元素的内容弹出
      }
      if (width == null)
          width = 300;
      if (height == null)
          height = 150;
    
    var winbuttons = buttons;
    var features = "isModal=yea,width=" + width + ",height=" + height + ",button=" + winbuttons;
    var win = topWinManager.Open(content, title, features);
    var position = mynet_GetCenterPosition(width, height);
    if (win.isReady) {
        win.MoveTo(position.Left, position.Top);
    }
    return win;
}

function mynet_GetCenterPosition(w, h) {
    if(w ==null)
    {
        w=400;//默认宽度
    }
    if(h == null)
    {
        h = 100;//默认高度
    }
    var doc = window.parent.document;

    var clientwidth = (window.parent.innerWidth) ? window.parent.innerWidth : (window.parent.document.documentElement && window.parent.document.documentElement.clientWidth) ? window.parent.document.documentElement.clientWidth : window.parent.document.body.offsetWidth;
    var clientheight = (window.parent.parent.innerHeight) ? window.parent.innerHeight : (window.parent.document.documentElement && window.parent.document.documentElement.clientHeight) ? window.parent.document.documentElement.clientHeight : window.parent.document.body.offsetHeight;


    var sLeft = (clientwidth - w) / 2;

    if (sLeft < 0) {
        sLeft = 0;
    }

    var sTop = (clientheight - h) / 2;
    if (sTop < 0) {
        sTop = 0;
    }
    var scrollTop = doc.documentElement.scrollTop > doc.body.scrollTop ? doc.documentElement.scrollTop : doc.body.scrollTop;
    return {Left:sLeft,Top:sTop + scrollTop};
}

//用DIV来模拟Confirm的对话框
function mynet_Confirm(title, caption, content, width, height) {
    var topWinManager = mynet_GetTopWin();
    if (width == null) {
        width = 400;
    }
    if (height == null) {
        height = 140;
    }
    if(typeof(content)=="undefined")
    {
        content = "";
    }
    var message = "<div style='margin-left:20px;text-align:left;'><table cellpadding=0><tr><td width='63' valign='top'>";
    message = message + "<img src='/res/css/img/Viopenwindowicon_1.gif' style='float:left;' /></td><td>";
    message = message + "<div style='float:left;margin-top:3px;'>";
    message = message + "<div class='VITitleText' style='text-align:left;margin-bottom:10px; margin-left:10px;'>";
    message = message + caption;
    message = message + "</div><div class='VIExplainText' style='margin-left:10px; color:#FF6600'>"
    message = message + content;
    message = message + "</div></div></td></tr></table></div>"
    ;

    var features = "isModal=yea,width=" + width + ",height=" + height;
    var win = topWinManager.Confirm(message, title, features);
    return win;
}

//用DIV来模拟ALert对话框
function mynet_Alert(caption,content,width, height) {
    var topWinManager = mynet_GetTopWin();
    if (width == null) {
        width = 400;
    }
    if (height == null) {
        height = 140;
    }
    if(typeof(content)=="undefined")
    {
        content = "";
    }
    var message = "<div style='margin-left:20px;text-align:left;'><table cellpadding=0><tr><td width='63' valign='top'>";
    message = message + "<img src='/res/css/img/Viopenwindowicon_dui.gif' style='float:left;' /></td><td>";
    message = message + "<div style='float:left;margin-top:3px;'>";
    message = message +"<div class='VITitleText' style='text-align:left;margin-bottom:10px; margin-left:10px;'>";
    message = message +caption; 
    message = message + "</div><div class='VIExplainText' style='margin-left:10px; color:#FF6600'>"
    message = message + content;
    message = message + "</div></div></td></tr></table></div>";


    var features = "isModal=yea,width=" + width + ",height=" + height;
    var win = topWinManager.Alert(message, "信息提示", features);
    return win;
}

//DIV模拟对话框用来回调的函数。对话框里的网页，做完某件事情后，将结果传递回打开对话框的窗口
//winid: 窗口的唯一id,打开窗口时通过Url传递给iframe
//retObj，返回的javascript对象，可以是字符串，数组等
function mynet_ModalDialogCallBack(retObj) {
    var winid = getUrlParameter("winid");
    var topWinManager = mynet_GetTopWin();
    if (topWinManager.windows[winid] == null) {
        alert("错误：窗口已经被关闭，无法找到该窗口对象");
        return;
    }
    topWinManager.windows[winid].OnOKCallBack(retObj)
    topWinManager.windows[winid].Close();
}

//在弹出对话框内部网页，调用关闭DIV模拟弹出窗口的javascript
function mynet_ModalDialogClose() {
    if (window.dialogWidth) {
        window.close();
    }
    else {
        var winId = getUrlParameter("winid");
        var topWinManager = mynet_GetTopWin();
        var win = topWinManager.windows[winId];
        win.Close();
     }
 }



//总在顶层窗口打开链接
function mynet_openLinkTop(url) { 
　　
    var topWinManager;
    //表示已经在Iframe里了，此时必须调用父窗口打开对话框
    if (window.parent != null) {
        topWinManager = window.parent;
    }
    else {
        topWinManager = window;
    }
    topWinManager.location.href = url;
}
//刷新页面
function mynet_refreshPageTop(){
    var topWinManager;
    //表示已经在Iframe里了，此时必须调用父窗口打开对话框
    if (window.parent != null) {
        topWinManager = window.parent;
    }
    else {
        topWinManager = window;
    }
    topWinManager.location.reload();
}
//设置弹出窗口时大小
//para0:w,弹出窗宽度;
//para1:h,弹出窗高度;
//080522 createBy Mynet|signBy ls
function centerSize(w, h) {

    //证明是模式对话框
    if (window.dialogWidth) {
        
        if (window.location.href.indexOf("noresize") != -1)
            return;
        var sLeft = (window.screen.availWidth - w) / 2 + "px";
        var sTop = (window.screen.availHeight - h) / 2 + "px";
        var sWidth = w + "px";
        var sHeight = h + "px";

        dialogLeft = sLeft+"px";
        dialogWidth = sWidth;
        dialogTop = sTop+"px";
        dialogHeight = sHeight;
        
    }
    else {//否则是DIV模拟对话框
       var position = mynet_GetCenterPosition(w, h);
       var winId = getUrlParameter("winid");
       var topWinManager = mynet_GetTopWin();
       var win;
       if (winId != "") { //参数里有winid
           win = topWinManager.windows[winId];
       }
       else {//尝试找最后一个
           win = topWinManager.windows[topWinManager.Ids[topWinManager.Ids.length - 1]];
        }
       var widthDiff = w - win.width;
       var heightDiff = h - win.height;
       win.MoveTo(position.Left, position.Top);
       win.ResizeBy(widthDiff, heightDiff);
     }
}
//获取下拉框的值
function getDropDownListValue(obj)
{
    return obj.options[obj.selectedIndex].value;
}
//设置下拉框的值
function setDropDownListValue(obj,value)
{
    for(var i=0;i<obj.options.length;i++)
    {
        if(obj.options[i].value==value)
        {
            obj.options[i].selected = true;
            break;
        }
    }
}
//构造changedData
function mynet_buildChangedData()
{
    var designData = "<r>";
    //遍历所有的input获取previewfield
    var objs = document.getElementsByTagName("input");
    for(var i=0;i<objs.length;i++)
    {
        var obj = objs[i];
        if(typeof(obj.previewfield)!="undefined")
        {
            designData= designData+ "<"+ obj.previewfield +"><![CDATA["+ obj.value +"]]></"+ obj.previewfield +">";
        }
    }
    //再遍历所有的select获取previewfield
    objs = document.getElementsByTagName("select");
    for(var i=0;i<objs.length;i++)
    {
        var obj = objs[i];
        if(typeof(obj.previewfield)!="undefined")
        {
            designData= designData+ "<"+ obj.previewfield +"><![CDATA["+ getDropDownListValue(obj) +"]]></"+ obj.previewfield +">";
        }
    }
    designData = designData + "</r>";
    return designData;
}
//这个是在预览的情况下使用的，避免重复调用服务器
var mynet_oldDesignData;
//预览控件 参数1：控件名称 参数2：预览区的DIV对象参数3：是否强制预览，也就是不检验两次预览的数据是否一致
function mynet_previewAspect(aspectTypeName,previewAreaDiv,force)
{
    var designData = mynet_buildChangedData();
    mynet_previewAspect1(aspectTypeName,previewAreaDiv,focus,designData);
}

//预览控件 参数1：控件名称 参数2：预览区的DIV,对象参数3：是否强制预览，也就是不检验两次预览的数据是否一致
function mynet_previewAspect1(aspectTypeName,previewAreaDiv,force,designData)
{
    var url = "/admin/previewaspect.aspx";
    if(designData!=mynet_oldDesignData||force==true)//如果数据不一样，才调用
    {
        var formPost = new mynet_FormDataPoster(url);
        formPost.AddFormKeyValue("data",designData);
        formPost.AddFormKeyValue("typename",aspectTypeName);
        var retvalue = formPost.Post();
        mynet_SetInnerHTML(previewAreaDiv,retvalue);
    }
    mynet_oldDesignData = designData; 
}
function mynet_AddSession(k,v)
{
    var url = "/admin/sessionmanager.aspx";
    var formPost = new mynet_FormDataPoster(url);
    if(k!="")
    {
        formPost.AddFormKeyValue("o","a");
        formPost.AddFormKeyValue("k",k);
        formPost.AddFormKeyValue("v",v);
        formPost.Post();
    }
}
function mynet_RemoveSession(k)
{
    var url = "/admin/sessionmanager.aspx";
    var formPost = new mynet_FormDataPoster(url);
    if(k!="")
    {
        formPost.AddFormKeyValue("o","r");
        formPost.AddFormKeyValue("k",k);
        formPost.Post();
    }
    
}

//设定checkboxList的值，多字段搜索使用的
function mynet_setCheckBoxListValue(hiddenFieldID, chkBox) {
    var hiddenField = document.getElementById(hiddenFieldID);
    var arr = hiddenField.value.split(",");
    if (chkBox.checked) {
        arr.push(chkBox.value);
    } else {
        removeElementInArray(chkBox.value, arr);
    }
    hiddenField.value = arr.join(",");
};
//从数组里移除一个元素
function removeElementInArray(element, sourceArray) {
    for (var i = 0; i < sourceArray.length; i++) {
        if (sourceArray[i] == element) {
            sourceArray.splice(i, 1);
            break;
        }
    }
}


function getElementIndexOfArray(element, sourceArray) {
    for (var i = 0; i < sourceArray.length; i++) {
        if (sourceArray[i] == element) {
            return i;
        }
    }
    return -1;
}
//将商品加入购物车
function shopbuy(pid, mode) {
    mode = "";
    var modelNames = new Array();
    var inputs = document.getElementsByTagName("input");
    for (var i = 0; i < inputs.length; i++) {
        var input = inputs[i];
        if (typeof (input.isModelValue) != "undifined" && input.isModelValue == "true" && input.ownerID == pid) {
            var isExist = false;
            for(var j=0;j<modelNames.length;j++)
            {
                if(modelNames[j] == input.filedname)
                {
                    isExist = true;
                    break;
                }
            }
            if(isExist == false)
            {
                modelNames.push(input.filedname);
                mode += "@@" + input.modelName + "||" + escape(input.value);
            }
        }
    }
    if (mode.length > 2) {
        mode = mode.substr(2, mode.length);
    }

    var url = '/plugin/Purchase/shoppingsolution.aspx?id=' + pid + '&specstring=' + mode + '&type=add&tmp=' + Math.random();
    httpRequestFunc(url,
        function() {mynet_openLinkTop("/_d50.htm" + "?retUrl=" + escape(window.location.href)) });
}

//删除评论和文章
function onDeleteDoc(id,doctypename) {

    var win = ShowModalDialogInFrame('/plugin/doc/docdelete.aspx?docid=' + id + "&doctypename=" + doctypename);
    win.OnOKCallBack = function(ret){
        if (ret != null) {
            window.location.href = window.location.href;
        }
    }

}
//编辑DOC
function onEditDocument(id) {
    var win = ShowModalDialogInFrame('/plugin/doc/docedit.aspx?docid=' + id);
    win.OnOKCallBack = function(ret){
        if (ret != null) {
            refreshDocList();
        }
    }
}

//商品图片分类控件使用的函数
function postDocImageCategory(categoryID,categoryName,siteUrl,aspectUID,curDocUID,mergedDocId,isPublishMod,hiddenid)
{
    //更改显示的分类名称
    var categoryNameDiv = document.getElementById("docCategoryName");
    categoryNameDiv.innerHTML = categoryName;
    
    //更改隐藏规格值
    var hiddenInput = document.getElementById(hiddenid);
    if(hiddenInput != null)
    {
        hiddenInput.value = categoryName;
    }
    
    var selectImage = document.getElementById("docCategoryImage_"+categoryID);
    clearDocImageBorder();
    selectImage.border = 1;

    var subjectDate = new mynet_SubjectDataPoster(siteUrl, aspectUID, curDocUID,mergedDocId, isPublishMod, "docImageList");
    subjectDate.AddFormKeyValue("categoryID",categoryID);
    
    subjectDate.Post();
}
//选择图片更改
function clearDocImageBorder()
{
    var images = document.getElementsByName("selectDocCategoryImage");
    for(var i = 0;i<images.length;i++)
    {
        var imgae = images[i];
        imgae.border = 0;
    }
}

//多字段搜索使用的函数
function postSearchConditions(siteUrl, aspectUID, curDocUID, isPublishMod) {
    var subjectData = new mynet_SubjectDataPoster(siteUrl, aspectUID, curDocUID, '0',isPublishMod, "onAdvanceSearch");
    var aspectContainer = document.getElementById("mynetcndelay" + aspectUID);
    if (aspectContainer == null) {
        alert("当前页面的预览状态才支持高级搜索！");
        return;
    }
    var formInputs = aspectContainer.getElementsByTagName("INPUT");
    var index = 0;
    for (var i = 0; i < formInputs.length; i++) {
        var inputItem = formInputs[i];
        //只处理文本框以及hidden的表单控件
        if (typeof (inputItem.isvaluefield) != "undifined" && inputItem.isvaluefield == "true") {
            subjectData.AddFormKeyValue("advanceSearchParam" + index, inputItem.value);
            index++;
        }
    }
    //再将搜索的字段名以及字段类型传过去

    subjectData.Post();
}

function propertyListCondition(siteUrl, aspectUID, curDocUID, isPublishMod, searchValue) {
    var subjectData = new mynet_SubjectDataPoster(siteUrl, aspectUID, curDocUID, 0, isPublishMod, "onClickPropertyList");
    var aspectContainer = document.getElementById("mynetcndelay" + aspectUID);
    if (aspectContainer == null) {
        alert("当前页面的预览状态才支持属性列表！");
        return;
    }
    subjectData.AddFormKeyValue("listparam1", searchValue);
    subjectData.Post();
}

//设定window.onload
//para0:func,传入函数，想要在window.onload执行的函数
//080522 createBy Mynet|signBy ls
function addWindowOnload(func) {
    var prev = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    }
    else {
        window.onload = function() {
            if (prev) prev();
            func();
        }
    }
}

//获取QueryString 使用方法：http://xxx.mynet.cn/xxx.aspx?x=abc 获取 QueryString()["x"]=abc
//080526 createBy lisi|signBy lisi
function QueryString() {//构造参数对象并初始化
    return new QueryStringParser(window.location.href);
}
function QueryStringParser(url) {
    var num = url.indexOf("?")
    url = url.substr(num + 1); //截取“?”后面的参数串
    var arrtmp = url.split("&"); //将各参数分离形成参数数组 
    
    for (i = 0; i < arrtmp.length; i++) {
        num = arrtmp[i].indexOf("=");
        if (num > 0) {
            name = arrtmp[i].substring(0, num); //取得参数名称 
            value = arrtmp[i].substr(num + 1); //取得参数值 
            this[name] = value; //定义对象属性并初始化 
        }
    }
    this.RemoveKey = function(key) {
        var newStr = "";
        for (i = 0; i < arrtmp.length; i++) {
            num = arrtmp[i].indexOf("=");
            if (num > 0) {
                name = arrtmp[i].substring(0, num); //取得参数名称
                if (name != key) {
                    value = arrtmp[i].substr(num + 1); //取得参数值 
                    newStr += name + "=" + value + "&";
                }
            }
        }
        if (newStr != "") {
            newStr = newStr.substring(0, newStr.length - 1);
        }
        return newStr;
    }
}

function createHttpRequestObj() {
    var objHttpRequest = null;
    try {
        objHttpRequest = new ActiveXObject('Msxml2.XMLHTTP');
    } catch (e) {
        try {
            objHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
        } catch (E) {
            try {
                objHttpRequest = new XMLHttpRequest();
            } catch (ex)
                { }
        }
    }
    return objHttpRequest;
}

//获取httpRequest
//para0:url,获取httprequest的Url
//para1:func,传入函数，想要在objHttpRequest.readyState == 4 && objHttpRequest.status == 200执行的函数，不传入的话return responseText
//080603 createBy lisi|signBy lisi
function httpRequestFunc(url, func) {
    var objHttpRequest = createHttpRequestObj();
    this.action = 'GET';
    this.formData = null;
    if (objHttpRequest == null)
        return null;
    if (objHttpRequest) {
        objHttpRequest.open(this.action, url, true);
        var lastModify = new Date();
        lastModify.setFullYear(1900, 1, 1);
        objHttpRequest.setRequestHeader("If-Modified-Since", lastModify);
        objHttpRequest.onreadystatechange = function() {
            if (objHttpRequest.readyState == 4 &&
            objHttpRequest.status == 200) {
                if (typeof (func) == "function")
                    func(objHttpRequest.responseText);
                else
                    return objHttpRequest.responseText;
            }
        };
    }
    objHttpRequest.send(this.formData);
}

//获取httpRequest
//para0:url,获取httprequest的Url
//080603 createBy mynet|signBy lisi
function httpRequest(url) {
   var objHttpRequest = createHttpRequestObj();
    this.action = 'GET';
    this.formData = null;

    if (objHttpRequest == null)
        return null;

    objHttpRequest.open(this.action, url, false);
    var lastModify = new Date();
    lastModify.setFullYear(1900, 1, 1);
    objHttpRequest.setRequestHeader("If-Modified-Since", lastModify);
    objHttpRequest.send(this.formData);
    var retvalue = objHttpRequest.responseText;
    return retvalue;
}

function UrlEncode(str) {
    str = escape(str);
    return str;
}

function gowhere1(formname) {
    var url;
    if (formname.myselectvalue.value == "0") {
        url = "http://www.baidu.com/baidu";
        document.search_form1.tn.value = "baidu";
        formname.method = "get";
    }
    if (formname.myselectvalue.value == "1") {
        url = "http://mp3.baidu.com/m";
        document.search_form1.tn.value = "baidump3";
        document.search_form1.ct.value = "134217728";
        document.search_form1.lm.value = "-1";
    }

    if (formname.myselectvalue.value == "4") {
        document.search_form1.tn.value = "news";
        document.search_form1.cl.value = "2";
        document.search_form1.rn.value = "20";
        url = "http://news.baidu.com/ns";
    }
    if (formname.myselectvalue.value == "5") {
        document.search_form1.tn.value = "baiduiamge";
        document.search_form1.ct.value = "201326592";
        document.search_form1.cl.value = "2";
        document.search_form1.lm.value = "-1";
        url = "http://image.baidu.com/i";
    }
    if (formname.myselectvalue.value == "6") {
        url = "http://post.baidu.com/f";
        document.search_form1.tn.value = "baiduPostSearch";
        document.search_form1.ct.value = "352321536";
        document.search_form1.rn.value = "10";
        document.search_form1.lm.value = "65536";
    }

    formname.action = url;
    return true;
}
function g_baidu(formname) {
    var url = "http://www.baidu.com/baidu";
    if (formname.s[1].checked) {
        formname.ct.value = "2097152";
    }
    else {
        formname.ct.value = "0";
    }
    formname.action = url;
    return true;
}

String.prototype.getBytes = function() {
    var cArr = this.match(/[^\x00-\xff]/ig);
    return this.length + (cArr == null ? 0 : cArr.length);
}

// Initializes a new instance of the StringBuilder class
// and appends the given value if supplied
function StringBuilder(value) {
    this.strings = new Array("");
    this.Append(value);
}
// Appends the given value to the end of this instance.
StringBuilder.prototype.Append = function(value) {
    if (value) {
        this.strings.push(value);
    }
}
// Clears the string buffer
StringBuilder.prototype.clear = function() {
    this.strings.length = 1;
}
// Converts this instance to a String.
StringBuilder.prototype.ToString = function() {
    return this.strings.join("");
}

// see http://groups.google.com/group/comp.lang.javascript/browse_frm/thread/23ddbc2448fef853/4a0123c93965eef5?lnk=st&q=XHTML+scrollTOP&rnum=7&hl=zh-CN#4a0123c93965eef5
function getScrollTop(target) {
    if (target == null)
        target = window;
    var doc = target.document;

    var scrollPos = 0;
    try {
        if (typeof target.pageYOffset != 'undefined') {
            scrollPos = target.pageYOffset;
        }
        if (scrollPos == 0 && typeof doc.compatMode != 'undefined' && doc.compatMode != 'BackCompat') {
            scrollPos = doc.documentElement.scrollTop;
        }
        if (scrollPos == 0 && typeof doc.body != 'undefined') {
            scrollPos = doc.body.scrollTop;
        }
    }
    catch (e) {
    }

    return scrollPos;
}

function getScrollLeft(target) {
    if (target == null)
        target = window;
    var doc = target.document;

    var scrollPos = 0;
    try {
        if (typeof target.pageXOffset != 'undefined') {
            scrollPos = target.pageXOffset;
        }
        if (scrollPos == 0 && typeof doc.compatMode != 'undefined' && doc.compatMode != 'BackCompat') {
            scrollPos = doc.documentElement.scrollLeft;
        }
        if (scrollPos == 0 && typeof doc.body != 'undefined') {
            scrollPos = doc.body.scrollLeft;
        }
    }
    catch (e) {
    }

    return scrollPos;
}

function mynetResizeTheme() {
    var panel = document.getElementById('mynetAspectPanel');
    if (panel == null) {
        panel = document.getElementById('mynetAspectPanelResize');
        if (panel == null)
            return;
    }
    var aspects = panel.childNodes;

    var div = document.getElementById('mynetAspectPanelDiv');
    if (div == null)
        div = panel;

    var divHeight = document.getElementById('mynetAspectPanelHeight');
    if (divHeight == null) {
        divHeight = panel.parentNode;
        divHeight.id = 'mynetAspectPanelHeight';
    }
    divHeight.style.height = '0px';
    divHeight.vAlign = "top";
    var minTop = null;
    try { minTop = Mynet_ObjectTop(document.getElementById('spanThemeBegin')) - Mynet_ObjectTop(panel); } catch (e) { }

    var height = 200; //panel.offsetHeight;
    var minLeft = 0;
    for (var i = 0; i < aspects.length; i++) {
        var one = aspects[i];
        try { if (minTop != null && minTop < 0 && one.style.pixelTop < minTop) one.style.top = minTop; } catch (e) { }
        if (one.offsetTop + one.offsetHeight + 0 > height)
            height = one.offsetTop + one.offsetHeight + 0;
        try { // 在firefox中，有些内容没有.style，所以加上try
            if (one.style.pixelLeft < minLeft)
                minLeft = one.style.pixelLeft
        }
        catch (e) {
        }
    }

    // 修改内容区的高度
    divHeight.style.height = height + 'px';

    if (document.getElementById('spanMasterTemplateBackgroundBody') != null) {
        var spanBg = document.getElementById('spanMasterRepeat');
        var index1 = spanBg.style.backgroundImage.indexOf('.');
        var index2 = spanBg.style.backgroundImage.indexOf(')');
        var extName = spanBg.style.backgroundImage.substr(index1 + 1, index2 - index1 - 1);

        // 获取原来的themeid
        var themeid = spanBg.style.backgroundImage.split('_')[3];

        // 获得新背景url
        var bodyHeight = document.getElementById('tdMasterTemplateBackgroundBody').offsetHeight;
        var url = 'url(_m_masterpagebackground_' + themeid + '_Repeat_' + bodyHeight + "." + extName + ')';
        if (spanBg.style.backgroundImage != url) {
            spanBg.style.backgroundImage = url;
        }
    }

    mynetCheckAspectPosition();
}

function mynetCheckAspectPosition() {
    if (document.readyState != 'complete') // 只有在loaded是才判断，否则有可能当时对象位置不对，错误把它内容下移了。
        return;
    var s = document.getElementsByTagName('DIV');
    for (var i = 0; i < s.length; i++) {
        var e = s[i];
        if (e.style.position == 'absolute' && e.id.length > 7 && e.id.substr(0, 7) == 'aspect_') {
          
            var t = Mynet_ObjectTop(e);
            if (t < 0)
                e.style.top = e.style.pixelTop - t;
        }
    }
}

function removeOptions(obj) {
    var len = obj.options.length;
    for (var i = 0; i < len; i++) {
        obj.options.remove(0);
    }
}
function AddToCar(SiteId, PageId, StandardInputName) {
    ShowOrderCar(SiteId);
}

function ShowOrderCar() {
    window.alert("点击这里，将显示购物车。");
}

function XmlDoc() {
    var tXmlDoc = false;
    if (window.ActiveXObject) {
        var tMsXmlDomType = [/*"Msxml2.DOMDocument.5.0",*/"Msxml2.DOMDocument.4.0", "Msxml2.DOMDocument.3.0", "MSXML2.DOMDocument", "MSXML.DOMDocument", "Microsoft.XMLDOM"];
        for (var i = 0; i < tMsXmlDomType.length; i++) {
            try {
                tXmlDoc = new ActiveXObject(tMsXmlDomType[i]);
                tXmlDoc.setProperty("SelectionLanguage", "XPath");
                break;
            } catch (ex) { }
        }
    } else if (document.implementation && document.implementation.createDocument) {
        tXmlDoc = document.implementation.createDocument("", "", null);
        if (!tXmlDoc.load) {  // for safari
            tXmlDoc.hp = new XMLHttpRequest();
            tXmlDoc.hp.hpOwner = tXmlDoc;
            tXmlDoc.hp.load = function(sUrl) {
                try {
                    this.open("GET", sUrl, this.async);
                    this.send(null);
                } catch (ex) {
                    throw "you can't connect the page using different domain,if you not config the Server-Side code";
                }
                if (this.readyState == 4) {
                    var _result = this.responseXML;
                    while (this.hpOwner.hasChildNodes())
                        this.hpOwner.removeChild(this.hpOwner.lastChild);
                    for (var i = 0; i < _result.childNodes.length; i++) {
                        this.hpOwner.appendChild(this.hpOwner.importNode(_result.childNodes[i], true));
                    }
                }
            }
            tXmlDoc.load = function(sUrl) {
                tXmlDoc.hp.load(sUrl);
            }
            tXmlDoc.selectNodes = function(sXPath) {// tagName/[@]
                //var _all = sXPath.split("//")
                this.getElementsByTagName();
            }
        }
    }
    if (!tXmlDoc) {
        throw ("Can not create xml doc object!");
    }
    return tXmlDoc;
}
function reloadPage() {
    window.location.reload();
}

function reloadDialog() {
    var url = window.location.href;
    if (url.indexOf("noresize=1") < 0) {
        if (url.indexOf('?') == -1)
            url = url + '?';
        else
            url = url + '&';
        url = url + "noresize=1";
    }
    window.navigate(url);
}

var windowLoadedFuncArray = new Array();

function addWindowLoadedFunc(func) {
    windowLoadedFuncArray[windowLoadedFuncArray.length] = func;
}

function windowLoaded() {
    //window.alert('windowLoadedFuncArray.length=' + windowLoadedFuncArray.length);
    for (var i = 0; i < windowLoadedFuncArray.length; i++) {
        var func = windowLoadedFuncArray[i];
        func();
    }
   
    annimations();
}

function Mynet_ObjectDim(el) {
    for (var lx = 0, ly = 0; el != null; lx += el.offsetLeft, ly += el.offsetTop, el = el.offsetParent) {
        if (el.tagName.toLowerCase() == 'div' && el.style.position == 'relative') {
            ly = ly - el.offsetTop;
            var top = el.offsetTop;
            ly = ly + (el.offsetTop - el.scrollTop);
        }
        else if (el.tagName != 'BODY') {
            ly -= el.scrollTop;
        }
    }
    return { x: lx, y: ly }
}

// 计算指定对象在document中的位置，考虑滚动条的情况。
function Mynet_ObjectLeft(o) {
    var x = 0;

    while (o != null && o.tagName.toUpperCase() != "HTML") {
        if (o.style.position == "absolute") {
            x += o.offsetLeft;
            do {
                o = o.offsetParent;
            }
            while (o != null && o.style.position != "relative");
            if (o == null)
                return x;
        }

        if (o.tagName.toUpperCase() != "HTML" && o.style.position != "absolute") {
            x += o.offsetLeft;
            x = x - o.scrollLeft;
        }
        o = o.offsetParent;
    }
    x += getScrollLeft();
    return x;
}

// 计算指定对象在document中的位置，考虑滚动条的情况。
function Mynet_ObjectTop(o) {
    return getElementPos(o).y;

    var y = 0;
    while (o != null && o.tagName.toUpperCase() != "HTML") {
        if (o.style.position == "absolute") {
            y += o.offsetTop;
            do {
                o = o.offsetParent;
            }
            while (o != null && o.style.position != "relative"); // 一直找到上一个relative为止
            if (o == null)
                return y;
            if (o != null) {
                document.title = o.style.position + ' ' + o.outerHTML;
            }
        }

        if (o.tagName.toUpperCase() != "HTML") {
            y += o.offsetTop;
            y = y - o.scrollTop;
        }
        o = o.offsetParent;
    }
    //document.title = 'y=' + y + 'getScrollTop()=' + getScrollTop();
    y += getScrollTop();
    return y;
}

function getElementPos(el) {
    var ua = navigator.userAgent.toLowerCase();
    var isOpera = (ua.indexOf('opera') != -1);
    var isIE = (ua.indexOf('msie') != -1 && !isOpera); // not opera spoof      
    // var el = document.getElementById(elementId);      
    if (el.parentNode == null || el.style.display == 'none') {
        return false;
    }
    var parent = null;
    var pos = [];
    var box;
    if (el.getBoundingClientRect)    //IE     
    {
        box = el.getBoundingClientRect();
        var scrollTop = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
        var scrollLeft = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
        return { x: box.left + scrollLeft, y: box.top + scrollTop };
    }
    else if (document.getBoxObjectFor)    // gecko     
    {
        box = document.getBoxObjectFor(el);
        var borderLeft = (el.style.borderLeftWidth) ? parseInt(el.style.borderLeftWidth) : 0;
        var borderTop = (el.style.borderTopWidth) ? parseInt(el.style.borderTopWidth) : 0;
        pos = [box.x - borderLeft, box.y - borderTop];
    }
    else    // safari & opera     
    {
        pos = [el.offsetLeft, el.offsetTop];
        parent = el.offsetParent;
        if (parent != el) {
            while (parent) {
                pos[0] += parent.offsetLeft;
                pos[1] += parent.offsetTop;
                parent = parent.offsetParent;
            }
        }
        if (ua.indexOf('opera') != -1 || (ua.indexOf('safari') != -1 && el.style.position == 'absolute')) {
            pos[0] -= document.body.offsetLeft; pos[1] -= document.body.offsetTop;
        }
    }
    if (el.parentNode) {
        parent = el.parentNode;
    }
    else {
        parent = null;
    }

    while (parent && parent.tagName != 'BODY' && parent.tagName != 'HTML') { // account for any scrolled ancestors         
        pos[0] -= parent.scrollLeft;
        pos[1] -= parent.scrollTop;
        if (parent.parentNode)
        { parent = parent.parentNode; }
        else { parent = null; }
    }
    return { x: pos[0], y: pos[1] };
}
//justify a string is integer or not
function IsInt(objStr, sign, zero) {
    var reg;
    var bolzero;
    if (Trim(objStr) == "") {
        return false;
    }
    else {
        objStr = objStr.toString();
    }
    if ((sign == null) || (Trim(sign) == "")) {
        sign = "+-";
    }
    if ((zero == null) || (Trim(zero) == "")) {
        bolzero = false;
    }
    else {
        zero = zero.toString();
        if (zero == "0") {
            bolzero = true;
        }
        else {
            alert("检查是否包含0参数，只可为(空、0)");
        }
    }
    switch (sign) {
        case "+-":
            //整数
            reg = /(^-?|^\+?)\d+$/;
            break;
        case "+":
            if (!bolzero) {
                //正整数

                reg = /^\+?[0-9]*[1-9][0-9]*$/;
            }
            else {
                //正整数+0
                //reg=/^\+?\d+$/;
                reg = /^\+?[0-9]*[0-9][0-9]*$/;
            }
            break;
        case "-":
            if (!bolzero) {
                //负整数

                reg = /^-[0-9]*[1-9][0-9]*$/;
            }
            else {
                //负整数+0
                //reg=/^-\d+$/;
                reg = /^-[0-9]*[0-9][0-9]*$/;
            }
            break;
        default:
            alert("检查符号参数，只可为(空、+、-)");
            return false;
            break;
    }

    var r = objStr.match(reg);
    if (r == null) {
        return false;
    }
    else {
        return true;
    }
}

// Sets cookie values. Expiration date is optional 
// 
function setCookie(name, value, expire) {
    document.cookie = name + "=" + escape(value)
  + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))
}


function getCookie(Name) {
    var search = Name + "="
    if (document.cookie.length > 0) { // if there are any cookies 
        offset = document.cookie.indexOf(search)
        if (offset != -1) { // if cookie exists 
            offset += search.length
            // set index of beginning of value 
            end = document.cookie.indexOf(";", offset)
            // set index of end of cookie value 
            if (end == -1)
                end = document.cookie.length
            return unescape(document.cookie.substring(offset, end))
        }
    }
}


function deleteCookie(name, path, domain) {
    if (getCookie(name)) document.cookie = name + "=" +
      ((path) ? ";path=" + path : "") +
      ((domain) ? ";domain=" + domain : "") +
      ";expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function LTrim(str) {
    var whitespace = new String(" \t\n\r");
    var s = new String(str);

    if (whitespace.indexOf(s.charAt(0)) != -1) {
        var j = 0, i = s.length;
        while (j < i && whitespace.indexOf(s.charAt(j)) != -1) {
            j++;
        }
        s = s.substring(j, i);
    }
    return s;
}


function RTrim(str) {
    var whitespace = new String(" \t\n\r");
    var s = new String(str);
    if (whitespace.indexOf(s.charAt(s.length - 1)) != -1) {
        var i = s.length - 1;
        while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) {
            i--;
        }
        s = s.substring(0, i + 1);
    }
    return s;
}


function Trim(str) {
    return RTrim(LTrim(str));
}


function mynetVoteOpenWin(opertype, openpath, voteguid,msgWhenNoSelected) {

    var frmvote = document.getElementById('frmvote_' + voteguid);

    if (frmvote == null) return;

    var radios = frmvote.getElementsByTagName("input");
    var selecvalue = "";
    if (radios != null && radios.length > 0) {
        for (var i = 0; i < radios.length; i++) {
            if ((radios[i].type == "radio" || radios[i].type == "checkbox") && radios[i].checked) {
                selecvalue = selecvalue + radios[i].value + "|";
                if (opertype == 1)
                    radios[i].checked = false;
            }
        }
        if (selecvalue != "")
            selecvalue = selecvalue.substr(0, selecvalue.length - 1);
    }
    if (opertype == 1 && selecvalue == "") {
        alert(msgWhenNoSelected);
        return false;
    }
    window.open(openpath + "?t=" + opertype + "&auid=" + voteguid + "&svalue=" + selecvalue, "kk", "top=200,left=300,width=450,height=300;toolbar=no, menubar=no,scrollbars=yes, resizable=yes,location=no, status=no");
    return false;

}

function setMynetCopyrightYear(item) {
    setCopyrightYear(item, "2005");
}

function setCopyrightYear(item, startYear) {
    if (item == null) return;
    if (item.constructor == String) {
        item = document.getElementById(item);
    }
    if (item == null) return;
    var thisYear = new Date();
    thisYear = thisYear.getYear().toString();
    if (thisYear == startYear) {
        item.innerHTML = startYear;
    }
    else {
        item.innerHTML = startYear + "-" + thisYear;
    }
}

function mynetAddBookmarkByUrl(title, Url) {
    if (title == null)
        title = "Mynet.cn我的空间";

    if (window.sidebar) {
        window.sidebar.addPanel(title, Url, "");
    }
    else if (document.all) {
        window.external.AddFavorite(Url, title);
    }
    else if (window.opera && window.print) {
        return true;
    }
}

function mynetAddBookmark(title) {
    if (title == null)
        title = "Mynet.cn我的空间";

    var url = document.location.href;
    if (window.sidebar) {
        window.sidebar.addPanel(title, url, "");
    }
    else if (document.all) {
        window.external.AddFavorite(url, title);
    }
    else if (window.opera && window.print) {
        return true;
    }
}

function mynetSetCopy(_sTxt) {
    try {
        clipboardData.setData('Text', _sTxt)
        window.alert('您已经把该网址（' + _sTxt + '）复制到系统剪贴板，您可以使用（Ctrl+V或鼠标右键）粘贴功能，通过QQ、MSN或其他聊天工具发送给您的朋友。');
    }
    catch (e) {
    }
}

//通用函数将某个字符，从通过逗号分割的字符串中移出
function RemoveStrFromIds(strIds, strCategoryId) {
    if (strIds.indexOf("," + strCategoryId + ",") != -1) {
        strIds = strIds.replace("," + strCategoryId + ",", ",");

    }
    else if (strIds.indexOf(strCategoryId + ",") == 0)//第一个栏目
    {
        strIds = strIds.replace(strCategoryId + ",", "");
    }
    else if (strIds.indexOf("," + strCategoryId) == (strIds.length - strCategoryId.length - 1) && (strIds.length - strCategoryId.length - 1) > -1)//最后一个
    {
        strIds = strIds.replace("," + strCategoryId, "");

    }
    else if (strIds.indexOf(strCategoryId) == 0 && strCategoryId.length == strIds.length)//只有一个
    {

        strIds = "";
    }

    return strIds;
}

function AddIdToStrIds(id, strIds) {
    if (IsIdInStrIds(id, strIds) == false) {
        if (strIds != null && strIds != "") {
            strIds += ",";
        }
        strIds += id;
    }
    return strIds;
}

//判断一个字符串是否在另外一个字符串中
function IsIdInStrIds(id, strIds) {
    var IsAuto = false;
    var arrIntAuto = strIds.split(",");
    var arrIntAutoLen = arrIntAuto.length;
    for (var i = 0; i < arrIntAutoLen; i++) {

        if (arrIntAuto[i] == id) {
            IsAuto = true;
            break;
        }
    }
    return IsAuto;
}

//替换字符串中的某个Id
function ReplaceId(strIds, newId, oldId) {
    var arrIntAuto = strIds.split(",");
    var arrIntAutoLen = arrIntAuto.length;
    for (var i = 0; i < arrIntAutoLen; i++) {

        if (arrIntAuto[i] == oldId) {
            arrIntAuto[i] = newId;
            break;
        }
    }
    var newStrIds = "";
    for (var k = 0; k < arrIntAutoLen; k++) {
        if (newStrIds != "") {
            newStrIds += ",";
        }
        newStrIds += arrIntAuto[k];
    }
    return newStrIds;
}


var DS_x, DS_y;

function dateSelector()  //构造dateSelector对象，用来实现一个日历形式的日期输入框。
{
    var myDate = new Date();
    this.year = myDate.getFullYear();  //定义year属性，年份，默认值为当前系统年份。
    this.month = myDate.getMonth() + 1;  //定义month属性，月份，默认值为当前系统月份。
    this.date = myDate.getDate();  //定义date属性，日，默认值为当前系统的日。
    this.inputName = '';  //定义inputName属性，即输入框的name，默认值为空。注意：在同一页中出现多个日期输入框，不能有重复的name！
    this.display = display;  //定义display方法，用来显示日期输入框。
    this.evalStr = '';
    this.docId = '0';
}



function TextToJson(txt) {  //将JSON文本转为JSON对象
    var func = new Function("return " + txt);
    var json = func();
    return json;
} 

function display(parentId)  //定义dateSelector的display方法，它将实现一个日历形式的日期选择框。
{
    var week = new Array('日', '一', '二', '三', '四', '五', '六');
    var strInnerHTML = "";


    strInnerHTML += "<input style='border:solid 1px silver;border-right:none 0px white;width:85px;height:18px;' isvaluefield=\"true\" id='txt_" + this.inputName + "' name='" + this.inputName + "' value='" + this.year + "-" + this.month + "-" + this.date + "' title='双击可进行编缉' ondblclick='this.readOnly=false;this.focus();' onblur='this.readOnly=true;' readonly>";
    strInnerHTML += "<img style='cursor:hand;' align='absmiddle' src='res/calendar.gif' onclick=\"this.nextSibling.style.display='block';\" onfocus=\"this.blur()\"/>";

    strInnerHTML += "<div style='position:absolute;display:none;text-align:center;width:0px;height:0px;overflow:visible' onselectstart='return false;'>";
    strInnerHTML += "  <div style='position:absolute;left:-60px;top:20px;width:142px;height:165px;background-color:#F6F6F6;border:1px solid #245B7D;' class=ds_font>";
    strInnerHTML += "    <table cellpadding=0 cellspacing=1 width=140 height=20 bgcolor=#CEDAE7 onmousedown='DS_x=event.x-parentNode.style.pixelLeft;DS_y=event.y-parentNode.style.pixelTop;setCapture();' onmouseup='releaseCapture();' onmousemove='dsMove(this.parentNode)' style='cursor:move;'>";
    strInnerHTML += "      <tr align=center>";
    strInnerHTML += "        <td width=12% onmouseover=this.className='ds_border' onmouseout=this.className='' onclick=subYear(this) title='减小年份'><<</td>";
    strInnerHTML += "        <td width=12% onmouseover=this.className='ds_border' onmouseout=this.className='' onclick=subMonth(this) title='减小月份'><</td>";
    strInnerHTML += "        <td width=52%><b>" + this.year + "</b><b>年</b><b>" + this.month + "</b><b>月</b></td>";
    strInnerHTML += "        <td width=12% onmouseover=this.className='ds_border' onmouseout=this.className='' onclick=addMonth(this) title='增加月份'>></td>";
    strInnerHTML += "        <td width=12% onmouseover=this.className='ds_border' onmouseout=this.className='' onclick=addYear(this) title='增加年份'>>></td>";
    strInnerHTML += "      </tr>";
    strInnerHTML += "    </table>";

    strInnerHTML += "    <table cellpadding=0 cellspacing=0 width=140 height=20 onmousedown='DS_x=event.x-parentNode.style.pixelLeft;DS_y=event.y-parentNode.style.pixelTop;setCapture();' onmouseup='releaseCapture();' onmousemove='dsMove(this.parentNode)' style='cursor:move;'>";
    strInnerHTML += "      <tr align=center>";
    for (i = 0; i < 7; i++)
        strInnerHTML += "      <td>" + week[i] + "</td>";
    strInnerHTML += "      </tr>";
    strInnerHTML += "    </table>";

    strInnerHTML += "    <table cellpadding=0 cellspacing=2 width=140 bgcolor=#EEEEEE>";
    for (i = 0; i < 6; i++) {
        strInnerHTML += "    <tr align=center>";
        for (j = 0; j < 7; j++)
            strInnerHTML += "    <td width=10% height=16 onmouseover=if(this.innerText!=''&&this.className!='ds_border2')this.className='ds_border' onmouseout=if(this.className!='ds_border2')this.className='' onclick=getvalue(this,document.all('txt_" + this.inputName + "'))></td>";
        strInnerHTML += "    </tr>";
    }
    strInnerHTML += "    </table>";

    strInnerHTML += "    <span style=cursor:hand onclick=this.parentNode.parentNode.style.display='none'>【关闭】</span>";
    strInnerHTML += "  </div>";
    strInnerHTML += "</div>";
    if (parentId != null && parent != "") {
        document.getElementById(parentId).innerHTML = strInnerHTML;
    }
    else {
        document.write(strInnerHTML);
    }
    dateShow(document.all("txt_" + this.inputName).nextSibling.nextSibling.childNodes[0].childNodes[2], this.year, this.month)
}

function subYear(obj)  //减小年份
{
    var myObj = obj.parentNode.parentNode.parentNode.cells[2].childNodes;
    myObj[0].innerHTML = eval(myObj[0].innerHTML) - 1;
    dateShow(obj.parentNode.parentNode.parentNode.nextSibling.nextSibling, eval(myObj[0].innerHTML), eval(myObj[2].innerHTML))
}

function addYear(obj)  //增加年份
{
    var myObj = obj.parentNode.parentNode.parentNode.cells[2].childNodes;
    myObj[0].innerHTML = eval(myObj[0].innerHTML) + 1;
    dateShow(obj.parentNode.parentNode.parentNode.nextSibling.nextSibling, eval(myObj[0].innerHTML), eval(myObj[2].innerHTML))
}

function subMonth(obj)  //减小月份
{
    var myObj = obj.parentNode.parentNode.parentNode.cells[2].childNodes;
    var month = eval(myObj[2].innerHTML) - 1;
    if (month == 0) {
        month = 12;
        subYear(obj);
    }
    myObj[2].innerHTML = month;
    dateShow(obj.parentNode.parentNode.parentNode.nextSibling.nextSibling, eval(myObj[0].innerHTML), eval(myObj[2].innerHTML))
}

function addMonth(obj)  //增加月份
{
    var myObj = obj.parentNode.parentNode.parentNode.cells[2].childNodes;
    var month = eval(myObj[2].innerHTML) + 1;
    if (month == 13) {
        month = 1;
        addYear(obj);
    }
    myObj[2].innerHTML = month;
    dateShow(obj.parentNode.parentNode.parentNode.nextSibling.nextSibling, eval(myObj[0].innerHTML), eval(myObj[2].innerHTML))
}

function dateShow(obj, year, month)  //显示各月份的日
{
    var myDate = new Date(year, month - 1, 1);
    var today = new Date();
    var day = myDate.getDay();
    var selectDate = obj.parentNode.parentNode.previousSibling.previousSibling.value.split('-');
    var length;
    switch (month) {
        case 1:
        case 3:
        case 5:
        case 7:
        case 8:
        case 10:
        case 12:
            length = 31;
            break;
        case 4:
        case 6:
        case 9:
        case 11:
            length = 30;
            break;
        case 2:
            if ((year % 4 == 0) && (year % 100 != 0) || (year % 400 == 0))
                length = 29;
            else
                length = 28;
    }
    for (i = 0; i < obj.cells.length; i++) {
        obj.cells[i].innerHTML = '';
        obj.cells[i].style.color = '';
        obj.cells[i].className = '';
    }
    for (i = 0; i < length; i++) {
        obj.cells[i + day].innerHTML = (i + 1);
        if (year == today.getFullYear() && (month - 1) == today.getMonth() && (i + 1) == today.getDate())
            obj.cells[i + day].style.color = 'red';
        if (year == eval(selectDate[0]) && month == eval(selectDate[1]) && (i + 1) == eval(selectDate[2]))
            obj.cells[i + day].className = 'ds_border2';
    }
}

function getvalue(obj, inputObj)  //把选择的日期传给输入框
{
    var myObj = inputObj.nextSibling.nextSibling.childNodes[0].childNodes[0].cells[2].childNodes;
    if (obj.innerHTML) {
        inputObj.value = myObj[0].innerHTML + "-" + myObj[2].innerHTML + "-" + obj.innerHTML;
        var arr = inputObj.id.split("_");
        try {
            var strFun = "setAnswerText_" + arr[1] + "(" + arr[2] + ",'" + inputObj.value + "')";
            eval(strFun);
        }
        catch (ex)
    { }
    }
    inputObj.nextSibling.nextSibling.style.display = 'none';
    for (i = 0; i < obj.parentNode.parentNode.parentNode.cells.length; i++)
        obj.parentNode.parentNode.parentNode.cells[i].className = '';
    obj.className = 'ds_border2'
}

function dsMove(obj)  //实现层的拖移
{
    if (event.button == 1) {
        var X = obj.clientLeft;
        var Y = obj.clientTop;
        obj.style.pixelLeft = X + (event.x - DS_x);
        obj.style.pixelTop = Y + (event.y - DS_y);
    }
}



function mynetSelectAllCheckBox(boxName, isChecked) {
    var chkFeedCates = document.getElementsByName(boxName);
    var len = chkFeedCates.length;
    for (var i = 0; i < len; i++) {
        chkFeedCates[i].checked = isChecked;
    }
}

function getEmailFeed(url, aspectUID, act) {
    var strEmail = document.getElementById("txtFeedEmail_" + aspectUID).value;
    if (strEmail == "") {
        alert("请输入电子邮件地址");
        return;
    }
    if (act == "add") {
        var strIds = "";
        var strFeederType = "";
        if (document.getElementById("selFeed_" + aspectUID) != null) {
            strFeederType = document.getElementById("selFeed_" + aspectUID).value;
        }
        var chkFeedCates = document.getElementsByName("chkFeedCate_" + aspectUID);
        var len = chkFeedCates.length;
        for (var i = 0; i < len; i++) {
            if (chkFeedCates[i].checked == true && chkFeedCates[i].value != "00") {
                if (strIds != "") {
                    strIds += ",";
                }
                strIds += chkFeedCates[i].value;
            }
        }
        if (strIds == "") {
            alert("请选择新闻分类");
        }
        else {
            var strQuery = "";
            strQuery = "?act=" + act + "&em=" + escape(strEmail) + "&ft=" + escape(strFeederType) + "&ids=" + strIds;
            var strUrl = url + strQuery;

            var retValue = httpRequest(strUrl);
            var objDic = document.getElementById("divAspectFeed_" + aspectUID);
            objDic.innerHTML = retValue;
        }
    }
    else {

        var strQuery = "?act=" + act + "&em=" + escape(strEmail);
        var strUrl = url + strQuery;
        var retValue = httpRequest(strUrl);
        var objDic = document.getElementById("divAspectFeed_" + aspectUID);
        objDic.innerHTML = retValue;
    }
}

// 显示更多颜色的对话框
// 如果按取消按钮，返回null
// 如果清空，则返回''
// 否则返回指定颜色。返回值和defColor都带前面的'#', 例如红色为'#ff0000'
function showColorDlg(defColorOrColorElement, hiddenField) {
    var isOldVersion = (defColorOrColorElement != null && typeof (defColorOrColorElement) == 'object');
    var defColor = isOldVersion
        ? defColorOrColorElement.style.backgroundColor // 旧版本，给出一个显示颜色的object
        : defColorOrColorElement; // 新版本，就是颜色。
    var win = ShowModalDialogInFrame("/res/ColorSelector.htm", defColor);
    win.OnOKCallBack = function(ret) {
        if (isOldVersion && ret != null) {
            defColorOrColorElement.style.backgroundColor = "";
            if (hiddenField != null)
                hiddenField.value = "";
        }
    }

    return ret;
}

var arrFloats = new Array();
function annimations() {
    var len = arrFloats.length;
    //首先全部停止，避免多次调用
    for (var i = 0; i < len; i++) {
        arrFloats[i].stopFlow();
    }
    //然后再全部开始
    for (var i = 0; i < len; i++) {
        arrFloats[i].mynetFlow();
    }
}

function getFirstParent(obj, tagName) {
    if (obj == null)
        return null;
    var objtmp = obj.parentNode;
    while (objtmp != null) {
        if (objtmp.tagName == tagName) {
            return objtmp;
        }
        else {
            objtmp = objtmp.parentNode;
        }
    }
}

//�悬浮对象
function pensileElement(id,oTarget, delay, position, showClose) {
    this.oHtml = null;
    this.oTarget = oTarget;
    this.x = Mynet_ObjectLeft(oTarget);
    this.y = Mynet_ObjectTop(oTarget);
    this.position = position;
    this.id = id;
    this.mynetFlow = function() {
        var obj = this;
        if (this.oHtml == null) {//the first time
            
            var oHtml = this.oTarget.cloneNode(true); //复制对象
             document.body.insertBefore(oHtml,document.body.childNodes[0]); //插入到BODY

            var bodyOffWidth = document.body.offsetWidth;
            var bodyOffHeight = document.body.offsetHeight;
            this.height = parseInt(oHtml.offsetHeight);
            switch (obj.position) {
                case "fromtop":
                    this.x = Mynet_ObjectLeft(this.oTarget); //计算初始位置
                    this.y = Mynet_ObjectTop(this.oTarget);
                    break;
                case "rightbottom": //屏幕的右下角
                    this.x = bodyOffWidth - oHtml.offsetWidth - 20;
                    this.y = bodyOffHeight - oHtml.offsetHeight;
                    break;
                case "righttop":
                    this.x = bodyOffWidth - oHtml.offsetWidth - 20;
                    this.y = 0;
                    break;
                case "lefttop":
                    {
                        this.x = 0;
                        this.y = 0;
                        break;
                    }
                case "leftbottom":
                    {
                        this.x = 0;
                        this.y = bodyOffHeight - oHtml.offsetHeight;
                    }
            }
            this.oTarget.parentNode.removeChild(this.oTarget);
            this.oHtml = oHtml;
            this.oHtml.refFloatElement = this;
            this.oHtml.style.left = this.x;
            this.oHtml.style.top = this.y;
            this.oHtml.style.display = "inline";
            this.startY = this.y;
        } //this.oHtml=null
        
        this.IntervalObj = setInterval(
      function() {

          var ns = (navigator.appName.indexOf("Netscape") != -1);
          var bodyHeight = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);

          var pY = parseInt(ns ? pageYOffset : getScrollTop(obj.oHtml));
          obj.y += parseInt((pY + obj.startY - obj.y) / 4);

          if (obj.y > bodyHeight - obj.height) {
              obj.y = bodyHeight - obj.height;
          }
          //obj.oHtml.offestLeft = obj.x + "px";
          obj.oHtml.style.top = obj.y + "px";

      }
      , delay
      );
        if (showClose == true) {
            this.oHtml.onmouseover = function() {
                showCloseSign(this);
            }
            this.oHtml.onmouseout = function() {
                var closeSign = document.getElementById("mynetCloseSign");
                if (closeSign != null) {
                    closeSign.style.display = "none";
                }
            }
        } //show close if

    } //mynetFlow

    this.stopFlow = function() {
        clearInterval(this.IntervalObj);
    }
}

//让某个对象由小变大
function smallToLargeElement(id,oTarget, delay, speed, showClose) {
    this.oHtml = oTarget;
    this.oHtml.refFloatElement = this;
    this.width = parseInt(this.oHtml.width);
    this.height = parseInt(this.oHtml.height);
    this.id = id;
    this.mynetFlow = function() {
        var obj = this;
        var x = 0;
        var y = 0;
        this.IntervalObj = setInterval(
        function() {
            x += speed;
            y += speed;
            if (x < obj.width) {
                obj.oHtml.style.width = x + "px";
            }
            if (y < obj.height) {
                obj.oHtml.style.height = y + "px";
            }

            if (y > obj.height && x > obj.width) {
                obj.stopFlow();
            }
        }
        ,
        delay
      )
    }

    this.stopFlow = function() {
        clearInterval(this.IntervalObj);
    }
    if (showClose == true) {
        this.oHtml.onmouseover = function() {
            showCloseSign(this);
        }
        this.oHtml.onmouseout = function() {
            var closeSign = document.getElementById("mynetCloseSign");
            if (closeSign != null) {
                closeSign.style.display = "none";
            }
        }
    }

}

function showCloseSign(obj) {
    var closeSign = document.getElementById("mynetCloseSign");
    if (closeSign == null) {
        closeSign = document.createElement("div");
        closeSign.style.backgroundColor = 'silver';
        closeSign.style.display = "none";
        closeSign.id = "mynetCloseSign";
        closeSign.innerHTML = "<span style='cursor:hand;'><nobr>关闭</nobr></span>";
        closeSign.style.position = "absolute";
        document.body.appendChild(closeSign);
    }
    closeSign.onmouseover = function() {
        closeSign.style.display = "inline";
        obj.refFloatElement.stopFlow();
    }
    closeSign.onmouseout = function() {
    closeSign.style.display = "none";
    obj.refFloatElement.mynetFlow();
     }
    var x = parseInt(obj.style.left) + parseInt(obj.style.width) - 22;
    var y = parseInt(obj.style.top) + parseInt(obj.style.height) - 18;
   
    if (x > 0) {
        closeSign.style.left = x + "px";
    }
    if (y > 0) {
        closeSign.style.top = y + "px";
    }
    closeSign.style.zIndex = 15;
    closeSign.style.display = "inline";
    
    var tmpObj = obj;
    closeSign.onclick = function() {
        tmpObj.style.display = "none";
        closeSign.style.display = "none";
    }
}

function pushMyentFlowElement(flowElement) {
    var len = arrFloats.length;
    var exist = false;
    for (var i = 0; i < len; i++) {
        if (arrFloats[i].id == flowElement.id) {
            arrFloats[i] = flowElement;
            exist = true;
            break;
        }
    }

    if (exist == false) {
        arrFloats.push(flowElement);
    }
}

//漂浮对象
function floatElement(id,oTarget, delay, speed, flagX, flagY, showClose) {
    this.oHtml = oTarget;
    this.id = id;
    this.oHtml.refFloatElement = this;
    this.delay = delay;
    this.flagX = flagX;
    this.flagY = flagY;
    this.speed = speed;
    this.IntervalObj = null;


    this.mynetFlow = function() {
        var obj = this;
        var pos1 = getElementPos(obj.oHtml);
        var iStartLeft = parseInt(obj.oHtml.style.left) - pos1.x;
        var iStartTop = parseInt(obj.oHtml.style.top) - pos1.y;
        var bWidth = Math.max(document.documentElement.clientWidth, document.body.clientWidth)-10;
        var bHeight = Math.max(document.documentElement.clientHeight, document.body.clientHeight);

        var iWidth = obj.oHtml.offsetWidth;
        var iHeight = obj.oHtml.offsetHeight;

        //由于控件莫明其秒的变大 变小，加入此行代码设置一下控件的宽度，浮动时大小便不再变化
        obj.oHtml.style.width = iWidth + "px";
        
        this.IntervalObj = setInterval(function() {
            var iLeft = parseInt(obj.oHtml.style.left);
            var iTop = parseInt(obj.oHtml.style.top);

            //下面一段控制横向移
            if (iLeft - iStartLeft <= (bWidth - iWidth) && obj.flagX == 0) {
                obj.oHtml.style.left = (iLeft + obj.speed) + "px";

            }
            else if (iLeft - iStartLeft > (bWidth - iWidth) && obj.flagX == 0) {
                obj.flagX = 1;
            }
            else if (iLeft >= iStartLeft && obj.flagX == 1) {
                obj.oHtml.style.left = (iLeft - obj.speed) + "px";
            }
            else if (iStartLeft > iLeft && obj.flagX == 1) {
                obj.flagX = 0;
            }

            //�下面一段控制纵向移?
            if (iTop - iStartTop <= (bHeight - iHeight) && obj.flagY == 0) {
                obj.oHtml.style.top = (iTop + obj.speed) + "px";
            }
            else if (iTop - iStartTop > (bHeight - iHeight) && obj.flagY == 0) {
                obj.flagY = 1;
            }
            else if (iTop >= iStartTop && obj.flagY == 1) {
                obj.oHtml.style.top = (iTop - obj.speed) + "px";
            }
            else if (iStartTop > iTop && obj.flagY == 1) {
                obj.flagY = 0;
            }
        }, delay);
    }

    this.stopFlow = function() {
        clearInterval(this.IntervalObj)
    }
    this.oHtml.onmouseover = function() {
        this.refFloatElement.stopFlow();
        if (showClose == true)
            showCloseSign(this);
    }
    this.oHtml.onmouseout = function() {
        this.refFloatElement.mynetFlow();
        if (showClose == true) {
            var closeSign = document.getElementById("mynetCloseSign");
            if (closeSign != null) {
                closeSign.style.display = "none";
            }
        }
    }

}

function filenameWithoutExtension(path) {
    var index = path.lastIndexOf("/");
    if (index < 0) {
        index = path.lastIndexOf("\\");
    }
    var filename = path.substr(index + 1);
    index = filename.lastIndexOf(".");
    if (index < 0) {
        return filename;
    }
    else {
        return filename.substr(0, index);
    }
}

//function for aspect turn page

function GetPageAspectContent(aspUID, docUID, curPage, parameter) {
    parameter=''+parameter;
    var frmId = aspUID.replace(/-/g, '_');
    var strUrl =  "/Aspect/GetAspectPageContent.aspx";
    strUrl += '?auid=' + aspUID + '&docuid=' + docUID + '&curPid=' + curPage;
    var divContent = document.getElementsByName('divContent_' + aspUID);
    //没有设置滚动时dicContent.length==0;此时FireFox下是得不到的
    if (divContent.length == 0) {
        divContent = document.getElementById('divContent_' + aspUID);
    }
    if (divContent != null) {
        divContent.innerHTML = "<img src='/res/loading.gif\' border='0' />正在读取数据...";
    }
    if (parameter.indexOf('=') > 0 && parameter.indexOf('p=') == -1) {
        strUrl += '&' + parameter;
    }
    else if (parameter != '') {
        strUrl += '&p=' + parameter;
    }
    
    //before 2008-6-26, using iframe to implement turn page.
    //now,using XmlHttpRequest to turn page
    var mynetPoster = new mynet_FormDataPoster(strUrl);
    var postedData = document.getElementById("mynet_CSubjectParameter_" + frmId);
    if (postedData != null) {
        mynetPoster.AddFormKeyValue("mynet_CSubjectParameter", postedData.value);
    }
    var retData = mynetPoster.Post();
    setTimeout(function showdata() { mynet_dealTurnPageData(retData, divContent) }, 10);
}

function AspectPageInfoToLeft(aspUID) {
    var objSpan = document.getElementById('span_' + aspUID);

    if (objSpan != null) {
        objSpan.scrollLeft -= parseInt(objSpan.style.width);

    }
}
function AspectPageInfoToRight(aspUID) {
    var objSpan = document.getElementById('span_' + aspUID);
    if (objSpan != null) {
        objSpan.scrollLeft += parseInt(objSpan.style.width);

    }
}
function SetNextPreSign(aspUID) {
    var objSpanNP = document.getElementById('spanNP_' + aspUID);
    {
        if (objSpanNP != null) {
            var objSpan = document.getElementById('span_' + aspUID);
            if (objSpan != null) {
                if (parseInt(objSpan.offsetWidth) < parseInt(objSpan.scrollWidth)) {
                    objSpanNP.innerHTML = '<a href=""javascript:AspectPageInfoToLeft(\'' + aspUID + '\');""><</a> ';
                    objSpanNP.innerHTML += '<a href=""javascript:AspectPageInfoToRight(\'' + aspUID + '\');"">></a>';
                }
            }
        }
    }
}

function mynet_FormDataPoster(postUrl) {
    var formDatas = new Array;
    var formKeys = new Array;
    //构造Form对象
    this.AddFormKeyValue = function(key, value) {
        formDatas[key] = value;
        formKeys.push(key);
    }

    this.GetFormDatas = function() {
        return formDatas;
    }

    this.builderDatas = function() {
        var len = formKeys.length;
        var postStr = "";
        for (var i = 0; i < len; i++) {
            if (postStr != "") {
                postStr += "&";
            }
            postStr += escape(formKeys[i]) + "=" + escape(formDatas[formKeys[i]]);
        }
        return postStr;
    }

    this.Post = function() {
        var url = postUrl;
        var objHttpRequest = null;
        try {
            objHttpRequest = new ActiveXObject('Msxml2.XMLHTTP');
        }
        catch (e) {
            try {
                objHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
            }
            catch (E) {
                objHttpRequest = new XMLHttpRequest();
            }
        }

        objHttpRequest.open("POST", url, false);
        objHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        objHttpRequest.setRequestHeader("char-set", "utf-8");
        objHttpRequest.send(this.builderDatas());
        var retvalue = objHttpRequest.responseText;
        return retvalue;
    }

}

//联动数据客户端发送器
function mynet_SubjectDataPoster(siteUrl, aspectUID, docUID, mergedDocId, isPublishMode, eventName) {
    this.SiteUrl = siteUrl;
    this.AspectUID = aspectUID;
    this.DocUID = docUID;
    this.IsPublishMode = isPublishMode;
    this.EventName = eventName;
    this.MergedDocId = mergedDocId;

    var formDatas = new Array;
    var formKeys = new Array;
    //构造Form对象
    this.AddFormKeyValue = function(key, value) {
        formDatas[key] = value;
        formKeys.push(key);
    }

    this.GetFormDatas = function() {
        return formDatas;
    }

    this.builderDatas = function() {
        var len = formKeys.length;
        var postStr = "";
        for (var i = 0; i < len; i++) {
            if (postStr != "") {
                postStr += "&";
            }
            postStr += escape(formKeys[i]) + "=" + escape(formDatas[formKeys[i]]);
        }
        return postStr;
    }

    this.Post = function() {
    var url = this.SiteUrl + "/aspect/aspectCascading.aspx?aspectuid=" + aspectUID + "&docuid=" + docUID + "&mdocuid=" + mergedDocId + "&ev=" + eventName + "&m=" + isPublishMode;
        var objHttpRequest = null;
        try {
            objHttpRequest = new ActiveXObject('Msxml2.XMLHTTP');
        }
        catch (e) {
            try {
                objHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
            }
            catch (E) {
                objHttpRequest = new XMLHttpRequest();
            }
        }

        objHttpRequest.open("POST", url, false);
        objHttpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
        objHttpRequest.setRequestHeader("char-set", "utf-8");
        objHttpRequest.send(this.builderDatas());
        var retvalue = objHttpRequest.responseText;
        mynet_dealCascadingData(retvalue);
    }
}

function mynet_dealTurnPageData(xmlDocString, divContent) {
    var docDom = new mynet_XmlDom();
    docDom.loadXML(xmlDocString);
    
    var nodeList = docDom.documentElement.childNodes;
    var len = nodeList.length;
    var isIE = mynet_GetNavigator() == "MSIE";
    for (var i = 0; i < len; i++) {
        var aspectUID = nodeList[i].getAttribute("uid");
        var strHtml = isIE ? nodeList[i].text : nodeList[i].textContent;
        if (strHtml != "") {
            
            if (divContent.tagName)//得到单一DIV
            {
                mynet_SetInnerHTML(divContent, strHtml); 
            }
            else {//when scroll cloned serval content doms
                var len = divContent.length;//多个滚动对象
                for (var i = 0; i < len; i++) {
                    mynet_SetInnerHTML(divContent[i], strHtml);
                }
            }
        }
    }
    mynetResizeTheme();
}

//处理从服务器端返回 
function mynet_dealCascadingData(xmlDocString) {
    var docDom = new mynet_XmlDom();
   // alert(xmlDocString);
    docDom.loadXML(xmlDocString);
    var nodeList = docDom.documentElement.childNodes;
    var len = nodeList.length;
    var isIE = mynet_GetNavigator() == "MSIE";
    for (var i = 0; i < len; i++) {
        var aspectUID = nodeList[i].getAttribute("uid");

        var conetentElement = mynet_GetAspectContentElement(aspectUID)
        if (conetentElement == null)
        {continue;}
        
        var contentElementParentNode =conetentElement.parentNode;
        var strInnerHTTML = isIE ? nodeList[i].text : nodeList[i].textContent;
        mynet_SetInnerHTML(conetentElement, strInnerHTTML);
    }
    mynetResizeTheme();
}

function mynet_GetAspectContentElement(aspectUID) {
    var contentElement = document.getElementById("divCascading_" + aspectUID);
    return contentElement;
}

function mynet_SetInnerHTML(el, htmlCode) {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf('msie') >= 0 && ua.indexOf('opera') < 0) {
        htmlCode = '<div style="display:none">for IE</div>' + htmlCode;
        htmlCode = htmlCode.replace(/<script([^>]*)>/gi,
                                 '<script$1 defer>');
        el.innerHTML = '';
        el.innerHTML = htmlCode;
        el.removeChild(el.firstChild);
    }
    else {
        var el_next = el.nextSibling;
        var el_parent = el.parentNode;
        el_parent.removeChild(el);
        el.innerHTML = htmlCode;
        if (el_next) {
            el_parent.insertBefore(el, el_next)
        }
        else {
            el_parent.appendChild(el);
        }
    }
}


//XMLDOM 相关开始=====================
//浏览器兼容的XmlDom模型
function mynet_XmlDom() {
    //通过对象/属性检测法，判断是IE来是Mozilla
    if (window.ActiveXObject) {
        var arrSignatures = ["MSXML2.DOMDocument.4.0",
                               "MSXML2.DOMDocument.3.0", "MSXML2.DOMDocument",
                               "Microsoft.XmlDom"];
        for (var i = 0; i < arrSignatures.length; i++) {
            try {
                oXmlDom = new ActiveXObject(arrSignatures[i]);
                oXmlDom.setProperty("SelectionLanguage", "XPath");
                return oXmlDom;
            }
            catch (oError) {

            }
        }
        throw new Error("MSXML is not installed on your system.");
    }
    else if (document.implementation && document.implementation.createDocument) {

        var oXmlDom = document.implementation.createDocument("", "", null);
        //创建Mozilla版本的parseError对象
        oXmlDom.parseError =
          {
              valueOf: function() { return this.errorCode; },
              toString: function() { return this.errorCode.toString() }
          };

        //初始化parseError对象
        oXmlDom.__initError__();
        oXmlDom.addEventListener("load", function() {
            this.__checkForErrors__();
            this.__changeReadyState__(4);
        }, false);
        return oXmlDom;

    }
    else {
        throw new Error("Your browser doesn't support an XML DOM object.");
    }
}

function mynet_GetNavigator() {
    var OsObject = "";
    if (navigator.userAgent.indexOf("MSIE") > 0) {
        return "MSIE";
    }
    if (navigator.userAgent.indexOf("Firefox") > 0) {
        return "Firefox";
    }
    if (navigator.userAgent.indexOf("Safari") > 0) {
        return "Safari";
    }
    if (navigator.userAgent.indexOf("Camino") > 0) {
        return "Camino";
    }
    if (navigator.userAgent.indexOf("Gecko") > 0) {
        return "Gecko";
    }

}

function  mynet_GetIeVersion()
{
    var reg = new RegExp("MSIE ([^;]*);", "i");
    if (reg.test(navigator.appVersion)) return parseInt(RegExp.$1);
    return 0;
}
if (navigator.userAgent.indexOf("Firefox") > 0) {
    Document.prototype.readyState = 0;
    Document.prototype.onreadystatechange = null;
    Document.prototype.__changeReadyState__ = function(iReadyState) {
        this.readyState = iReadyState;
        if (typeof this.onreadystatechange == "function") {
            this.onreadystatechange();
        }
    };
    //初始化parseError对象
    Document.prototype.__initError__ = function() {
        this.parseError.errorCode = 0;
        this.parseError.filepos = -1;
        this.parseError.line = -1;
        this.parseError.linepos = -1;
        this.parseError.reason = null;
        this.parseError.srcText = null;
        this.parseError.url = null;
    };

    Document.prototype.__checkForErrors__ = function() {
        if (this.documentElement.tagName == "parsererror") {
            var reError = "/>([\s\S]*?)Location:([\s\S]*?)Line Number (\d+),Column (\d+):<sourcetext>([\s\S]*?)(?:\-*\^)/";
            var regular = new RegExp(reError);
            regular.test(this.xml);
            this.parseError.errorCode = -999999;
            this.parseError.reason = RegExp.$1;
            this.parseError.url = RegExp.$2;
            this.parseError.line = parseInt(RegExp.$3);
            this.parseError.linepos = parseInt(RegExp.$4);
            this.parseError.srcText = RegExp.$5;
        };
    };

    //定义Mozilla的loadXML方法   
    Document.prototype.loadXML = function(sXml) {
        this.__initError__();
        this.__changeReadyState__(1);
        var oParser = new DOMParser();
        var oXmlDom = oParser.parseFromString(sXml, "text/xml");
        while (this.firstChild) {
            this.removeChild(this.firstChild);
        }
        for (var i = 0; i < oXmlDom.childNodes.length; i++) {
            var oNewNode = this.importNode(oXmlDom.childNodes[i], true);
            this.appendChild(oNewNode);
        }
        //载入后检查错误
        this.__checkForErrors__();
        //没有问题，设置readyState属性为4
        this.__changeReadyState__(4);

    };
    Document.prototype.__load__ = Document.prototype.load;
    Document.prototype.load = function(sURL) {
        this.__initError__();
        this.__changeReadyState__(1);
        this.__load__(sURL);
    };
    Node.prototype.__defineGetter__("xml", function() {
        var oSerializer = new XMLSerializer();
        return oSerializer.serializeToString(this, "text/xml");
    });
}
//XMLDOM 相关结束==========
// window.attachEvent("onload",correctPNG); 
//end funtion for aspect turn page

//add a remote javascript file dynamicly
function mynet_LoadRemoteJs(id, url) {
    var script = document.getElementById(id);
    var head = document.getElementsByTagName('head').item(0);
    if (script == null) {
        script = document.createElement('script');
        script.src = url;
        script.type = 'text/javascript';
        script.id = id;
        head.appendChild(script);
    }
    return script;
}

//页面载入时调用
function mynet_pageonload(pagename)
{
	var mynet_productdocpageCount=eval('pageCount_'+pagename);
	var mynet_productdocpageCurrent=eval('pageCurrent_'+pagename);

    //mynet_productdocpageCount=document.getElementById("pagenation_"+pagename).innerHTML;
    mynet_productdocpageCurrent=1;
    var r=/^\+?[1-9][0-9]*$/;
    if(!r.test(mynet_productdocpageCurrent)||parseInt(mynet_productdocpageCurrent)>parseInt(mynet_productdocpageCount))
    {
        mynet_productdocpageCurrent = 1;
    }
    if (mynet_productdocpageCount > 0) 
    {
        document.getElementById('page_'+pagename+'1').style.display='none';
        document.getElementById('page_'+pagename+mynet_productdocpageCurrent).style.display='block';
        
        mynet_pageSet(pagename);
        document.getElementById('pagenation_'+pagename).style.display='block';
    }
}
function mynet_pageSet(pagename) {
    
	var mynet_productdocpageCount=eval('pageCount_'+pagename);
	var mynet_productdocpageCurrent=eval('pageCurrent_'+pagename);

    var pagehtml="";
    var pagesize = 10;
    
    pagehtml = mynet_pageModel1(pagesize, mynet_productdocpageCurrent, mynet_productdocpageCount, pagename);
    
    document.getElementById("pagenation_"+pagename).innerHTML=pagehtml;
}
function mynet_pageModel1(pagesize,crrentPage,pageCount,pagename)
{
	var mynet_productdocpageCount=eval('pageCount_'+pagename);
	var mynet_productdocpageCurrent=eval('pageCurrent_'+pagename);
    var pagenavigation="";
    var i=0;
    if(crrentPage>1)
        pagenavigation+='<a href=\'javascript:void(0);\' onclick=\'javascript:mynet_pagenation('+'pageCurrent_'+pagename+'-1,"'+pagename+'")\'><<</a>';
    for(i=1;i<=pageCount;i++)
    {
        if(i==crrentPage)
        {
            pagenavigation+="<span class='current'>"+i+"</span>";
        }
        else
        {
            pagenavigation+='<a href=\'javascript:void(0);\' onclick=\'javascript:mynet_pagenation('+i+',"'+pagename+'")\'>'+i+'</a>';
        }
    }
    if(parseInt(crrentPage)<parseInt(pageCount))
        pagenavigation+='<a href=\'javascript:void(0);\' onclick=\'javascript:mynet_pagenation('+'pageCurrent_'+pagename+'+1,"'+pagename+'")\'>>></a>';
    return pagenavigation;
}
function mynet_pageModel2(pagesize,crrentPage,pageCount,pagename)
{
	var mynet_productdocpageCount=eval('pageCount_'+pagename);
	var mynet_productdocpageCurrent=eval('pageCurrent_'+pagename);

    var pagenavigation="";
    var i=0;
    var tmp=Div(pagesize,2);
    var startpage;
    var endpage;
    startpage=crrentPage-tmp;
    if(startpage<1)
    {
        startpage=1;
    }
    endpage=startpage+pagesize-1;
    if(endpage>pageCount)
    {
        endpage=pageCount;
        tmp=endpage-startpage+1;
        if(tmp<pagesize)
        {
            startpage-=pagesize-tmp;
            if(startpage<1)
            {
                startpage=1;
            }
        }
    }
    
    
    if(crrentPage>1)
        pagenavigation+='<a href=\'javascript:void(0);\' onclick=\'javascript:mynet_pagenation('+'pageCurrent_'+pagename+'-1,"'+pagename+'")\'><<</a>';
    for(i=startpage;i<=endpage;i++)
    {
        if(i==crrentPage)
        {
            pagenavigation+="<span class='current'>"+i+"</span>";
        }
        else
        {
            pagenavigation+='<a href=\'javascript:void(0);\' onclick=\'javascript:mynet_pagenation('+i+',"'+pagename+'")\'>'+i+'</a>';
        }
    }
    if(parseInt(crrentPage)<parseInt(pageCount))
        pagenavigation+='<a href=\'javascript:void(0);\' onclick=\'javascript:mynet_pagenation('+'pageCurrent_'+pagename+'+1,"'+pagename+'")\'>>></a>';
    return pagenavigation;
}
function mynet_pagenation(pageid,pagename)
{

	var mynet_productdocpageCount=eval('pageCount_'+pagename);
	var mynet_productdocpageCurrent=eval('pageCurrent_'+pagename);
	if(pageid>0&&pageid<=mynet_productdocpageCount)
    {
        document.getElementById('page_'+pagename+pageid).style.display='block';
        document.getElementById('page_'+pagename+mynet_productdocpageCurrent).style.display='none';
        mynet_productdocpageCurrent=pageid;
		eval('pageCurrent_'+pagename+"="+pageid);
    }
    mynet_pageSet(pagename);
    mynetResizeTheme();
}

//获取URL中的参数
function getUrlParameter(seekParameter) {
    var url = location.href;

    // 删除url后面#之后的内容
    var index = url.indexOf('#');
    if (index >= 0) {
        url = url.substr(0, index);
    }
    
    var parameters = url.substr(url.indexOf("?") + 1);
    var parameterItems = parameters.split("&");
    var parameterName;
    var parameterVar = "";
    for (i in parameterItems) {
        parameterName = parameterItems[i].split("=")[0];
        parameterVar = parameterItems[i].split("=")[1];
        if (parameterName == seekParameter) {
            return (parameterVar);
        }
    }
    return "";
}



//整除
function Div(exp1, exp2) {
    var n1 = Math.round(exp1);
    var n2 = Math.round(exp2);
    var rslt = n1 / n2;
    if (rslt >= 0)
        rslt = Math.floor(rslt);
    else
        rslt = Math.ceil(rslt);
    return rslt;
}
//CaseCading DropDownList Begin
function commonCategoryInit(clientId, selectedValue, width, noticeMsg) {
    var data = eval('commonCategoryData_' + clientId);
    var span = document.getElementById('commonCategorySpan_' + clientId);

    var ctrl = commonCategoryCreateDropDownList(data, 1, 10000, span, 0, width, noticeMsg);

    if (selectedValue == null)
        return;

    var indexArray = commonCategoryGetIndex(data, selectedValue); // 选择所有选择框
    if (indexArray.length <= 0)
        return;

    var itemLength = data[0];
    for (var i = 0; i < indexArray.length; i++) {
        var selectedIndex = indexArray[i];
        ctrl.value = data[selectedIndex + 1];
        var listCount = data[selectedIndex];
        if (listCount > 0) {
            var listIndex = selectedIndex + itemLength;
            ctrl = commonCategoryCreateDropDownList(data, listIndex, listCount, span, 0, width, noticeMsg);
        }
    }
}

function commonCategoryOnChange(noticeMsg,obj) {
    var span =obj.parentNode;
    var clientId = span.id.substr('commonCategorySpan_'.length);
    var data = eval('commonCategoryData_' + clientId);
    var selectedValue = obj.value;
    var selectedText = obj.options[obj.selectedIndex].text;
    var indexOfParent = selectedText.indexOf("-->");
    
    // set selected value
    document.getElementById(clientId + "_hfSelectedValue").value = selectedValue;

    if (selectedValue == '')
        return;
    var dataIndexArray = commonCategoryGetIndex(data, selectedValue);
    var dataIndex = dataIndexArray[dataIndexArray.length - 1];


    var debugCount = 1000;
    while (span.childNodes.length > 0 && debugCount-- > 0) {
        var spanChild = span.childNodes[span.childNodes.length - 1];
        if (spanChild == obj)
            break;
        span.removeChild(spanChild); 
    }


    var childrenCount = data[dataIndex];
    if (childrenCount <= 0)
        return;


    var itemLength = data[0];
    var childSelect = commonCategoryCreateDropDownList(data, dataIndex + itemLength, childrenCount, span, 0, parseInt(obj.style.width), noticeMsg);
}

function commonCategoryGetIndex(data, categoryId) {
    var itemLength = data[0];
    var returnIndexArray = new Array;
    for (var index = 1; index < data.length; ) {
        var ret = commonCategoryGetIndex2(data, index, categoryId, returnIndexArray);
        if (ret == -1)
            break;
        index += ret * itemLength;
    }
    return returnIndexArray;
}

function commonCategoryGetIndex2(data, index, categoryId, returnIndexArray) {
    returnIndexArray[returnIndexArray.length] = index; // add my index
    if (data[index + 1] == categoryId) // found
    {
        return -1;
    }

    // search children
    var itemLength = data[0];
    var count = data[index];
    var total = 1; // 包括子目录本身
    index += itemLength;
    while (count-- > 0) {
        var ret = commonCategoryGetIndex2(data, index, categoryId, returnIndexArray);
        if (ret == -1) // found at children
            return -1;
        total += ret;
        index += ret * itemLength;
    }

    // Not Found
    returnIndexArray.length--;
    return total;
}

// 返回指定目录下所有层次子目录数量，包括自身目录．
function commonCategoryGetTotalChildren(data, index) {
    var itemLength = data[0];
    var count = data[index];
    var total = 1; // 包括子目录本身
    index += itemLength;
    while (count-- > 0) {
        var ret = commonCategoryGetTotalChildren(data, index);
        total += ret;
        index += ret * itemLength;
    }
    return total;
}

function commonCategoryCreateDropDownList(data, index, count, span, selectedIndex, width, noticeMsg) {
    if (selectedIndex == null)
        selectedIndex = -1;
    var select = document.createElement('SELECT');
    if (width != "0" && !isNaN(width))
        select.style.width = width + "px";
    if (span.childNodes.length > 0) {
        span.insertBefore(select,null);
    }
    else {
        span.appendChild(select);
    }


    select.onchange = function() { commonCategoryOnChange(noticeMsg,select) };

    var option = document.createElement('OPTION');
    option.value = '';
    if (noticeMsg == null || noticeMsg == '') {
        noticeMsg = "--请选择--";
    }
    option.text = noticeMsg;
    if (mynet_GetNavigator() != 'MSIE') {
        select.appendChild(option);
    }
    else {
        select.options.add(option);
    }

    var itemLength = data[0];
    while (index < data.length && count > 0) {
        option = document.createElement('OPTION');
        option.value = data[index + 1];
        option.text = data[index + 2];
        option.selected = (selectedIndex == index);
        if (data[index] > 0) // 有子栏目
            option.text += " ->";
        if (mynet_GetNavigator() != 'MSIE') {
            select.appendChild(option);
        }
        else {
            select.options.add(option);
        }

        index += itemLength * (commonCategoryGetTotalChildren(data, index));
        count--;
    }

    return select;
}

//End CaseCading DropDownList

function mynet_TabOnClick(obj, aspectUID) {
    var tabHeaderDiv = document.getElementById("tabHeaders_" + aspectUID);
    var tabHeaders = tabHeaderDiv.getElementsByTagName("a");
    var tabHeaderLen = tabHeaders.length;
    var tabIndex = 0;
    for (var i = 0; i < tabHeaderLen; i++) {
        if (tabHeaders[i] == obj) {
            tabHeaders[i].className = "selected";
            tabIndex = i;
        }
        else {
            tabHeaders[i].className = "";
        }
    }

    var parentSpan = document.getElementById("tabParent_" + aspectUID);
    var tabs = parentSpan.childNodes;
    var len = tabs.length;
    for (var i = 0; i < len; i++) {
        if (i != tabIndex) {
            tabs[i].style.display = "none";
        }
        else {
            tabs[i].style.display = "inline";

        }
    }
}
//刷新验证码
//改为使用SETTIMEOUT 是为了避免IE6的弱智BUG
function refreshValidateCode(codeid) {
    var imgValidate = document.getElementById(codeid);
    if (codeid != null) {
        //imgValidate.src="http://qc2008.alpha.mynet.cn/web/VCodeImg.aspx?id="+1

        setTimeout('document.getElementById("' + codeid + '").src="/web/VCodeImg.aspx?isCreate=true&dt="+new Date()', 10);
    }
}
//加入收藏夹
function addMynetFavorite(keystring, type, title, usermark, userloged) {
    if (userloged) {
        var strUrl = "/plugin/mynetsite/AddFavorite.aspx?keystring=" + keystring + "&usermark=" + usermark + "&type=" + type + "&title=" + escape(title);
        var win = ShowModalDialogInFrame(strUrl);
        win.OnOKCallBack = function(ret)
        {
            if (ret == "true") {
                mynet_Alert("恭喜您，成功加入收藏!","你可以在控件中心的收藏夹，找到此控件");
            }
            else if (ret == "false") {
                mynet_Alert("加入收藏失败！", "可能是您之前已经加入过该收藏");
            }
        }
    }
    else {
        window.location.href = '/web/login.aspx?returnurl=' + escape(window.location.href);
    }
}

function removeMynetFavorite(keystring) {
   var win = mynet_Confirm("移出收藏","您是否确定要移出该收藏？","收藏移出后，在控件中心收藏夹将不再显示此控件");
   win.OnOK = function() {
       win.Close();
       var strUrl = "/plugin/mynetsite/removeFavorite.aspx?keystring=" + keystring;
       var ret = httpRequest(strUrl);
       if (ret == "true") {
           var win2 = mynet_Alert("恭喜您，该收藏已经成功移出！", "控件中心收藏夹将不再显示此控件");
           win2.OnOK = function() {
               win2.Close();
               window.location.href = window.location.href;
           }
       }
       else {
           mynet_Alert("移出收藏失败。", "可能是您没有登录或者该收藏之前已经被移出了");
       }
   }

}

//修正png图片在ie6下有灰背景的问题
function fixPNG(myImage) {
    var arVersion = navigator.appVersion.split("MSIE");
    var version = parseFloat(arVersion[1]);
    
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) {
        var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
        var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
        var imgTitle = (myImage.title) ?
		             "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
        var imgStyle = "display:inline-block;" + myImage.style.cssText
        var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width
                  + "px; height:" + myImage.height
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
        myImage.outerHTML = strNewHTML;

    }
}

//消除超过32个style的IEbug
$(function Mynet_FixIEStyleBug() {
    //只有IE 且 style长度大于32才执行
    if ($.browser.msie && $("style").length > 32) {
        var newStyle = "";
        //遍历style并且把所有style放到newstyle字串中
        $("style").each(function gatherStyle() {
            newStyle += $(this).html();
            //把原来的style带标签一并删除
            $(this).remove();
        }
                                     );
        //加到head里
        $("head").append("<style type='text/css'>" + newStyle + "</style>");
    }
}
);

//客户端浏览器不支持提示，如果用户的浏览器不是IE则提示
function mynet_AgentNotSupportAlert() {
    if (mynet_GetIeVersion() < 6.0) {
        mynet_Alert("系统不支持您当前使用的浏览器。", "在设计状态和管理后台，系统推荐使用<a href='http://www.microsoft.com/china/windows/internet-explorer/' target='_blank'>IE8.0</a>,IE7.0,IE6.0这三款浏览器。在其他浏览器下如腾讯TT、遨游、FireFox、Safari等，系统的某些功能可能无法正常使用。谢谢合作！", 400, 150);
        return;
    }
    try
    {
        XmlDoc();//如果无法初始化一个XMLDO就可以认为不支持ActiveX
    }
    catch(e)
    {
        mynet_Alert("您当前浏览器不支持ActiveX控件", "<div style='line-height:20px'>系统的某些功能将无法正常使用。可能是浏览器的“运行ActiveX控件和插件”选项没有打开．<br/>请参考<a href='http://121.199.64.253/_d269918402.htm' target='_blank'>如何让浏览器支持ActiveX控件和插件</a>。</div>", 400, 150);
    }
     
}
/*
This license text has to stay intact at all times:
fleXcroll Public License Version
Cross Browser Custom Scroll Bar Script by Hesido.
Public version - Free for non-commercial uses.

This script cannot be used in any commercially built
web sites, or in sites that relates to commercial
activities. This script is not for re-distribution.
For licensing options:
Contact Emrah BASKAYA @ www.hesido.com

Derivative works are only allowed for personal uses,
and they cannot be redistributed.

FleXcroll Public Key Code: 20050907122003339
MD5 hash for this license: 9ada3be4d7496200ab2665160807745d

End of license text---
*/
//fleXcroll v1.9.5
var fleXenv = {

    fleXcrollInit: function() { this.addTrggr(window, 'load', this.globalInit); },

    fleXcrollMain: function(dDv) {
        //Main code beg
        var dC = document, wD = window, nV = navigator;
        if (!dC.getElementById || !dC.createElement) return;
        if (typeof (dDv) == 'string') dDv = document.getElementById(dDv);
        if (dDv == null || nV.userAgent.indexOf('OmniWeb') != -1 || ((nV.userAgent.indexOf('AppleWebKit') != -1 || nV.userAgent.indexOf('Safari') != -1) && !(typeof (HTMLElement) != "undefined" && HTMLElement.prototype)) || nV.vendor == 'KDE' || (nV.platform.indexOf('Mac') != -1 && nV.userAgent.indexOf('MSIE') != -1)) return;
        if (dDv.scrollUpdate) { dDv.scrollUpdate(); return; };
        if (!dDv.id || dDv.id == '') { var sTid = "flex__", c = 1; while (document.getElementById(sTid + c) != null) { c++ }; dDv.id = sTid + c; }
        var targetId = dDv.id;
        dDv.fleXdata = new Object(); var sC = dDv.fleXdata;
        sC.keyAct = { _37: ['-1s', 0], _38: [0, '-1s'], _39: ['1s', 0], _40: [0, '1s'], _33: [0, '-1p'], _34: [0, '1p'], _36: [0, '-100p'], _35: [0, '+100p'] };
        sC.wheelAct = ["-2s", "2s"];
        sC.baseAct = ["-2s", "2s"];
        var cDv = createDiv('contentwrapper', true), mDv = createDiv('mcontentwrapper', true), tDv = createDiv('scrollwrapper', true), pDv = createDiv('copyholder', true);
        var iDv = createDiv('domfixdiv', true), fDv = createDiv('zoomdetectdiv', true), stdMode = false;
        pDv.sY.border = '1px solid blue'; pDv.fHide();
        dDv.style.overflow = 'hidden';
        fDv.sY.fontSize = "12px"; fDv.sY.height = "1em"; fDv.sY.width = "1em"; fDv.sY.position = "absolute"; fDv.sY.zIndex = "-999"; fDv.fHide();
        var brdHeight = dDv.offsetHeight, brdWidth = dDv.offsetWidth;
        copyStyles(dDv, pDv, '0px', ['border-left-width', 'border-right-width', 'border-top-width', 'border-bottom-width']);
        var intlHeight = dDv.offsetHeight, intlWidth = dDv.offsetWidth, brdWidthLoss = brdWidth - intlWidth, brdHeightLoss = brdHeight - intlHeight;
        var oScrollY = (dDv.scrollTop) ? dDv.scrollTop : 0, oScrollX = (dDv.scrollLeft) ? dDv.scrollLeft : 0;
        var urlBase = document.location.href, uReg = /#([^#.]*)$/;
        var focusProtectList = ['textarea', 'input', 'select'];
        sC.scroller = []; sC.forcedBar = []; sC.containerSize = sC.cntRSize = []; sC.contentSize = sC.cntSize = []; sC.edge = [false, false];
        sC.reqS = []; sC.barSpace = [0, 0]; sC.forcedHide = []; sC.forcedPos = []; sC.paddings = [];
        while (dDv.firstChild) { cDv.appendChild(dDv.firstChild) };
        cDv.appendChild(iDv); dDv.appendChild(mDv); dDv.appendChild(pDv);
        if (getStyle(dDv, 'position') != 'absolute') dDv.style.position = "relative";

        var dAlign = getStyle(dDv, 'text-align'); dDv.style.textAlign = 'left';
        mDv.sY.width = "100px"; mDv.sY.height = "100px"; mDv.sY.top = "0px"; mDv.sY.left = "0px";
        copyStyles(dDv, pDv, "0px", ['padding-left', 'padding-top', 'padding-right', 'padding-bottom']);
        var postWidth = dDv.offsetWidth, postHeight = dDv.offsetHeight, mHeight;
        mHeight = mDv.offsetHeight; mDv.sY.borderBottom = "2px solid black";
        if (mDv.offsetHeight > mHeight) stdMode = true; mDv.sY.borderBottomWidth = "0px";
        copyStyles(pDv, dDv, false, ['padding-left', 'padding-top', 'padding-right', 'padding-bottom']);
        findPos(mDv); findPos(dDv);
        sC.paddings[0] = mDv.yPos - dDv.yPos; sC.paddings[2] = mDv.xPos - dDv.xPos;
        dDv.style.paddingTop = getStyle(dDv, "padding-bottom"); dDv.style.paddingLeft = getStyle(dDv, "padding-right");
        findPos(mDv); findPos(dDv);
        sC.paddings[1] = mDv.yPos - dDv.yPos; sC.paddings[3] = mDv.xPos - dDv.xPos;
        dDv.style.paddingTop = getStyle(pDv, "padding-top"); dDv.style.paddingLeft = getStyle(pDv, "padding-left");
        var padWidthComp = sC.paddings[2] + sC.paddings[3], padHeightComp = sC.paddings[0] + sC.paddings[1];

        mDv.style.textAlign = dAlign;
        copyStyles(dDv, mDv, false, ['padding-left', 'padding-right', 'padding-top', 'padding-bottom']);
        tDv.sY.width = dDv.offsetWidth + 'px'; tDv.sY.height = dDv.offsetHeight + 'px';
        mDv.sY.width = postWidth + 'px'; mDv.sY.height = postHeight + 'px';
        tDv.sY.position = 'absolute'; tDv.sY.top = '0px'; tDv.sY.left = '0px';
        tDv.fHide();

        mDv.appendChild(cDv); dDv.appendChild(tDv); tDv.appendChild(fDv);

        cDv.sY.position = 'relative'; mDv.sY.position = 'relative';
        cDv.sY.top = "0"; cDv.sY.width = "100%"; //fix IE7
        mDv.sY.overflow = 'hidden';
        mDv.sY.left = "-" + sC.paddings[2] + "px";
        mDv.sY.top = "-" + sC.paddings[0] + "px";
        sC.zTHeight = fDv.offsetHeight;

        sC.getContentWidth = function() {
            var cChilds = cDv.childNodes, maxCWidth = compPad = 0;
            for (var i = 0; i < cChilds.length; i++) { if (cChilds[i].offsetWidth) { maxCWidth = Math.max(cChilds[i].offsetWidth, maxCWidth) } };
            sC.cntRSize[0] = ((sC.reqS[1] && !sC.forcedHide[1]) || sC.forcedBar[1]) ? dDv.offsetWidth - sC.barSpace[0] : dDv.offsetWidth;
            sC.cntSize[0] = maxCWidth + padWidthComp;
            return sC.cntSize[0];
        };
        sC.getContentHeight = function() {
            sC.cntRSize[1] = ((sC.reqS[0] && !sC.forcedHide[0]) || sC.forcedBar[0]) ? dDv.offsetHeight - sC.barSpace[1] : dDv.offsetHeight;
            sC.cntSize[1] = Math.max(cDv.offsetHeight,cDv.scrollHeight) + padHeightComp - 2;
            return sC.cntSize[1];
        };

        sC.fixIEDispBug = function() { cDv.sY.display = 'none'; cDv.sY.display = 'block'; };
        sC.setWidth = function() { mDv.sY.width = (stdMode) ? (sC.cntRSize[0] - padWidthComp - brdWidthLoss) + 'px' : sC.cntRSize[0] + 'px'; };
        sC.setHeight = function() { mDv.sY.height = (stdMode) ? (sC.cntRSize[1] - padHeightComp - brdHeightLoss) + 'px' : sC.cntRSize[1] + 'px'; };

        sC.createScrollBars = function() {
            sC.getContentWidth(); sC.getContentHeight();
            //vert
            tDv.vrt = new Array(); var vrT = tDv.vrt;
            createScrollBars(vrT, 'vscroller');
            vrT.barPadding = [parseInt(getStyle(vrT.sBr, 'padding-top')), parseInt(getStyle(vrT.sBr, 'padding-bottom'))];
            vrT.sBr.sY.padding = '0px'; vrT.sBr.curPos = 0; vrT.sBr.vertical = true;
            vrT.sBr.indx = 1; cDv.vBar = vrT.sBr;
            prepareScroll(vrT, 0); sC.barSpace[0] = vrT.sDv.offsetWidth; sC.setWidth();
            //horiz
            tDv.hrz = new Array(); var hrZ = tDv.hrz;
            createScrollBars(hrZ, 'hscroller');
            hrZ.barPadding = [parseInt(getStyle(hrZ.sBr, 'padding-left')), parseInt(getStyle(hrZ.sBr, 'padding-right'))];
            hrZ.sBr.sY.padding = '0px'; hrZ.sBr.curPos = 0; hrZ.sBr.vertical = false;
            hrZ.sBr.indx = 0; cDv.hBar = hrZ.sBr;
            if (wD.opera) hrZ.sBr.sY.position = 'relative';
            prepareScroll(hrZ, 0);
            sC.barSpace[1] = hrZ.sDv.offsetHeight; sC.setHeight();
            tDv.sY.height = dDv.offsetHeight + 'px';

            hrZ.jBox = createDiv('scrollerjogbox');
            tDv.appendChild(hrZ.jBox); hrZ.jBox.onmousedown = function() {
                hrZ.sBr.scrollBoth = true; sC.goScroll = hrZ.sBr; hrZ.sBr.clicked = true;
                hrZ.sBr.moved = false; tDv.vrt.sBr.moved = false;
                fleXenv.addTrggr(dC, 'selectstart', retFalse); fleXenv.addTrggr(dC, 'mousemove', mMoveBar); fleXenv.addTrggr(dC, 'mouseup', mMouseUp);
                return false;
            };
            if (dDv.style.overflowX == "hidden") {
                hrZ.sDv.style.height = "1px";
                hrZ.sDv.style.overflow = "hidden";
                hrZ.sDv.style.filter = "alpha(opacity=0)";
            }
        };

        sC.goScroll = null;
        sC.createScrollBars();
        cDv.removeChild(iDv);

        if (!this.addChckTrggr(dDv, 'mousewheel', mWheelProc) || !this.addChckTrggr(dDv, 'DOMMouseScroll', mWheelProc)) { dDv.onmousewheel = mWheelProc; };
        this.addChckTrggr(dDv, 'mousewheel', mWheelProc);
        this.addChckTrggr(dDv, 'DOMMouseScroll', mWheelProc);
        dDv.setAttribute('tabIndex', '0');

        this.addTrggr(dDv, 'keydown', function(e) {
            if (dDv.focusProtect) return;
            if (!e) { var e = wD.event; }; var pK = e.keyCode; sC.pkeY = pK;
            sC.mDPosFix();
            if (sC.keyAct['_' + pK] && !window.opera) { dDv.contentScroll(sC.keyAct['_' + pK][0], sC.keyAct['_' + pK][1], true); if (e.preventDefault) e.preventDefault(); return false; };
        });
        this.addTrggr(dDv, 'keypress', function(e) {//make Opera Happy
            if (dDv.focusProtect) return;
            if (!e) { var e = wD.event; }; var pK = e.keyCode;
            if (sC.keyAct['_' + pK]) { dDv.contentScroll(sC.keyAct['_' + pK][0], sC.keyAct['_' + pK][1], true); if (e.preventDefault) e.preventDefault(); return false; };
        });

        this.addTrggr(dDv, 'keyup', function() { sC.pkeY = false });

        this.addTrggr(dC, 'mouseup', intClear);
        this.addTrggr(dDv, 'mousedown', function(e) {
            if (!e) e = wD.event;
            var cTrgt = (e.target) ? e.target : (e.srcElement) ? e.srcElement : false;
            if (!cTrgt || (cTrgt.className && cTrgt.className.match(RegExp("\\bscrollgeneric\\b")))) return;
            sC.inMposX = e.clientX; sC.inMposY = e.clientY;
            pageScrolled(); findPos(dDv); intClear();
            fleXenv.addTrggr(dC, 'mousemove', tSelectMouse);
            sC.mTBox = [dDv.xPos + 10, dDv.xPos + sC.cntRSize[0] - 10, dDv.yPos + 10, dDv.yPos + sC.cntRSize[1] - 10];
        });

        function tSelectMouse(e) {
            if (!e) e = wD.event;
            var mX = e.clientX, mY = e.clientY, mdX = mX + sC.xScrld, mdY = mY + sC.yScrld;
            sC.mOnXEdge = (mdX < sC.mTBox[0] || mdX > sC.mTBox[1]) ? 1 : 0;
            sC.mOnYEdge = (mdY < sC.mTBox[2] || mdY > sC.mTBox[3]) ? 1 : 0;
            sC.xAw = mX - sC.inMposX; sC.yAw = mY - sC.inMposY;
            sC.sXdir = (sC.xAw > 40) ? 1 : (sC.xAw < -40) ? -1 : 0; sC.sYdir = (sC.yAw > 40) ? 1 : (sC.yAw < -40) ? -1 : 0;
            if ((sC.sXdir != 0 || sC.sYdir != 0) && !sC.tSelectFunc) sC.tSelectFunc = wD.setInterval(function() {
                if (sC.sXdir == 0 && sC.sYdir == 0) { wD.clearInterval(sC.tSelectFunc); sC.tSelectFunc = false; return; }; pageScrolled();
                if (sC.mOnXEdge == 1 || sC.mOnYEdge == 1) dDv.contentScroll((sC.sXdir * sC.mOnXEdge) + "s", (sC.sYdir * sC.mOnYEdge) + "s", true);
            }, 45)
        }
        function intClear() {
            fleXenv.remTrggr(dC, 'mousemove', tSelectMouse); if (sC.tSelectFunc) wD.clearInterval(sC.tSelectFunc); sC.tSelectFunc = false;
            if (sC.barClickRetard) wD.clearTimeout(sC.barClickRetard); if (sC.barClickScroll) wD.clearInterval(sC.barClickScroll);
        }
        function pageScrolled() {
            sC.xScrld = (wD.pageXOffset) ? wD.pageXOffset : (dC.documentElement && dC.documentElement.scrollLeft) ? dC.documentElement.scrollLeft : 0;
            sC.yScrld = (wD.pageYOffset) ? wD.pageYOffset : (dC.documentElement && dC.documentElement.scrollTop) ? dC.documentElement.scrollTop : 0;
        }

        dDv.scrollUpdate = function(recurse) {
            if (tDv.getSize[1]() === 0 || tDv.getSize[0]() === 0) return;
            cDv.sY.padding = '1px'; var reqH = sC.reqS[0], reqV = sC.reqS[1], vBr = tDv.vrt, hBr = tDv.hrz, vUpReq, hUpReq, cPSize = [];
            tDv.sY.width = dDv.offsetWidth - brdWidthLoss + 'px'; tDv.sY.height = dDv.offsetHeight - brdHeightLoss + 'px';
            cPSize[0] = sC.cntRSize[0]; cPSize[1] = sC.cntRSize[1];
            sC.reqS[0] = sC.getContentWidth() > sC.cntRSize[0];
            sC.reqS[1] = sC.getContentHeight() > sC.cntRSize[1];
            var stateChange = (reqH != sC.reqS[0] || reqV != sC.reqS[1] || cPSize[0] != sC.cntRSize[0] || cPSize[1] != sC.cntRSize[1]) ? true : false;
            vBr.sDv.setVisibility(sC.reqS[1]); hBr.sDv.setVisibility(sC.reqS[0]);
            vUpReq = (sC.reqS[1] || sC.forcedBar[1]); hUpReq = (sC.reqS[0] || sC.forcedBar[0]);
            sC.getContentWidth(); sC.getContentHeight(); sC.setHeight(); sC.setWidth();
            if (!sC.reqS[0] || !sC.reqS[1] || sC.forcedHide[0] || sC.forcedHide[1]) hBr.jBox.fHide();
            else hBr.jBox.fShow();
            if (vUpReq) updateScroll(vBr, (hUpReq && !sC.forcedHide[0]) ? sC.barSpace[1] : 0); else cDv.sY.top = "0";
            if (hUpReq) updateScroll(hBr, (vUpReq && !sC.forcedHide[1]) ? sC.barSpace[0] : 0); else cDv.sY.left = "0";
            if (stateChange && !recurse) dDv.scrollUpdate(true);
            cDv.sY.padding = '0px';
            sC.edge[0] = sC.edge[1] = false;
        };

        dDv.commitScroll = dDv.contentScroll = function(xPos, yPos, relative) {
            var reT = [[false, false], [false, false]], Bar;
            if ((xPos || xPos === 0) && sC.scroller[0]) { xPos = calcCScrollVal(xPos, 0); Bar = tDv.hrz.sBr; Bar.trgtScrll = (relative) ? Math.min(Math.max(Bar.mxScroll, Bar.trgtScrll - xPos), 0) : -xPos; Bar.contentScrollPos(); reT[0] = [-Bar.trgtScrll - Bar.targetSkew, -Bar.mxScroll] }
            if ((yPos || yPos === 0) && sC.scroller[1]) { yPos = calcCScrollVal(yPos, 1); Bar = tDv.vrt.sBr; Bar.trgtScrll = (relative) ? Math.min(Math.max(Bar.mxScroll, Bar.trgtScrll - yPos), 0) : -yPos; Bar.contentScrollPos(); reT[1] = [-Bar.trgtScrll - Bar.targetSkew, -Bar.mxScroll] }
            if (!relative) sC.edge[0] = sC.edge[1] = false;
            return reT;
        };

        dDv.scrollToElement = function(tEM) {
            if (tEM == null || !isddvChild(tEM)) return;
            var sPos = findRCpos(tEM);
            dDv.contentScroll(sPos[0] + sC.paddings[2], sPos[1] + sC.paddings[0], false);
            dDv.contentScroll(0, 0, true);
        };

        copyStyles(pDv, dDv, '0px', ['border-left-width', 'border-right-width', 'border-top-width', 'border-bottom-width']);

        dDv.removeChild(pDv);
        dDv.scrollTop = 0; dDv.scrollLeft = 0;
        dDv.fleXcroll = true;
        classChange(dDv, 'flexcrollactive', false);
        dDv.scrollUpdate();
        dDv.contentScroll(oScrollX, oScrollY, true);
        if (urlBase.match(uReg)) { dDv.scrollToElement(dC.getElementById(urlBase.match(uReg)[1])); }
        tDv.fShow();

        sC.sizeChangeDetect = wD.setInterval(function() {
            var n = fDv.offsetHeight; if (n != sC.zTHeight) { dDv.scrollUpdate(); sC.zTHeight = n };
        }, 2500);

        function calcCScrollVal(v, i) {
            var stR = v.toString(); v = parseFloat(stR);
            return parseInt((stR.match(/p$/)) ? v * sC.cntRSize[i] * 0.9 : (stR.match(/s$/)) ? v * sC.cntRSize[i] * 0.1 : v);
        }
        function camelConv(spL) {
            var spL = spL.split('-'), reT = spL[0], i;
            for (i = 1; parT = spL[i]; i++) { reT += parT.charAt(0).toUpperCase() + parT.substr(1); }
            return reT;
        }
        function getStyle(elem, style) {
            if (wD.getComputedStyle) return wD.getComputedStyle(elem, null).getPropertyValue(style);
            if (elem.currentStyle) return elem.currentStyle[camelConv(style)];
            return false;
        };

        function copyStyles(src, dest, replaceStr, sList) {
            var camelList = new Array();
            for (var i = 0; i < sList.length; i++) {
                camelList[i] = camelConv(sList[i]);
                dest.style[camelList[i]] = getStyle(src, sList[i], camelList[i]);
                if (replaceStr) src.style[camelList[i]] = replaceStr;
            }
        };
        function createDiv(typeName, noGenericClass) {
            var nDiv = dC.createElement('div')//,pTx=dC.createTextNode('\u00a0');
            nDiv.id = targetId + '_' + typeName;
            nDiv.className = (noGenericClass) ? typeName : typeName + ' scrollgeneric';
            nDiv.getSize = [function() { return nDiv.offsetWidth; }, function() { return nDiv.offsetHeight; } ];
            nDiv.setSize = [function(sVal) { nDiv.sY.width = sVal; }, function(sVal) { nDiv.sY.height = sVal; } ];
            nDiv.getPos = [function() { return getStyle(nDiv, "left"); }, function() { return getStyle(nDiv, "top"); } ];
            nDiv.setPos = [function(sVal) { nDiv.sY.left = sVal; }, function(sVal) { nDiv.sY.top = sVal; } ];
            nDiv.fHide = function() { nDiv.sY.visibility = "hidden" };
            nDiv.fShow = function(coPy) { nDiv.sY.visibility = (coPy) ? getStyle(coPy, 'visibility') : "visible"; };
            nDiv.sY = nDiv.style;
            //	if(!noGenericClass) nDiv.appendChild(pTx);
            return nDiv;

        };
        function createScrollBars(ary, bse) {
            ary.sDv = createDiv(bse + 'base'); ary.sFDv = createDiv(bse + 'basebeg');
            ary.sSDv = createDiv(bse + 'baseend'); ary.sBr = createDiv(bse + 'bar');
            ary.sFBr = createDiv(bse + 'barbeg'); ary.sSBr = createDiv(bse + 'barend');
            tDv.appendChild(ary.sDv); ary.sDv.appendChild(ary.sBr);
            ary.sDv.appendChild(ary.sFDv); ary.sDv.appendChild(ary.sSDv);
            ary.sBr.appendChild(ary.sFBr); ary.sBr.appendChild(ary.sSBr);
        };
        function prepareScroll(bAr, reqSpace) {
            var sDv = bAr.sDv, sBr = bAr.sBr, i = sBr.indx;
            sBr.minPos = bAr.barPadding[0];
            sBr.ofstParent = sDv;
            sBr.mDv = mDv;
            sBr.scrlTrgt = cDv;
            sBr.targetSkew = 0;
            updateScroll(bAr, reqSpace, true);

            sBr.doScrollPos = function() {
                sBr.curPos = (Math.min(Math.max(sBr.curPos, 0), sBr.maxPos));
                sBr.trgtScrll = parseInt((sBr.curPos / sBr.sRange) * sBr.mxScroll);
                sBr.targetSkew = (sBr.curPos == 0) ? 0 : (sBr.curPos == sBr.maxPos) ? 0 : sBr.targetSkew;
                sBr.setPos[i](sBr.curPos + sBr.minPos + "px");
                cDv.setPos[i](sBr.trgtScrll + sBr.targetSkew + "px");
            };

            sBr.contentScrollPos = function() {
                sBr.curPos = parseInt((sBr.trgtScrll * sBr.sRange) / sBr.mxScroll);
                sBr.targetSkew = sBr.trgtScrll - parseInt((sBr.curPos / sBr.sRange) * sBr.mxScroll);
                sBr.curPos = (Math.min(Math.max(sBr.curPos, 0), sBr.maxPos));
                sBr.setPos[i](sBr.curPos + sBr.minPos + "px");
                sBr.setPos[i](sBr.curPos + sBr.minPos + "px");
                cDv.setPos[i](sBr.trgtScrll + "px");
            };

            sC.barZ = getStyle(sBr, 'z-index');
            sBr.sY.zIndex = (sC.barZ == "auto" || sC.barZ == "0" || sC.barZ == 'normal') ? 2 : sC.barZ;
            mDv.sY.zIndex = getStyle(sBr, 'z-index');

            sBr.onmousedown = function() {
                sBr.clicked = true; sC.goScroll = sBr; sBr.scrollBoth = false; sBr.moved = false;
                fleXenv.addTrggr(dC, 'selectstart', retFalse);
                fleXenv.addTrggr(dC, 'mousemove', mMoveBar);
                fleXenv.addTrggr(dC, 'mouseup', mMouseUp);
                return false;
            };

            sBr.onmouseover = intClear;

            sDv.onmousedown = sDv.ondblclick = function(e) {
                if (!e) { var e = wD.event; }
                if (e.target && (e.target == bAr.sFBr || e.target == bAr.sSBr || e.target == bAr.sBr)) return;
                if (e.srcElement && (e.srcElement == bAr.sFBr || e.srcElement == bAr.sSBr || e.srcElement == bAr.sBr)) return;
                var relPos, mV = []; pageScrolled();
                sC.mDPosFix();
                findPos(sBr);
                relPos = (sBr.vertical) ? e.clientY + sC.yScrld - sBr.yPos : e.clientX + sC.xScrld - sBr.xPos;
                mV[sBr.indx] = (relPos < 0) ? sC.baseAct[0] : sC.baseAct[1]; mV[1 - sBr.indx] = 0;
                dDv.contentScroll(mV[0], mV[1], true);
                if (e.type != "dblclick") {
                    intClear();
                    sC.barClickRetard = wD.setTimeout(function() {
                        sC.barClickScroll = wD.setInterval(function() {
                            dDv.contentScroll(mV[0], mV[1], true);
                        }, 80)
                    }, 425);
                }
                return false;
            };
            sDv.setVisibility = function(r) {
                if (r) {
                    sDv.fShow(dDv);
                    sC.forcedHide[i] = (getStyle(sDv, "visibility") == "hidden") ? true : false;
                    if (!sC.forcedHide[i]) sBr.fShow(dDv); else sBr.fHide();
                    sC.scroller[i] = true; classChange(sDv, "", "flexinactive");
                }
                else {
                    sDv.fHide(); sBr.fHide();
                    sC.forcedBar[i] = (getStyle(sDv, "visibility") != "hidden") ? true : false;
                    sC.scroller[i] = false; sBr.curPos = 0; cDv.setPos[i]('0px');
                    classChange(sDv, "flexinactive", "");
                }
                mDv.setPos[1 - i]((sC.forcedPos[i] && (r || sC.forcedBar[i]) && !sC.forcedHide[i]) ? sC.barSpace[1 - i] - sC.paddings[i * 2] + "px" : "-" + sC.paddings[i * 2] + "px");
            };
            sDv.onmouseclick = retFalse;
        };

        function updateScroll(bAr, reqSpace, firstRun) {
            var sDv = bAr.sDv, sBr = bAr.sBr, sFDv = bAr.sFDv, sFBr = bAr.sFBr, sSDv = bAr.sSDv, sSBr = bAr.sSBr, i = sBr.indx;
            sDv.setSize[i](tDv.getSize[i]() - reqSpace + 'px'); sDv.setPos[1 - i](tDv.getSize[1 - i]() - sDv.getSize[1 - i]() + 'px');
            sC.forcedPos[i] = (parseInt(sDv.getPos[1 - i]()) === 0) ? true : false;
            bAr.padLoss = bAr.barPadding[0] + bAr.barPadding[1]; bAr.baseProp = parseInt((sDv.getSize[i]() - bAr.padLoss) * 0.75);
            sBr.aSize = Math.min(Math.max(Math.min(parseInt(sC.cntRSize[i] / sC.cntSize[i] * sDv.getSize[i]()), bAr.baseProp), 45), bAr.baseProp);
            sBr.setSize[i](sBr.aSize + 'px'); sBr.maxPos = sDv.getSize[i]() - sBr.getSize[i]() - bAr.padLoss;
            sBr.curPos = Math.min(Math.max(0, sBr.curPos), sBr.maxPos);
            sBr.setPos[i](sBr.curPos + sBr.minPos + 'px'); sBr.mxScroll = mDv.getSize[i]() - sC.cntSize[i];
            sBr.sRange = sBr.maxPos;
            sFDv.setSize[i](sDv.getSize[i]() - sSDv.getSize[i]() + 'px');
            sFBr.setSize[i](sBr.getSize[i]() - sSBr.getSize[i]() + 'px');
            sSBr.setPos[i](sBr.getSize[i]() - sSBr.getSize[i]() + 'px');
            sSDv.setPos[i](sDv.getSize[i]() - sSDv.getSize[i]() + 'px');
            if (!firstRun) sBr.doScrollPos();
            sC.fixIEDispBug();
        };

        sC.mDPosFix = function() { mDv.scrollTop = 0; mDv.scrollLeft = 0; dDv.scrollTop = 0; dDv.scrollLeft = 0; };

        this.addTrggr(wD, 'load', function() { if (dDv.fleXcroll) dDv.scrollUpdate(); });
        this.addTrggr(wD, 'resize', function() {
            if (dDv.refreshTimeout) wD.clearTimeout(dDv.refreshTimeout);
            dDv.refreshTimeout = wD.setTimeout(function() { if (dDv.fleXcroll) dDv.scrollUpdate(); }, 80);
        });

        for (var j = 0, inputName; inputName = focusProtectList[j]; j++) {
            var inputList = dDv.getElementsByTagName(inputName);
            for (var i = 0, formItem; formItem = inputList[i]; i++) {
                fleXenv.addTrggr(formItem, 'focus', function() { dDv.focusProtect = true; });
                fleXenv.addTrggr(formItem, 'blur', onblur = function() { dDv.focusProtect = false; });
            }
        };

        function retFalse() { return false; };
        function mMoveBar(e) {
            if (!e) { var e = wD.event; };
            var FCBar = sC.goScroll, movBr, maxx, xScroll, yScroll;
            if (FCBar == null) return;
            if (!fleXenv.w3events && !e.button) mMouseUp();
            maxx = (FCBar.scrollBoth) ? 2 : 1;
            for (var i = 0; i < maxx; i++) {
                movBr = (i == 1) ? FCBar.scrlTrgt.vBar : FCBar;
                if (FCBar.clicked) {
                    if (!movBr.moved) {
                        sC.mDPosFix();
                        findPos(movBr); findPos(movBr.ofstParent); movBr.pointerOffsetY = e.clientY - movBr.yPos;
                        movBr.pointerOffsetX = e.clientX - movBr.xPos; movBr.inCurPos = movBr.curPos; movBr.moved = true;
                    };
                    movBr.curPos = (movBr.vertical) ? e.clientY - movBr.pointerOffsetY - movBr.ofstParent.yPos - movBr.minPos : e.clientX - movBr.pointerOffsetX - movBr.ofstParent.xPos - movBr.minPos;
                    if (FCBar.scrollBoth) movBr.curPos = movBr.curPos + (movBr.curPos - movBr.inCurPos);
                    movBr.doScrollPos();
                } else movBr.moved = false;
            };
        };

        function mMouseUp() {
            if (sC.goScroll != null) { sC.goScroll.clicked = false; }
            sC.goScroll = null;
            fleXenv.remTrggr(dC, 'selectstart', retFalse);
            fleXenv.remTrggr(dC, 'mousemove', mMoveBar);
            fleXenv.remTrggr(dC, 'mouseup', mMouseUp);
        };

        function mWheelProc(e) {
            if (!e) e = wD.event;
            if (!this.fleXcroll) return;
            var scrDv = this, vEdge, hEdge, hoverH = false, delta = 0, iNDx;
            sC.mDPosFix();
            hElem = (e.target) ? e.target : (e.srcElement) ? e.srcElement : this;
            if (hElem.id && hElem.id.match(/_hscroller/)) hoverH = true;
            if (e.wheelDelta) delta = -e.wheelDelta; if (e.detail) delta = e.detail;
            delta = (delta < 0) ? -1 : +1; iNDx = (delta < 0) ? 0 : 1; sC.edge[1 - iNDx] = false;
            if ((sC.edge[iNDx] && !hoverH) || (!sC.scroller[0] && !sC.scroller[1])) return;
            if (sC.scroller[1] && !hoverH) scrollState = dDv.contentScroll(false, sC.wheelAct[iNDx], true);
            vEdge = !sC.scroller[1] || hoverH || (sC.scroller[1] && ((scrollState[1][0] == scrollState[1][1] && delta > 0) || (scrollState[1][0] == 0 && delta < 0)));
            if (sC.scroller[0] && (!sC.scroller[1] || hoverH)) scrollState = dDv.contentScroll(sC.wheelAct[iNDx], false, true);
            hEdge = !sC.scroller[0] || (sC.scroller[0] && sC.scroller[1] && vEdge && !hoverH) || (sC.scroller[0] && ((scrollState[0][0] == scrollState[0][1] && delta > 0) || (scrollState[0][0] == 0 && delta < 0)));
            if (vEdge && hEdge && !hoverH) sC.edge[iNDx] = true; else sC.edge[iNDx] = false;
            if (e.preventDefault) e.preventDefault();
            return false;
        };

        function isddvChild(elem) { while (elem.parentNode) { elem = elem.parentNode; if (elem == dDv) return true; } return false; };

        function findPos(elem) {
            //modified from firetree.net
            var obj = elem, curleft = curtop = 0;
            var monc = "";
            if (obj.offsetParent) { while (obj) { curleft += obj.offsetLeft; curtop += obj.offsetTop; obj = obj.offsetParent; monc += curtop + " "; } }
            else if (obj.x) { curleft += obj.x; curtop += obj.y; }
            elem.xPos = curleft; elem.yPos = curtop;
        };

        function findRCpos(elem) {
            var obj = elem; curleft = curtop = 0;
            while (!obj.offsetHeight && obj.parentNode && obj != cDv && getStyle(obj, 'display') == "inline") { obj = obj.parentNode; }
            if (obj.offsetParent) { while (obj != cDv) { curleft += obj.offsetLeft; curtop += obj.offsetTop; obj = obj.offsetParent; } }
            return [curleft, curtop];
        };

        function classChange(elem, addClass, remClass) {
            if (!elem.className) elem.className = '';
            var clsnm = elem.className;
            if (addClass && !clsnm.match(RegExp("(^|\\s)" + addClass + "($|\\s)"))) clsnm = clsnm.replace(/(\S$)/, '$1 ') + addClass;
            if (remClass) clsnm = clsnm.replace(RegExp("((^|\\s)+" + remClass + ")+($|\\s)", "g"), '$2').replace(/\s$/, '');
            elem.className = clsnm;
        };
    },
    //main code end
    globalInit: function() {
        if (fleXenv.catchFastInit) window.clearInterval(fleXenv.catchFastInit);
        var regg = /#([^#.]*)$/, urlExt = /(.*)#.*$/, matcH, i, anchoR, anchorList = document.getElementsByTagName("a"), urlBase = document.location.href;
        if (urlBase.match(urlExt)) urlBase = urlBase.match(urlExt)[1];
        for (i = 0; anchoR = anchorList[i]; i++) {
            if (anchoR.href && anchoR.href.match(regg) && anchoR.href.match(urlExt) && urlBase === anchoR.href.match(urlExt)[1]) {
                anchoR.fleXanchor = true;
                fleXenv.addTrggr(anchoR, 'click', function(e) {
                    if (!e) e = window.event;
                    var clickeD = (e.srcElement) ? e.srcElement : this;
                    while (!clickeD.fleXanchor && clickeD.parentNode) { clickeD = clickeD.parentNode };
                    if (!clickeD.fleXanchor) return;
                    var tEL = document.getElementById(clickeD.href.match(regg)[1]), eScroll = false;
                    if (tEL == null) tEL = (tEL = document.getElementsByName(clickeD.href.match(regg)[1])[0]) ? tEL : null;
                    if (tEL != null) {
                        var elem = tEL;
                        while (elem.parentNode) {
                            elem = elem.parentNode; if (elem.scrollToElement) {
                                elem.scrollToElement(tEL); eScroll = elem;
                            };
                        };
                        if (eScroll) { if (e.preventDefault) e.preventDefault(); document.location.href = "#" + clickeD.href.match(regg)[1]; eScroll.fleXdata.mDPosFix(); return false; }
                    };
                });
            };
        };
        fleXenv.initByClass();
        if (window.onfleXcrollRun) window.onfleXcrollRun();
    },

    initByClass: function() {
        if (fleXenv.initialized) return;
        fleXenv.initialized = true;
        var fleXlist = fleXenv.getByClassName(document.getElementsByTagName("body")[0], "div", 'flexcroll');
        for (var i = 0, tgDiv; tgDiv = fleXlist[i]; i++) fleXenv.fleXcrollMain(tgDiv);
    },

    getByClassName: function(elem, elType, classString) {
        //v1.1fleX
        if (typeof (elem) == 'string') elem = document.getElementById(elem);
        if (elem == null) return false;
        var regExer = new RegExp("(^|\\s)" + classString + "($|\\s)"), clsnm, retArray = [], key = 0;
        var elems = elem.getElementsByTagName(elType);
        for (var i = 0, pusher; pusher = elems[i]; i++) {
            if (pusher.className && pusher.className.match(regExer)) {
                retArray[key] = pusher; key++;
            }
        }
        return retArray;
    },

    catchFastInit: window.setInterval(function() {
        var dElem = document.getElementById('flexcroll-init');
        if (dElem != null) { fleXenv.initByClass(); window.clearInterval(fleXenv.catchFastInit); }
    }, 100),

    addTrggr: function(elm, eventname, func) { if (!fleXenv.addChckTrggr(elm, eventname, func) && elm.attachEvent) { elm.attachEvent('on' + eventname, func); } },

    addChckTrggr: function(elm, eventname, func) { if (elm.addEventListener) { elm.addEventListener(eventname, func, false); fleXenv.w3events = true; window.addEventListener("unload", function() { fleXenv.remTrggr(elm, eventname, func) }, false); return true; } else return false; },

    remTrggr: function(elm, eventname, func) { if (!fleXenv.remChckTrggr(elm, eventname, func) && elm.detachEvent) elm.detachEvent('on' + eventname, func); },

    remChckTrggr: function(elm, eventname, func) { if (elm.removeEventListener) { elm.removeEventListener(eventname, func, false); return true; } else return false; }

};

function CSBfleXcroll(targetId){fleXenv.fleXcrollMain(targetId)};
fleXenv.fleXcrollInit();//用于检查输入框的内容并且返回正确的值

//检查输入的是否小数，返回正确的位数的小数
//para0:obj,输入框 为页面上某个element
//para1:digitmount,小数位数（数字）
//080828 createBy ls|signBy ls
function Mynetcn_chkInputDecimal(obj,digitmount)
{
    while (!(/^[\d]+\.?\d*$/.test(obj.value))&&obj.value!="")
    {
        obj.value=obj.value.substring(0,obj.value.length-1);  
    }
    if(obj.value.split('.').length>=2)
    {
        while(obj.value.split('.')[1].length>digitmount && obj.value!="")
            obj.value=obj.value.substring(0,obj.value.length-1);
    }
}

//检查输入的是否数字
//para0:obj,输入框 为页面上某个element
//para1:length,数字长度（数字）
//080828 createBy ls|signBy ls
function Mynetcn_chkInputNumber(obj,length)
{
    if(obj.value!="")
    {
       obj.value= obj.value.replace(/\D+/g,''); 
       if(length!=null)
        Mynetcn_chkInputLength(obj,length);     
    }
}

//检查限制输入的长度,超长的自动截取
//para0:obj,输入框 为页面上某个element
//080828 createBy ls|signBy ls
function Mynetcn_chkInputLength(obj,length)
{
    while(obj.value.length>length)
    {
        obj.value=obj.value.substring(0,obj.value.length-1);
    }
}

//截取数字
function NumDecimal(num, pos) {
    if (parseFloat(num) == num)
        return Math.round(num * Math.pow(10, pos)) / Math.pow(10, pos);
    else
        return 0;
} 

//页面管理修改网页属性js
function coEdit(docId) {
    var win = (docId != 0)
        ? ShowModalDialogInFrame('/admin/CategoryEdit.aspx?portaltype=2&docuid=' + docId) // Edit
        : ShowModalDialogInFrame('/admin/CategoryEdit.aspx?portaltype=2&caninsert=1'); // New
    win.OnOKCallBack = function(ret){
        if (ret != null) {
            if (docId == 0) {//新建一个网页
                window.parent.location.href = ret[0].url;
            }
            else {
                window.parent.location.href = "/admin/design.aspx?docuid=" + docId;
            }
        }
    }
}

function siteEdit() {
    location.href = "/admin/siteedit.aspx?returnurl=" + window.location.href;
}

//修改文章最终页属性
function onEditDocDetailTemplate(docId, doctypeName) {
    var win = ShowModalDialogInFrame("/mod/docTemplate/NewDocDetailPage.aspx?docid=" + docId + "&doctypename=" + doctypeName);
    win.OnOKCallBack = function(ret){
        if (ret != null) {
            document.location.href = document.location.href;
        }
    }
}

//修改调查表属性
function setFormProperty(docId) {
    var win = ShowModalDialogInFrame('../q/EditDocQuestionDialog.aspx?id=' + docId);
    win.OnOKCallBack = function(ret){
        if (ret != null && ret != '') {
            document.location.href = document.location.href;
        }
    }
}

function coDelete(docId) {
        if (confirm("您是否真的要删除此栏目?")) {
            var docId = httpRequest("/admin/categorydelete.aspx?categoryuid=" + docId);
            if (docId != null) {
                window.location.href = "/admin/design.aspx?docuid=" + docId; //如果删除页面则刷新页面
            }
            else {
                alert("删除失败！");
            }
        }
}

//老版本栏目导航的新建栏目
function categoryOrder() {
    var win = mynet_ShowModalDialog("/admin/categoryorder.aspx?portaltype=2", "管理栏目", 600, 500);
    win.OnOKCallBack = function(newCategoryId)
    {
        if (newCategoryId == null) {
            return;
        }
        if (newCategoryId == "0" || newCategoryId == "true") {
            //_docUID = newCategoryId;
            reloadPage();
        }
        else {
            //有新建立的栏目
            window.parent.location.href = "/admin/design.aspx?docuid=" + newCategoryId;
        }
    }
}



function themeSelect(curDocId) {
    if (curDocId == null) {
        curDocId = _docUID
    }
    var win = mynet_ShowModalDialog("/admin/categoryedit.aspx?panel=theme&docuid=" + curDocId, "更换模板");
    win.OnOKCallBack = function(ret) {
        if (ret != null) {
            if (window.location.href.indexOf('design') > -1) {//在设计状态
                mynet_openLinkTop("/admin/design.aspx?docuid=" + curDocId); //保证在顶层窗口打开设计页面
            }
            else {
               searchResult(curDocId); //在后台管理
            }
        }
    }
}

//从工具箱删除文章/商品
function onDeleteDocument(id) {
    var win = ShowModalDialogInFrame('/plugin/doc/docdelete.aspx?docid=' + id);
    win.OnOKCallBack = function(ret)
    {
        if (ret != null) {
            window.location.href = "/";
        }
    }
}
//设置预制内容
function setContent(_docUID, _docParameter) {
    var win = ShowModalDialogInFrame('/admin/AutoCategoryContent.aspx' +
        '?docuid=' + _docUID +
        '&p=' + _docParameter);
    win.OnOKCallBack = function(ret){
        if (ret != null && ret != '') {
            var obj = document.getElementById('mynetAspectPanel');
            obj.outerHTML = ret;
            mynetResizeTheme();
        }
    }
}
function bgSelect() {
    var win = ShowModalDialogInFrame("/admin/SiteBgImage.aspx");
    win.OnOKCallBack = function(ret) {
        if (ret == null || ret == "") {
            return;
        }
        var designFrame = document.getElementById("designFrame");
        if (ret.indexOf("#") == 0 || ret == "transparent")//颜色
        {
            designFrame.contentWindow.document.body.style.backgroundColor = ret;
            designFrame.contentWindow.document.body.style.backgroundImage = "";
        }
        else {
            designFrame.contentWindow.document.body.style.backgroundColor = "";
            designFrame.contentWindow.document.body.style.backgroundImage = "url(" + ret + ")";
        }
    }
    //其实可以通过javascript改变背景颜色，而不需要刷新
}

function NewOrEditDocDetailPage(doctypename) {
    if (doctypename == "product_productdoc" || doctypename == "article_articledoc") {
        var win = ShowModalDialogInFrame("/plugin/doc/setPageStyle.aspx?doctypename=" + doctypename);
            win.OnOKCallBack = function(ret){
            if (ret != null && ret != "true") {
                mynet_openLinkTop("/admin/design.aspx?docuid=" + ret);
            }
            else if (ret == "true") {
                alert("设置成功！");
            }
        }
        return;
    }
}


//重置页面内容
function resetCategoryContent(docId) {

    var confirm = mynet_Confirm('重置页面', '您是否确定要重置该页面的内容？', '页面重置后将不能被恢复！');
    confirm.OnOK = function() {
        confirm.Close();
        var title = '重置页面';
        var url = '/admin/CategoryNewOrReset.aspx?isreset=1&docuid=' + docId;
        var win = mynet_ShowModalDialog(url, title, 660, 480);
        //Iframe里的页面执行完页面本身的逻辑后，回调该函数。
        win.OnOKCallBack = function(retValue) {
            if (mynet_IsDesignWin()) {
                var frameSrc = "design2.aspx?docuid=" + retValue
                var designFrame = document.getElementById("designFrame");
                designFrame.src = frameSrc;
            }
            else {
                mynet_Alert('页面内容已经重置！');
                searchResult(retValue);
            }
        }
    }
}

// 页面发布
function publishCategory() {
    var curDocId = document.getElementById("hfCurDocId").value;
    var win = mynet_ShowModalDialog('/admin/publishCategory.aspx?docid=' + curDocId, '页面发布', 600, 480, 'OK|CANCEL');
    win.OnOKCallBack = function(ret) {
    if (ret != null && ret != '' && ret!='0') {
            mynet_Alert('页面发布成功！');
        }
    }
}

//新建页面的函数，在工具箱和design.aspx均用到
function coNewCategory() {

    var title = '新建页面';
    var url = '/admin/CategoryNewOrReset.aspx';
    var buttons = null; //窗口要显示的按钮
    var win = mynet_ShowModalDialog(url, title, 660, 480);
    
    //Iframe里的页面执行完页面本身的逻辑后，回调该函数。
    win.OnOKCallBack = function(retValue) {
        if (mynet_IsDesignWin()) {
            mynet_openLinkTop('/admin/design.aspx?docuid=' + retValue);
        }
        else {
            // 新建页面总是属于普通栏目
            window.location.href = "/plugin/siteAdmin/pageMgrCenter.aspx?docid=" + retValue + "&folderName=CommonCategory"; 
        }
    }
}

function mynet_IsDesignWin() {
    return window.location.href.indexOf('design.aspx') != -1 || window.parent.window.location.href.indexOf('design.aspx')!=-1;
}

//更多网页对话框
function onSearchPages() {
    var title = '网页搜索';
    var url = '/plugin/siteAdmin/searchPages.aspx';
  
    var win = mynet_ShowModalDialog(url, title,580,450,'');
    //回调提交后的事件
    win.OnOKCallBack = function(retValue) {
        if (retValue != null) {
            if (mynet_IsDesignWin()) {//设计状态窗口
                window.location.href = "/admin/design.aspx?docuid=" + retValue;
            }
            else //后台管理
            {
                searchResult(retValue);
            }
        }
    }
}

//编辑模板属性
function onEditThemeProperty(themeId, imgTemplateId) {
    var docId = (typeof(curPageDocId)=="undefined") ? '' : curPageDocId;
    var win = ShowModalDialogInFrame("/mod/masterpage/masterpageproperty.aspx?themeid=" + themeId + "&docuid=" + docId + "&date=" + new Date());
    win.OnOKCallBack = function(ret){
        if (ret != null) {
            if(typeof(curPageDocId)=="undefined"){
                mynet_refreshPageTop();
            }else
            {
                mynet_openLinkTop("/admin/design.aspx?docuid="+curPageDocId);
            }
        }
    }
}

//设计模板跳转的函数
function onDesignThemeDoc(themeId) {
    if (themeId.indexOf("-") == 0) {
        themeId = themeId.substring(1);

    }
   
    if (mynet_IsDesignWin()) {// in design window
        var frameSrc = "design2.aspx?docuid=" + themeId;
        document.getElementById("designFrame").src = frameSrc;
        currentPageNode = document.getElementById("mynetPageNode_x");
    }
    else //in manage window
    {
        window.location.href = "/admin/design.aspx?docuid=" + themeId;
    }
}
function onSetSmartDisplayShowNameInToolBar(context, designPanel) {
    var designData = context.designData;
    var indexPos = designData.indexOf("^|");
    if (indexPos >= -1) {
        var smartDisplayName = designData.substring(0, indexPos);
        designPanel.previousSibling.childNodes[0].childNodes[0].innerHTML = smartDisplayName;
    }
}
// ----------------------------------------------------------
// ******************  �风声 JS 窗口 V1.00  ******************
// 作者：风声
// 版本?.00
// 网站：http://www.fonshen.com
// 邮件：webmaster@fonshen.com
// 版权：版权全体,源代码公开,各种用途均可免费使用
// **********************************************************
// ----------------------------------------------------------
function UseVistaInIE6(obj) {
    var s = obj.button ? "_BY_BUTTON" : "";
    obj.sides[0].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/LEFT_TOP.png', sizingMethod='scale');background-image:url('/res/images/vista/LEFT_TOP.png') !important;background-image:none;";
    obj.sides[1].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/TOP.png', sizingMethod='scale');background-image:url('/res/images/vista/TOP.png') !important;background-image:none;";
    obj.sides[2].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/RIGHT_TOP.png', sizingMethod='scale');background-image:url('/res/images/vista/RIGHT_TOP.png') !important;background-image:none;";
    obj.sides[3].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/RIGHT.png', sizingMethod='scale');background-image:url('/res/images/vista/RIGHT.png') !important;background-image:none;";
    obj.sides[4].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/RIGHT_BOTTOM.png', sizingMethod='scale');background-image:url('/res/images/vista/RIGHT_BOTTOM.png') !important;background-image:none;";
    obj.sides[5].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/BOTTOM" + s + ".png', sizingMethod='scale');background-image:url('/res/images/vista/BOTTOM.png') !important;background-image:none;";
    obj.sides[6].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/LEFT_BOTTOM.png', sizingMethod='scale');background-image:url('/res/images/vista/LEFT_BOTTOM.png') !important;background-image:none;";
    obj.sides[7].style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/res/images/vista/LEFT.png', sizingMethod='scale');background-image:url('/res/images/vista/LEFT.png') !important;background-image:none;";
}

function _window(features)
{
	this.id=this.name="_W_"+(++_window.wIndex);
	this.string="_window.windows."+this.id;
	this.zIndex=++_window.zIndex;
	this.className=_window.getFeature(features,"class")||_window.ClassName;
	this.bodyWidth=parseInt(_window.getFeature(features,"width"))||_window.Width;
	this.bodyHeight=parseInt(_window.getFeature(features,"height"))||_window.Height;
	this.left=_window.getFeature(features,"left");
	this.top=_window.getFeature(features,"top");
	this.right=_window.getFeature(features,"right");
	this.bottom=_window.getFeature(features,"bottom");
	this.move=_window.getFeature(features,"move").toLowerCase()||"move";
	this.isModal=_window.getFeature(features,"ismodal")?true:false;
	this.button = _window.getFeature(features, "button").toUpperCase();
	this.resize=_window.getFeature(features,"resize").toLowerCase()||"resize";
	this.buttons = {};
	this.frameUrl = "";
	this.isReady = false;
	transparentLowerWindow();
	_window.windows[this.id] = this;
	_window.Ids.push(this.id);
}

function transparentLowerWindow() {
    for (var i = 0; i < _window.Ids.length; i++) {
    if(_window.windows[_window.Ids[i]]!=null)
        _window.windows[_window.Ids[i]].modal.className = "MODAL_Tran";
    }
}

_window.Version="Fonshen JS Window V1.00.08.01.03";
_window.ClassName="VISTA";
_window.Width=400;
_window.Height=-1;
_window.Timer=10;
_window.windows={};
_window.wIndex=0;
_window.zIndex=19820120;
_window.clientWidth=0;
_window.clientHeight=0;
_window.onmousemove=null;
_window.onmouseup=null;
_window.onselectstart = null;
_window.Ids = new Array();
_window.Frames =new Array();//缓存Iframe，避免创建过多占用内存

_window.getFeature=function(source,name)
{
	var reg=new RegExp("(^|,|\\s)"+ name +"\\s*=\\s*([^,]*)(\\s|,|$)","i");
	if (reg.test(source)) return RegExp.$2;
	return "";
};
_window.getMaxNumber=function()
{
	var num=0;
	for(var i=0;i<arguments.length;i++) if(arguments[i]>num) num=arguments[i];
	return num;
};

_window.Open=function(content,title,features)
{
	var obj=new _window(features);
	obj.Creat(content,title);
	return obj;
};
_window.Alert = function(content, title, features) {
    var obj = new _window(features);
    obj.button = "OK";
    obj.isModal = true;
    obj.Creat(content, title || "Alert");
    return obj;
};
_window.Confirm=function(content,title,features)
{
	var obj=new _window(features);
	obj.button="OK|CANCEL";
	obj.isModal = true;
	obj.Creat(content,title||"Confirm");
	return obj;
};


_window.prototype.Creat = function(content, title) {
var obj = this;
var IsIE = mynet_GetNavigator() == "MSIE";
if (IsIE && (document.body.readyState != "loaded" ||
             (document.forms.length > 0 && document.forms[0].readyState != "loaded")
    ))//延迟创建避免报错
    {
        var interObj = setInterval(
                   function() {
        if ((document.forms.length > 0 && document.forms[0].readyState == "complete") 
             ||document.body.readyState != "loaded") {
                           obj.InternalCreate(content, title);
                           obj.isReady = true;
                           clearInterval(interObj);
                       }
                   }, 30);
    }
    else {
        obj.InternalCreate(content, title);
        obj.isReady = true;
    }
}
_window.prototype.InternalCreate = function(content, title) {
    if (this.isModal) {
        this.modal = document.createElement("div");
        this.modal.className = "MODAL";
        this.modal.style.position = "absolute";
        this.modal.style.zIndex = this.zIndex;
        this.modal.style.width = $().width() + "px";
        this.modal.style.height = $().height() + "px";
        this.modal.style.left = "0px";
        this.modal.style.top = "0px";
        document.body.insertBefore(this.modal, null);
        var ieVersion = mynet_GetIeVersion();
        if (ieVersion > 0 && ieVersion < 7) {//IE 6挡不住Iframe
            var iframeMask = this.GetFrame(this.id,"",true);
            this.modal.appendChild(iframeMask);
            this.iframeMask = iframeMask;
            iframeMask.width = $().width() + "px";
            iframeMask.height = $().height() + "px";
        }
        this.zIndex = ++_window.zIndex;
    }
    this.board = document.createElement("div");
    this.board.className = this.className;
    this.board.style.position = "absolute";
    this.board.style.zIndex = this.zIndex;
    this.board.style.visibility = "hidden";
    document.body.insertBefore(this.board, null);
    if (!_window.clientHeight) {
        this.board.style.left = "100%";
        this.board.style.top = "100%";
        _window.clientWidth = this.board.offsetLeft;
        _window.clientHeight = this.board.offsetTop;
    }
    var styles = new Array("LEFT_TOP", "TOP", "RIGHT_TOP", "RIGHT", "RIGHT_BOTTOM", "BOTTOM", "LEFT_BOTTOM", "LEFT", "CONTENT", "TITLE");
    this.sides = new Array();
    if (this.button) {
        styles[4] = "RIGHT_BOTTOM_BY_BUTTON";
        styles[5] = "BOTTOM_BY_BUTTON";
        styles[6] = "LEFT_BOTTOM_BY_BUTTON";
        styles[styles.length] = "BUTTON";
    }
    if (this.resize != "no") styles[styles.length] = "RESIZE";
    styles[styles.length] = "CLOSE";
    var sAttachFocus = "obj.onmousedown=function(e){ " + this.string + ".Focus();};";
    var sAttachPreMove = this.move == "no" ? sAttachFocus : "obj.onmousedown=function(e){ " + this.string + ".PreMove(e?e:window.event);};";
    for (var i = 0; i < styles.length; i++) {
        var obj = document.createElement("div");
        obj.className = styles[i];
        obj.style.position = "absolute";
        this.board.appendChild(obj);
        switch (styles[i]) {
            case "CONTENT":
                if (content.slice(0, 5) == "[url]") {
                    var loadingBar = document.createElement("div");
                    loadingBar.className = "winLoadingBar";
                    loadingBar.innerHTML = "<img src='/res/images/loader.gif'/>  请稍候...";
                    loadingBar.style.left = (this.bodyWidth / 2 - 40) + "px";
                    loadingBar.style.top = this.bodyHeight / 2 + "px";
                    loadingBar.style.zIndex = this.zIndex + 1;
                    loadingBar.style.position = "absolute";
                    this.board.appendChild(loadingBar);
                    this.loadingBar = loadingBar;
                }

                this.contentCase = obj;
                obj.style.width = this.bodyWidth + "px";
                this.SetContent(content);
                obj.style.height = this.bodyHeight + "px";
                obj.style.left = (this.sides[7].width + obj.offsetLeft) + "px";

                obj.style.top = (this.sides[1].height + obj.offsetTop) + "px";

                eval(sAttachFocus);
                this.width = this.bodyWidth + this.sides[3].width + this.sides[7].width;
                this.height = this.bodyHeight + this.sides[1].height + this.sides[5].height;
                this.board.style.height = this.height + "px";
                this.board.style.width = this.width + "px";
                this.minWidth = _window.getMaxNumber(this.sides[0].width + this.sides[2].width, this.sides[3].width + this.sides[7].width, this.sides[4].width + this.sides[6].width) + 20;
                this.minHeight = _window.getMaxNumber(this.sides[0].height + this.sides[6].height, this.sides[1].height + this.sides[5].height, this.sides[2].height + this.sides[4].height) + 2;
                break;

            case "TITLE":
                this.titleCase = obj;
                obj.style.width = this.width + "px";
                this.titleCase.dx = obj.offsetWidth - this.width;
                if (this.minWidth < this.titleCase.dx) this.minWidth = this.titleCase.dx;
                if (this.width > this.titleCase.dx) obj.style.width = (this.width - this.titleCase.dx) + "px";
                this.SetTitle(title);
                eval(sAttachPreMove);
                break;

            case "BUTTON":
                this.buttonCase = obj;
                obj.style.width = this.width + "px";
                obj.style.bottom = "0px";
                this.buttonCase.dx = obj.offsetWidth - this.width;
                if (this.minWidth < this.buttonCase.dx) this.minWidth = this.buttonCase.dx;
                if (this.width > this.buttonCase.dx) obj.style.width = (this.width - this.buttonCase.dx) + "px";
                var buttons = this.button != "UNDEFINED" ? this.button.split("|") : new Array();
                if (buttons.length == 0) {
                    obj.style.display = 'none'; //there is no buttons then hidden the banner
                    obj.disabled = true;
                }
                else {
                    obj.style.backgroundColor = "#CCCCCC";
                }

                for (var j = 0; j < buttons.length; j++) {
                    var o = document.createElement("button");
                    o.className = buttons[j];

                    //chengfeng.sue 2009-07-09 Title 与按钮文字一致无需提示。
                    //o.title = buttons[j];
                    o.innerHTML = buttons[j] == "OK" ? "确定" : "取消";
                    obj.appendChild(o);
                    eval("o.onclick=function(e){ " + this.string + ".On" + buttons[j] + "();};");
                    this.buttons[buttons[j]] = o;
                }
                break;

            case "RESIZE":
                obj.style.cursor = "se-resize";
                eval("obj.onmousedown=function(e){ " + this.string + ".PreResize(e?e:window.event);};");
                break;

            case "CLOSE":
                eval("obj.onclick=function(e){ " + this.string + ".OnClose();};");
                break;

            default:
                this.sides[i] = obj;
                this.sides[i].width = obj.offsetWidth;
                this.sides[i].height = obj.offsetHeight;
                eval(sAttachPreMove);
                break;
        }
    }
    this.sides[1].dx = this.sides[0].width + this.sides[2].width;
    if (this.width > this.sides[1].dx) this.sides[1].style.width = (this.width - this.sides[1].dx) + "px";
    this.sides[3].dy = this.sides[2].height + this.sides[4].height;
    if (this.height > this.sides[3].dy) this.sides[3].style.height = (this.height - this.sides[3].dy) + "px";
    this.sides[5].dx = this.sides[4].width + this.sides[6].width;
    if (this.width > this.sides[5].dx) this.sides[5].style.width = (this.width - this.sides[5].dx) + "px";
    this.sides[7].dy = this.sides[6].height + this.sides[0].height;
    if (this.height > this.sides[7].dy) this.sides[7].style.height = (this.height - this.sides[7].dy) + "px";

    this.sides[0].style.left = "0px";
    this.sides[0].style.top = "0px";
    this.sides[1].style.left = this.sides[0].width + "px";
    this.sides[1].style.top = "0px";
    this.sides[2].style.right = "0px";
    this.sides[2].style.top = "0px";
    this.sides[3].style.right = "0px";
    this.sides[3].style.top = this.sides[2].height + "px";
    this.sides[4].style.right = "0px";
    this.sides[4].style.bottom = "0px";
    this.sides[5].style.left = this.sides[6].width + "px";
    this.sides[5].style.bottom = "0px";
    this.sides[6].style.left = "0px";
    this.sides[6].style.bottom = "0px";
    this.sides[7].style.left = "0px";
    this.sides[7].style.top = this.sides[0].height + "px";

    var ieVersion = mynet_GetIeVersion();
    if (_window.ClassName == "VISTA") {
        if (ieVersion > 0 && ieVersion < 7) UseVistaInIE6(this);
        this.SetTitle(title);
    }

    this.left = this.left ? parseInt(this.left) : (this.right ? _window.clientWidth - this.width - parseInt(this.right) : parseInt((_window.clientWidth - this.width) / 2));
    this.top = this.top ? parseInt(this.top) : (this.bottom ? _window.clientHeight - this.height - parseInt(this.bottom) : parseInt((_window.clientHeight - this.height) / 2));
    if (this.left < 0) this.left = 0;
    if (this.top < 0) this.top = 0;
    this.left += document.documentElement.scrollLeft;
    this.top += document.documentElement.scrollTop;
    this.board.style.left = this.left + "px";
    this.board.style.top = this.top + "px";
    this.board.style.visibility = "visible";
    this.board.focus();
    this.status = 1;
};
    

_window.prototype.OnFrameLoad = function() {
    if (this.iframe == null)
        return;
    if (this.buttons["OK"] != null && this.buttons["OK"].disabled == true) {
        this.EnableButton("OK");
    }
    if (this.bodyHeight < 0) {
        if (this.bh < 2) {
            this.ResizeBy(0, frames[frames.length - 1].document.documentElement.scrollHeight);
        }
    }
    if (this.title == null || this.title == "") {
        this.SetTitle(this.iframe.contentWindow.document.title);
    }
    this.ResizeBy(2, 2);
    this.loadingBar.style.display = 'none';

    var buttonPanel = this.iframe.contentWindow.document.getElementById("VIOpenWindowDivFootDiv");
    if (buttonPanel != null) {
        //buttonPanel.style.top = (this.iframe.contentWindow.document.body.clientHeight - 32) + "px";
        buttonPanel.focus();
    }
}
_window.prototype.GetFrame = function(id, url, isMask) {
    //类似存储_window.Frames["1-used"];_window.Frames["2"];最多允许弹出4层
    //找到一个没有被用过的Iframe
    var frame = null;
    var frameCount = 0;
    for (var i = 0; i < _window.Frames.length; i++) {
        if (_window.Frames[i] != null && _window.Frames[i].src == "javascript:''")//释放过的窗口
        {
            frame = _window.Frames[i];
            break;
        }
    }

    if (frame == null) {
        frame = document.createElement("iframe");
        _window.Frames.push(frame);
    }
    if (isMask == true) {
        frame.id = id + "mask";
        frame.name = id + "mask";
        frame.style.cssText = 'visibility:visible;moz-opacity:0.0;filter:alpha(opacity=0);position:absolute;';
    }
    else {
        frame.id = id;
        frame.name = id;
        frame.frameBorder = '0';
        frame.marginHeight = '0'; frame.marginWidth = '0'; frame.width = '100%'; frame.height = '100%';
        if (mynet_GetNavigator() == "MSIE") {
            eval("frame.attachEvent(\"onfocus\", function(){" + this.string + ".Focus();})");
            eval("frame.attachEvent(\"onload\", function(){" + this.string + ".OnFrameLoad();})");
        }
        else {
            eval("frame.onfocus=function(){" + this.string + ".Focus();}");
            eval("frame.onload =function(){" + this.string + ".OnFrameLoad();}");
        }
    }
    frame.src = url;
    frame.style.visibility = "visible";
    return frame;
}

_window.prototype.SetContent = function(content) {
    var type = content.slice(0, 5), tent = content.slice(5);
    if (this.oldcase) {
        this.oldcase.appendChild(this.oldcontent);
        this.oldcase = null;
    }

    if (type == "[url]") {
        if (tent.indexOf('?') != -1) {
            tent += "&winid=" + this.id;
        }
        else {
            tent += "?winid=" + this.id;
        }
        this.frameUrl = tent;
        if (this.iframe) {
            if (this.contentCase.firstChild != this.iframe) this.contentCase.replaceChild(this.iframe, this.contentCase.firstChild);
            this.iframe.src = tent;
        }
        else {

            var id = "_F" + this.id;
            var contentIframe = this.GetFrame(id, tent);
            this.contentCase.appendChild(contentIframe);
            this.iframe = contentIframe;
            if (this.bodyHeight < 0) this.bodyHeight = 1;

        }
    }
    else {
        if (this.form) {
            if (this.contentCase.firstChild != this.form) this.contentCase.replaceChild(this.form, this.contentCase.firstChild);
        }
        else {
            this.form = document.createElement("form");
            this.form.className = "FORM";
            this.form.method = "post";
            eval("this.form.onsubmit=function(e){ return false;}");
            if (this.contentCase.hasChildNodes()) this.contentCase.replaceChild(this.form, this.contentCase.firstChild);
            else this.contentCase.appendChild(this.form);
        }
        if (type == "[obj]" || content.slice(0, 4) == "[id]") {
            if (type == "[obj]") this.oldcontent = eval(tent);
            else this.oldcontent = document.getElementById(content.slice(4));
            this.oldcase = this.oldcontent.parentNode;
            this.form.appendChild(this.oldcontent);
        }
        else {
            this.form.innerHTML = content;
        }
        if (this.bodyHeight < 0) this.bodyHeight = this.contentCase.offsetHeight + 1;
        this.contentCase.style.overflow = "auto";
    }
    this.content = content;
};
_window.prototype.SetTitle=function(title)
{
	title=title||"";
	if(this.title==title) return false;
	this.titleCase.innerHTML=title;
	this.title=title;
};

_window.prototype.Focus=function()
{
	if(this.zIndex<_window.zIndex) this.board.style.zIndex=this.zIndex=++_window.zIndex;
};
_window.prototype.Close = function() {
    try {
        if (this.iframe != null) {
            this.iframe.src = "javascript:''";
            this.iframe.style.visibility = "hidden";
        }
        if (this.iframeMask != null) {
            this.iframeMask.src = "javascript:''";
            this.iframeMask.style.visibility = "hidden";
        }
        this.Hidden();
        _window.Ids.splice(_window.Ids.length - 1, 1); //移出当前窗口ＩＤ
        if (_window.Ids.length > 0) {//最后一个窗口设置透明度
            _window.windows[_window.Ids[_window.Ids.length - 1]].modal.className = "MODAL";
        }
        for (var key in this) delete this[key];
        delete _window.windows[this.id];
        CollectGarbage();

    }
    catch (e) {
    }
};
_window.prototype.Hidden=function()
{
	if (typeof(this.MoveTimer)!="undefined") clearTimeout(this.MoveTimer);
	if (typeof (this.ResizeTimer) != "undefined") clearTimeout(this.ResizeTimer);
	document.body.removeChild(this.board);
	if(this.isModal) document.body.removeChild(this.modal);
	if(this.oldcase) this.oldcase.appendChild(this.oldcontent);
	this.status=0;
};
_window.prototype.Show=function()
{
	if(this.oldcase) this.form.appendChild(this.oldcontent);
	if(this.isModal) document.body.appendChild(this.modal);
	document.body.appendChild(this.board);
	this.status=1;
};

_window.prototype.Duplicate=function()
{
	this.copy=document.createElement("DIV");
	document.body.appendChild(this.copy);
	this.copy.style.cssText="position:absolute;left:"+(this.left-2)+"px;top:"+(this.top-2)+"px;width:"+this.width+"px;height:"+this.height+"px;border:2px dotted #000000;";
	this.copy.style.zIndex=this.zIndex+1;
};
_window.prototype.DetachEvent=function(e)
{
	document.body.style.cursor="default";
	document.onmousemove=_window.onmousemove;
	document.onmouseup=_window.onmouseup;
	document.onselectstart=_window.onselectstart;
	if(this.board.releaseCapture) this.board.releaseCapture();
};
_window.prototype.AttachEvent=function(e)
{
	_window.onmousemove=document.onmousemove;
	_window.onmouseup=document.onmouseup;
	_window.onselectstart=document.onselectstart;
	if(e.preventDefault) e.preventDefault();
	else
	{
		document.onselectstart=function(){return false;};
		if(this.board.setCapture) this.board.setCapture();
	}
};

_window.prototype.PreResize=function(e)
{
	if (typeof(this.ResizeTimer)!="undefined") clearTimeout(this.ResizeTimer);
	this.Focus();
	this.Duplicate();
	this.resizeX=e.clientX-this.width-4;
	this.resizeY=e.clientY-this.height-4;
	document.body.style.cursor="se-resize";
	this.AttachEvent(e);
	eval("document.onmousemove=function(e){"+this.string+".Resize(e?e:window.event);};");
	eval("document.onmouseup=function(e){"+this.string+".Resized(e?e:window.event);};");
};
_window.prototype.Resize=function(e)
{
	if(this.resize!="resize-y")
	{
		var w=e.clientX-this.resizeX;
		if(w >= this.minWidth) this.copy.style.width=w+"px";
	}
	if(this.resize!="resize-x")
	{
		var h=e.clientY-this.resizeY;
		if(h >= this.minHeight) this.copy.style.height=h+"px";
	}
};
_window.prototype.Resized = function(e) {
    this.DetachEvent(e);
    var dx = 0, dy = 0;
    if (this.resize != "resize-y") {
        var w = e.clientX - this.resizeX - 4;
        w = (w > this.minWidth) ? w : this.minWidth;
        dx = w - this.width;
    }
    if (this.resize != "resize-x") {
        var h = e.clientY - this.resizeY - 4;
        var h = (h > this.minHeight) ? h : this.minHeight;
        dy = h - this.height;
    }
    if (_window.Timer > 0 && this.width >= this.minWidth && this.height >= this.minHeight) this.ActResizeBy(dx, dy);
    else this.ResizeBy(dx, dy);
    document.body.removeChild(this.copy);
    this.copy = null;

};
_window.prototype.ResizeBy=function(dx,dy)
{
	if(dx)
	{
		this.width+=dx;
		this.board.style.width=this.width+"px";
		this.sides[1].style.width=(this.width-this.sides[1].dx)+"px";
		this.sides[5].style.width=(this.width-this.sides[5].dx)+"px";
		this.titleCase.style.width=(this.width-this.titleCase.dx)+"px";
		if(this.buttonCase) this.buttonCase.style.width=(this.width-this.buttonCase.dx)+"px";
		this.bodyWidth+=dx;
		this.contentCase.style.width = this.bodyWidth + "px";

	}
	if(dy){this.height+=dy;
	this.board.style.height=this.height+"px";
	this.sides[3].style.height=(this.height-this.sides[3].dy)+"px";
	this.sides[7].style.height=(this.height-this.sides[7].dy)+"px";
	this.bodyHeight+=dy;
	this.contentCase.style.height = this.bodyHeight + "px";

	}
};
_window.prototype.ActResizeBy=function(dx,dy)
{
	if(dx||dy)
	{
		var x=dx/10;
		x=(x>0)?Math.ceil(x):Math.floor(x);
		var y=dy/10;
		y=(y>0)?Math.ceil(y):Math.floor(y);
		this.ResizeBy(x,y);
		dx-=x;
		dy-=y;
		this.ResizeTimer=window.setTimeout(this.string+".ActResizeBy("+dx+","+dy+")",_window.Timer);
	}
};

_window.prototype.PreMove=function(e)
{
	if (typeof(this.MoveTimer)!="undefined") clearTimeout(this.MoveTimer);
	this.Focus();
	this.Duplicate();
	this.moveX=e.clientX-this.left+2;
	this.moveY=e.clientY-this.top+2;
	document.body.style.cursor="move";
	this.AttachEvent(e);
	eval("document.onmousemove=function(e){"+this.string+".Move(e?e:window.event);};");
	eval("document.onmouseup=function(e){"+this.string+".Moved(e?e:window.event);};");
};
_window.prototype.Move=function(e)
{
	if(this.move!="move-y") this.copy.style.left=(e.clientX-this.moveX)+"px";
	if(this.move!="move-x") this.copy.style.top=(e.clientY-this.moveY)+"px";
};
_window.prototype.Moved=function(e)
{
	this.DetachEvent(e);
	var tx=(this.move=="move-y")?null:(e.clientX-this.moveX+2);
	var ty=(this.move=="move-x")?null:(e.clientY-this.moveY+2);
	if(_window.Timer>0) this.ActMoveTo(tx,ty);
	else  this.MoveTo(tx,ty);
	document.body.removeChild(this.copy);
	this.copy=null;
};
_window.prototype.MoveTo=function(tx,ty)
{
	if(tx!=null)
	{
		this.left=tx;
		this.board.style.left=tx+"px";
	}
	if(ty!=null)
	{
		this.top=ty;
		this.board.style.top=ty+"px";
	}
};
_window.prototype.ActMoveTo=function(tx,ty)
{
	if((tx==null||tx==this.left)&&(ty==null||ty==this.top)) return;
	if(tx!=null)
	{
		var dx=(tx-this.left)/10;
		dx=(dx>0)?Math.ceil(dx):Math.floor(dx);
		this.left+=dx;
		}if(ty!=null){var dy=(ty-this.top)/10;
		dy=(dy>0)?Math.ceil(dy):Math.floor(dy);
		this.top+=dy;
	}
	this.MoveTo(this.left,this.top);
	this.MoveTimer=window.setTimeout(this.string+".ActMoveTo("+tx+","+ty+")",_window.Timer);
};

_window.prototype.DisableButton=function(name,style)
{
	name=name.toUpperCase();
	this.buttons[name].disabled=true;
	this.buttons[name].className=(style?style:"DISABLED")+" "+name;
};
_window.prototype.HiddenButton = function(name) {
    name = name.toUpperCase();
    this.buttons[name].style.display = "none";
};

_window.prototype.ShowButton = function(name) {
    name = name.toUpperCase();
    this.buttons[name].style.display = "inline";
};

_window.prototype.EnableButton=function(name)
{
	name=name.toUpperCase();
	this.buttons[name].disabled=false;
	this.buttons[name].className=name;
};

_window.prototype.OnBACK=function()
{
	if(!this.step) this.step=0;
	if(this.OnBACKS){ if(this.step>0) this.OnBACKS[--this.step]();}
};
_window.prototype.OnNEXT=function()
{
	if(!this.step) this.step=0;
	if(this.OnNEXTS){ if(this.step<this.OnNEXTS.length) this.OnNEXTS[this.step]();}
};
_window.prototype.OnOK = function() {
    if (this.iframe!=null && this.iframe.contentWindow!=null && typeof (this.iframe.contentWindow.OnSubmitButtonClick) == "function") // 如果对话框存在SubmitButtonClick函数，则调用
        this.iframe.contentWindow.OnSubmitButtonClick();
    else
        this.Close(); // 默认关闭
};
_window.prototype.OnClose = function() {
    //if (this.iframe != null && this.iframe.contentWindow != null && typeof (this.iframe.contentWindow.OnSubmitButtonClick) == "function") // 如果对话框存在SubmitButtonClick函数，则调用
    //    this.iframe.contentWindow.OnSubmitButtonClick();
    //else
    //    this.Close(); // 默认关闭
    this.OnCANCEL();
};

_window.prototype.OnOKCallBack = function(retValue)
{

};

_window.prototype.OnCloseCallBack = function() {

};
_window.prototype.OnCANCEL=function()
{
	this.Close();
};
 if(typeof(mynetMenuData)!='object')
 {
    mynetMenuData = new Array; // 存放菜单数据
    mynetMenuTimeout = null; // 存放超时数据
    mynetMenuTarget = window; // 存放显示的窗口
    mynetMenuSource = window; // 存放当前在本窗口显示的菜单数据存放窗口
    mynetMenuObjects = new Array; // 存放菜单对应的对象, array of mynetMenuObject
    mynetMenuTopDiv = null; // the parent of all menu div
    MenuStyle = "border:solid 1px #B9B9B9;background-color:#FFFFFF;";
    MenuItemStyle="cursor:pointer;height:20px;font-size:12px;background-color:#FFFFFF;color:#000000;";
    MenuItemOverStyle="cursor:pointer;height:20px;font-size:12px;background-color:silver;color:#000000;";
    BtnBgImg="btn_black.gif,btn_black_blue.gif";
    ArrImg = "arr_black.gif,arr_white.gif";
    CellPadding = 4;
    MynetcssToJsMap = new Array;
    MynetcssToJsMap["background"]	=	"background";
    MynetcssToJsMap["background-attachment"]	=	"backgroundAttachment";
    MynetcssToJsMap["background-color"]	=	"backgroundColor";
    MynetcssToJsMap["background-image"]	=	"backgroundImage";
    MynetcssToJsMap["background-position"]	=	"backgroundPosition";
    MynetcssToJsMap["background-position-x"]	=	"backgroundPositionX";
    MynetcssToJsMap["background-position-y"]	=	"backgroundPositionY";
    MynetcssToJsMap["background-repeat"]	=	"backgroundRepeat";
    MynetcssToJsMap["behavior"]	=	"behavior";
    MynetcssToJsMap["border"]	=	"border";
    MynetcssToJsMap["border-bottom"]	=	"borderBottom";
    MynetcssToJsMap["border-bottom-color"]	=	"borderBottomColor";
    MynetcssToJsMap["border-bottom-style"]	=	"borderBottomStyle";
    MynetcssToJsMap["border-bottom-width"]	=	"borderBottomWidth";
    MynetcssToJsMap["border-color"]	=	"borderColor";
    MynetcssToJsMap["border-left"]	=	"borderLeft";
    MynetcssToJsMap["border-left-color"]	=	"borderLeftColor";
    MynetcssToJsMap["border-left-style"]	=	"borderLeftStyle";
    MynetcssToJsMap["border-left-width"]	=	"borderLeftWidth";
    MynetcssToJsMap["border-right"]	=	"borderRight";
    MynetcssToJsMap["border-right-color"]	=	"borderRightColor";
    MynetcssToJsMap["border-right-style"]	=	"borderRightStyle";
    MynetcssToJsMap["border-right-width"]	=	"borderRightWidth";
    MynetcssToJsMap["border-style"]	=	"borderStyle";
    MynetcssToJsMap["border-top"]	=	"borderTop";
    MynetcssToJsMap["border-top-color"]	=	"borderTopColor";
    MynetcssToJsMap["border-top-style"]	=	"borderTopStyle";
    MynetcssToJsMap["border-top-width"]	=	"borderTopWidth";
    MynetcssToJsMap["border-width"]	=	"borderWidth";
    MynetcssToJsMap["bottom"]	=	"bottom";
    MynetcssToJsMap["clear"]	=	"clear";
    MynetcssToJsMap["clip"]	=	"clip";
    MynetcssToJsMap["color"]	=	"color";
    MynetcssToJsMap["cursor"]	=	"cursor";
    MynetcssToJsMap["direction"]	=	"direction";
    MynetcssToJsMap["display"]	=	"display";
    MynetcssToJsMap["filter"]	=	"filter";
    MynetcssToJsMap["font"]	=	"font";
    MynetcssToJsMap["font-family"]	=	"fontFamily";
    MynetcssToJsMap["font-size"]	=	"fontSize";
    MynetcssToJsMap["font-style"]	=	"fontStyle";
    MynetcssToJsMap["font-variant"]	=	"fontVariant";
    MynetcssToJsMap["font-weight"]	=	"fontWeight";
    MynetcssToJsMap["height"]	=	"height";
    MynetcssToJsMap["layout-flow"]	=	"layoutFlow";
    MynetcssToJsMap["layout-grid"]	=	"layoutGrid";
    MynetcssToJsMap["layout-grid-char"]	=	"layoutGridChar";
    MynetcssToJsMap["layout-grid-line"]	=	"layoutGridLine";
    MynetcssToJsMap["layout-grid-mode"]	=	"layoutGridMode";
    MynetcssToJsMap["layout-grid-type"]	=	"layoutGridType";
    MynetcssToJsMap["left"]	=	"left";
    MynetcssToJsMap["letter-spacing"]	=	"letterSpacing";
    MynetcssToJsMap["line-break"]	=	"lineBreak";
    MynetcssToJsMap["line-height"]	=	"lineHeight";
    MynetcssToJsMap["overflow"]	=	"overflow";
    MynetcssToJsMap["overflow-x"]	=	"overflowX";
    MynetcssToJsMap["overflow-y"]	=	"overflowY";
    MynetcssToJsMap["padding"]	=	"padding";
    MynetcssToJsMap["padding-bottom"]	=	"paddingBottom";
    MynetcssToJsMap["padding-left"]	=	"paddingLeft";
    MynetcssToJsMap["padding-right"]	=	"paddingRight";
    MynetcssToJsMap["padding-top"]	=	"paddingTop";
    MynetcssToJsMap["right"]	=	"right";
    MynetcssToJsMap["scrollbar-3dlight-color"]	=	"scrollbar3dLightColor";
    MynetcssToJsMap["scrollbar-arrow-color"]	=	"scrollbarArrowColor";
    MynetcssToJsMap["scrollbar-base-color"]	=	"scrollbarBaseColor";
    MynetcssToJsMap["scrollbar-darkshadow-color"]	=	"scrollbarDarkShadowColor";
    MynetcssToJsMap["scrollbar-face-color"]	=	"scrollbarFaceColor";
    MynetcssToJsMap["scrollbar-highlight-color"]	=	"scrollbarHighlightColor";
    MynetcssToJsMap["scrollbar-shadow-color"]	=	"scrollbarShadowColor";
    MynetcssToJsMap["scrollbar-track-color"]	=	"scrollbarTrackColor";
    MynetcssToJsMap["float"]	=	"styleFloat";
    MynetcssToJsMap["text-align"]	=	"textAlign";
    MynetcssToJsMap["text-align-last"]	=	"textAlignLast";
    MynetcssToJsMap["text-autospace"]	=	"textAutospace";
    MynetcssToJsMap["text-decoration"]	=	"textDecoration";
    MynetcssToJsMap["text-indent"]	=	"textIndent";
    MynetcssToJsMap["text-justify"]	=	"textJustify";
    MynetcssToJsMap["text-kashida-space"]	=	"textKashidaSpace";
    MynetcssToJsMap["text-overflow"]	=	"";
    MynetcssToJsMap["text-transform"]	=	"textTransform";
    MynetcssToJsMap["text-underline-position"]	=	"textUnderlinePosition";
    MynetcssToJsMap["top"]	=	"top";
    MynetcssToJsMap["unicode-bidi"]	=	"unicodeBidi";
    MynetcssToJsMap["visibility"]	=	"visibility";
    MynetcssToJsMap["white-space"]	=	"whiteSpace";
    MynetcssToJsMap["width"]	=	"width";
    MynetcssToJsMap["z-index"]	=	"zIndex";
    MynetcssToJsMap["zoom"]	=	"zoom";
    
    
    var mynetMenuOnBlurFunc;

    function setDivPaddingTop(obj)
    {
        try {
            var fontSizePx = parseInt(obj.style.fontSize);
            var height = parseInt(obj.clientHeight);
            if(height<=0)
            {
                try
                {
                    height= parseInt(obj.style.height);
                }
                catch(ex)
                {
                    height=22;
                }
            }

            var paddingTop =(height-fontSizePx)/2;
            if(paddingTop<0)
                paddingTop=5;
            var menuText =  obj.getElementsByTagName("nobr")[0];
            menuText.style.paddingTop = paddingTop + "px";
            menuText.style.display = "inline-block";
            obj.getElementsByTagName("img")[0].width = obj.clientWidth; // 不要修改style.width, 否则会引起导航条初次访问时变成白底
        }
        catch(e)
        {
        }
    }

    function setTargetCss(oTarget,cssStr)
    {
       if(cssStr==null || cssStr=='')
        return;
       var arrCss = cssStr.split(';');
       var len = arrCss.length;
       for(var i=0;i<len;i++)
       {
          var cssName = arrCss[i].split(':')[0];
          var cssValue = arrCss[i].substring(cssName.length+1);
          if(cssName!='' && cssValue!='')
          oTarget.style[MynetcssToJsMap[cssName]] = cssValue;
       }
    }
   function mynetMenuRootOver(id,rootObj)
    {
      var menuImgs =null;
      if(mynetMenuData[id]["btnBgImg"]!=null && mynetMenuData[id]["btnBgImg"].length > 1)
      {
        menuImgs= mynetMenuData[id]["btnBgImg"].split(',');
        var img = rootObj.getElementsByTagName('img');
        if(img.length>0)
        {
            if(menuImgs[1].length > 0)
            {
                img[0].src= menuImgs[1];
                img[0].style.visibility = 'visible';
            }
            else
            {
                img[0].style.visibility = 'hidden';
            }
        }
       }

      var menuStyle ='';
      if(mynetMenuData[id]["menuRootItemOverStyle"]!=null && mynetMenuData[id]["menuRootItemOverStyle"]!='')
         menuStyle=mynetMenuData[id]["menuRootItemOverStyle"];
      if(menuStyle!='')
      setTargetCss(rootObj,menuStyle);
    }
    
    function mynetMenuSetCurrent(id,rootObj)
    {
        var data = mynetMenuData[id];
        if(data!=null && data["CurrentSelectRootItem"]!=null)
        {
          mynetMenuRootOut(id,data["CurrentSelectRootItem"],true);
        }
        
        mynetMenuRootOver(id,rootObj);
        if(data!=null)
        {
          data["CurrentSelectRootItem"] = rootObj;
        }
    }

    function mynetMenuRegisterData(id, width, menuStyle, menuItemStyle, menuItemOverStyle, btnBgImg, menuRootItemStyle, menuRottItemOverStyle, zIndex, cellpadding, menuChildItemStyle, menuChildItemOverStyle,menuChildBgImg)
    {
        var a=new Array();
        mynetMenuData[id] = a;

        a["width"] = width;
        a["menuStyle"] = menuStyle;
        a["menuItemStyle"] = menuItemStyle;
        a["menuItemOverStyle"] = menuItemOverStyle;
        a["btnBgImg"] = btnBgImg;
        a["menuRootItemStyle"] = menuRootItemStyle;
        a["menuRootItemOverStyle"] = menuRottItemOverStyle;
        a["menuChildItemStyle"] = menuChildItemStyle;
        a["menuChildItemOverStyle"] = menuChildItemOverStyle;
        a["menuChildBgImg"] = menuChildBgImg;
        a["zIndex"] = zIndex;
        if (cellpadding == null) {
            a["cellpadding"] = 4;
        }
        else {
            a["cellpadding"] = cellpadding;
        }
    }
    
    function mynetMenuRootOut(id,rootObj,forceToDo)
    {
      //if the rootObj is current selected menu item then not apply mouse out event;
      var data = mynetMenuData[id];
      if(data!=null && data["CurrentSelectRootItem"]!=null && data["CurrentSelectRootItem"]==rootObj && !forceToDo)
      {
         return;
      }
        
      var menuImgs =null;
      if(mynetMenuData[id]["btnBgImg"]!=null && mynetMenuData[id]["btnBgImg"].length > 1)
      {
        menuImgs= mynetMenuData[id]["btnBgImg"].split(',');
        var img = rootObj.getElementsByTagName('img');
        if(img.length>0)
        {
            if(menuImgs[0].length > 0)
            {
                img[0].src= menuImgs[0];
                img[0].style.visibility = 'visible';
            }
            else
            {
                img[0].style.visibility = 'hidden';
            }
        }
       }

       var menuStyle ='';
      if(mynetMenuData[id]["menuRootItemStyle"]!=null && mynetMenuData[id]["menuRootItemStyle"]!='')
         menuStyle=mynetMenuData[id]["menuRootItemStyle"];
      if(menuStyle!='')
      setTargetCss(rootObj,menuStyle);

    }

    // 菜单对象，保存类似菜单id, 菜单table等信息
    function mynetMenuObject(id, target)
    {
        if(target==null)
            target = window;

        var body = target.document.body;
        this.borderStyle='';
        if(mynetMenuTopDiv==null)
        {
            mynetMenuTopDiv = document.createElement('DIV');
            
            if(body.childNodes.length<=0)
                body.insertBefore(mynetMenuTopDiv, null);
            else
                body.insertBefore(mynetMenuTopDiv, body.childNodes[0]);
        }

        // 获得菜单数据
        var data = mynetMenuData[id];

        var div = target.document.createElement('DIV');        
        mynetMenuTopDiv.insertBefore(div, null);
        var menuStyle = MenuStyle;
        var menuWidthHtml = '';
        if(data!=null)
        {
            if(data["menuStyle"]!=null && data["menuStyle"]!='')
                menuStyle=data["menuStyle"];
            var menuWidth = data["width"];
            menuWidthHtml = (menuWidth==null || menuWidth=='') ? '' : ('width=' + menuWidth);
        }
        var zindex = (data != null && data["zIndex"] != null) ? data["zIndex"] : 10000000;
        var cellpadding = (data!=null && data["cellpadding"] != null) ? data["cellpadding"]:"4" ;
        div.innerHTML =
            "<table onmousemove='mynetMenuSetTimeout(100000)' onmouseout='mynetMenuSetTimeout(1000)'  onblur='mynetMenuBlur()'" + menuWidthHtml +
            " style='" + menuStyle + ";visibility:hidden;position:absolute;left:0px;top:0px;z-index:" + zindex + ";border-collapse:collapse;' cellpadding='" + cellpadding + "'>" +
            "<tr valign=top><td width='100%'>" +
            "</td></tr>" +
            "</table>";
        if(!(id.length > 18 && id.substr(0, 18)=="mynetToolBoxFolder")) // 工具箱时，id类似 "mynetToolBoxFolder_menu_addControl"， 此时不要出iframe
            div.innerHTML = "<iframe FRAMEBORDER='no' scrolling='no' style='visibility:hidden;moz-opacity:0.0;filter:alpha(opacity=0);position:absolute;z-index:" + zindex + "'></iframe>" + div.innerHTML;

        // 返回内容
        this.id = id;
        this.div = div;
        this.data = data;
        this.table = this.div.getElementsByTagName('TABLE')[0];
        this.td = this.table.rows[0].cells[0];
        this.selectedItemId = null;

        var s = this.div.getElementsByTagName('IFRAME');
        this.iframe = s.length > 0 ? s[0] : null;
    }
    
    function mynetMenuSetTimeout(millisecond)
    {
        mynetMenuSource.mynetMenuTimeout = new Date();
        mynetMenuSource.mynetMenuTimeout.setTime(mynetMenuSource.mynetMenuTimeout.getTime() + millisecond);

    }
    
    function mynetMenuEnter(tr, menuId, itemId) {
        mynetMenuSetTimeout(100000);

        var data = mynetMenuData[menuId];

        // Get current table 
        var table = tr.offsetParent;
        while (table != null && !mynetMenuTableInArray(table))
            table = table.offsetParent;

        // 获得当前菜单的mynetMenuObject
        var obj, objIndex;
        for (objIndex = 0; objIndex < mynetMenuObjects.length; objIndex++) {
            obj = mynetMenuObjects[objIndex];
            if (obj.table == table) // 寻找当前级别的table
                break;
        }

        // 检查当前是否已经被选中了
        if (obj.selectedItemId == itemId)
            return;
        obj.selectedItemId = itemId;

        // set all other tr color
        var menuItemStyle = MenuItemStyle;
        if (data["menuItemStyle"] != '' && data["menuItemStyle"] != null)
            menuItemStyle = data["menuItemStyle"];

        var childItemTextSize = "font-size:12px;";
        var imgSrc = "";
        if (data["menuChildItemStyle"] != null && data["menuChildItemStyle"] != "") {
            menuItemStyle = data["menuChildItemStyle"];
            childItemTextSize = GetChildMenuFontSize(menuItemStyle);
            imgSrc = GetChildBgImg(data["menuChildBgImg"])[0];
        }

        for (var i = 0; i < tr.offsetParent.rows.length; i++) {
            var a = tr.offsetParent.rows[i];
            if (a.style.display != 'none' && a.innerText != '') {
                setTargetCss(a.getElementsByTagName("table")[0], menuItemStyle);
                setTargetCss(a.getElementsByTagName("nobr")[1], childItemTextSize);
                    var img = a.getElementsByTagName("img");
                    if (img != null && img.length > 0) {
                        if (imgSrc != null && imgSrc != "") {
                            img[0].style.visibility = "visible";
                            img[0].src = imgSrc;
                        }
                        else {
                            img[0].style.visibility = "hidden";
                        }
                    }
            }
        }

        // set current selected tr color
        var curItem = getMenueItemById(data, itemId);
        var menuItemOverStyle = MenuItemOverStyle;
        if (data["menuItemOverStyle"] != null && data["menuItemOverStyle"] != '')
            menuItemOverStyle = data["menuItemOverStyle"];

        var childItemOverTextSize = "font-size:12px;";
        var imgOverSrc = "";
        if (data["menuChildItemOverStyle"] != null && data["menuChildItemOverStyle"] != "") {
            menuItemOverStyle = data["menuChildItemOverStyle"];
            childItemOverTextSize = GetChildMenuFontSize(menuItemOverStyle);
            imgOverSrc = GetChildBgImg(data["menuChildBgImg"])[1];
        }

        if (tr.style.display != 'none' && tr.innerText != '' && (curItem.url != '' || curItem.hasChild != false)) {
            setTargetCss(tr.getElementsByTagName("table")[0], menuItemOverStyle);
            setTargetCss(tr.getElementsByTagName("nobr")[1], childItemOverTextSize);
            var img = tr.getElementsByTagName("img");
            if (img != null && img.length > 0) {
                if (imgOverSrc != "") {
                    img[0].style.visibility = "visible";
                    img[0].src = imgOverSrc;
                }
                else {
                    img[0].style.visibility = "hidden";
                }
            }            
        }


        // 隐藏子菜单
        while (mynetMenuObjects.length > objIndex + 1) {
            mynetMenuObjects.pop().div.removeNode(true);
        }


        // 判断是否有子菜单
        if (curItem.hasChild) // has sub menu
        {
            obj = mynetMenuGenerateTable2(menuId, curItem.id, window);
            if (obj == null)
                return;
            var x = mynetMenuObjectLeft(tr) + tr.offsetWidth + 4; // 准确距离是5, 用4使二级菜单压在一级菜单一个像数
            var y = mynetMenuObjectTop(tr);

            // 如果菜单太靠右，则显示在左边
            if (x > document.body.offsetWidth - obj.table.offsetWidth - 20)
                x = mynetMenuObjectLeft(tr) - obj.table.offsetWidth - 5;
            mynetMenuSetPos(obj, x, y, window);
        }
    } 
    
    function mynetMenuRemoveItemById(data, itemId)
    {
        var index = mynetMenuGetItemIndexById(data, itemId);
        if(index>=0)
            data.splice(index, 1);
    }
    
    function mynetMenuGetItemIndexById(data, itemId)
    {
        var len= data.length;
        for(var i=0;i<len;i++)
        {
            if(data[i].id==itemId)
            {
                return i;
            }
        }
        return -1;
    }
    
    function getMenueItemById(data,itemId)
    {
        var index = mynetMenuGetItemIndexById(data, itemId);
        if(index>=0)
            return data[index];
        return null;
    }
    
    function mynetMenuLeave()
    {
        mynetMenuSetTimeout(200);
    }
    function mynetMenuStartsWith(str, word)
    {
        if(str!=null && word!=null && str.length>=word.length && str.substr(0,word.length)==word)
            return true;
        return false;
    }
    function mynetMenuTableInArray(table)
    {
        for(var i=0; i<mynetMenuObjects.length; i++)
        {
            var obj = mynetMenuObjects[i];
            if(obj.table==table)
            {
                return true;
            }
        }
        return false;
    }
    function mynetMenuBlur()
    {

        var obj = document.activeElement;

        //此正则是为了解决在IE下,当菜单导航的子导航长度过长时,无法点击的BUG,子菜单的输出时会生成符合该要求的NOBR  

        var re = new RegExp('^<NOBR id=.*>.*</NOBR>$');
        if (re.test(obj.innerHTML) == true) { return; }
      
      if(typeof mynetMenuOnBlurFunc=='function')
      {
        mynetMenuOnBlurFunc();
        return;
      }
      
        obj = document.activeElement;
          
        while(obj!=null && !mynetMenuTableInArray(obj))
            obj = obj.offsetParent;
        if(obj==null)
        {
            mynetMenuHide();
        }
        else
        {
            obj.focus();
        }
    }
    

    
    
    // 生成菜单，返回mynetMenuObject对象
    function mynetMenuGenerateTable(id, target,srcElement,parentId)
    {
        if(parentId!=null && parentId!='') // 有指定父菜单
        {
            var data = mynetMenuData[id]; // 获得指定菜单数据
            if(data==null)
                return null;
            var menuItem = getMenueItemById(data,parentId);
            if(menuItem==null || !menuItem.hasChild) // 没有找到指定的子菜单
                return null;
        }
        
        var obj = mynetMenuGenerateTable2(id, parentId, target);
        return obj;
    }
    function mynetMenuGenerateTable2(id, parentId, target)
    {
        // Get the document of target window
        if(target==null)
            target = window;

        var doc = target.document;
        mynetMenuTarget = target;
        target.mynetMenuSource = window;

        // create the object
        var obj = new mynetMenuObject(id);
        mynetMenuObjects[mynetMenuObjects.length] = obj; // 记录当前生产的菜单
        
        // get the element of table
        var data = obj.data;
        if(data==null) // not found the menu data define
            return obj;

        // 创建html
        var html = '';
        html += '<table width=100% cellpadding=0 cellspacing=0 >';
        for(var i=0;i<data.length;i++)
        {
            if(data[i].parentId==parentId)
            {
                html+= data[i].getHtml(obj);
            }
        }
        html += '</table>';
        obj.td.innerHTML = html;
        
        return obj;
    }
    function mynetMenuSkip(data, index, subItemCount)
    {
        while(subItemCount-->0)
        {
            index += 5;
            index = mynetMenuSkip(data, index, data[index-1]);
        }
        return index;
    }
    
    // 在指定控件相对位置显示菜单
    function mynetMenuPopup(id, srcElement, elementPoint, menuAlign, target, hide,menuItemId)
    {
        var x = mynetMenuObjectLeft(srcElement);
        var y = mynetMenuObjectTop(srcElement);
        
        if(elementPoint==0) // RightBottom
            { x += srcElement.offsetWidth; y += srcElement.offsetHeight-2; }
        else if(elementPoint==1) // LeftBottom
            { y += srcElement.offsetHeight-2; }
        else if(elementPoint==2) // RightTop
            { x += srcElement.offsetWidth; }
        else if(elementPoint==3) // LeftTop
            { }
            
        return mynetMenuPopupXY(id, x, y,srcElement, menuAlign, target, hide,menuItemId, srcElement.offsetWidth);
    }
    
    // 在指定的位置显示菜单
    function mynetMenuPopupXY(id, x, y,srcElement, align, target, hide,menuItemId, srcElementWidth)
    {
        if(hide==null || hide)
            mynetMenuHide();
        mynetMenuSetTimeout(3000);
        if(menuItemId==null)
            menuItemId ='';
        var obj = mynetMenuGenerateTable(id, target,srcElement,menuItemId);
        if(obj==null)
            return null;

        if(align==null || align==0) // RightBottom
            {}
        else if(align==1) // LeftBottom
            x -= obj.table.offsetWidth;
        else if(align==2) // RightTop
            y -= obj.table.offsetHeight;
        else if(align==3) // LeftTop
            { x -= obj.table.offsetWidth;; y -= obj.table.offsetHeight; }


        if(srcElementWidth==null)
        {
            srcElementWidth = 0;
        }

        // 如果超出屏幕，尝试修改方向
        /*
        var body = document.body;
        var bodyScrollLeft = body.scrollLeft;
        if (window.frameElement != null) // 在IFRAME中
        {
            bodyScrollLeft -= Math.min(0, getElementPos(window.frameElement).x);
        }
        if ((align == 1 || align == 3) && x - bodyScrollLeft < 0)
        {
            x += obj.table.offsetWidth + srcElementWidth;
        }
        
        if((align==0 || align==2) && eval(x) - body.scrollLeft > body.offsetWidth - obj.table.offsetWidth - 10)
        {
            x -= obj.table.offsetWidth + eval(srcElementWidth);
        }
        */
  
        mynetMenuSetPos(obj, x, y, target);
        //obj.div.style.display = 'inline';
       
        
        return obj;
    }
    function mynetMenuSetPos(obj, x, y, target) {
        if(target==null)
            target = window;
        var doc = target.document;
        var table = obj.table;

        var bodyWidth = doc.body.offsetWidth;
        var bodyHeight = doc.body.offsetHeight;
        var scrollLeft = getScrollLeft(target);
        var scrollTop = getScrollTop(target);

        x = Math.max(x, scrollLeft + 5);
        y = Math.max(y, scrollTop + 5);

        if (x + table.offsetWidth + 20 > bodyWidth + scrollLeft)
            x = bodyWidth + scrollLeft - table.offsetWidth - 20;
        if (x < 0)
            x = 0;

        if (y + table.offsetHeight + 20 > bodyHeight + scrollTop)
            y = bodyHeight + scrollTop - table.offsetHeight - 20;
        if(y < 0)
            y = 0;

        table.style.left = x + 'px';
        table.style.top = y + 'px';

        table.style.visibility = 'visible';
        table.focus();

        var iframe = obj.iframe;
        if (iframe != null) {
            iframe.style.pixelLeft = table.style.pixelLeft;
            iframe.style.pixelTop = table.style.pixelTop;
            iframe.width = table.offsetWidth;
            iframe.height = table.offsetHeight;
            iframe.style.visibility = 'visible';
        }
    }
    function mynetMenuHide()
    {
        while(mynetMenuObjects.length > 0)
        {
            var obj = mynetMenuObjects.pop();
            var objId=obj.id;
            obj.div.parentNode.removeChild(obj.div);            
            if(typeof mynetMenuAfterHideFunc=='function')
            {
                  mynetMenuAfterHideFunc(objId);
                  return;
            }
        }
    }

    function mynetMenuHideExcept(id) {
        //var len = mynetMenuObjects.length;
        for (var i = 0; i < mynetMenuObjects.length; i++) {
            if (mynetMenuObjects[i].id != id) {
                mynetMenuObjects[i].div.parentNode.removeChild(mynetMenuObjects[i].div);
                mynetMenuObjects.splice(i, 1);
            }
        }
    }
    
    function mynetMenuIsShowing()
    {
        return mynetMenuObjects.length > 0;
    }

    function mynetMenuGetShowingId()
    {
        if(mynetMenuObjects.length > 0)
            return mynetMenuObjects[mynetMenuObjects.length-1].id;
        return null;
    }

    // 返回指定对象相对于document的位置，考虑了滚动条的情况
    function mynetMenuObjectLeft(o)
    {
        return Mynet_ObjectLeft(o);
        /*
        var x = 0;
        while (o != null)
        {
            x += o.offsetLeft;
            o = o.offsetParent;
        }
        return x;
        */
    }

    // 返回指定对象相对于document的位置，考虑了滚动条的情况
    function mynetMenuObjectTop(o)
    {
        return Mynet_ObjectTop(o);
        /*
        var y = 0;
        while (o != null)
        {
            y += o.offsetTop;
            o = o.offsetParent;
        }
        return y;
        */
    }
    function mynetMenuInterval()
    {
        var now = new Date();
        if(mynetMenuTimeout!=null && now.getTime() > mynetMenuTimeout.getTime()) {
            mynetMenuTimeout = null;
            mynetMenuHide();
        }
    }
    
    // 单个菜单条目
    function mynetMenueItem(id, parentId, leftText, text, url, rightText, hasChild) {
        this.id = id;
        this.leftText = leftText;
        this.text = text;
        this.url = url;
        this.rightText = rightText;
        this.hasChild = hasChild;
        this.parentId = parentId;

        this.getHtml = function(objM) {
            var html = "";
            html += "<tr ";
            html += " onmouseover=mynetMenuEnter(this,'" + objM.id + "','" + this.id + "') onmouseout='mynetMenuLeave()'";
            if (url != '') {
                html += this.url;
            }
            html += "><td width='100%'>";
            var style = mynetMenuData[objM.id]["menuItemStyle"];
            var textSize = "font-size:12px;";
            var imgSrc = "";
            var imgHtml = "";
            if (mynetMenuData[objM.id]["menuChildItemStyle"] != null && mynetMenuData[objM.id]["menuChildItemStyle"] != "") {
                style = mynetMenuData[objM.id]["menuChildItemStyle"];
                textSize = GetChildMenuFontSize(style);
                imgSrc = GetChildBgImg(mynetMenuData[objM.id]["menuChildBgImg"])[0];
            }
            var visibility = "visibility:hidden;";
            imgHtml = "<img id='childBgImg' src='" + imgSrc + "' onload='javascript:resetImg(this)' style='position:absolute;z-index:10;" + visibility + "' width='100%' align='middle'/>"
            html += imgHtml;
            html += "<table width='100%' style='" + style + "' cellpadding='" + ((mynetMenuData[objM.id]["cellpadding"] == null) ? "4" : mynetMenuData[objM.id]["cellpadding"]) + "' cellspacing=0><tr>";

            if (text == '---') {
                html += "<td colspan=3 height=5><table width=100% height=1 cellpadding=0 cellspacing=0 bgcolor=gray><tr><td></td></tr></table></td>";
            }
            else {
                html += "<td style='width:1px;z-index:100;'><nobr >" + this.leftText + "</nobr></td>";
                html += "<td width=100% style='" + textSize + "'><nobr style='display:inline-block;position:relative;z-index:100; ' id='" + "_ii_" + this.id + "' >" + this.text + '</nobr></td>';
                html += "<td width=1 style='width:1px;z-index:100;'align=right><nobr>" + this.rightText;
                if (this.hasChild) {
                    html += "<img style='z-index:100;display:inline-block;position:relative;' src='/res/menu_expand.gif' width=15 height=15 border='0'/>";
                }
                html += '</nobr></td>';
            }
            html += '</tr></table></td></tr>';

            return html;
        }
    }
    
      
    //单独获取二级菜单字体大小
    function GetChildMenuFontSize(style) {
        var textSize = "";
        if (style != null && style != "") {
            var styleArray = style.split(';');
            for (var i = 0; i < styleArray.length; i++) {
                if (styleArray[i].indexOf("font-size") > -1) {
                    textSize = styleArray[i];
                    break;
                }
            }

        }
        return textSize;
    }

    function GetChildBgImg(styleImg) {
        var imgs;
        if (styleImg != null && styleImg != "") {
            imgs = styleImg.split(',');
        }
        return imgs;
    }

    function resetImg(img) {
        var parent = img.parentNode;
        var height = parent.clientHeight;
        img.style.height = height;
        img.style.visibility = "visible";
    }
    
    window.setInterval(mynetMenuInterval, 200);
}

//非IE浏览器里的contains方法扩展
if(typeof(HTMLElement)!= "undefined")   
{   
    HTMLElement.prototype.contains = function(obj)   
    {   
        while(obj!=null && typeof(obj.tagName) != "undefind")   
        {
            if(obj==this)
                return true;   
            obj=obj.parentNode;
        }   
        return false;   
    };   
}
//检查某个功能是否可以使用
function mynet_CheckFunctionCanUse(checkKey) {
    var url = "/admin/CheckFunction.aspx?key=" + checkKey;
    var returnValue = httpRequest(url);//返回True或者SponsorName
    if (returnValue == "True") {
        return "true";
    }
    else {
        return returnValue;
     }
}
//改变当前页面上的按钮的onclick事件
function mynet_AttachClientClick() {
    //只处理Aspx页面
    if (document.location.pathname.indexOf(".aspx") == -1) {
        return;
    }
    var inputButtons = document.getElementsByTagName("input");
    var buttons = document.getElementsByTagName("button");
    for (var i = 0; i < inputButtons.length; i++) {
        var btn = inputButtons[i];
        mynet_AttachOneButtonClick(btn);
    }

    for (var i = 0; i < buttons.length; i++) {
        var btn = buttons[i];
        mynet_AttachOneButtonClick(btn);
    }
}
//输出版本升级提示信息
function mynet_checkFunctionAlert(sponsorName) {
    var title = "对不起！您所使用的功能超出了版本限制，请尽快升级到更高版本。"; ;
    var content;
    var isHichina = sponsorName.toLowerCase() == "default" || sponsorName == "hichina" || sponsorName == "oinsite" || sponsorName == "hichinafree";
    if (isHichina) {
        content = "请登录http://www.net.cn 付费升级或与您的销售代表联系。<br/><br/>";
        content += "<font color='red'>全国统一服务热线：400-600-8500</font>";
    }
    else {
        content = "请与您的服务提供商联系升级。";
    }
    mynet_Alert(title, content, 450, 160);
}

function mynet_AttachOneButtonClick(btn) {
    var checkFunction = btn.getAttribute("CheckFunction");
    if (checkFunction != null && checkFunction != "") {
        var strOnclick = btn.getAttribute("onclick");
        btn.onclick = function() {
            var returnValue = mynet_CheckFunctionCanUse(checkFunction);
            if (returnValue == "true") {
                if (btn.type == "submit" && strOnclick != null && strOnclick != "")//代表该按钮会引发验证
                {
                    if (typeof (Page_ClientValidate) == "function" && Page_ClientValidate() == false &&
                         typeof (ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) {
                        return false;
                    }
                }

                if (strOnclick != null && strOnclick != "") {
                    var IsIE = mynet_GetNavigator() == "MSIE";
                    if (IsIE == false) {//FF和ＩＥ８不一样
                        eval(strOnclick);
                    }
                    else {//IE 7及以下对该字符串的解析不一样,IE 7下被解析成function onclick
                        var tempStr = strOnclick + ""; //变成字符串
                        if (tempStr.indexOf("function onclick()") == 0) {
                            tempStr = tempStr.replace("function onclick()\n{", "");
                            tempStr = tempStr.substring(0, tempStr.length - 2);
                        }
                        else if (tempStr.indexOf("function anonymous()") == 0) {
                            tempStr = tempStr.replace("function anonymous()\n{", "");
                            tempStr = tempStr.substring(0, tempStr.length - 2);
                        }
                        
                        eval(tempStr);
                    }
                  
                }
                return true;
            }
            else {
                mynet_checkFunctionAlert(returnValue);
                return false;
            }
        }
    }
}

$(function() { mynet_AttachClientClick() });

//-----------6PhotosAlbumJS.js------------------
function JSAlbum(prefix,picarry,lnkarry,ttlarry)
{
    this.prefix = prefix;
    this.picarry = picarry;
    this.lnkarry = lnkarry;
    this.ttlarry = ttlarry; 
    var obj = this; 
    this.currslid = 0;
    this.setfoc = function(id){
	    var focpic = document.getElementById(prefix + "_focpic");
	    if(focpic == null)
	        return;
	    focpic.src = picarry[id];
	    document.getElementById(prefix + "_foclnk").href = lnkarry[id];
	    document.getElementById(prefix + "_fttltxt").innerHTML = '<a href="'+lnkarry[id]+'" target="_blank" style="color:#FFF;text-decoration:none">'+ttlarry[id]+'</a>';
	    obj.currslid = id;
	    for(i=0;i<ttlarry.length;i++){
	        try
	        {
		        document.getElementById(prefix + "_tmb"+i).className = "thubpic";
		    }
		    catch(e){}
	    };
	    document.getElementById(prefix + "_tmb"+id).className +=" thubpiccur";
	    focpic.style.visibility = "hidden";
	    focpic.filters[0].Apply();
	    if (focpic.style.visibility == "visible") {
		    focpic.style.visibility = "hidden";
		    focpic.filters.revealTrans.transition=23;
	    }
	    else {
		    focpic.style.visibility = "visible";
		    focpic.filters[0].transition=23;
	    }
	    obj.stopit();
	    focpic.filters[0].Play();
    }
    
    this.stopit = function(){
        if(typeof(timerId)!='undefined' && timerId + "" != "")
        {
	        clearInterval(timerId);
	    }
    }
    
    this.playit = function(){
        this.stopit();
	    timerId = setInterval(this.playnext,4500);
    }

    this.playnext = function (){
	    if(obj.currslid<obj.ttlarry.length-1){
		    obj.currslid++;
	    }
	    else{
		    obj.currslid = 0;
	    };
	    obj.setfoc(obj.currslid);
	    obj.playit();
    }
}
//-----------AnimateFadein.js------------------


//function animateFadeInAdd(obj)
//{
//    var table = obj.parentNode.parentNode.parentNode.parentNode;
//    _animateFadeInArray.push(table);
//}

//隐藏table元素,该方法不同于其名称,实际只是隐藏掉传入的元素
function hiddenParentTable(table)
{
  //var table = obj.parentNode.parentNode.parentNode.parentNode;
  table.style.visibility ="hidden";
}
//播放滤镜效果,参数将被修改的元素 和滤镜ID
function playParentFilter(table,transitionId)
{  
   //var table = obj.parentNode.parentNode.parentNode.parentNode;
   try
   {
    if(transitionId>=0)
    {
      table.filters.item(0).transition = transitionId;
    }
   
     table.filters(0).apply();
     table.style.visibility ="visible";
     table.filters(0).play(2.0);
   }
   catch(e)
   {
      table.style.visibility ="visible";
   }
}

//function animateFadeInInterval()
//{
//    var count = 0;
//    for(var i=0; i<_animateFadeInArray.length; )
//    {
//        var table = _animateFadeInArray[i];
//        if(table==null)
//            continue;
//        var filter = table.style.filter;
//        var index = filter.indexOf('alpha(opacity=') + 14;
//        var indexEnd = filter.indexOf(')', index);
//        var opacity = parseInt(filter.substr(index, indexEnd - index), 10);
//        if(opacity < 100)
//        {
//            opacity += 25;
//            filter = filter.substr(0, index) + opacity + filter.substr(indexEnd);
//            table.style.filter = filter;
//            count++;
//        }
//        
//        if(opacity==100)
//        {
//            _animateFadeInArray.splice(i, 1);
//        }
//        else
//        {
//            i++;
//        }
//        
//        //document.title = _animateFadeInArray.length;
//    }
//}
//-----------AspectPhotoAlbum.js------------------
//var photoalbum_upnum =0 ;
//点击显示的层，隐藏
function photoalbum_selectDiv(uid)
{
    var slder = document.getElementById('divContrl_'+uid);
    slder.style.pixelTop = slder.style.pixelTop + 20;
    slder.style.display = 'none';
    slder.style.visibility = 'hidden'; // 兼容旧版本，万一脚本不更新
}

function photoalbum_overPic(uid, ctrlLeft, ctrlTop)
{ 
    var divLarge = document.getElementById('divContrl_'+uid);       
    if(divLarge.style.display=='' && divLarge.style.visibility == 'visible') // 已经显示 // visibility兼容旧版本
    {
        return;
    }
    
    //if(photoalbum_upnum!= 0) return;
    var slder = document.getElementById('slider_'+uid);  
    var pos = photoalbum_getPosition(slder);        
    var top  = pos[1];
    var left = pos[0];           
    
    divLarge.style.left = ctrlLeft + 'px';
    divLarge.style.top = (ctrlTop - 20) + 'px';
    curAlpha = 0;
    divLarge.style.filter ='alpha(opacity=80)';
    divLarge.style.visibility = 'visible'; // 兼容旧版本，万一脚本不更新
    divLarge.style.display = '';
    //photoalbum_slowup(uid, 0);
}

function photoalbum_getPosition(elt) 
{
    var pos = new Object;
    pos.x = 0;
    pos.y = 0;
    //一直找到body，如果相等就不加
    while (elt&& elt.tagName.toUpperCase()!='BODY')
    {	
	    if (pos.y!=elt.offsetTop && elt.style.position !='absolute')	
	    {  
	        pos.x += elt.offsetLeft;
	        pos.y += elt.offsetTop;
	        if(elt.tagName.toUpperCase()!='HTML')
	        {
	         pos.x = pos.x -elt.scrollLeft;
		     pos.y = pos.y -elt.scrollTop;
		    }
	    }	
	    elt = elt.offsetParent;
    }
    return ([pos.x,pos.y]);
}

function photoalbum_slowup(uid, upnum)
{
    if ( upnum < 20   )
    {  
        var divLarge = document.getElementById('divContrl_'+uid);
        upnum++;
        divLarge.style.pixelTop = divLarge.style.pixelTop -1;           
        setTimeout('photoalbum_slowup(\''+uid+'\','+upnum+')',40);
    }
}

//-----------calendar2008.js------------------
Date.prototype.getTheDate=function(){
		return {Y:this.getFullYear(),M:this.getMonth()+1,D:this.getDate()};
	}
Date.prototype.beforeTheDate=function(Y,M,D){
		if(Y<this.getFullYear()||(Y==this.getFullYear()&&M<this.getMonth()+1)||(Y==this.getFullYear()&&M==this.getMonth()+1&&D<this.getDate()))
		{
			return true;
		}
		else
		{
			return false;
		}
}
Date.prototype.afterTheDate=function(Y,M,D){
		if(Y>this.getFullYear()||(Y==this.getFullYear()&&M>this.getMonth()+1)||(Y==this.getFullYear()&&M==this.getMonth()+1&&D>this.getDate()))
		{
			return true;
		}
		else
		{
			return false;
		}
}
Date.prototype.getThePreDate=function(dateObj,minYear){
		var M=dateObj.M;
		var Y=dateObj.Y;
		var D=dateObj.D;
		M--;
		if(M<1)
		{
			M=12;
			Y--;
		}
		if(Y<minYear)
		{
			Y=minYear;
		}
		
		
		this.selDate=Y+'-'+M+'-'+D; 	
		return "{Y:"+Y+",M:"+M+",D:"+D+"}";
		
}


Date.prototype.getTheNextDate=function(dateObj,maxYear){
		var M=dateObj.M;
		var Y=dateObj.Y;
		var D=dateObj.D;
		M++;
		if(M>12)
		{
			M=1;
			Y++;
		}
		if(Y>maxYear)
		{
			Y=maxYear;
		}
		return "{Y:"+Y+",M:"+M+",D:"+D+"}";
}
function MarcianCalendar2(calendarObjName,display,minYear,maxYear,afterNotUsed,beforeNotUsed)
{
        this.calendarName=calendarObjName;//create 
		this.display=display?"block":"none";//
		this.minYear=minYear?minYear:1900;//
		this.maxYear=maxYear?maxYear:2900;//
		this.afterNotUsed=afterNotUsed?afterNotUsed:false;
		this.beforeNotUsed=beforeNotUsed?beforeNotUsed:false;
		this.calendarContainer=null;//calendar block
		this.calendarMenuContainer=null;//list
		this.calendarDateContainer=null;//date
		this.calendarWeekContainer=null;//
		this.calendarCloseContainer=null;//
		this.weekAry=["S","M","T","W","T","F","S"];//
		this.date=new Date();//
		this.moveObjAry=new Array();//
		this.fillObjAry=new Array();//
		this.id=0;//
		
        this.getObjOffset=function(obj){
			var x=obj.offsetWidth;
			var y=0;
			while(obj.offsetParent)
			{
				x+=obj.offsetLeft;
				y+=obj.offsetTop;
				obj=obj.offsetParent;
			}
			return{x:x,y:y};
		}
		
				//fill date
		this.fillDate=function(dateStr){
		
		      var selDateArr=dateStr.split('-');
		      this.setSelStyle(this.currentDateId,false);
		      this.currentDateId=selDateArr[2];
		      this.selDate=dateStr;
		      this.setSelStyle(selDateArr[2],true);
		}

		//
		this.$=function(id)
		{
			return document.getElementById(id);
		}
		
       this.showCalendar=function(showIDAry,fillIDAry){
		    /******************************
			*����˵��
			*showIDAry:�����ʾ������Ԫ�ص�ID����
			*fillIDAry:Ҫ����������ݵ�Ԫ�ص�ID����
			******************************/
			this.moveObjAry=showIDAry;
			this.fillObjAry=fillIDAry;
			this.moveCalendar(0);
		}
		
		this.setDate=function(dateObj){
			if(this.calendarDateContainer.childNodes)
			{
				for(var j=this.calendarDateContainer.childNodes.length-1;j>=0;j--)
				{
					this.calendarDateContainer.removeChild(this.calendarDateContainer.childNodes[j]);
				}
			}
		    var W=1;
			var Y=dateObj.Y;
			var M=dateObj.M;
			var D=dateObj.D;
			var dayAry=[31,28,31,30,31,30,31,31,30,31,30,31];
			var r=[0,3,3,6,1,4,6,2,5,0,3,5];
			var c=6;
			if(Y%400==0||(Y%4==0&&Y%100!=0))
			{
				dayAry[1]=29;
			}
			if((Y%400==0||(Y%4==0&&Y%100!=0))&&M<3)
			{
				c=5;
			}
			var y=Y%400;
			w=(y+Math.floor(y/4)-Math.floor(y/100)+r[M-1]+1+c)%7;
			//alert(w);
			var R=1;
		    R=(dayAry[M-1]-7+w)%7==0?R+(dayAry[M-1]-7+w)/7:R+Math.floor((dayAry[M-1]-7+w)/7)+2;
			
			
			 var w2 = new Date(Y, M-1, 1).getDay();
            var prevDays = M==1  ? dayAry[11] : dayAry[M-2];
            var preDaysArr=new Array();//����֮ǰ���ڵ�����
			
			var preDaysAdd=0;//ͨ�����������ȫ֮ǰ������
			if(w<8) //Ϊ��֤����������������� ����ʱ��Ȳ���������
			{
			 preDaysAdd =8;
			}
			
			if(w>12)
			{
			 preDaysAdd =-3;
			}
			
	for(var i=(w2-1+preDaysAdd); i>=0; i--) //��� for ѭ��Ϊ����������Դ������ WebCalendar.day����ʽ�� d/m/yyyy
    {
          preDaysArr.push(prevDays-i);
    }
			
			var nextIndex=1;
			var lastIndex=0;
			var start=0;
			var d=1;
			
			w=w+preDaysAdd;
			
			for(var i=0;i<7;i++)
			{
				var div=document.createElement("div");
				div.style.cssText="width:175px;height:23px;margin-bottom:2px;background:#fff;";
				for(var k=0;k<7;k++)
				{
					var p=document.createElement("p");
					p.style.cssText="width:25px;height:20px;float:left;text-align:center;padding-top:3px;margin:0px;color:#ccc;";
					if(start>=w&&d<=dayAry[M-1])
					{
					
//						if(this.beforeNotUsed&&this.date.beforeTheDate(Y,M,d))
//						{
//							p.innerHTML=d;
//						}
//						else if(this.afterNotUsed&&this.date.afterTheDate(Y,M,d))
//						{
//							p.innerHTML=d;
//						}
//						else
//						{
                          var selStyle='';
                            if((this.currentDate.D==d)&&(this.currentDate.M==dateObj.M)&&(this.currentDate.Y==dateObj.Y))
                            {//�ж��ǽ���
                             selStyle='background-color:#99aabb;';
                       
                            }
                            else{
                               'background-color:#000000;';
                            }
							
                            p.innerHTML="<a style='"+selStyle+"' id='"+this.calendarName+'_ti_'+d+"' href='javascript:"+this.calendarName+".fillDate(\""+Y+"-"+M+"-"+d+"\");void(0);'>"+d+"</a>";
							
//						}
						d++;
					}else{
                        if(d==1)
                        {
                          // p.innerHTML=preDaysArr[k];
                          p.innerHTML="<a style='color:gray;' href='javascript:"+this.calendarName+".setMenu("+this.date.getThePreDate(dateObj,this.minYear)+");void(0)'>"+preDaysArr[lastIndex++]+"</a>";
                        }
                        else
                        {
                          p.innerHTML="<a style='color:gray;' href='javascript:"+this.calendarName+".setMenu("+this.date.getTheNextDate(dateObj,this.maxYear)+");void(0)'>"+(nextIndex++)+"</a>";
                        }
					}
					
					start>w?start=w:start++;
					div.appendChild(p);
					
				}
			  this.calendarDateContainer.appendChild(div);
			}
		}
		
		this.setSelStyle=function(id,isSel)
		{
		var currentDate=this.selDate.split('-');
		var toDay=this.date.getTheDate();
		  if(isSel)
		  {
		    if((currentDate[2]==toDay.D)&&(currentDate[1]==toDay.M)&&(currentDate[0]==toDay.Y))
		    {
		        document.getElementById(this.calendarName+'_ti_'+id).style.backgroundColor='#557799';
		    }
		    else
		    {
		       document.getElementById(this.calendarName+'_ti_'+id).style.backgroundColor='#aaccee';
		    }
		   
		  }
		  else
		  {
		    if(id==0)
		    {
               return;	
		    }
		    if((currentDate[2]==toDay.D)&&(currentDate[1]==toDay.M)&&(currentDate[0]==toDay.Y))
		    {
		        document.getElementById(this.calendarName+'_ti_'+id).style.backgroundColor='#99aabb';
		    }
		    else
		    {
		      document.getElementById(this.calendarName+'_ti_'+id).style.backgroundColor='#ffffff';
		    }
		  }		
		}

				/*�����������Ʋ˵�*/
		this.setMenu=function(dateObj){
			this.calendarMenuContainer.innerHTML="<a href='javascript:"+this.calendarName+".setMenu("+this.date.getThePreDate(dateObj,this.minYear)+");void(0)'><<</a>  "+dateObj.Y+"-"+(dateObj.M>9?dateObj.M:"0"+dateObj.M)+"  <a href='javascript:"+this.calendarName+".setMenu("+this.date.getTheNextDate(dateObj,this.maxYear)+");void(0)'>>></a>";
			this.setDate(dateObj);
	
		}

		/*��ʼ��*/
		this.initial=function(){
	        
			this.calendarContainer=document.createElement("div");
			this.calendarContainer.style.cssText="width:175px;border-left:8px solid #c3d9ff;border-right:8px solid #c3d9ff;padding:0px;background:#c3d9ff;font:12px Arial;margin-bottom:1px;display:"+this.display+";";
			this.calendarContainer.setAttribute("css",this.calendarContainer.style.cssText);
			this.calendarMenuContainer=document.createElement("div");
			this.calendarMenuContainer.style.cssText="width:175x;height:25px;background:#c3d9ff;color:#fff;text-align:center;padding-top:3px;";
			this.calendarWeekContainer=document.createElement("div");
			this.calendarWeekContainer.style.cssText="width:175px;height:25px;margin-bottom:1px;";
			for(i=0;i<7;i++)
			{
				var p=document.createElement("p");
				p.style.cssText="width:25px;height:20px;float:left;text-align:center;padding-top:3px;border-bottom:1px solid #666;margin:0px;background:#c3d9ff;";
				p.innerHTML=this.weekAry[i];
				this.calendarWeekContainer.appendChild(p);
			}
			
			this.calendarDateContainer=document.createElement("div");
		    this.calendarDateContainer.style.cssText="width:175px;background:#fff;";
			this.calendarCloseContainer=document.createElement("div");
			this.calendarCloseContainer.style.cssText=this.calendarMenuContainer.style.cssText;
			//this.calendarCloseContainer.innerHTML="<a href='javascript:"+this.calendarName+".calendarContainer.style.display=\"none\";void(0);'>�ر�����</a>";
			this.calendarContainer.appendChild(this.calendarMenuContainer);
			this.calendarContainer.appendChild(this.calendarWeekContainer); 
			this.calendarContainer.appendChild(this.calendarDateContainer); 
			this.calendarContainer.appendChild(this.calendarCloseContainer);
			//alert('1');
		
			document.getElementById(this.calendarName+'_div').appendChild(this.calendarContainer);
		  //  setTimeout(new Function( document.body.appendChild(this.calendarContainer)),50);
				
             this.currentDate=this.date.getTheDate();
			this.setMenu(this.date.getTheDate());
			this.currentDateId=0;
			this.selDate='';
		}
		
		this.checkYear=function(){
	
			if(!this.minYear.toString().match(/\d\d\d\d/))
			{
				alert("���������벻��ȷ����������");
			}
			else if(!this.maxYear.toString().match(/\d\d\d\d/))
			{
				alert("���������벻��ȷ����������");
			}
			else if(eval("0+"+this.maxYear)<=eval("0+"+this.minYear))
			{
				alert("�����ݱ������������,��������");
			}
			else if(eval("0+"+this.maxYear)<this.date.getFullYear())
			{
				alert("�����ݱ�����ڻ��ߵ��ڵ�ǰ���");
			}
			else
			{
			 this.initial();
			}
		}
		this.checkYear();
//		alert('2');

}
	
function calendarOpenMonthEvent(eventStr,timeStr)
{
    if(eventStr=="<Time></Time>")
    {
      return;
    }
    var url = "/plugin/BasicPluginAspects/calendar/CalendarMonthOpenWindow.aspx?eventStr=" + escape(eventStr) + "&timeStr=" + escape(timeStr);

    ShowModalDialogInFrame(url);
}  
//-----------cn_mynet_context.js------------------
cn_mynet_Context = function(container,topContainer,aspectUID,renderMode)
{
   //当前控件被包含的容器，一般来说是对应一个HTML的对象，一个DIV或者一个TD。
   //控件的内容直接输出到这个容器里
   this.container = container;
   //当前控件被包含的顶级容器，是mynet里边一个控件的最外围的HTML元素，通常是一个控件的边框。对应HTML对象是DIV或者Table
   this.topContainer = topContainer;
   //页面引擎分配给当前控件的唯一ID，该变量可以用来作为HTML元素，javascript变量等的唯一标识
   this.aspectUID = aspectUID;
   //当前控件的输出模式，包括设计状态和预览状态.design 和 preview两种状态
   this.renderMode = renderMode;
   //当前控件的width
   this.width = 0;
   //当前控件的高度
   this.height =0;
   //所有匿名数据的集合
   var allAnonymousData = null;
   //当前Site的Url
   this.curSiteHomeUrl = "http://"+ window.location.hostname;
  
   
   
   //获取保存在狼烟服务器的数据，目前一个控件在狼烟保存的数据限定在10K
   //参数：数据名称
   //返回：字符串
   this.loadAnonymousData = function(dataName)
   {
   
   }
   
   //释放内存
   this.dispose = function()
   {
     this.container = null;
     this.topContainer = null;
     allAnonymousData = null;
   }
}

//用来请求远程数据的Request
//支持跨域请求，支持Post和Get方式
//url: 数据来源，如http://www.baidu.com
//method: post 或者 get
//remoteEncoding: 远程服务器的数据编码格式，gb2312 或者 utf-8
//Sample:
/*
var request = new cn_mynet_RequestClient("http://www.baidu.com","get","http://mynet.cn/,"gb2312");
alert(request.getResponseData())
*/
function cn_mynet_RequestClient(url,method,proxySiteUrl,remoteEncoding)
{
  if(url.indexOf("http://")!=0)
  {
    alert("url参数不对，必须以http://开头");
    return;
  }
  var encoding = remoteEncoding =="" ? "utf-8":remoteEncoding;
  var formDatas = new Array;
  var formKeys = new Array;
  //构造Form对象
  this.AddFormKeyValue = function(key,value)
  {
     formDatas[key] =value;
     formKeys.push(key);
  }
  
  this.GetFormDatas = function()
  {
     return formDatas;
  }
  
  //私有方法
  this.builderDatas = function()
  {
    var len = formKeys.length;
    var postStr ="";
    for(var i=0;i<len;i++)
    {
       if(postStr !="")
       {
         postStr +="&";
       }
       postStr += escape(formKeys[i])+"="+escape(formDatas[formKeys[i]]);
    }
    return postStr;
  }
  
  this.getResponseData = function()
  {
    var realUrl = "";
    //证明没有垮域，否则认为是跨域
    if(url.indexOf("http://"+window.location.hostname)==0)
    {
      //可以直接请求，无须服务器端代理
      realUrl = url;
    }
    else
    {
       //要走服务器代理
       realUrl = proxySiteUrl +"plugin/proxy/proxy.aspx?encode="+encoding+"&remoteurl="+escape(url);
    }
    
    var objHttpRequest=null;
    try 
    {
        objHttpRequest = new ActiveXObject('Msxml2.XMLHTTP');
    } 
    catch (e) 
    {
        try 
        {
            objHttpRequest = new ActiveXObject('Microsoft.XMLHTTP');
        } 
        catch (E) 
        {
            objHttpRequest = new XMLHttpRequest();
        }
    }
    
    objHttpRequest.open(method,realUrl, false);
    if(method.toLowerCase()=="post")
    {
      objHttpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
      objHttpRequest.setRequestHeader("char-set","utf-8");
      objHttpRequest.send(this.builderDatas());
    }
    else
    {
      objHttpRequest.send(null);
    }
    return objHttpRequest.responseText;
  }
}
//-----------colorfulPhotosAlbumJS.js------------------
//��������Ϊ��
//prefix ǰ׺��
//num ����
//time �л�ʱ��
function Colorful(prefix,num,time)
{
    var currentPic = document.getElementById(prefix + "pic_1"); //ȡ��DIVԪ������
    this.prefix = prefix; //ǰ׺
    this.count = num; //����
    this.currentIndex;  //��ǰѡ����
    if(!this.currentIndex)
        this.currentIndex = 1; 
    var self = this; //Ϊ�˱��ⶨʱ������THIS�ؼ��� 
    this.time = time; //ʱ�����
    this.Show = function(index)
    {
        try {
        //�л�չʾ������
            var cPic = document.getElementById(prefix + "pic_" + index);
            for(var i=1;i<=this.count;i++)
            {
                document.getElementById(prefix+"pic_"+i).style.display="none";
            }
            cPic.style.display = "inline-block";
            this.currentPic = cPic;
            this.currentIndex = index;
            this.Play();
        }
        catch(e){}
    }
    //ֹͣ   
    this.Stop = function()
    {
        if(typeof(timerId)!='undefined' && timerId + "" != "")
        {
            clearInterval(timerId);
        }
    }
    //���Ų������ʱ
    this.Play = function()
    {
        this.Stop();
        timerId = setInterval(this.PlayNext,time);
    } 
    //������һ��
    this.PlayNext = function()
    {
        var index = self.currentIndex + 1;
        if(index > self.count)
            index = 1;
        self.Show(index);         
    }   
}
//-----------d_checkSiteType.js------------------

//-----------FadeTextSwitch.js------------------
var FadeTextSwitchEffect=new Object();
//构造函数
FadeTextSwitchEffect=function(textArray,targetId,times,clientTimeId)
{
  this.textArray=textArray; //需切换的文本数组
  this.targetId=targetId;//标志前缀
  this.times=times;//切换时间
  this.currentIndex=0;//初始当前选中项
  this.timeId="";//时间的ID
  

var self=this;  //为了避免THIS关键字作用域不同
//if(this.clientTimeId!=null)
//clearInterval(this.clientTimeId);
  this.clientTimeId=""; //时间ID
  var tempF=function (){ self.Switch(); };   
  this.clientTimeId=setInterval(tempF,3500);

};
//切换文字
FadeTextSwitchEffect.prototype.Switch=function()
{

  var self=this;
  if(this.currentIndex<this.textArray.length)
  {
    self.SwitchText(this.textArray[this.currentIndex]); 
	
	this.currentIndex++;
	if(this.currentIndex==this.textArray.length)
	{
	   this.currentIndex=0;
	}
	
  };


}
//切换文字时,播放特效
FadeTextSwitchEffect.prototype.SwitchText = function(switchValue) {
    var tId = this.targetId + "__sdf__f3";
    if (document.getElementById(tId) != null) {
        var tempDiv = document.getElementById(this.targetId);
        if (tempDiv.filters && tempDiv.filters.length > 0) {
            tempDiv.filters[0].Apply();
            tempDiv.filters[0].Play();
        }
    }
    if (document.getElementById(this.targetId) != null) {
        document.getElementById(this.targetId).innerHTML = "<div id='" + tId + "' class='" + this.targetId + "_cssFade'>" + switchValue + "</div>"; 
    }
}
//此程序是为了避免程序在酷炫工具中重复RENDER时定时器出错的问题.
FadeTextSwitchEffect.prototype.ChangeArray=function(newArray)
{
  this.currentIndex=0;
  this.textArray=newArray;
}
//-----------Func.js------------------

//-----------GraySidePhotoGallery.js------------------
var GraySiderPhotoGallery = new Object();
GraySiderPhotoGallery = function(prefix, jsonPhotos, currentPhotoIndex, photoWidth, photoHeight, currentPageIndex, currentPageSize, currentPageListCount) {
    /*
    prefix=前缀名,通过前缀名+定义好的名字寻找属于该控件的HTML元素
    jsonPhotos=用JSON构建一个PHOTO对象,其中包括,大图片链接,小图片链接,图片名,图片说明,
    currentPhotoIndex:当前图片索引
    photoWidth,PhotoHeight:容器宽高
    */
    this.prefix = prefix;
    this.jsonPhotos = jsonPhotos;
    this.currentPhotoIndex = currentPhotoIndex;
    this.photoWidth = photoWidth;
    this.photoHeight = photoHeight;
    this.delayCount = 0;

    this.fadeTimeId = '';
    this.tranLeftId = '';
    this.tranRightId = '';

    this.photoSpace = 30; //间隔
    this.currentPageIndex = currentPageIndex; //当前页面
    this.currentPageSize = currentPageSize; //当前页面图片数量
    this.currentPageListCount = currentPageListCount; //当前页面列表数
    this.currentPageListIndex = 0; //当前分页列表
    this.currentPageListTotal = (jsonPhotos.length % this.currentPageListCount) > 0 ? (jsonPhotos.length / this.currentPageListCount) + 1 : (jsonPhotos.length / this.currentPageListCount);
    this.currentPageListTotal = parseInt(this.currentPageListTotal);//取整,避免出现小数
}

//展示其边框
GraySiderPhotoGallery.prototype.ShowSider = function(event, target) {

    var self = this;

    self.clearTime(this.tranLeftId);
    var obj = event.toElement ? event.toElement : event.target;

    if (typeof obj == 'undefined') {
        return;
    }
    self.SetTranStyle(document.getElementById(self.prefix + 'TranBackgroundLeft'), 0);
    self.SetTranStyle(document.getElementById(self.prefix + 'TranBackgroundRight'), 0);

    //判读其边框是左还是右
    if (obj.id.indexOf("Right") != -1) {
        document.getElementById(self.prefix + 'ArrowImgRight').style.display = '';
    }
    else {
        document.getElementById(self.prefix + 'ArrowImgLeft').style.display = '';
    }

    //     // debugger;
    // self.DoFade(target.id,7,0,50,4,'',this.tranRightId);
    self.SetTranStyle(target, 50);
}
//关闭侧边栏
GraySiderPhotoGallery.prototype.CloseSider = function(event, target) {

    var self = this;
    var obj = event.toElement ? event.toElement : event.relatedTarget;

    if (typeof obj != 'undefined') {
        var testString = obj.id + "";
        if (testString.indexOf("rrow") != -1) {
            return;
        }
    }
    document.getElementById(self.prefix + 'ArrowImgRight').style.display = 'none';
    document.getElementById(self.prefix + 'ArrowImgLeft').style.display = 'none';

    self.SetTranStyle(target, 0);
    ////     //阻止图片激发此事件     
}
//更换图片
GraySiderPhotoGallery.prototype.ChangPic = function(imgIndex) {
    var self = this;
    self.clearTime(this.fadeTimeId);
    self.clearTime(this.tranLeftId);
    self.clearTime(this.tranRightId);
    //document.getElementById(self.prefix+'OverLoadingTran').filters.alpha.opacity=100;
    self.SetTranStyle(document.getElementById(self.prefix + 'OverLoadingTran'), 100);
    document.getElementById(self.prefix + 'OverLoadingTran').style.display = '';
    self.currentPhotoIndex = (imgIndex);
    var currentIndex = self.currentPageIndex + (this.currentPageListCount * this.currentPageListIndex);
    var src = self.jsonPhotos[currentIndex][imgIndex].bigPhotoSrc;
    //通过RECT属性，制作渐渐剪切出现的效果 
    var rect = "rect(0," + self.photoWidth + "," + self.photoHeight + "," + "0)";
    document.getElementById(self.prefix + 'OverLoading').width = self.photoWidth + 'px';
    document.getElementById(self.prefix + 'OverLoading').height = self.photoHeight + 'px';
    document.getElementById(self.prefix + 'OverLoading').style.clip = rect;
    document.getElementById(self.prefix + 'OverLoading').style.display = '';
    document.getElementById(self.prefix + 'mainPic').src = src;
    document.getElementById(self.prefix + 'ImgTitle').innerHTML = self.jsonPhotos[currentIndex][imgIndex].title;
    document.getElementById(self.prefix + 'ImgText').innerHTML = self.jsonPhotos[currentIndex][imgIndex].content;

}

GraySiderPhotoGallery.prototype.ImageLoad = function(Img) {
    //  alert('1');
    var self = this;
    
    if ((Img.height == 0) || (Img.width == 0)) {

        Img.height = self.photoHeight;
        Img.width = self.photoWidth;

        //当初始化时没有读取出图片的宽高时，使用默认数值，不再调整位置
        //        self.transitionCurtain(document.getElementById(self.prefix + 'OverLoading'), self.photoWidth, 50);
        //        self.DoFade(self.prefix + "OverLoadingTran", 18, 100, 0, -4, "", this.fadeTimeId);
        //        return;


    }

    var leftVar = self.getLeft(document.getElementById(self.prefix + 'TranBackgroundLeft'));
    //      document.getElementById(self.prefix+'TranBackgroundRight').style.height=Img.height;
    //     document.getElementById(self.prefix+'TranBackgroundLeft').style.height=Img.height;



    //document.getElementById(self.prefix + 'OverLoadingTran').style.height = Img.height;
    //document.getElementById(self.prefix + 'OverLoadingTran').style.width = Img.width;
    var ctrlid = self.prefix + 'OverLoadingTran';
    var ctrl = document.getElementById(ctrlid);
    ctrl.style.height = Img.height == 0 ? self.photoHeight : Img.height;
    ctrl.style.width = Img.width == 0 ? self.photoWidth : Img.width;

    var pLeft;
    var pTop;
    //如果此时刻没有加载width or height 为保证显示样式好看特作如下位置处理，但好像这里pLeft,pTop怎么处理都是0.
    if (Img.width == 0 || Img.height == 0) {
        pLeft = 0;
        pTop = 0;
    }
    else {
        pLeft = (parseInt(self.photoWidth) - parseInt(Img.width)) / 2; 
        pTop = (parseInt(self.photoHeight) - parseInt(Img.height)) / 4; 
    }

    document.getElementById(self.prefix + 'mainPic').style.marginLeft = pLeft;
    document.getElementById(self.prefix + 'mainPic').style.marginTop = pTop;

    ctrl.style.marginLeft = pLeft;
    ctrl.style.marginTop = pTop;

    self.transitionCurtain(document.getElementById(self.prefix + 'OverLoading'), self.photoWidth, 50);
    //   var es=self.antiEnd;
    self.DoFade(self.prefix + "OverLoadingTran", 18, 100, 0, -4, "", this.fadeTimeId);

}

//修改小图片的样式
GraySiderPhotoGallery.prototype.ChangePicBox = function(imgNum) {
    var self = this;
    var box = document.getElementById(self.prefix + 'overSmallImg' + imgNum);
    var tImg = document.getElementById(self.prefix + 'smallImg' + imgNum);
    box.style.display = "";
    box.style.height = tImg.height + 1 + "px";
    box.style.width = tImg.width + 1 + "px";
    box.style.clip = "rect(0," + parseInt(tImg.width + 1) + "px," + parseInt(tImg.height + 1) + "px,0)";
}
//获得TOP
GraySiderPhotoGallery.prototype.getTop = function(e) {
    var self = this;
    var offset = e.offsetTop;
    if (e.offsetParent != null) offset += self.getTop(e.offsetParent);
    return offset;
}
//获得LEFT
GraySiderPhotoGallery.prototype.getLeft = function(e) {
    var self = this;
    var offset = e.offsetLeft;
    if (e.offsetParent != null) offset += self.getLeft(e.offsetParent);
    return offset;
}
//小图片弹出时 将覆盖其上的透明白框去掉
GraySiderPhotoGallery.prototype.smallImageOut = function(event, imgNum) {
    var self = this;
    var obj = event.toElement ? event.toElement : event.relatedTarget;

    if (typeof obj != 'undefined') {
        if (obj.id.indexOf('Sider') == -1) {
            return;
        }
    }     
    var currentId = self.prefix + 'overSmallImg' + imgNum;
    self.transitionCurtainCenter(document.getElementById(currentId), 0, 50);
}
//获取当前CSS
GraySiderPhotoGallery.prototype.retrieveComputedStyle = function(element, styleProperty) {

    var self = this;
    var computedStyle = null;
    if (typeof element.currentStyle != "undefined") {
        computedStyle = element.currentStyle;
    }
    else {
        computedStyle = document.defaultView.getComputedStyle(element, null);
    }
    return computedStyle[styleProperty];
}
//透明的应用
GraySiderPhotoGallery.prototype.GoFade = function(img, value, step, myfun, timeId) {
    // IE6
    var self = this;
    var im = document.getElementById(img);
    if (typeof im.filters == 'object') {
        if ((step > 0) ? im.filters.alpha.opacity < value : im.filters.alpha.opacity > value) {
            im.filters.alpha.opacity += step;
        }
        else {
            self.clearTime(timeId);
            if (typeof myfun == 'function') {

                myfun();
            }
        }
    }
    else if (typeof im.style.MozOpacity != 'undefined') {
        value = value / 100;
        step = step / 100;
        if ((step > 0) ? im.style.MozOpacity < value : im.style.MozOpacity > value) {
            im.style.MozOpacity = Number(im.style.MozOpacity) + step;
        }
        else {
            self.clearTime(timeId);
            if (typeof myfun == 'function') {
                myfun();
            }
        }
    }
    else if (typeof img.style.KhtmlOpacity != 'undefined') {
        value = value / 100;
        step = step / 100;
        if ((step > 0) ? im.style.KhtmlOpacity < value : im.style.KhtmlOpacity > value) {
            im.style.KhtmlOpacity = Number(im.style.KhtmlOpacity) + step;
        }
        else {
            self.clearTime(timeId);
            if (typeof myfun == 'function') {
                myfun();
            }
        }
    }
    else {
        value = value / 100;
        step = step / 100;
        if ((step > 0) ? im.style.Opacity < value : im.style.Opacity > value) {
            im.style.Opacity = Number(im.style.Opacity) + step;
        }
        else {
            self.clearTime(timeId);
            if (typeof myfun == 'function') {
                myfun();
            }

        }
    }
}
//定时执行FADE 方法 
GraySiderPhotoGallery.prototype.DoFade = function(imgId, times, start, end, step, myfun, timeId) {
    var self = this;

    //  self.clearTime();

    var im = document.getElementById(imgId);

    self.SetTranStyle(im, start);
    //  var fun="self.GoFade('"+imgId+"',"+end+","+step+","+myfun+")";
    timeId = setInterval(function() { self.GoFade(imgId, end, step, myfun, timeId) }, times);  //
}

//清除定时器,特别是FADE时的定时器
GraySiderPhotoGallery.prototype.clearTime = function(timeId) {

    var self = this;
    document.getElementById(self.prefix + 'OverLoading').style.display = 'none';
    document.getElementById(self.prefix + 'OverLoadingTran').style.display = 'none';

    if (timeId) clearInterval(timeId);
}

//剪切功能实现
GraySiderPhotoGallery.prototype.transitionCurtainCenter = function(target, endSize, increment, myfun) {
    var self = this;
    var increment = 3;
    var width = target.offsetWidth;
    var height = target.offsetHeight;

    if (target.style.clip.indexOf("rect") == -1) {
        target.style.clip = "rect(0," + (width - increment) + "px," + height +
      "px," + increment + "px)";
    }
    else {
        var clipDimensions = self.getClipDimensions(target.style.clip);

        if ((clipDimensions[1] > 0) || (clipDimensions[2] > 0)) {
            clipDimensions[0] = clipDimensions[0] + increment;
            clipDimensions[1] = clipDimensions[1] - increment;
            clipDimensions[2] = clipDimensions[2] - increment;
            clipDimensions[3] = clipDimensions[3] + increment;
            target.style.clip = "rect(" + clipDimensions[0] + "px," + clipDimensions[1] + "px," + clipDimensions[2] + "px," + clipDimensions[3] + "px )";
            setTimeout(function() { self.transitionCurtainCenter(target, endSize, increment, myfun) }, 50);
        }
        else {
            if (typeof myfun == 'function') {
                myfun();
            }
        }
    }
    return true;
}

//该方法对相应的元素施用剪辑
GraySiderPhotoGallery.prototype.transitionCurtain = function(target, endSize, increment) {
    var self = this;
    var increment = 50;
    var width = target.offsetWidth;
    var height = target.offsetHeight;
    if (target.style.clip.indexOf("rect") == -1) {
        target.style.clip = "rect(0," + (width - increment) + "px," + height +
      "px," + increment + "px)";
    }
    else {
        var clipDimensions = self.getClipDimensions(target.style.clip);

        if (clipDimensions[0] < parseInt(endSize)) {
            clipDimensions[0] = clipDimensions[0] + increment;
            target.style.clip = "rect(" + clipDimensions[0] + "px," + clipDimensions[1] + "px," + clipDimensions[2] + "px," + clipDimensions[3] + "px )";
            setTimeout(function() { self.transitionCurtain(target, endSize, increment) }, 50);
        }
        else {

        }

    }

    return true;
}

//动画停止时,某些元素关闭
GraySiderPhotoGallery.prototype.antiEnd = function() {

    var self = this;

    document.getElementById(self.prefix + 'OverLoading').style.display = 'none';
    document.getElementById(self.prefix + 'OverLoadingTran').style.display = 'none';

}

//获取CSS CLIP属性中的特定元素内容
GraySiderPhotoGallery.prototype.getClipDimensions = function(clipString) {
    var clipValue = clipString.replace(/rect\((.*)\)/, "$1");
    if (/,/.test(clipValue)) {
        var clipDimensions = clipValue.split(",");
    }
    else {
        var clipDimensions = clipValue.split(" ");
    }

    for (var i = 0; i < clipDimensions.length; i++) {
        clipDimensions[i] = parseInt(clipDimensions[i]);
    }

    return clipDimensions;
}
//播放下一张
GraySiderPhotoGallery.prototype.GoNext = function() {
    var self = this;

  //边界判断
    var currentIndex = self.currentPageIndex + (this.currentPageListCount * this.currentPageListIndex);
    if (this.currentPhotoIndex < (this.jsonPhotos[currentIndex].length - 1)) {
        this.currentPhotoIndex++;
        this.ChangPic(this.currentPhotoIndex);
    }

}
//播放上一张
GraySiderPhotoGallery.prototype.GoPre = function() {
//边界判断
    if (this.currentPhotoIndex > (0)) {
        this.currentPhotoIndex--;
        this.ChangPic(this.currentPhotoIndex);
    }
}
//按索引切换图片
GraySiderPhotoGallery.prototype.ChangePageIndex = function(pageIndex, IsChangePageList) {
    var self = this;

    if (typeof IsChangePageList == 'undefined') {
        if (pageIndex == self.currentPageIndex) {
            return;
        }
    }
    self.SetCurrentPageStyle(self.currentPageIndex, false); // chang old style
    self.currentPageIndex = pageIndex;
    var currentIndex = self.currentPageIndex + (this.currentPageListCount * this.currentPageListIndex);

    var arrSize = self.jsonPhotos[currentIndex].length;
    for (var i = 0; i < self.currentPageSize; i++) {
        if (i < arrSize) {
            document.getElementById(self.prefix + 'smallImg' + i).src = self.jsonPhotos[currentIndex][i].smallPhotoSrc;
            document.getElementById(self.prefix + 'imageBox' + i).style.display = '';
        }
        else {
            document.getElementById(self.prefix + 'imageBox' + i).style.display = 'none';
        }
    }
    self.SetCurrentPageStyle(self.currentPageIndex, true); //set new style 
    this.currentPhotoIndex = 0;
    this.ChangPic(this.currentPhotoIndex);

}
//选择透明的样式
GraySiderPhotoGallery.prototype.SetTranStyle = function(target, degreen) {

    if (typeof target.filters == 'object') {
        target.filters.alpha.opacity = degreen;
    }
    else if (typeof target.style.MozOpacity != 'undefined') {
        target.style.MozOpacity = degreen / 100;
    }
    else if (typeof target.style.KhtmlOpacity != 'undefined') {
        target.style.KhtmlOpacity = degreen / 100;
    }
    else {
        target.style.Opacity = degreen / 100;
    }

}
//加粗选中的页面数字
GraySiderPhotoGallery.prototype.SetCurrentPageStyle = function(id, isCurrentPage) {
    if (id == -1) {
        return;
    }

    //  id=(id-this.currentPageListIndex);

    var tempId = this.prefix + "Page" + id;

    var temp = document.getElementById(tempId);

    if (isCurrentPage == true) {
        temp.style.fontWeight = 'bold';
        temp.style.textDecoration = 'none';
    }
    else {
        temp.style.fontWeight = 'normal';
        temp.style.textDecoration = 'underline';
    }
}
//切换数据
GraySiderPhotoGallery.prototype.ChangePageList = function(pageListIndex) {
    var self = this;
    var arrSize = self.jsonPhotos.length;
    for (var i = 0; i < self.currentPageListCount; i++) {

        var temp = document.getElementById(self.prefix + 'Page' + i);
        var pageIndex = (self.currentPageListIndex * this.currentPageListCount) + i;
        if (pageIndex < arrSize) {

            temp.innerHTML = pageIndex + 1;
            var tpageIndex = pageIndex;

            temp.style.display = '';
        }
        else {
            temp.style.display = 'none';
        }
    }

    this.ChangePageIndex(0, true);

}
//下一页数据
GraySiderPhotoGallery.prototype.GoNextPageList = function() {

    if (this.currentPageListIndex < (this.currentPageListTotal - 1)) {
        this.currentPageListIndex++;
        this.ChangePageList(this.currentPageListIndex);
    }
}
//上一页数据
GraySiderPhotoGallery.prototype.GoPrePageList = function() {
    if (this.currentPageListIndex > (0)) {
        this.currentPageListIndex--;
        this.ChangePageList(this.currentPageListIndex);
    }
}
//转入特定的URL
GraySiderPhotoGallery.prototype.GoUrl = function(isBlank) {
    var self = this;
    var imgIndex = self.currentPhotoIndex;
    var currentIndex = self.currentPageIndex + (this.currentPageListCount * this.currentPageListIndex);
    var src = self.jsonPhotos[currentIndex][imgIndex].url;
    if (src + '' == '') {
        src = '#';
    }
    if (src == '#') {
        return;
    }

    if (isBlank == 'False') {

        window.open(src);
    }
    else {
        location.href = src;
    }

}
//-----------helpPopMenu.js------------------
//����popmenu���script Start

//����popmenu
var helpPopObj;

//��������
var helpelements3=new Array();


//��Ӱ�������
function AddhelpElement3(content,URL)
{
    var widthStyle="";
    if(helpelements3.length!=0)
    {
        widthStyle="width:100%;";
    }
    helpelements3.push( "&nbsp;&nbsp;<span onclick=\"mynetCnShowHelpWin('"+URL+"');\"style='cursor:pointer;"+widthStyle+"'>"+
                        "<a href='#' class='toolbox_helpcontent' ><nobr>"+content+"</nobr></a></span>");
}
//��ȡ��������
function ShowhelpElement3()
{   
    var ShownContent="";
    
	for(i=1;i<helpelements3.length;i++)
	{
	    ShownContent+="<tr><td height='20' width='100%'  style='background-color:#FFFFFF'"+ 
	                    "onmouseover='onselecthelp(this,true)'onmouseout='onselecthelp(this,false)' align='left'>";
	    ShownContent+=helpelements3[i];
	    ShownContent+="</td></tr>";
	}
	return ShownContent;
}

//ѡ��������ݱ�������
function onselecthelp(obj,isSelect)
{
    if (isSelect)
    {
        obj.style.backgroundColor="#D9D9D9";
    }
    else 
    {
        obj.style.backgroundColor="#FFFFFF";
    }
}

var maxHeight=0;
//ҳ����ʾ����
function showhelp3()
{  
    helpPopObj=document.getElementById("helpLayer");
    var helpInner="";
    //����������Ԫ��ʱ����ȡ�������鲢��ʾ
    if(helpelements3.length<=1)
    {
       maxHeight=20;       
       helpInner="<tr><td height='"+maxHeight+"' style='background-color:#FFFFFF'></td></tr>";
    } 
    else
    {
        helpInner=ShowhelpElement3();
        maxHeight=20*(helpelements3.length-1)+2;
    }
    var content ='<table style="FILTER:alpha(opacity=90) shadow(color=#ffffff,direction=135);" id="toolTipTable" width="100%" cellspacing="0" cellpadding="0" border="0" >'+
                helpInner+'</table>';
    helpPopObj.innerHTML=content;
    speadDiv(helpPopObj,maxHeight);
    
}
//ҳ�����ذ���
function hidehelp3()
{
    if(helpPopObj!=null)
    {
        shrinkDiv(helpPopObj,maxHeight);
    }
}
//չ��div
function speadDiv(obj,maxh)
{
    var h=obj.offsetHeight;
    if(obj.style.display=='none')
    {
        function dmove()
        {
            h+=5; //���ò�չ�����ٶ�
            if(h>=maxh)
            {
                obj.style.height=maxh+'px';
                clearInterval(iIntervalId);
                obj.focus();
            }
            else
            {
                obj.style.display='block';
                obj.style.height=h+'px';
                
            }
        }
    }
    iIntervalId=setInterval(dmove,10);
}
//����div
function shrinkDiv(obj,maxh)
{
    var h=parseInt(obj.style.height.substring(0,obj.style.height.length-2));
    if (h==maxh)
    {
    
        function dmove()
        {
            h-=5;//���ò��������ٶ�
            if(h<=0)
            {
                obj.style.display='none';
                clearInterval(iIntervalId);
                helpPopObj=null;
            }
            else
            {
                obj.style.height=h+'px';
            }
        }
        iIntervalId=setInterval(dmove,10);
    }
}
var helpTimer;
//��ʾ/���ذ���
function activehelp()
{
    var target=document.getElementById("helpTopElement");
    var helpobj=document.getElementById("helpLayer");
    if (helpobj.style.top=="")
    {
        helpobj.style.top=getoffset(target).offsetTop+target.offsetHeight+3;
    }
    if (helpobj.style.left=="")
    {
        helpobj.style.left=getoffset(target).offsetLeft-2;
    }
    if(helpPopObj==null)
    {
        showhelp3();
        helpTimer=setTimeout('hidehelp3()',3000);
    }
    else
    {
        if(helpTimer!=null)
            clearTimeout(helpTimer);
        hidehelp3();
    }
}

function  mynetCnShowHelpWin(url)
{
    var parameter="";
    if(url!=""&&url!=null)
      parameter="?contenturl="+url;
  ShowModalDialogInFrame("~/plugin/HelpCenter/HelpCentermain.aspx"+parameter);
  return false;
}

//��ȡ�ؼ��ľ���λ��   
function getoffset(e) 
{  
    this.offsetTop=Mynet_ObjectTop(e);
    this.offsetLeft=Mynet_ObjectLeft(e);
    return this; 
}  

//����popmenu���script End
//-----------jquery.pngFix.pack.js------------------
/**
 * --------------------------------------------------------------------
 * jQuery-Plugin "pngFix"
 * Version: 1.1, 11.09.2007
 * by Andreas Eberhard, andreas.eberhard@gmail.com
 *                      http://jquery.andreaseberhard.de/
 *Something altered by zhangxinxu for supporting that the images can be located at HTML
 * Copyright (c) 2007 Andreas Eberhard
 * Licensed under GPL (http://www.opensource.org/licenses/gpl-license.php)
 */
eval(function(p,a,c,k,e,r){e=function(c){return(c<62?'':e(parseInt(c/62)))+((c=c%62)>35?String.fromCharCode(c+29):c.toString(36))};if('0'.replace(0,e)==0){while(c--)r[e(c)]=k[c];k=[function(e){return r[e]||e}];e=function(){return'([237-9n-zA-Z]|1\\w)'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(s(m){3.fn.pngFix=s(c){c=3.extend({P:\'http://www.zhangxinxu.com/study/image/pixel.gif\'},c);8 e=(o.Q=="t R S"&&T(o.u)==4&&o.u.A("U 5.5")!=-1);8 f=(o.Q=="t R S"&&T(o.u)==4&&o.u.A("U 6.0")!=-1);p(3.browser.msie&&(e||f)){3(2).B("img[n$=.C]").D(s(){3(2).7(\'q\',3(2).q());3(2).7(\'r\',3(2).r());8 a=\'\';8 b=\'\';8 g=(3(2).7(\'E\'))?\'E="\'+3(2).7(\'E\')+\'" \':\'\';8 h=(3(2).7(\'F\'))?\'F="\'+3(2).7(\'F\')+\'" \':\'\';8 i=(3(2).7(\'G\'))?\'G="\'+3(2).7(\'G\')+\'" \':\'\';8 j=(3(2).7(\'H\'))?\'H="\'+3(2).7(\'H\')+\'" \':\'\';8 k=(3(2).7(\'V\'))?\'float:\'+3(2).7(\'V\')+\';\':\'\';8 d=(3(2).parent().7(\'href\'))?\'cursor:hand;\':\'\';p(2.9.v){a+=\'v:\'+2.9.v+\';\';2.9.v=\'\'}p(2.9.w){a+=\'w:\'+2.9.w+\';\';2.9.w=\'\'}p(2.9.x){a+=\'x:\'+2.9.x+\';\';2.9.x=\'\'}8 l=(2.9.cssText);b+=\'<y \'+g+h+i+j;b+=\'9="W:X;white-space:pre-line;Y:Z-10;I:transparent;\'+k+d;b+=\'q:\'+3(2).q()+\'z;r:\'+3(2).r()+\'z;\';b+=\'J:K:L.t.M(n=\\\'\'+3(2).7(\'n\')+\'\\\', N=\\\'O\\\');\';b+=l+\'"></y>\';p(a!=\'\'){b=\'<y 9="W:X;Y:Z-10;\'+a+d+\'q:\'+3(2).q()+\'z;r:\'+3(2).r()+\'z;">\'+b+\'</y>\'}3(2).hide();3(2).after(b)});3(2).B("*").D(s(){8 a=3(2).11(\'I-12\');p(a.A(".C")!=-1){8 b=a.13(\'url("\')[1].13(\'")\')[0];3(2).11(\'I-12\',\'none\');3(2).14(0).15.J="K:L.t.M(n=\'"+b+"\',N=\'O\')"}});3(2).B("input[n$=.C]").D(s(){8 a=3(2).7(\'n\');3(2).14(0).15.J=\'K:L.t.M(n=\\\'\'+a+\'\\\', N=\\\'O\\\');\';3(2).7(\'n\',c.P)})}return 3}})(3);',[],68,'||this|jQuery||||attr|var|style||||||||||||||src|navigator|if|width|height|function|Microsoft|appVersion|border|padding|margin|span|px|indexOf|find|png|each|id|class|title|alt|background|filter|progid|DXImageTransform|AlphaImageLoader|sizingMethod|scale|blankgif|appName|Internet|Explorer|parseInt|MSIE|align|widows|inherit|display|inline|block|css|image|split|get|runtimeStyle'.split('|'),0,{}))
//-----------JumpTextEffect.js------------------
var JumpTextEffect=new Object();
JumpTextEffect=function(jumpText,targetId,fontsize)
{
this.message=jumpText;
this.mes=new Array();
this.mes[0]=-1;
this.mes[1]=-4;
this.mes[2]=-7;
this.mes[3]=-10;
this.mes[4]=-7;
this.mes[5]=-4;
this.mes[6]=-1;
this.num=0;
this.num2=0;
this.txt="";
this.fontsize=fontsize;
this.jumpId=targetId;

}
JumpTextEffect.prototype.JumpInit=function()
{
//add __uhgnb8s_032 it mark identity
    if(this.message.length > 1){
    for(var i=0; i !=this.message.length;i++){       
        this.txt=this.txt+"<span style='position:relative;' class='"+this.jumpId+"_cssJump' id='"+this.jumpId+""+i+"__uhgnb8s_032'>"+this.message.charAt(i)+"</span>"};     
        document.getElementById(this.jumpId).innerHTML=this.txt;
        this.txt="";
        this.JumpTopCharToLeft();
    }
    else{
      //Error Do NoThing
    }
}
JumpTextEffect.prototype.JumpTopCharToLeft=function()
{
    var self=this;
    var nfinal=document.getElementById(this.jumpId+"0__uhgnb8s_032");
    if(nfinal==null)
    {
      return;
    }
           
    nfinal.style.left=-this.num2;
    if(this.num2 != 9)
    {
    this.num2=this.num2+3;
    var tempF=function (){  self.JumpTopCharToLeft(); };
    setTimeout(tempF,50);
   }
   else
   {
     this.JumpTopCharToRight();
   }
}

JumpTextEffect.prototype.JumpTopCharToRight=function()
{ 
    var self=this;
    var nfinal=document.getElementById(this.jumpId+"0__uhgnb8s_032");
    if(nfinal==null)
    {
      return;
    }
    
    nfinal.style.left=-this.num2;
    if(this.num2 != 0)
    {
     this.num2=this.num2-3;
      var tempF=function (){  self.JumpTopCharToRight(); };
      setTimeout(tempF,50);
     }
    else
    {
        self.AllJump();
    }
}

JumpTextEffect.prototype.AllJump=function()
{

   var self=this;
   this.txt="";
   for(var i=0;i !=this.message.length;i++)
   {
     if(i+this.num > -1 && i+this.num < 7)
     {
       this.txt=this.txt+"<span class='"+this.jumpId+"_cssJump' style='position:relative;top:"+this.mes[i+this.num]+"'>"+this.message.charAt(i)+"</span>";
     }
      else
      {
        this.txt=this.txt+"<span class='"+this.jumpId+"_cssJump'>"+this.message.charAt(i)+"</span>";
      }
   }
   if(document.getElementById(this.jumpId)==null)
   {
      return;
   }
    document.getElementById(this.jumpId).innerHTML=this.txt;
    this.txt="";
    if(this.num != (-this.message.length))
    {
       this.num--;
       var tempF=function (){  self.AllJump(); };
       setTimeout(tempF,50);
    }
    else
    {
       this.num=0;
       var tempF=function (){  self.JumpInit(); };
       setTimeout(tempF,50);
    }

}


//-----------liquidADJS.js------------------
//����ͼƬJS�ļ�
//id ����ID
//width ���
//longwidth �䳤��Ŀ��
//avgwidth ƽ�����

function Liquids(id,width,longwidth,avgwidth){
    eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('n 19=l(1W){n 4h=l(){m(9.1n&&15[0]!=\'6d\')k 9.1n.2K(9,15);T k 9};P(n C 14 9)4h[C]=9[C];4h.Y=1W;k 4h};19.1H=l(){};19.Y={V:l(1W){n 4g=Q 9(\'6d\');n 6c=l(2C,1x){m(!2C.2K||!1x.2K)k U;k l(){9.1A=2C;k 1x.2K(9,15)}};P(n C 14 1W){n 2C=4g[C];n 1x=1W[C];m(2C&&2C!=1x)1x=6c(2C,1x)||1x;4g[C]=1x}k Q 19(4g)},26:l(1W){P(n C 14 1W)9.Y[C]=1W[C]}};2a.V=l(){n 12=15;12=(12[1])?[12[0],12[1]]:[9,12[0]];P(n C 14 12[1])12[0][C]=12[1][C];k 12[0]};2a.5f=l(){P(n i=0;i<15.11;i++)15[i].V=19.Y.26};Q 2a.5f(51,1t,5E,6h,19);m(5u 3L==\'2R\'){n 3L=19.1H;3L.Y={}}T{3L.Y.5c=1h}1a.V=L.V=2a.V;n 8x=1a;l $B(J){m(J===22||J===2R)k U;n B=5u J;m(B==\'4U\'){m(J.5c)k\'G\';m(J.1o)k\'1P\';m(J.8w){23(J.6m){18 1:k\'G\';18 3:k J.8v.1d(/\\S/)?\'8t\':\'4H\'}}}k B};l $2t(J){k!!(J||J===0)};l $8u(J,6b){k($B(J))?J:6b};l $69(2s,1e){k I.7u(I.69()*(1e-2s+1)+2s)};l $4c(1q){8z(1q);8D(1q);k 22};m(1a.8C)1a.34=1a[1a.8B?\'8A\':\'5A\']=1h;T m(L.6I&&!L.8s&&!8r.8j)1a.31=1h;T m(L.8i!=22)1a.5h=1h;m(1a.5A)68{L.8h("8f",U,1h)}67(e){};1t.Y.48=1t.Y.48||l(R,K){P(n i=0;i<9.11;i++)R.1v(K,9[i],i,9)};1t.Y.2g=1t.Y.2g||l(R,K){n 3s=[];P(n i=0;i<9.11;i++){m(R.1v(K,9[i],i,9))3s.1o(9[i])}k 3s};1t.Y.4v=1t.Y.4v||l(R,K){n 3s=[];P(n i=0;i<9.11;i++)3s[i]=R.1v(K,9[i],i,9);k 3s};1t.Y.3W=1t.Y.3W||l(R,K){P(n i=0;i<9.11;i++){m(!R.1v(K,9[i],i,9))k U}k 1h};1t.Y.6a=1t.Y.6a||l(R,K){P(n i=0;i<9.11;i++){m(R.1v(K,9[i],i,9))k 1h}k U};1t.Y.4x=1t.Y.4x||l(3t,N){N=N||0;m(N<0)N=I.1e(0,9.11+N);35(N<9.11){m(9[N]===3t)k N;N++}k-1};1t.V({1u:1t.Y.48,5k:l(1c,11){1c=1c||0;m(1c<0)1c=9.11+1c;11=11||(9.11-1c);n 3v=[];P(n i=0;i<11;i++)3v[i]=9[1c++];k 3v},4E:l(3t){n i=0;35(i<9.11){m(9[i]===3t)9.4R(i,1);T i++}k 9},1d:l(3t,N){k 9.4x(3t,N)!=-1},V:l(3v){P(n i=0;i<3v.11;i++)9.1o(3v[i]);k 9},8g:l(1z){n J={},11=I.2s(9.11,1z.11);P(n i=0;i<11;i++)J[1z[i]]=9[i];k J}});l $A(1P,1c,11){k 1t.Y.5k.1v(1P,1c,11)};l $1u(6e,R,K){k 1t.Y.48.1v(6e,R,K)};5E.V({1d:l(4M,6f){k((5u 4M==\'3Q\')?Q 64(4M,6f):4M).1d(9)},2L:l(){k 5L(9)},6g:l(){k 3J(9)},53:l(){k 9.3i(/-\\D/g,l(2j){k 2j.5z(1).6j()})},6B:l(){k 9.3i(/\\w[A-Z]/g,l(2j){k(2j.5z(0)+\'-\'+2j.5z(1).3F())})},6z:l(){k 9.3F().3i(/\\b[a-z]/g,l(2j){k 2j.6j()})},6i:l(){k 9.3i(/^\\s+|\\s+$/g,\'\')},4k:l(){k 9.3i(/\\s{2,}/g,\' \').6i()},4L:l(1P){n 1f=9.2j(/\\d{1,3}/g);k(1f)?1f.4L(1P):U},3K:l(1P){n 2z=9.2j(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);k(2z)?2z.8q(1).3K(1P):U}});1t.V({4L:l(1P){m(9.11<3)k U;m(9[3]&&(9[3]==0)&&!1P)k\'8p\';n 2z=[];P(n i=0;i<3;i++){n 4y=(9[i]-0).8o(16);2z.1o((4y.11==1)?\'0\'+4y:4y)}k 1P?2z:\'#\'+2z.2V(\'\')},3K:l(1P){m(9.11!=3)k U;n 1f=[];P(n i=0;i<3;i++){1f.1o(5L((9[i].11==1)?9[i]+9[i]:9[i],16))}k 1P?1f:\'1f(\'+1f.2V(\',\')+\')\'}});6h.V({2L:l(){k 5L(9)},6g:l(){k 3J(9)}});51.V({2q:l(u){n R=9;u=2a.V({\'K\':R,\'F\':U,\'15\':22,\'2l\':U,\'2E\':U,\'4A\':U},u||{});m($2t(u.15)&&$B(u.15)!=\'1P\')u.15=[u.15];k l(F){n 12;m(u.F){F=F||1a.F;12=[(u.F===1h)?F:Q u.F(F)];m(u.15)12=12.8m(u.15)}T 12=u.15||15;n 2y=l(){k R.2K(u.K,12)};m(u.2l)k 8n(2y,u.2l);m(u.2E)k 8E(2y,u.2E);m(u.4A){68{k 2y()}67(5Y){k 5Y}}k 2y()}},8F:l(12,K){k 9.2q({\'15\':12,\'K\':K})},4A:l(12,K){k 9.2q({\'15\':12,\'K\':K,\'4A\':1h})()},K:l(K,12){k 9.2q({\'K\':K,\'15\':12})},8X:l(K,12){k 9.2q({\'K\':K,\'F\':1h,\'15\':12})},2l:l(4G,K,12){k 9.2q({\'2l\':4G,\'K\':K,\'15\':12})()},2E:l(4G,K,12){k 9.2q({\'2E\':4G,\'K\':K,\'15\':12})()}});n 1k=Q 19({1n:l(o){m($B(o)==\'3Q\')o=L.6G(o);k $(o)}});l $(o){m(!o)k U;m(o.5X||[1a,L].1d(o))k o;m($B(o)==\'3Q\')o=L.4d(o);m($B(o)!=\'G\')k U;m([\'4U\',\'8W\'].1d(o.4I.3F())||o.V)k o;o.5X=1h;2P.4w(o);o.V=2a.V;m(!(o.5c))o.V(1k.Y);k o};n 2o=Q 19({});Q 2a.5f(2o);L.2M=L.3x;l $$(){m(!15)k U;m(15.11==1){m(!15[0])k U;m(15[0].5W)k 15[0]}n 1b=[];$1u(15,l(1j){23($B(1j)){18\'G\':1b.1o($(1j));1X;18\'3Q\':1j=L.2M(1j);5J:m(1j.11){$1u(1j,l(o){m($(o))1b.1o(o)})}}});1b.5W=1h;k 2a.V(1b,Q 2o)};2o.4q=l(C){k l(){n 12=15;n 3O=[];n 1b=1h;$1u(9,l(o){n 2y=o[C].2K(o,12);m($B(2y)!=\'G\')1b=U;3O.1o(2y)});m(1b)3O=$$(3O);k 3O}};1k.V=l(1W){P(n C 14 1W){3L.Y[C]=1W[C];1k.Y[C]=1W[C];2o.Y[C]=2o.4q(C)}};1k.V({4p:l(o,5U){o=$(o)||Q 1k(o);23(5U){18"5Z":$(o.2h).5V(9,o);1X;18"61":m(!o.5R())$(o.2h).4r(9);T $(o.2h).5V(9,o.5R());1X;18"66":o.4r(9)}k 9},8Z:l(o){k 9.4p(o,\'5Z\')},7r:l(o){k 9.4p(o,\'61\')},92:l(o){k 9.4p(o,\'66\')},7c:l(o){9.4r($(o)||Q 1k(o));k 9},4E:l(){9.2h.8S(9);k 9},8R:l(65){n o=9.8K(65!==U);k $(o)},6y:l(o){o=$(o)||Q 1k(o);9.2h.8e(o,9);k o},8J:l(2X){m(1a.34){23(9.3Y()){18\'1p\':9.8I.6k=2X;k 9;18\'4X\':9.4K(\'2X\',2X);k 9}}9.4r(L.8G(2X));k 9},4J:l(1m){k 9.1m.1d(\'(?:^|\\\\s)\'+1m+\'(?:\\\\s|$)\')},63:l(1m){m(!9.4J(1m))9.1m=(9.1m+\' \'+1m).4k();k 9},62:l(1m){9.1m=9.1m.3i(Q 64(\'(^|\\\\s)\'+1m+\'(?:\\\\s|$)\'),\'$1\').4k();k 9},8H:l(1m){k 9.4J(1m)?9.62(1m):9.63(1m)},1O:l(C,O){m(C==\'2c\')9.6l(3J(O));T 9.1p[C.53()]=(O.1o)?\'1f(\'+O.2V(\',\')+\')\':O;k 9},6H:l(1Y){23($B(1Y)){18\'4U\':P(n C 14 1Y)9.1O(C,1Y[C]);1X;18\'3Q\':9.1p.6k=1Y}k 9},6l:l(2c){m(2c==0){m(9.1p.4N!="4z")9.1p.4N="4z"}T{m(9.1p.4N!="6D")9.1p.4N="6D"}m(!9.4O||!9.4O.7N)9.1p.7M=1;m(1a.34)9.1p.2g="4D(2c="+2c*2p+")";9.1p.2c=9.2c=2c;k 9},2d:l(C){C=C.53();n 1p=9.1p[C]||U;m(!$2t(1p)){m(C==\'2c\')k $2t(9.2c)?9.2c:1;m([\'2u\',\'7J\'].1d(C)){k[9.2d(C+\'-28\')||0,9.2d(C+\'-4Y\')||0,9.2d(C+\'-6p\')||0,9.2d(C+\'-21\')||0].2V(\' \')}m(L.6C)1p=L.6C.7H(9,22).7D(C.6B());T m(9.4O)1p=9.4O[C]}m(1p==\'7G\'&&[\'3l\',\'3m\'].1d(C))k 9[\'2J\'+C.6z()]+\'47\';k(1p&&C.1d(/1F/i)&&1p.1d(/1f/))?1p.4L():1p},1i:l(B,R){9.W=9.W||{};9.W[B]=9.W[B]||{\'1z\':[],\'1E\':[]};m(!9.W[B].1z.1d(R)){9.W[B].1z.1o(R);m(9.6A){9.6A((B==\'3p\'&&1a.5h)?\'5O\':B,R,U)}T{R=R.K(9);9.85(\'59\'+B,R);9.W[B].1E.1o(R)}}k 9},84:l(1Y){m(1Y){P(n B 14 1Y)9.1i(B,1Y[B])}k 9},1R:l(B,R){m(9.W&&9.W[B]){n 1I=9.W[B].1z.4x(R);m(1I==-1)k 9;n 1D=9.W[B].1z.4R(1I,1)[0];m(9.6E){9.6E((B==\'3p\'&&1a.5h)?\'5O\':B,1D,U)}T{9.88(\'59\'+B,9.W[B].1E.4R(1I,1)[0])}}k 9},3b:l(B){m(9.W){m(B){m(9.W[B]){9.W[B].1z.1u(l(R){9.1R(B,R)},9);9.W[B]=22}}T{P(n 6F 14 9.W)9.3b(6F);9.W=22}}k 9},1C:l(B,12){m(9.W&&9.W[B]){9.W[B].1z.1u(l(R){R.K(9,12)()},9)}},5i:l(52){n o=9[52+\'5T\'];35($B(o)==\'4H\')o=o[52+\'5T\'];k $(o)},82:l(){k 9.5i(\'2C\')},5R:l(){k 9.5i(\'81\')},7U:l(){n o=9.7T;35($B(o)==\'4H\')o=o.7S;k $(o)},7R:l(){n o=9.7V;35($B(o)==\'4H\')o=o.80;k $(o)},7Z:l(){k $(9.2h)},7Y:l(){k $$(9.6I)},4K:l(C,O){23(C){18\'6x\':9.1m=O;1X;18\'1p\':9.6H(O);1X;18\'2v\':m(1a.5A){n o=$(L.6G(\'<\'+9.3Y()+\' 2v="\'+O+\'" />\'));$1u(9.a1,l(3h){m(3h.2v!=\'2v\')o.4K(3h.2v,3h.O)});m(9.2h)9.6y(o);k o}5J:9.a0(C,O)}k 9},9Z:l(1Y){P(n C 14 1Y)9.4K(C,1Y[C]);k 9},a2:l(){9.a3=$A(15).2V(\'\');k 9},a6:l(C){k(C==\'6x\')?9.1m:9.5S(C)},3Y:l(){k 9.4I.3F()},2n:l(x,y){9.3C=x;9.3D=y},2W:l(){23(9.3Y()){18\'3c\':m(9.6q!=-1){n 5s=9.u[9.6q];k 5s.O||5s.2X}1X;18\'9X\':m(!(9.9W&&[\'9Q\',\'9P\'].1d(9.B))&&![\'4z\',\'2X\',\'9N\'].1d(9.B))1X;18\'9R\':k 9.O}k U},4a:l(){k{\'2b\':{\'x\':9.3C,\'y\':9.3D},\'2N\':{\'x\':9.2x,\'y\':9.2w},\'49\':{\'x\':9.4f,\'y\':9.4m}}},3k:l(3g){3g=3g||[];n o=9,21=0,28=0;9S{21+=o.9V||0;28+=o.9U||0;o=o.9T}35(o);3g.1u(l(G){21-=G.3C||0;28-=G.3D||0});k{\'x\':21,\'y\':28}},5K:l(){k 9.3k().y},5M:l(){k 9.3k().x},ap:l(3g){n 1Q=9.3k(3g);n J={\'3m\':9.2x,\'3l\':9.2w,\'21\':1Q.x,\'28\':1Q.y};J.4Y=J.21+J.3m;J.6p=J.28+J.3l;k J}});1a.1i=L.1i=1k.Y.1i;1a.1R=L.1R=1k.Y.1R;1a.3b=L.3b=1k.Y.3b;n 2P={1b:[],4w:l(G){2P.1b.1o(G)},6o:l(){2P.4w(1a);2P.4w(L);2P.1b.1u(l(o){o.3b();P(n p 14 1k.Y)o[p]=22;o.V=22})}};1a.1i(\'ak\',2P.6o);n 3A=Q 19({1n:l(F){9.F=F||1a.F;9.B=9.F.B;9.3H=9.F.3H||9.F.al;m(9.3H.6m==3)9.3H=9.3H.2h;9.6u=9.F.ar;9.ai=9.F.aj;9.ac=9.F.ab;9.aa=9.F.a9;m([\'5O\',\'3p\'].1d(9.B)){9.3N=9.F.6n?(9.F.6n/(1a.55?-6r:6r)):-(9.F.ae||0)/ 3} T m (9.B.1d(/1D/)){9.5D=9.F.6v||9.F.ah;P(n 2v 14 3A.1z){m(3A.1z[2v]==9.5D){9.1D=2v;1X}}9.1D=9.1D||5E.af(9.5D).3F()}T m(9.B.1d(/2m/)||(9.B==\'9L\')){9.1J={\'x\':9.F.5C||9.F.6s+L.1Z.3C,\'y\':9.F.5H||9.F.6w+L.1Z.3D};9.7C={\'x\':9.F.5C?9.F.5C-1a.70:9.F.6s,\'y\':9.F.5H?9.F.5H-1a.7a:9.F.6w};9.9k=(9.F.6v==3)||(9.F.9M==2);23(9.B){18\'9i\':9.4u=9.F.4u||9.F.9h;1X;18\'9l\':9.4u=9.F.4u||9.F.7m}}},1B:l(){9.4t();9.4n();k 9},4t:l(){m(9.F.4t)9.F.4t();T 9.F.9n=1h;k 9},4n:l(){m(9.F.4n)9.F.4n();T 9.F.9f=U;k 9}});3A.1z={\'99\':13,\'97\':38,\'9a\':40,\'21\':37,\'4Y\':39,\'9c\':27,\'9q\':32,\'9G\':8,\'9J\':46};51.V({2Q:l(K,12){k 9.2q({\'K\':K,\'15\':12,\'F\':3A})}});n 6V=Q 19({9B:l(R){9.2S=9.2S||[];9.2S.1o(R);k 9},7j:l(){m(9.2S&&9.2S.11)9.2S.6u().2l(10,9)},9v:l(){9.2S=[]}});n 3z=Q 19({1i:l(B,R){m(R!=19.1H){9.W=9.W||{};9.W[B]=9.W[B]||[];m(!9.W[B].1d(R))9.W[B].1o(R)}k 9},1C:l(B,12,2l){m(9.W&&9.W[B]){9.W[B].1u(l(R){R.2q({\'K\':9,\'2l\':2l,\'15\':12})()},9)}k 9},1R:l(B,R){m(9.W&&9.W[B])9.W[B].4E(R);k 9}});n 3E=Q 19({3o:l(6t,u){9.u=2a.V(6t,u);m(9.1i){P(n 41 14 9.u){m(($B(9.u[41])==\'l\')&&41.1d(/^59[A-Z]/))9.1i(41,9.u[41])}}k 9}});n 9A=Q 19({1n:l(){9.3S=$A(15);9.W={};9.33={}},1i:l(B,R){9.33[B]=9.33[B]||{};9.W[B]=9.W[B]||[];m(9.W[B].1d(R))k U;T 9.W[B].1o(R);9.3S.1u(l(3U,i){3U.1i(B,9.6K.K(9,[B,3U,i]))},9);k 9},6K:l(B,3U,i){9.33[B][i]=1h;n 3W=9.3S.3W(l(1x,j){k 9.33[B][j]||U},9);m(!3W)k;9.3S.1u(l(1x,j){9.33[B][j]=U},9);9.W[B].1u(l(F){F.1v(9,9.3S,3U)},9)}});l $E(1j,2g){k($(2g)||L).4C(1j)};l $9I(1j,2g){k($(2g)||L).2M(1j)};1k.V({3B:l(1j){n 1b=[];1j.4k().5N(\' \').1u(l(4b,i){n 1K=4b.2j(/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/);m(!1K)k;2i.1j=1K;1K[1]=1K[1]||\'*\';m(i==0){m(1K[2]){n o=9.4d(1K[2]);m(!o||((1K[1]!=\'*\')&&(1k.Y.3Y.1v(o)!=1K[1])))k;1b=[o]}T{1b=$A(9.3x(1K[1]))}}T{1b=2o.Y.3x.1v(1b,1K[1],1h);m(1K[2])1b=1b.2g(2i.2Y)}m(1K[3])1b=1b.2g(2i.1m);m(1K[4])1b=1b.2g(2i.3h)},9);k $$(1b)},4d:l(2Y){n o=L.4d(2Y);m(!o)k U;P(n 1A=o.2h;1A!=9;1A=1A.2h){m(!1A)k U}k o},4C:l(1j){k 9.2M(1j)[0]},2M:l(1j){n 5l=[];1j.5N(\',\').1u(l(4b){5l.V(9.3B(4b))},9);k $$(5l)}});L.V({9w:l(1m){k L.3B(\'.\'+1m)},4C:1k.Y.4C,3B:1k.Y.3B,2M:1k.Y.2M});n 2i={1j:[],2Y:l(o){k(o.2Y==2i.1j[2])},1m:l(o){k(1k.Y.4J.1v(o,2i.1j[3]))},3h:l(o){n 1x=o.5S(2i.1j[4]);m(!1x)k U;n 5w=2i.1j[5];m(!5w)k 1h;n O=2i.1j[6];23(5w){18\'*=\':k(1x.1d(O));18\'=\':k(1x==O);18\'^=\':k(1x.1d(\'^\'+O));18\'$=\':k(1x.1d(O+\'$\'))}k U}};2o.V({3x:l(4I){n 5P=[];9.1u(l(o){5P.V(o.3x(4I))});k 5P}});n 6J=Q 19({11:0,J:{},1n:l(J){9.V(J)},9d:l(1D){k 9.J[1D]},9e:l(1D){k 9.J[1D]!==2R},24:l(1D,O){m(O===2R)k U;m(9.J[1D]===2R)9.11++;9.J[1D]=O;k 9},4E:l(1D){m(9.J[1D]===2R)k 9;n J={};9.11--;P(n C 14 9.J){m(C!=1D)J[C]=9.J[C]}9.J=J;k 9},1u:l(R,K){P(n C 14 9.J)R.1v(K||9,C,9.J[C])},V:l(J){P(n C 14 J){m(9.J[C]===2R)9.11++;9.J[C]=J[C]}k 9},1H:l(){k(9.11==0)},1z:l(){n 1z=[];P(n C 14 9.J)1z.1o(C);k 1z},1E:l(){n 1E=[];P(n C 14 9.J)1E.1o(9.J[C]);k 1E}});l $H(J){k Q 6J(J)};n 1V=Q 19({1n:l(1F,B){m(1F.7n)k 1F;1F.7n=1h;B=B||(1F.1o?\'1f\':\'2z\');n 1f,1y;23(B){18\'1f\':1f=1F;1y=1f.5r();1X;18\'1y\':1f=1F.7k();1y=1F;1X;5J:1f=1F.3K(1h);1y=1f.5r()}1f.1y=1y;k 2a.V(1f,1V.Y)},9g:l(){n 3I=$A(15);n 4D=($B(3I[3I.11-1])==\'79\')?3I.98():50;n 1f=9.5k();3I.1u(l(1F){1F=Q 1V(1F);P(n i=0;i<3;i++)1f[i]=I.1T((1f[i]/ 2p * (2p - 4D)) + (1F[i] /2p*4D))});k Q 1V(1f,\'1f\')},96:l(){k Q 1V(9.4v(l(O){k 30-O}))},9F:l(O){k Q 1V([O,9.1y[1],9.1y[2]],\'1y\')},9E:l(4F){k Q 1V([9.1y[0],4F,9.1y[2]],\'1y\')},9D:l(4F){k Q 1V([9.1y[0],9.1y[1],4F],\'1y\')}});l $9H(r,g,b){k Q 1V([r,g,b],\'1f\')};l $9C(h,s,b){k Q 1V([h,s,b],\'1y\')};1t.V({5r:l(){n 3T=9[0],3V=9[1],4P=9[2];n 1S,4B,5g;n 1e=I.1e(3T,3V,4P),2s=I.2s(3T,3V,4P);n 3P=1e-2s;5g=1e/30;4B=(1e!=0)?3P/1e:0;m(4B==0){1S=0}T{n 56=(1e-3T)/3P;n 5b=(1e-3V)/3P;n 1N=(1e-4P)/3P;m(3T==1e)1S=1N-5b;T m(3V==1e)1S=2+56-1N;T 1S=4+5b-56;1S/=6;m(1S<0)1S++}k[I.1T(1S*6L),I.1T(4B*2p),I.1T(5g*2p)]},7k:l(){n 1N=I.1T(9[2]/2p*30);m(9[1]==0){k[1N,1N,1N]}T{n 1S=9[0]%6L;n f=1S%60;n p=I.1T((9[2]*(2p-9[1]))/9s*30);n q=I.1T((9[2]*(7A-9[1]*f))/7y*30);n t=I.1T((9[2]*(7A-9[1]*(60-f)))/7y*30);23(I.7u(1S/60)){18 0:k[1N,t,p];18 1:k[q,1N,p];18 2:k[p,1N,t];18 3:k[p,q,1N];18 4:k[t,p,1N];18 5:k[1N,p,q]}}k U}});1a.V({1i:l(B,R){m(B==\'42\'){m(9.4o)R();T m(!9.W||!9.W.42){n 3X=l(){m(9.4o)k;9.4o=1h;m(9.1q)9.1q=$4c(9.1q);1k.Y.1C.1v(9,\'42\');9.W.42=22}.K(9);m(L.4l&&9.31){9.1q=l(){m([\'4o\',\'6Y\'].1d(L.4l))3X()}.2E(50)}T m(L.4l&&9.34){L.9o("<4X 2Y=7f ao 9p=9b:9K(0)><\\/4X>");$(\'7f\').9u=l(){m(9.4l==\'6Y\')3X()}}T{9.1i("9j",3X);L.1i("9y",3X)}}}1k.Y.1i.1v(9,B,R);k 9},9z:l(6P){k 9.1i(\'42\',6P)}});1a.V({7b:l(){m(9.31)k 9.9x;m(9.55)k L.43.6Q;k L.1Z.6Q},7d:l(){m(9.31)k 9.9t;m(9.55)k L.43.6Z;k L.1Z.6Z},78:l(){m(9.34)k I.1e(L.1Z.2x,L.1Z.4f);m(9.31)k L.43.4f;k L.1Z.4f},76:l(){m(9.34)k I.1e(L.1Z.2w,L.1Z.4m);m(9.31)k L.43.4m;k L.1Z.4m},6O:l(){k 9.70||L.1Z.3C},6X:l(){k 9.7a||L.1Z.3D},4a:l(){k{\'2N\':{\'x\':9.7b(),\'y\':9.7d()},\'49\':{\'x\':9.78(),\'y\':9.76()},\'2b\':{\'x\':9.6O(),\'y\':9.6X()}}},3k:l(){k{\'x\':0,\'y\':0}}});n 17={};17.1L=Q 19({2D:l(){k{3q:19.1H,2G:19.1H,7o:19.1H,7h:17.3u.5e,5I:9m,1M:\'47\',3a:1h,6R:50}},1n:l(u){9.G=9.G||22;9.3o(9.2D(),u);m(9.u.1n)9.u.1n.1v(9)},1l:l(){n 2Z=Q 7q().7p();m(2Z<9.2Z+9.u.5I){9.7l=2Z-9.2Z;9.2O();9.2F()}T{9.1B(1h);9.X=9.M;9.2F();9.1C(\'2G\',9.G,10);9.7j()}},24:l(M){9.X=M;9.2F();k 9},2O:l(){9.X=9.2I(9.N,9.M)},2I:l(N,M){k 9.u.7h(9.7l,N,(M-N),9.u.5I)},1c:l(N,M){m(!9.u.3a)9.1B();T m(9.1q)k 9;9.N=N;9.M=M;9.2Z=Q 7q().7p();9.1q=9.1l.2E(I.1T(a7/9.u.6R),9);9.1C(\'3q\',9.G);k 9},1B:l(2B){m(!9.1q)k 9;9.1q=$4c(9.1q);m(!2B)9.1C(\'7o\',9.G);k 9},ag:l(N,M){k 9.1c(N,M)},ad:l(2B){k 9.1B(2B)}});17.1L.26(Q 6V);17.1L.26(Q 3z);17.1L.26(Q 3E);17.3u={7i:l(t,b,c,d){k c*t/d+b},5e:l(t,b,c,d){k-c/2*(I.5d(I.29*t/d)-1)+b}};17.2k={3c:l(C,M){m(C.1d(/1F/i))k 9.1V;m(M.1d&&M.1d(\' \'))k 9.4q;k 9.6W},1U:l(o,C,36){m(!36.1o)36=[36];n N=36[0],M=36[1];m(!M&&M!=0){M=N;N=o.2d(C)}n 1g=9.3c(C,M);k{N:1g.1U(N),M:1g.1U(M),1g:1g}}};17.2k.6W={1U:l(O){k 3J(O)},3f:l(N,M,3e){k 3e.2I(N,M)},2W:l(O,1M){k O+1M}};17.2k.4q={1U:l(O){k O.1o?O:O.5N(\' \').4v(l(v){k 3J(v)})},3f:l(N,M,3e){n X=[];P(n i=0;i<N.11;i++)X[i]=3e.2I(N[i],M[i]);k X},2W:l(O,1M){k O.2V(1M+\' \')+1M}};17.2k.1V={1U:l(O){k O.1o?O:O.3K(1h)},3f:l(N,M,3e){n X=[];P(n i=0;i<N.11;i++)X[i]=I.1T(3e.2I(N[i],M[i]));k X},2W:l(O){k\'1f(\'+O.2V(\',\')+\')\'}};17.73=17.1L.V({1n:l(o,C,u){9.G=$(o);9.C=C;9.1A(u)},7s:l(){k 9.24(0)},2O:l(){9.X=9.1g.3f(9.N,9.M,9)},24:l(M){9.1g=17.2k.3c(9.C,M);k 9.1A(9.1g.1U(M))},1c:l(N,M){m(9.1q&&9.u.3a)k 9;n 1w=17.2k.1U(9.G,9.C,[N,M]);9.1g=1w.1g;k 9.1A(1w.N,1w.M)},2F:l(){9.G.1O(9.C,9.1g.2W(9.X,9.u.1M))}});1k.V({an:l(C,u){k Q 17.73(9,C,u)}});17.71=17.1L.V({1n:l(o,u){9.G=$(o);9.1A(u)},2O:l(){P(n p 14 9.N)9.X[p]=9.1g[p].3f(9.N[p],9.M[p],9)},24:l(M){n 1w={};9.1g={};P(n p 14 M){9.1g[p]=17.2k.3c(p,M[p]);1w[p]=9.1g[p].1U(M[p])}k 9.1A(1w)},1c:l(J){m(9.1q&&9.u.3a)k 9;9.X={};9.1g={};n N={},M={};P(n p 14 J){n 1w=17.2k.1U(9.G,p,J[p]);N[p]=1w.N;M[p]=1w.M;9.1g[p]=1w.1g}k 9.1A(N,M)},2F:l(){P(n p 14 9.X)9.G.1O(p,9.1g[p].2W(9.X[p],9.u.1M))}});1k.V({am:l(u){k Q 17.71(9,u)}});17.2o=17.1L.V({1n:l(1b,u){9.1b=$$(1b);9.1A(u)},2O:l(){P(n i 14 9.N){n 3Z=9.N[i],2H=9.M[i],2r=9.1g[i],44=9.X[i]={};P(n p 14 3Z)44[p]=2r[p].3f(3Z[p],2H[p],9)}},24:l(M){n 1w={};9.1g={};P(n i 14 M){n 2H=M[i],2r=9.1g[i]={},72=1w[i]={};P(n p 14 2H){2r[p]=17.2k.3c(p,2H[p]);72[p]=2r[p].1U(2H[p])}}k 9.1A(1w)},1c:l(J){m(9.1q&&9.u.3a)k 9;9.X={};9.1g={};n N={},M={};P(n i 14 J){n 5x=J[i],3Z=N[i]={},2H=M[i]={},2r=9.1g[i]={};P(n p 14 5x){n 1w=17.2k.1U(9.1b[i],p,5x[p]);3Z[p]=1w.N;2H[p]=1w.M;2r[p]=1w.1g}}k 9.1A(N,M)},2F:l(){P(n i 14 9.X){n 44=9.X[i],2r=9.1g[i];P(n p 14 44)9.1b[i].1O(p,2r[p].2W(44[p],9.u.1M))}}});17.aq=17.1L.V({1n:l(G,u){9.X=[];9.G=$(G);9.1i(\'3q\',l(){9.G.1i(\'3p\',9.1B.K(9,U))}.K(9));9.1R(\'2G\',l(){9.G.1R(\'3p\',9.1B.K(9,U))}.K(9));9.1A(u)},2O:l(){P(n i=0;i<2;i++)9.X[i]=9.2I(9.N[i],9.M[i])},2n:l(x,y){m(9.1q&&9.u.3a)k 9;n o=9.G.4a();n 1E={\'x\':x,\'y\':y};P(n z 14 o.2N){n 1e=o.49[z]-o.2N[z];m($2t(1E[z]))1E[z]=($B(1E[z])==\'79\')?I.1e(I.2s(1E[z],1e),0):1e;T 1E[z]=o.2b[z]}k 9.1c([o.2b.x,o.2b.y],[1E.x,1E.y])},a8:l(){k 9.2n(U,0)},9O:l(){k 9.2n(U,\'7g\')},a4:l(){k 9.2n(0,U)},a5:l(){k 9.2n(\'7g\',U)},7m:l(o){k 9.2n($(o).5M(),$(o).5K())},2F:l(){9.G.2n(9.X[0],9.X[1])}});17.9Y=17.1L.V({1n:l(o,u){9.G=$(o).1O(\'2u\',0);9.3d=Q 1k(\'95\').7r(9.G).1O(\'9r\',\'4z\').7c(9.G);9.3o({\'1s\':\'5Q\'},u);9.X=[];9.1A(9.u)},2O:l(){P(n i=0;i<2;i++)9.X[i]=9.2I(9.N[i],9.M[i])},5Q:l(){9.2u=\'28\';9.4W=\'3l\';9.2J=9.G.2w;k[9.G.2d(\'2u-28\').2L(),9.3d.2d(\'3l\').2L()]},5B:l(){9.2u=\'21\';9.4W=\'3m\';9.2J=9.G.2x;k[9.G.2d(\'2u-21\').2L(),9.3d.2d(\'3m\').2L()]},7x:l(1s){k 9.1c(9[1s||9.u.1s](),[0,9.2J])},7w:l(1s){k 9.1c(9[1s||9.u.1s](),[-9.2J,0])},7s:l(1s){9[1s||9.u.1s]();k 9.24([-9.2J,0])},7X:l(1s){9[1s||9.u.1s]();k 9.24([0,9.2J])},7W:l(1s){m(9.3d.2w==0||9.3d.2x==0)k 9.7x(1s);T k 9.7w(1s)},2F:l(){9.G.1O(\'2u-\'+9.2u,9.X[0]+9.u.1M);9.3d.1O(9.4W,9.X[1]+9.u.1M)}});17.3u={7i:l(t,b,c,d){k c*t/d+b},89:l(t,b,c,d){k c*(t/=d)*t+b},8a:l(t,b,c,d){k-c*(t/=d)*(t-2)+b},8b:l(t,b,c,d){m((t/=d/2)<1)k c/2*t*t+b;k-c/2*((--t)*(t-2)-1)+b},8c:l(t,b,c,d){k c*(t/=d)*t*t+b},7Q:l(t,b,c,d){k c*((t=t/d-1)*t*t+1)+b},87:l(t,b,c,d){m((t/=d/2)<1)k c/2*t*t*t+b;k c/2*((t-=2)*t*t+2)+b},83:l(t,b,c,d){k c*(t/=d)*t*t*t+b},86:l(t,b,c,d){k-c*((t=t/d-1)*t*t*t-1)+b},8d:l(t,b,c,d){m((t/=d/2)<1)k c/2*t*t*t*t+b;k-c/2*((t-=2)*t*t*t-2)+b},7K:l(t,b,c,d){k c*(t/=d)*t*t*t*t+b},7F:l(t,b,c,d){k c*((t=t/d-1)*t*t*t*t+1)+b},7E:l(t,b,c,d){m((t/=d/2)<1)k c/2*t*t*t*t*t+b;k c/2*((t-=2)*t*t*t*t+2)+b},7O:l(t,b,c,d){k-c*I.5d(t/d*(I.29/2))+c+b},7I:l(t,b,c,d){k c*I.3M(t/d*(I.29/2))+b},5e:l(t,b,c,d){k-c/2*(I.5d(I.29*t/d)-1)+b},7L:l(t,b,c,d){k(t==0)?b:c*I.2f(2,10*(t/d-1))+b},7P:l(t,b,c,d){k(t==d)?b+c:c*(-I.2f(2,-10*t/d)+1)+b},94:l(t,b,c,d){m(t==0)k b;m(t==d)k b+c;m((t/=d/2)<1)k c/2*I.2f(2,10*(t-1))+b;k c/2*(-I.2f(2,-10*--t)+2)+b},8N:l(t,b,c,d){k-c*(I.3G(1-(t/=d)*t)-1)+b},8O:l(t,b,c,d){k c*I.3G(1-(t=t/d-1)*t)+b},8P:l(t,b,c,d){m((t/=d/2)<1)k-c/2*(I.3G(1-t*t)-1)+b;k c/2*(I.3G(1-(t-=2)*t)+1)+b},8Q:l(t,b,c,d,a,p){m(t==0)k b;m((t/=d)==1)k b+c;m(!p)p=d*.3;m(!a)a=1;m(a<I.5y(c)){a=c;n s=p/4}T n s=p/(2*I.29)*I.5t(c/a);k-(a*I.2f(2,10*(t-=1))*I.3M((t*d-s)*(2*I.29)/p))+b},8M:l(t,b,c,d,a,p){m(t==0)k b;m((t/=d)==1)k b+c;m(!p)p=d*.3;m(!a)a=1;m(a<I.5y(c)){a=c;n s=p/4}T n s=p/(2*I.29)*I.5t(c/a);k a*I.2f(2,-10*t)*I.3M((t*d-s)*(2*I.29)/p)+c+b},8L:l(t,b,c,d,a,p){m(t==0)k b;m((t/=d/2)==2)k b+c;m(!p)p=d*(.3*1.5);m(!a)a=1;m(a<I.5y(c)){a=c;n s=p/4}T n s=p/(2*I.29)*I.5t(c/a);m(t<1)k-.5*(a*I.2f(2,10*(t-=1))*I.3M((t*d-s)*(2*I.29)/p))+b;k a*I.2f(2,-10*(t-=1))*I.3M((t*d-s)*(2*I.29)/p)*.5+c+b},90:l(t,b,c,d,s){m(!s)s=1.4Q;k c*(t/=d)*t*((s+1)*t-s)+b},91:l(t,b,c,d,s){m(!s)s=1.4Q;k c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},93:l(t,b,c,d,s){m(!s)s=1.4Q;m((t/=d/2)<1)k c/2*(t*t*(((s*=(1.74))+1)*t-s))+b;k c/2*((t-=2)*t*(((s*=(1.74))+1)*t+s)+2)+b},77:l(t,b,c,d){k c-17.3u.4V(d-t,0,c,d)+b},4V:l(t,b,c,d){m((t/=d)<(1/2.75)){k c*(7.45*t*t)+b}T m(t<(2/2.75)){k c*(7.45*(t-=(1.5/2.75))*t+.75)+b}T m(t<(2.5/2.75)){k c*(7.45*(t-=(2.25/2.75))*t+.8Y)+b}T{k c*(7.45*(t-=(2.8U/2.75))*t+.8T)+b}},8V:l(t,b,c,d){m(t<d/2)k 17.3u.77(t*2,0,c,d)*.5+b;k 17.3u.4V(t*2-d,0,c,d)*.5+c*.5+b}};n 3r={};3r.1L=Q 19({2D:l(){k{3w:U,1M:\'47\',3q:19.1H,6N:19.1H,2G:19.1H,6U:19.1H,4T:19.1H,1r:U,2T:{x:\'21\',y:\'28\'},4s:6}},1n:l(o,u){9.3o(9.2D(),u);9.G=$(o);9.3w=$(9.u.3w)||9.G;9.2m={\'X\':{},\'1I\':{}};9.O={\'1c\':{},\'X\':{}};9.1G={\'1c\':9.1c.2Q(9)};9.6M();m(9.u.1n)9.u.1n.1v(9)},6M:l(){9.3w.1i(\'5o\',9.1G.1c)},1c:l(F){9.1C(\'6N\',9.G);9.2m.1c=F.1J;n 1r=9.u.1r;9.1r={\'x\':[],\'y\':[]};P(n z 14 9.u.2T){9.O.X[z]=9.G.2d(9.u.2T[z]).2L();9.2m.1I[z]=F.1J[z]-9.O.X[z];m(1r&&1r[z]){P(n i=0;i<2;i++){m($2t(1r[z][i]))9.1r[z][i]=1r[z][i].2K?1r[z][i].1v(9):1r[z][i]}}}9.1G.2A=9.2A.2Q(9);9.1G.1B=9.1B.K(9);9.1G.3n=9.u.4s?9.6S.2Q(9):9.1G.2A;L.1i(\'3j\',9.1G.3n);L.1i(\'7e\',9.1G.1B);9.1C(\'3q\',9.G);F.1B()},6S:l(F){n 6T=I.1T(I.3G(I.2f(F.1J.x-9.2m.1c.x,2)+I.2f(F.1J.y-9.2m.1c.y,2)));m(6T>9.u.4s){L.1R(\'3j\',9.1G.3n);9.1G.3n=9.1G.2A;L.1i(\'3j\',9.1G.3n);9.2A(F);9.1C(\'6U\',9.G)}F.1B()},2A:l(F){9.5q=U;9.2m.X=F.1J;P(n z 14 9.u.2T){9.O.X[z]=9.2m.X[z]-9.2m.1I[z];m(9.1r[z]){m($2t(9.1r[z][1])&&(9.O.X[z]>9.1r[z][1])){9.O.X[z]=9.1r[z][1];9.5q=1h}T m($2t(9.1r[z][0])&&(9.O.X[z]<9.1r[z][0])){9.O.X[z]=9.1r[z][0];9.5q=1h}}9.G.1O(9.u.2T[z],9.O.X[z]+9.u.1M)}9.1C(\'4T\',9.G);F.1B()},8l:l(){9.3w.1R(\'5o\',9.1G.1c)},1B:l(){L.1R(\'3j\',9.1G.3n);L.1R(\'7e\',9.1G.1B);9.1C(\'2G\',9.G)}});3r.1L.26(Q 3z);3r.1L.26(Q 3E);1k.V({8k:l(u){k Q 3r.1L(9,2a.V(u||{},{2T:{x:\'3m\',y:\'3l\'}}))}});n 5m=Q 19({2D:l(){k{3y:20,5j:1,4e:l(x,y){9.G.2n(x,y)}}},1n:l(G,u){9.3o(9.2D(),u);9.G=$(G);9.5F=([1a,L].1d(G))?$(L.43):9.G},1c:l(){9.5v=9.7B.2Q(9);9.5F.1i(\'3j\',9.5v)},1B:l(){9.5F.1R(\'3j\',9.5v);9.1q=$4c(9.1q)},7B:l(F){9.1J=(9.G==1a)?F.7C:F.1J;m(!9.1q)9.1q=9.2b.2E(50,9)},2b:l(){n o=9.G.4a();n 1I=9.G.3k();n 2U={\'x\':0,\'y\':0};P(n z 14 9.1J){m(9.1J[z]<(9.u.3y+1I[z])&&o.2b[z]!=0)2U[z]=(9.1J[z]-9.u.3y-1I[z])*9.u.5j;T m(9.1J[z]+9.u.3y>(o.2N[z]+1I[z])&&o.2b[z]+o.2N[z]!=o.49[z])2U[z]=(9.1J[z]-o.2N[z]+9.u.3y-1I[z])*9.u.5j}m(2U.y||2U.x)9.1C(\'4e\',[o.2b.x+2U.x,o.2b.y+2U.y])}});5m.26(Q 3z);5m.26(Q 3E);n 5n=Q 19({2D:l(){k{4e:19.1H,2G:19.1H,5a:l(1I){9.2e.1O(9.p,1I+\'47\')},3R:2p,1s:\'5B\',3N:U}},1n:l(o,2e,u){9.G=$(o);9.2e=$(2e);9.3o(9.2D(),u);9.58=-1;9.4Z=-1;9.1l=-1;9.G.1i(\'5o\',9.7v.2Q(9));m(9.u.3N)9.G.1i(\'3p\',9.7t.2Q(9));m(9.u.1s==\'5B\'){9.z=\'x\';9.p=\'21\';9.1e=9.G.2x-9.2e.2x;9.57=9.2e.2x/2;9.54=9.G.5M.K(9.G)}T m(9.u.1s==\'5Q\'){9.z=\'y\';9.p=\'28\';9.1e=9.G.2w-9.2e.2w;9.57=9.2e.2w/2;9.54=9.G.5K.K(9.G)}9.2e.1O(\'1Q\',\'8y\').1O(9.p,0);n 4S={},5G={};5G[9.z]=[0,9.1e];4S[9.z]=9.p;9.2A=Q 3r.1L(9.2e,{1r:5G,4s:0,2T:4S,3q:l(){9.4i()}.K(9),4T:l(){9.4i()}.K(9),2G:l(){9.4i();9.2B()}.K(9)});m(9.u.1n)9.u.1n.1v(9)},24:l(1l){m(1l>9.u.3R)1l=9.u.3R;T m(1l<0)1l=0;9.1l=1l;9.4j();9.2B();9.1C(\'5a\',9.7z(9.1l)+\'\');k 9},7t:l(F){m(F.3N<0)9.24(9.1l+1);T m(F.3N>0)9.24(9.1l-1);F.1B()},7v:l(F){n 1Q=F.1J[9.z]-9.54()-9.57;m(1Q>9.1e)1Q=9.1e;T m(1Q<0)1Q=0;9.1l=9.5p(1Q);9.4j();9.2B();9.1C(\'5a\',1Q+\'\')},4i:l(){9.1l=9.5p(9.2A.O.X[9.z]);9.4j()},4j:l(){m(9.58!=9.1l){9.58=9.1l;9.1C(\'4e\',9.1l)}},2B:l(){m(9.4Z!==9.1l){9.4Z=9.1l;9.1C(\'2G\',9.1l+\'\')}},5p:l(1Q){k I.1T(1Q/9.1e*9.u.3R)},7z:l(1l){k(9.1e)*1l/9.u.3R}});5n.26(Q 3z);5n.26(Q 3E);',62,648,'|||||||||this|||||||||||return|function|if|var|el||||||options|||||||type|property|||event|element||Math|obj|bind|document|to|from|value|for|new|fn||else|false|extend|events|now|prototype|||length|args||in|arguments||Fx|case|Class|window|elements|start|test|max|rgb|css|true|addEvent|selector|Element|step|className|initialize|push|style|timer|limit|mode|Array|each|call|parsed|current|hsb|keys|parent|stop|fireEvent|key|values|color|bound|empty|pos|page|param|Base|unit|br|setStyle|array|position|removeEvent|hue|round|parse|Color|properties|break|source|documentElement||left|null|switch|set||implement||top|PI|Object|scroll|opacity|getStyle|knob|pow|filter|parentNode|Filters|match|CSS|delay|mouse|scrollTo|Elements|100|create|iCss|min|chk|margin|name|offsetHeight|offsetWidth|returns|hex|drag|end|previous|getOptions|periodical|increase|onComplete|iTo|compute|offset|apply|toInt|getElementsBySelector|size|setNow|Garbage|bindWithEvent|undefined|chains|modifiers|change|join|getValue|text|id|time|255|khtml||checker|ie|while|fromTo||||wait|removeEvents|select|wrapper|fx|getNow|overflown|attribute|replace|mousemove|getPosition|height|width|move|setOptions|mousewheel|onStart|Drag|results|item|Transitions|newArray|handle|getElementsByTagName|area|Events|Event|getElements|scrollLeft|scrollTop|Options|toLowerCase|sqrt|target|colors|parseFloat|hexToRgb|HTMLElement|sin|wheel|items|delta|string|steps|instances|red|instance|green|every|domReady|getTag|iFrom||option|domready|body|iNow|5625||px|forEach|scrollSize|getSize|sel|clear|getElementById|onChange|scrollWidth|pr0t0typ3|klass|draggedKnob|checkStep|clean|readyState|scrollHeight|preventDefault|loaded|inject|Multi|appendChild|snap|stopPropagation|relatedTarget|map|collect|indexOf|bit|hidden|attempt|saturation|getElement|alpha|remove|percent|ms|whitespace|tagName|hasClass|setProperty|rgbToHex|regex|visibility|currentStyle|blue|70158|splice|modSlide|onDrag|object|bounceOut|layout|script|right|previousEnd||Function|what|camelCase|getPos|opera|rr|half|previousChange|on|onTick|gr|htmlElement|cos|sineInOut|Native|brightness|gecko|getBrother|velocity|copy|els|Scroller|Slider|mousedown|toStep|out|rgbToHsb|opt|asin|typeof|coord|operator|iProps|abs|charAt|ie6|horizontal|pageX|code|String|mousemover|limSlide|pageY|duration|default|getTop|parseInt|getLeft|split|DOMMouseScroll|found|vertical|getNext|getAttribute|Sibling|where|insertBefore|_elements_extended_|_element_extended_|err|before||after|removeClass|addClass|RegExp|contents|inside|catch|try|random|some|picked|parentize|noinit|iterable|params|toFloat|Number|trim|toUpperCase|cssText|setOpacity|nodeType|wheelDelta|trash|bottom|selectedIndex|120|clientX|defaults|shift|which|clientY|class|replaceWith|capitalize|addEventListener|hyphenate|defaultView|visible|removeEventListener|evType|createElement|setStyles|childNodes|Hash|check|360|attach|onBeforeStart|liquidADJSgetScrollLeft|init|clientWidth|fps|checkAndDrag|distance|onSnap|Chain|Single|liquidADJSgetScrollTop|complete|clientHeight|pageXOffset|Styles|iParsed|Style|525||getScrollHeight|bounceIn|getScrollWidth|number|pageYOffset|getWidth|adopt|getHeight|mouseup|ie_ready|full|transition|linear|callChain|hsbToRgb|cTime|toElement|isColor|onCancel|getTime|Date|injectAfter|hide|scrolledElement|floor|clickedElement|slideOut|slideIn|600000|toPosition|6000|getCoords|client|getPropertyValue|quintInOut|quintOut|auto|getComputedStyle|sineOut|padding|quintIn|expoIn|zoom|hasLayout|sineIn|expoOut|cubicOut|getLast|nextSibling|firstChild|getFirst|lastChild|toggle|show|getChildren|getParent|previousSibling|next|getPrevious|quartIn|addEvents|attachEvent|quartOut|cubicInOut|detachEvent|quadIn|quadOut|quadInOut|cubicIn|quartInOut|replaceChild|BackgroundImageCache|associate|execCommand|getBoxObjectFor|taintEnabled|makeResizable|detach|concat|setTimeout|toString|transparent|slice|navigator|all|textnode|pick|nodeValue|nodeName|Window|relative|clearTimeout|ie7|XMLHttpRequest|ActiveXObject|clearInterval|setInterval|pass|createTextNode|toggleClass|styleSheet|appendText|cloneNode|elasticInOut|elasticOut|circIn|circOut|circInOut|elasticIn|clone|removeChild|984375|625|bounceInOut|embed|bindAsEventListener|9375|injectBefore|backIn|backOut|injectInside|backInOut|expoInOut|div|invert|up|pop|enter|down|javascript|esc|get|hasKey|returnValue|mix|fromElement|mouseover|load|rightClick|mouseout|500|cancelBubble|write|src|space|overflow|10000|innerHeight|onreadystatechange|clearChain|getElementsByClassName|innerWidth|DOMContentLoaded|onDomReady|Group|chain|HSB|setBrightness|setSaturation|setHue|backspace|RGB|ES|delete|void|click|button|password|toBottom|radio|checkbox|textarea|do|offsetParent|offsetTop|offsetLeft|checked|input|Slide|setProperties|setAttribute|attributes|setHTML|innerHTML|toLeft|toRight|getProperty|1000|toTop|metaKey|meta|altKey|alt|clearTimer|detail|fromCharCode|custom|keyCode|control|ctrlKey|unload|srcElement|effects|effect|defer|getCoordinates|Scroll|shiftKey'.split('|'),0,{}))
    this.id = id;
    this.width = width;
    this.longwidth = longwidth;
   
    this.parseLiquids=function(){
    var liquids = $$('#' + id + ' .liquid');
	    //��δ����ƺ�������ĳ�ּܹ�
	    var fx = new Fx.Elements(liquids, {wait: false, duration: 800, transition: Fx.Transitions.elasticOut});
	    liquids.each(function(liquid, i)
	    {
	        try
	        {
		        liquid.addEvent('mouseover', function(e)
		        {
			        e = new Event(e).stop();
			        var obj = {};
			        obj[i] = { 'width': [liquid.getStyle('width').toInt(), longwidth] };

			        liquids.each(function(other, j)
			        {
				        if (other != liquid)
				        {
					        var w = other.getStyle('width').toInt();
					        if (w != width) obj[j] = {'width': [w, width]};
				        }
			        });
			        fx.start(obj);
		        });
		    }
		    catch(e){}
	    });

	    document.addEvent('mouseover', function(e){
		    e = new Event(e);
		    var rel = e.relatedTarget;
		    if (!rel) return;
		    if (rel.hasClass && (rel.hasClass('liquids') || rel.hasClass('liquid') || rel.id == 'liquid')){
		        var obj = {};
			    //�������ϵ�Ԫ��,���趨����
			    liquids.each(function(other, j){
				    obj[j] = {'width': [other.getStyle('width').toInt(), avgwidth]};
			    });
			    fx.start(obj);
		    };
	    });
    }
}
//-----------l_flexcroll.js------------------

//-----------l_InputValueCheck.js------------------

//-----------l_jq1.3.2.js------------------

//-----------l_toolbox.js------------------

//-----------l_Window.js------------------

//-----------mqv1.js------------------
function OnMarquee(item) {
    try {

        var value = item.getScroll(item);
        value += item.scrollAmount;
        var test = item.clFix < 0 ? item.mqSize - value : value;
        if (test <= 0) {
            value += item.clFix;
        }
        item.setScroll(item, value);
    }
    catch (e)
  { }
}



function EnsureMarqueeManaged(item) {
    if (item.getThisSize == null) {
        InitFunctions(item);
        item.asyncStartMarquee = setInterval(function() { StartMarquee(item.id); }, 50);
        if (item.getThisSize(item) == 0) {
            return;
        }
    }

    if (item.asyncStartMarquee != null) {
        if (item.getThisSize(item) == 0) {
            return;
        }

        clearInterval(item.asyncStartMarquee);
        item.asyncStartMarquee = null;
        BuildMarquee(item);
        InitValues(item);
        CloneWhileNotFullFilled(item);
        InitScroll(item.direction, item, item.getThisSize(item));
        item.style.visibility = '';
        item.onmouseover = function() { StopMarquee(item); };
        item.onmouseout = function() { ResumeMarquee(item); };
    }

}



function BuildMarquee(item) {
    item.style.width = item.offsetWidth + "px";
    item.style.height = item.offsetHeight + "px";
    var table = document.createElement("table");
    table.cellSpacing = 0;
    table.cellPadding = 0;
    table.border = 0;
    var row = table.insertRow();
    var cell = row.insertCell();
    var chtm = item.innerHTML;
    item.hasNoBr = (item.getElementsByTagName.length > 0);
    if (item.hasNoBr == false) {
        chtm = '<nobr>' + item.innerHTML + '</nobr>';
    }

    cell.innerHTML = chtm;
    if (item.getThisSize == GetThisWidth) {
        RemoveLayoutFix(cell.childNodes[0]);
    }

    item.innerHTML = '';
    item.insertBefore(table);
    item.mq = table;
    item.rw = row;
    item.cl = cell;
    table = item.mq;
    item.cl.style.width = table.offsetWidth + "px";
    item.cl.style.height = table.offsetHeight + "px";
    table.style.position = 'relative';
    table.style.tableLayout = 'fixed';
    table.style.width = '100%';
    table.style.height = '100%';
}



function RemoveLayoutFix(item) {
    for (var i = 0; i < item.childNodes.length; i++) {
        var child = item.childNodes[i];
        if (child != null && child.tagName != null && child.tagName.toLowerCase() == 'table') {
            child.style.tableLayout = '';
            child.style.height = '';
            child.style.width = '';
            child.width = '';
            child.height = '';
        }
    }
}



function InitValues(item) {
    item.scrollAmount = Math.abs(parseInt(item.scrollAmount));
    if (isNaN(item.scrollAmount)) {
        item.scrollAmount = 6;
    }

    item.scrollDelay = Math.abs(parseInt(item.scrollDelay));
    if (isNaN(item.scrollDelay)) {
        item.scrollDelay = 85;
    }

    switch (item.direction) {
        case "right":
            item.clFix = item.cl.offsetWidth;
            break;

        case "up":
            item.clFix = -item.cl.offsetHeight;
            break;

        case "down":
            item.clFix = item.cl.offsetHeight;
            break;

        case "left":
        default:
            item.clFix = -item.cl.offsetWidth;
            break;

    }

}



function InitFunctions(item) {

    try {
        item.direction = item.direction.toLowerCase();
    }
    catch (e) {
        item.direction = "left";
    }

    switch (item.direction) {
        case "right":
            item.getThisSize = GetThisWidth;
            item.getMqSize = GetMqWidth;
            item.cloneOne = CloneOneHorizontal;
            item.setScroll = SetScrollLeft;
            item.getScroll = GetScrollLeft;
            break;

        case "up":

            item.getThisSize = GetThisHeight;
            item.getMqSize = GetMqHeight;
            item.cloneOne = CloneOneVertical;
            item.setScroll = SetScrollTop;
            item.getScroll = GetScrollTop;
            break;

        case "down":

            item.getThisSize = GetThisHeight;
            item.getMqSize = GetMqHeight;
            item.cloneOne = CloneOneVertical;
            item.setScroll = SetScrollTop;
            item.getScroll = GetScrollTop;
            break;

        case "left":

        default:

            item.getThisSize = GetThisWidth;
            item.getMqSize = GetMqWidth;
            item.cloneOne = CloneOneHorizontal;
            item.setScroll = SetScrollLeft;
            item.getScroll = GetScrollLeft;
            break;

    }

}



function InitScroll(direction, item, size) {
    var table = item.mq;
    var cell;
    switch (direction) {
        case "right":
            cell = item.rw.insertCell();
            cell.style.width = item.getThisSize(item) + "px";
            item.scrollAmount = -item.scrollAmount;
            item.scrollLeft = item.scrollWidth;
            break;

        case "up":

            table.style.top = size + "px";
            item.scrollTop = 0;
            break;

        case "down":
            cell = table.insertRow().insertCell();
            cell.style.height = item.getThisSize(item) + "px";
            item.scrollAmount = -item.scrollAmount;
            item.scrollTop = item.scrollHeight;
            break;

        case "left":
        default:
            table.style.left = size + "px";
            item.scrollLeft = 0;
            break;
    }
}



function SetScrollLeft(item, value) {
    item.scrollLeft = value;
}
function SetScrollTop(item, value) {
    item.scrollTop = value;
}
function GetScrollLeft(item) {
    return item.scrollLeft;
}
function GetScrollTop(item) {

    return item.scrollTop;

}
function GetMqWidth(item) {

    return item.mq.offsetWidth;

}
function GetMqHeight(item) {
    return item.mq.offsetHeight;
}

function GetThisWidth(item) {
    return item.offsetWidth;
}
function GetThisHeight(item) {
    return item.offsetHeight;
}
function CloneWhileNotFullFilled(item) {
    var lastSize = 0;
    var size = item.getMqSize(item);
    while (size != lastSize && size <= item.getThisSize(item) + Math.abs(item.scrollAmount) + Math.abs(item.clFix)) {
        item.cloneOne(item);
        lastSize = size;
        size = item.getMqSize(item);
    }

    item.mqSize = item.getMqSize(item);
}

function CloneOneHorizontal(item) {
    return CloneCell(item, item.rw);
}



function CloneCell(item, row) {
    var cell = row.insertCell();
    cell.innerHTML = item.cl.innerHTML;
    cell.style.width = item.cl.style.width;
    cell.style.height = item.cl.style.height;
    return cell;
}



function CloneOneVertical(item) {
    var row = item.mq.insertRow();
    return CloneCell(item, row);
}

function StopMarquee(item) {
    if (item.il != null) {
        clearInterval(item.il);
        item.il = null;
    }

}

function ResumeMarquee(item) {
    if (item.il == null) {
        item.il = setInterval(function() { OnMarquee(item); }, item.scrollDelay);
    }
}



function StartMarquee(name) {
    try {
        var item = document.getElementById(name);
        if (item != null) {
           
            if (item.childNodes.length == 0) {
                return;
            }
            EnsureMarqueeManaged(item);
            if (item.getThisSize(item) == 0) {
                return;
            }
            ResumeMarquee(item);
        }

    }
    catch (e) {
   }

}
function RebuildMarquee(name) {
    try {
        var item = document.getElementById(name);
        if (item != null && item.mq != null) {
            var scrollFix = item.getScroll(item); // v3
            if (item.clFix > 0) {
                if (item.getScroll == GetScrollLeft) {
                    scrollFix -= item.scrollWidth;
                }
                else {
                    scrollFix -= item.scrollHeight;
                }
                scrollFix += item.getThisSize(item);
            }

            StopMarquee(item);
            var chtm = item.cl.innerHTML; // v2
            if (item.hasNoBr == false) {
                chtm = chtm.substr(6, chtm.length - 13);
            }

            item.innerHTML = chtm;
            item.getThisSize = null;
            item.style.width = '100%';
            item.style.height = '100%';
            StartMarquee(name);
            item.setScroll(item, item.getScroll(item) + scrollFix);
        }
    }
    catch (e)
 { }

}
//-----------mynetMenu.js------------------

//-----------newmenustyle.js------------------
var tagNavigation=new Object();

//标签导航JS文件
//prefix 前缀
//classprefix CSS前缀
//该程序中所有的样式变化,都是根据

tagNavigation=function(prefix,classPrefix)
{
   this.currentId=0;
   this.currentSubId=0;
   this.prefix=prefix;
   this.menuName="M";//固定的命名前缀,服务端生成类似的DIV
   this.subMenuName="subM"
   this.selectId=0;
   this.selectSubId=0;
          this.classPrefix = classPrefix;
   
   
}

//切换当前样式
tagNavigation.prototype.ChangeMenuIndex=function(index)
{
// 关闭之前的子菜单层

   var temp=document.getElementById(this.prefix+this.subMenuName+"T"+this.currentId);
   if(temp!=null)
   {
      this.SetSubMenu(temp,false);
      
   }
   
   if(this.selectId!=this.currentId)
   {
       
        //假如不是选中项目,清掉上个菜单的样式
         var oldmenu=document.getElementById(this.prefix+this.menuName+this.currentId);
         if(oldmenu!=null)
         this.SetMenuStyle(oldmenu,"N");
     }
   
   this.currentId=index;
   temp=document.getElementById(this.prefix+this.subMenuName+"T"+this.currentId);
   
   if(temp!=null)
   {
      this.SetSubMenu(temp,true);
   }   
   
   var  menu=document.getElementById(this.prefix+this.menuName+this.currentId);
   
   this.SetMenuStyle(menu,"O",false);
      
}
//设置二级菜单的样式
//obj 二级菜单的元素引用
//isOpen 是否打开该元素
tagNavigation.prototype.SetSubMenu=function(obj,isOpen)
{
    if(isOpen)
    {
       obj.style.display='';
    }
    else
    {       
       obj.style.display='none';
    }
}

tagNavigation.prototype.SetMenuStyle = function(obj, styleMode, isSubMenu) {
    try {
        //根据styleMode改变样式
        var menuName = (isSubMenu == true) ? this.subMenuName : this.menuName;
        //var menuSideName=
        //求出两个边来  为了做成圆角,所以放了两个边

        var leftSide = document.getElementById(obj.id + "L");
        var rightSide = document.getElementById(obj.id + "R");
        obj.className = this.classPrefix + menuName + styleMode;

        if (leftSide != null) {
            leftSide.className = this.classPrefix + menuName + "L" + styleMode;
        }
        if (rightSide != null) {
            rightSide.className = this.classPrefix + menuName + "R" + styleMode;
        }
    }
    catch (er) {
               //donothing
     }

}

//选定一个项目,该项目的样式不受MOUSEOVER的影响
tagNavigation.prototype.SelMenu=function(index,isSubMenu)
{
     if(this.selectId==index)
     {
       return;
     }
     if(this.selectId!=0)
     {
        var oldmenu=document.getElementById(this.prefix+menuName+this.selectId);
        this.SetMenuStyle(oldmenu,"N");
    }
    this.selectId=index;
    this.currentId=index;
    var menuName=(isSubMenu==true)?this.subMenuName:this.menuName; 
    var menu=document.getElementById(this.prefix+menuName+this.selectId);
    this.SetMenuStyle(menu,"O");
    
    //如果存在子菜单的话
   var subItem=document.getElementById(this.prefix+this.subMenuName+"T"+this.currentId);

   if (subItem != null)
   {
       this.SetSubMenu(subItem, true);
   }   
            
}

//选中子菜单时,将样式设置为选中时的状态
tagNavigation.prototype.ChangeSubMenuIndex=function(index)
{
   this.currentSubId=index;
       
   var  temp=document.getElementById(this.prefix+this.menuName+this.currentId+this.currentSubId);
 // alert(this.prefix+this.menuName+this.currentId+this.currentSubId);
   if(temp!=null)
   {
       this.SetMenuStyle(temp,"O",true);
   }

}

//将子菜单设定为未选中的样式
tagNavigation.prototype.UnChangeSubMenuIndex=function(index)
{
//修改子菜单样式
    this.currentSubId = index;
   //获取子菜单的引用      
   var  temp=document.getElementById(this.prefix+this.menuName+this.currentId+this.currentSubId);
   if(temp!=null)
   {
       this.SetMenuStyle(temp,"N",true);
   }

}

var titleNavigation=new Object();
//标题式导航
//prefix 前缀
titleNavigation=function(prefix)
{
   this.currentId=0;
   this.prefix=prefix;
   this.menuName="titleM";
   this.selectId=0;  
}

//鼠标移动上时更改当前样式，传this为此处参数
titleNavigation.prototype.ChangeMenuIndex=function(obj)
{
//    this.currentSubId=index;       
//   var  temp=document.getElementById(this.prefix+this.menuName+this.currentId);
   if(obj!=null)
   {
      obj.className=this.prefix+this.menuName+'O';  
   }
}

//撤销当前样式
titleNavigation.prototype.UnChangeMenuIndex=function(obj) {

//   this.currentSubId=index;    
//   var  temp=document.getElementById(this.prefix+this.menuName+this.currentId);

   if(obj!=null)
   {
       obj.className=this.prefix+this.menuName+'N';  
   }
}



//-----------newsplayer.js------------------
var NewsPlayer = new Object()
//新闻播放器
//prefix 前缀
//totalwidth 总宽度
//datajson 用JSON格式记录的数据
//vitemwidth 单元宽度
//totalHeight 总高度
NewsPlayer = function(prefix, totalwidth, dataJson, itemWidth, totalHeight) {
   
    this.prefix = prefix;
    this.totalWidth = totalwidth;
    this.totalHeight = totalHeight;
    this.dataJson = dataJson;
    this.currentIndex = 0;
    this.urlIndex = 0;
    this.timeid = '';
    var self = this;
    this.mainImg = document.getElementById(this.prefix + 'imgMain');
    this.normalBar = document.getElementById(this.prefix + 'NormalSelected'); //普通红块
    this.mouseIndex = 0;
    this.mainDiv = document.getElementById(this.prefix + 'content');

    this.normalText = document.getElementById(this.prefix + 'NormalSelected_Text');

    this.selectBar = document.getElementById(this.prefix + 'CurrentSelected'); //当前选择的红块
    this.normalSelectText = document.getElementById(this.prefix + 'CurrentSelected_Text');
    this.clientTimeId = "";
    //定时切换
    var tempF = function() { self.Switch(); };
    this.clientTimeId = setTimeout(tempF, 4500);
    this.itemWidth = itemWidth;
    this.barWidth = this.totalWidth - this.itemWidth * this.dataJson.length;
    this.selectBar.style.left = this.barWidth + 0 * this.itemWidth + 2 + 'px';


}
//切换
NewsPlayer.prototype.Switch = function() {
    //this.urlIndex = this.currentIndex;

    var self = this;
    if (this.currentIndex < this.dataJson.length) {
        self.SwitchPic(this.currentIndex);
        this.currentIndex++; //维护当前的选中项
        if (this.currentIndex == this.dataJson.length) {
            this.currentIndex = 0;
        }

    }
}
//切换图片
NewsPlayer.prototype.SwitchPic = function(switchValue) {
    //    if (window.event) {
    //        window.event.cancelBubble = true;
    //    }
    var self = this;
    if (this.mainImg != null) {
        this.mainImg.src = this.dataJson[switchValue].smallPhotoSrc; //切换图片
        this.urlIndex = this.currentIndex = switchValue;
        this.selectBar.style.left = this.barWidth + switchValue * (this.itemWidth) + 2 + 'px';
        //alert(this.selectBar.style.left);
        this.normalSelectText.innerHTML = switchValue + 1;
        var tempDiv = this.mainImg;
        try {
            if (tempDiv.filters) {
                //启动滤镜效果
                tempDiv.filters[0].Stop();
                tempDiv.filters[0].Apply();
                tempDiv.filters[0].Play();

            }
            clearTimeout(this.clientTimeId);
            var tempF = function() { self.Switch(); };
            this.clientTimeId = setTimeout(tempF, 4500);
            //再次启动定时器

        }
        catch (e)
        { }
    }
}

NewsPlayer.prototype.OverBar = function(index) {
  //当鼠标移动到某个按钮之上
    index--;
    this.mouseIndex = index;
    this.normalBar.style.left = this.barWidth + index * this.itemWidth + 2 + 'px';
  
    index++;
    this.normalText.innerHTML = index;
    this.normalBar.style.visibility = 'visible';

}
//当鼠标离开后,将其恢复
NewsPlayer.prototype.UnOverBar = function(event) {
    this.normalBar.style.visibility = 'hidden';
}

NewsPlayer.prototype.SelectBar = function() {
    this.SwitchPic(this.mouseIndex);
    this.currentIndex = this.mouseIndex;
}
//获取随机数值
NewsPlayer.prototype.Ran = function(seed) {
    return Math.floor((seed + 1) * Math.random());
}
//当图片读取的时候
NewsPlayer.prototype.ImgLoad = function(img) {

    var tmpHeight = this.totalHeight - parseInt(img.height);
    // alert(img.height);
    //    if (tmpHeight > 0) {
    var addHeight = parseInt((tmpHeight / 2));  //set it on center
    img.style.marginTop = addHeight + 'px';
    // }

}
//前往当前的URL
NewsPlayer.prototype.GoUrl = function(isNewWin) {

    if (!isNewWin) {
        window.location.href = this.dataJson[this.urlIndex].url;
    }
    else {
        window.open(this.dataJson[this.urlIndex].url);
    }
}
//-----------OnOffMenu.js------------------
var OnOffMenu = new Object()

OnOffMenu = function(prefix, menuArr, imgArr, itemName, itemTitleName, itemImgName) {
    this.prefix = prefix; //前缀
    this.currentIndex = 0; //当前项
    this.menuArr = menuArr; //菜单数组,存0者打开,存1者关闭
    this.imgArr = imgArr; //图片数组
    this.itemName = itemName; // 名称内容
    this.itemTitleName = itemTitleName; //标题
    this.itemImgName = itemImgName; //关闭打开按钮
}


//切换显示样式,根据传入的INDEX
OnOffMenu.prototype.ChangeMode = function(index) {
    if (this.menuArr[index] != null) {
        var item = document.getElementById(this.prefix + this.itemName + index);
        var title = document.getElementById(this.prefix + this.itemTitleName + index);
        var img = document.getElementById(this.prefix + this.itemImgName + index);
        // 代表这UL已经打开
        if (this.menuArr[index] == true) {
            if (item != null) {
                item.style.display = 'none';
                img.src = this.imgArr[1]; //切换箭头图片
            }
            this.menuArr[index] = false;

        }
        else {
            if (item != null) {
                item.style.display = '';
                img.src = this.imgArr[0];
            }
            this.menuArr[index] = true;
        }
    }
}
//这个方法关闭所有的标签,只打开INDEX中传入的项
OnOffMenu.prototype.SetOnlyMenuOpen = function(index) {
    for (var i = 0; i < this.menuArr.length; i++) {
        this.menuArr[i] = false;
    }

    if ((index > -1) && (index < menuArr.lenght)) {
        this.menuArr[index] = true;
    }   

    for (var i = 0; i < this.menuArr.length; i++) {
        this.ChangeMode(i);
    }

}



//-----------OutlookBar.js------------------
function showitem(id, name, iscurrent) {
    var bgcolor = iscurrent ? 'orange' : 'transparent';
    return ("<span style='text-align:left; border:solid 1px " + bgcolor+ "; padding:2px 4px 2px 4px;'><img src='/res/images/cpwoutlookbar_arrow.gif'/> <a href='" + id + "' target=_self>" + name + "</a></span><br>")
}

//number 为一数字，根据其选定合适的DOM 元素
function switchoutlookBar(number) {
    var i = outlookbar.opentitle;
    outlookbar.opentitle = number;
    var id1, id2, id1b, id2b;
    if (number != i && outlooksmoothstat == 0) {
        if (number != -1) {
            if (i == -1) {
                id2 = "blankdiv";
                id2b = "blankdiv";
            }
            else {
                id2 = "outlookdiv" + i;
                id2b = "outlookdivin" + i;
                var outlookTitle = document.getElementById("outlooktitle" + i);
                outlookTitle.className = 'mynetoutlookbar_open';
            }
            id1 = "outlookdiv" + number;
            id1b = "outlookdivin" + number;
            //var curOutLookTitle = document.all("outlooktitle" + number);
            var curOutLookTitle = document.getElementById("outlooktitle" + number);
            curOutLookTitle.className = 'mynetoutlookbar_close';
            smoothout(id1, id2, id1b, id2b, 0);
        }
        else {
            var blankDiv = document.getElementById("blankdiv");
            blankDiv.style.display = "";
            blankDiv.style.height = "100%";
            blankDiv.style.display = "none";
            blankDiv.style.height = "0%";
            blankDiv.style.border = "1px none navy";
            blankDiv.style.background = "white";
            blankDiv.style.color = "#ffffff";
            blankDiv.style.textalign = "center";
        }
    }
}
function smoothout(id1, id2, id1b, id2b, stat) {
    if (stat == 0) {
        var id1bObj = document.getElementById(id1b);
        var id2bObj = document.getElementById(id2b);
        tempinnertext1 = id1bObj.innerHTML;
        tempinnertext2 = id2bObj.innerHTML;
        id1bObj.innerHTML = "";
        id2bObj.innerHTML = "";
        outlooksmoothstat = 1;
        id1bObj.style.overflow = "hidden";
        id2bObj.style.overflow = "hidden";
        document.getElementById(id1).style.height = "0%";
        document.getElementById(id1).style.display = "";
        setTimeout("smoothout('" + id1 + "','" + id2 + "','" + id1b + "','" + id2b + "'," + outlookbar.inc + ")", outlookbar.timedalay);
    }
    else {
        stat += outlookbar.inc;
        if (stat > 100)
            stat = 100;
        document.getElementById(id1).style.height = stat + "%";
        document.getElementById(id2).style.height = (100 - stat) + "%";
        if (stat < 100)
            setTimeout("smoothout('" + id1 + "','" + id2 + "','" + id1b + "','" + id2b + "'," + stat + ")", outlookbar.timedalay);
        else {
            document.getElementById(id1b).innerHTML = tempinnertext1;
            document.getElementById(id2b).innerHTML = tempinnertext2;
            outlooksmoothstat = 0;
            document.getElementById(id1b).style.overflow = "auto";
            document.getElementById(id2).style.display = "none";
        }
    }
}
function getOutLine() {
    outline = "<table " + outlookbar.otherclass + ">";
    for (i = 0; i < (outlookbar.titlelist.length); i++) {
        outline += "<tr><td name=outlooktitle" + i + " id=outlooktitle" + i + " ";
        if (i != outlookbar.opentitle) {
            outline += " nowrap class='mynetoutlookbar_close'";
        }
        else {
            outline += " nowrap  class='mynetoutlookbar_open'";
        }
        outline += outlookbar.titlelist[i].otherclass
        outline += " onclick='switchoutlookBar(" + i + ")'>";
        if (i != outlookbar.opentitle) {
            outline += "<img src='/res/images/cpwoutlookbar_sign.jpg' style='vertical-align:middle;'/>";
        }
        else {
            outline += "<img src='/res/images/cpwoutlookbar_sign2.jpg' style='vertical-align:middle;'/>"; 
        }
        outline += outlookbar.titlelist[i].title + "</td></tr>";
        outline += "<tr><td name=outlookdiv" + i + " valign=top align=left id=outlookdiv" + i + " style='width:100%"
        if (i != outlookbar.opentitle)
            outline += ";display:none;height:0%;";
        else
            outline += ";display:;height:100%;";
        outline += "'><div name=outlookdivin" + i + " id=outlookdivin" + i + " style='overflow:auto;width:100%;height:100%;line-height:22px;padding:4px 0px 0px 18px;text-align:left;'>";
        for (j = 0; j < outlookbar.itemlist[i].length; j++)
            outline += showitem(outlookbar.itemlist[i][j].key, outlookbar.itemlist[i][j].title, outlookbar.itemlist[i][j].isCurrent);
        outline += "</div></td></tr>"
    }
    outline += "</table>"
    return outline
}
function showOutlookItem() {
    var outline;
    outline = "<div id='outLookBarDiv' name='outLookBarDiv' style='width=100%;height:100%'>"
    outline += outlookbar.getOutLine();
    outline += "</div>"
    document.write(outline);
}
function theitem(intitle, instate, inkey,iscurrent) {
    this.state = instate;
    this.otherclass = " nowrap ";
    this.key = inkey;
    this.title = intitle;
    this.isCurrent = iscurrent;
}
function addtitle(intitle) {
    outlookbar.itemlist[outlookbar.titlelist.length] = new Array();
    outlookbar.titlelist[outlookbar.titlelist.length] = new theitem(intitle, 1, 0);
    return (outlookbar.titlelist.length - 1);
}
function additem(intitle, parentid, inkey,iscurrent) {
    if (parentid >= 0 && parentid <= outlookbar.titlelist.length) {
        outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length] = new theitem(intitle, 2, inkey, iscurrent);
        outlookbar.itemlist[parentid][outlookbar.itemlist[parentid].length - 1].otherclass = " nowrap align=left style='height:5' ";
        return (outlookbar.itemlist[parentid].length - 1);
    }
    else
        additem = -1;
}
function outlook() {
    this.titlelist = new Array();
    this.itemlist = new Array();
    this.divstyle = "style='height:100%;width:100%;overflow:auto' align=center";
    this.otherclass = "border=0 cellspacing='0' cellpadding='0' style='height:100%;width:100%'valign=middle align=center ";
    this.addtitle = addtitle;
    this.additem = additem;
    this.starttitle = -1;
    this.show = showOutlookItem;
    this.getOutLine = getOutLine;
    this.opentitle = this.starttitle;
    this.reflesh = outreflesh;
    this.timedelay = 50;
    this.inc = 10;
}
function outreflesh() {
    document.getElementById("outLookBarDiv").innerHTML = outlookbar.getOutLine();
}
function locatefold(foldname) {
    for (var i = 0; i < outlookbar.titlelist.length; i++) {
        if (foldname == outlookbar.titlelist[i].title) {
            outlookbar.starttitle = i;
            outlookbar.opentitle = i;
        }
    }
}

//-----------questionnairy.js------------------

function ValidatePassword(frmId,strBaseUrl)
{
  var oPasswordList = document.getElementsByTagName('input');
  var len = oPasswordList.length;
  for(var i=0;i<len;i++)
  {
    if(oPasswordList[i].getAttribute('typename')=='AspectInvitationalCodeQuestion')
    {
      var password = oPasswordList[i].value;
      var aspectUID = oPasswordList[i].getAttribute('aspectuid');
      var randomNum =  parseInt(100000 * Math.random()); 
      var strUrl = strBaseUrl +'q/IsPasswordUsed.aspx?password='+escape(password)+'&aspectUID='+aspectUID+"&dt="+randomNum;
      var questionairyForm = document.getElementById(frmId);
      //同时需要改变表单Action的url,让密码提交后做保存处理，避免密码重复使用
      if(questionairyForm.action.indexOf('&aspectUID')==-1)
      {
        questionairyForm.action =questionairyForm.action+"&aspectUID="+aspectUID;
      }
      var pos = questionairyForm.action.indexOf('&password=')
      if(pos!=-1)
      {
        questionairyForm.action = questionairyForm.action.substring(0,pos);
      }
      questionairyForm.action += "&password="+escape(password);
      var retValue = httpRequest(strUrl);
      return retValue =='true';
    }
  }
  //证明没有密码验证域
  return true;
}

function ValidateVerifyCode(qaId,strBaseUrl)
{
  var oTxtVeryCode = document.getElementById('txtValidCode_'+qaId);
  var strUrl = strBaseUrl + 'web/VidateVeryCode.aspx?strCode='+ oTxtVeryCode.value;
  var retValue = httpRequest(strUrl);
  if(retValue== "false")
  {
    return false;
  }
  else
  {
    return true;
  }
}

function ValidateEmail(email,qaId,strBaseUrl)
{
   var strUrl = strBaseUrl+'q/IsQuestionEmailUsed.aspx?qid='+qaId+'&email='+email;
   var retValue = httpRequest(strUrl);
   if(retValue== "false")
   {
     return false;
   }
   else
   {
     return true;
   }
   
}
//-----------RandomFilterText.js------------------
var RandomFilterText=new Object();
//随机特效文字
//targetId 目标ID
//textArray 带有文字的字符串
//colorArray  颜色字符串
RandomFilterText=function(targetId,textArray,colorArray)
{
clearTimeout(this.timer); //首先初始化清除时间ID,为了避免控件RENDER时候的错误
this.textArray=textArray;
this.targetId=targetId;
this.colorArray=colorArray;
this.timer="";
}
RandomFilterText.prototype.Ran=function(seed) {
//求随机数
   return Math.floor((seed+1)*Math.random());
}
RandomFilterText.prototype.Play=function() {	 
//执行
if(this.timer+""!="")
{
    clearTimeout(this.timer);
}

    //获取当前目标
    var targetDiv=document.getElementById(this.targetId);
    if(targetDiv==null)
    {
      return;
  }
    //获得随机滤镜 
	targetDiv.style.filter="revealTrans(Duration=1.5,Transition=" + this.Ran(22) + ")";
    targetDiv.filters.revealTrans.apply();
	targetDiv.style.background=this.colorArray[this.Ran(this.colorArray.length-1)];
	targetDiv.innerHTML=this.textArray[this.Ran(this.textArray.length-1)];
    targetDiv.filters.revealTrans.play();
    var self = this;
    //使用为了解决SELF的作用域的问题
    var tempTimeFun=function(){self.Play();};
    this.timer = setTimeout(tempTimeFun,3500);
}
//切换数组,让用户数据可以RENDER时切换
RandomFilterText.prototype.ChangeArray=function(newArray)
{
this.textArray=newArray;
}
//-----------rollingPhotosAlbumJS.js------------------
//speed �ٶ�
//prefix ǰ׺
//width ���
  RollingImage = function(speed,prefix,width)
  {
    if(speed > 90)
        speed = 90;
    if(speed < 0)
        speed = 0;
    this.tick = 100 - speed;
    this.width = width;
    this.obj1 = document.getElementById(prefix + "_RollingImg_1");
    this.obj2 = document.getElementById(prefix + "_RollingImg_2");
    this.obj3 = document.getElementById(prefix + "_RollingImg_3");
    this.obj3.innerHTML = this.obj2.innerHTML;
    var obj = this;
    var totalWidth = obj.obj2.offsetWidth * 2;
    this.count = 0;
  //���� 
    this.Marquee = function()
    {
        if(obj.obj2.offsetWidth > 0 && 2 * obj.width > totalWidth)
        {
            obj.AddCells();
        }
        try
        {
            if(obj.obj1.scrollLeft >= obj.obj2.offsetWidth)
                obj.obj1.scrollLeft = 0;
            else
                obj.obj1.scrollLeft++;
        }
        catch(e){}
    }
    //��ʱִ��
    var MyMar=setInterval(this.Marquee,this.tick)
    this.obj1.onmouseover=function() 
    {
        clearInterval(MyMar);
    }
    this.obj1.onmouseout=function()
    {
        MyMar=setInterval(obj.Marquee, obj.tick);
    }
    //������������
    this.AddCells = function()
    {    
        while(2 * obj.width > totalWidth)
        {
            var newCell = obj.obj3.parentElement.insertCell();
            newCell.innerHTML = obj.obj2.innerHTML;
            totalWidth += obj.obj2.offsetWidth;
        }
    }
  }
//-----------rotatingBoxPhotosAlbumJS.js------------------
//��ת���ӿؼ���JS����
//prefix ǰ׺
//width ������
//imgs ����ͼƬ���ӵ�����
//urls �����������ӵ�����
//titles ���Ƶ�����
//speed �ؼ����е��ٶ�
RotatingBox = function(prefix,width,imgs,urls,titles,speed) {
var speed = 20;
    //��Ҫ����ͼƬ��������
    var originalImg = document.getElementById(prefix+"_RotatingBox_1");
    var alternantlImg = document.getElementById(prefix+"_RotatingBox_2"); 
    var timer;
    var currentIndex = 0;
    //���Ʋ��Ų���
    var step = 3;
    if(speed < 1)
        step = 1;
    else if(speed > 10)
        step = 10;
    else
        step = speed;
    var obj = this;
    
    //����
    this.Play = function()
    {
        if(originalImg.clientWidth <= 0)
        {
            var nextIndex;
            currentIndex += 1;
            nextIndex = currentIndex + 1;
            if(currentIndex == imgs.length -1)
            {
                nextIndex = 0;
            }
            else if(currentIndex >= imgs.length)
            {
                currentIndex = 0;
                nextIndex = 1;
            }
            try {
            //�л�Ϊ��ǰ��ֵ
                originalImg.style.width = width;
                alternantlImg.style.width = 0;
                originalImg.title=titles[currentIndex];
                alternantlImg.title=titles[nextIndex];
                originalImg.childNodes[0].src=imgs[currentIndex];
                alternantlImg.childNodes[0].src=imgs[nextIndex];
            }catch(e){}
        }
        if(originalImg.clientWidth>0)
        {
            var finalStep = step;
            if(originalImg.clientWidth <= step || alternantlImg.clientWidth <= step)
                finalStep = 1;
            originalImg.style.width = originalImg.clientWidth - finalStep;
            alternantlImg.style.width = alternantlImg.clientWidth + finalStep;
        }
        clearTimeout(timer);
        timer=setTimeout(obj.Play,speed);
    }
    
    this.Stop = function() {
    //�رն�ʱ��
        clearTimeout(timer);
    }
    
    originalImg.onmouseout=obj.Play;
    alternantlImg.onmouseout=obj.Play;
    originalImg.onmouseover=obj.Stop;
    alternantlImg.onmouseover=obj.Stop;
}
//-----------rotatingPhotosAlbumJS.js------------------
RotatingImages = function(prefix,Car_Image_Sources,size)
{
	var Car_Image_Width=size; 
	var Car_Image_Height=size;
	var Car_Border=true;
	var Car_Border_Color="white";
	var Car_Speed=4;
	var Car_Direction=true;
	var Car_NoOfSides=12;	
	var obj = this;

	var CW_I=new Array(Car_NoOfSides/2+1);
	var C_ClcW=new Array(Car_NoOfSides/2);
	var C_Coef=new Array(3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4,0,Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
	var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;
	var C_Pre_Img=new Array(Car_Image_Sources.length);
	var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,C_Stppd=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;

	this.Play = function()
	{
		if(document.getElementById)
		{
			for(i=0;i<Car_Image_Sources.length;i+=2)
			{
				C_Pre_Img[i]=new Image();
				C_Pre_Img[i].src=Car_Image_Sources[i];
			}
			C_MaxW=Car_Image_Width/Math.sin(Math.PI/Car_NoOfSides)+C_HalfNo+1;
			Car_Div=document.getElementById(prefix+"_rotatingImgsDiv");
			for(i=0;i<C_HalfNo;i++)
			{
				CW_I[i]=document.createElement("img");
				Car_Div.appendChild(CW_I[i]);	
				CW_I[i].style.position="absolute";
				CW_I[i].style.top=0+"px";
				CW_I[i].style.height=Car_Image_Height+"px";
				if(Car_Border)
				{
					CW_I[i].style.borderStyle="solid";
					CW_I[i].style.borderWidth=1+"px";
					CW_I[i].style.borderColor=Car_Border_Color;
				}
				CW_I[i].src=Car_Image_Sources[2*i];
				CW_I[i].lnk=Car_Image_Sources[2*i+1];
				CW_I[i].onclick=obj.C_LdLnk;
				CW_I[i].onmouseover=obj.C_Stp;
				CW_I[i].onmouseout=obj.C_Rstrt;
			}
			obj.CarImages();
		}
	}

	this.CarImages = function()
	{
		if(!C_Stppd)
		{
			C_TotalW=0;
			for(i=0;i<C_HalfNo;i++)
			{
				C_ClcW[i]=Math.round(Math.cos(Math.abs(C_Coef[C_CoefOf+i]+C_Angle))*Car_Image_Width);
				C_TotalW+=C_ClcW[i];
			}
			C_LeftOffset=(C_MaxW-C_TotalW)/2;
			for(i=0;i<C_HalfNo;i++)
			{
				CW_I[i].style.left=C_LeftOffset+"px";
				CW_I[i].style.width=C_ClcW[i]+"px";
				C_LeftOffset+=C_ClcW[i];
			}
			C_Angle+=Car_Speed/720*Math.PI*(Car_Direction?-1:1);
			if((Car_Direction&&C_Angle<=0)||(!Car_Direction&&C_Angle>=Math.PI/C_HalfNo))
			{
			    if(C_CrImg==Car_Image_Sources.length)
			        C_CrImg=0;
				if(Car_Direction)
				{
					CW_I[C_HalfNo]=CW_I[0];
					for(i=0;i<C_HalfNo;i++)
					{
					    CW_I[i]=CW_I[i+1];
					}
					CW_I[C_HalfNo-1].src=Car_Image_Sources[C_CrImg];
					CW_I[C_HalfNo-1].lnk=Car_Image_Sources[C_CrImg+1];
				}
				else
				{	
				    for(i=C_HalfNo;i>0;i--)
				    {
				        CW_I[i]=CW_I[i-1];
				    }
					CW_I[0]=CW_I[C_HalfNo];
					CW_I[0].src=Car_Image_Sources[C_CrImg];
					CW_I[0].lnk=Car_Image_Sources[C_CrImg+1]
				}
				C_Angle=Car_Direction?Math.PI/C_HalfNo:0;
				C_CrImg+=2
			}
		}
		setTimeout(obj.CarImages,50);
	}

	this.C_LdLnk=function()
	{
	    if(this.lnk)
	    {
	        window.location.href=this.lnk;
        }
	}
	this.C_Stp=function()
	{
	    this.style.cursor=this.lnk?"pointer":"default";
	    C_Stppd=true;
	}
	this.C_Rstrt=function ()
	{
	    C_Stppd=false
	}
}
//-----------SliderObject.js------------------
SliderObject = new Object();
//本对象用来控制'实用标签'控件
//targetId 目标ID
//maxItems 最大数量
//itemsWidth 单元宽度
SliderObject=function(targetId,maxItems,itemsWidth)
{

    this.targetX=0; 
    this.targetY=0;
    this.targetId=targetId;
    this.currentTarget=0;
    this.targetSpeed=30;
    this.maxTarget=maxItems;
    this.slowSpeed=70; //移动速度最小值
    this.quickSpeed=170; //移动速度最大值
    this.timed="";
    this.itemsWidth=itemsWidth;
}
SliderObject.prototype.retrieveComputedStyle=function(element, styleProperty)
{
//获取CSS设置 
  var computedStyle = null;
  if (typeof element.currentStyle != "undefined")
  {
    computedStyle = element.currentStyle;
  }
  else
  {
    computedStyle = document.defaultView.getComputedStyle(element, null);
  }

  return computedStyle[styleProperty];
}
//移动当前标签
SliderObject.prototype.moveObject=function(target, destinationLeft, destinationTop, maxSpeed)
{

  var currentLeft = parseInt(this.retrieveComputedStyle(target, "left"));
  var currentTop = parseInt(this.retrieveComputedStyle(target, "top"));

  if (isNaN(currentLeft))
  {
    currentLeft = 0;
  }

  if (isNaN(currentTop))
  {
    currentTop = 0;
  }
//控制左右移动
  if (currentLeft < destinationLeft)
  {
    currentLeft += maxSpeed;

    if (currentLeft > destinationLeft)
    {
      currentLeft = destinationLeft;
    }
  }
  else
  {
    currentLeft -= maxSpeed;

    if (currentLeft < destinationLeft)
    {
      currentLeft = destinationLeft;
    }
  }
//控制上下移动
  if (currentTop < destinationTop)
  {
    currentTop += maxSpeed;

    if (currentTop > destinationTop)
    {
      currentTop = destinationTop;
    }
  }
  else
  {
    currentTop -= maxSpeed;
    if (currentTop < destinationTop)
    {
      currentTop = destinationTop;
    }
  }
  target.style.left = currentLeft + "px";
  target.style.top = currentTop + "px";
  var self = this;
//一旦条件达成,清空定时器
  if (currentLeft == destinationLeft && currentTop == destinationTop)
  {      
     if(typeof this.timed != undefined)
     {  
       clearTimeout(this.timed);
     }
  }
  else //启动新的定时器
  {
    //   var tempF=function(){self.moveIt();}
    
     var tempF=function(){self.moveObject(target, destinationLeft, destinationTop, maxSpeed);};
      this.timed =setTimeout(tempF,50);   
  }
  
  
}
SliderObject.prototype.moveIt=function()
{

    this.targetX =this.currentTarget *(-(this.itemsWidth));
    this.clearAllClickStyle();
        
    this.setClickStyle(document.getElementById(this.targetId+'_title_'+(this.currentTarget)));
    
    if(this.currentTarget==0)
    {
        //左边界
      this.endSideStyle(document.getElementById(this.targetId+"SiderLeft"));
      this.clearSideStyle(document.getElementById(this.targetId+"SiderRight"));
    }
    else if(this.currentTarget==this.maxTarget-1)
    {//右边界
       this.endSideStyle(document.getElementById(this.targetId+"SiderRight"));
       this.clearSideStyle(document.getElementById(this.targetId+"SiderLeft"));
    }
    else{       
         if(document.getElementById(this.targetId+"SiderLeft").className+""!=this.targetId+"SideOnMouseOver")
         {    
             this.clearSideStyle(document.getElementById(this.targetId+"SiderLeft"));               
         }   
          if(document.getElementById(this.targetId+"SiderRight").className+""!=this.targetId+"SideOnMouseOver")
         {  
             this.clearSideStyle(document.getElementById(this.targetId+"SiderRight"));  
         } 
    }

    this.moveObject(document.getElementById(this.targetId),this.targetX, this.targetY, this.targetSpeed);   
 
}
//移动到下一个
SliderObject.prototype.moveNext =function()
{

     this.targetSpeed=this.slowSpeed;
      if(this.currentTarget<this.maxTarget-1)
      {

        this.currentTarget++;
        this.moveIt();
      }
  }
//移动到前一个
SliderObject.prototype.movePre=function()
{
        this.targetSpeed=this.slowSpeed;
        if(this.currentTarget>0)
        {
            this.currentTarget--;
            this.moveIt();        
        }
    } 
//移动到首项
SliderObject.prototype.moveFirst=function()
{
      this.targetSpeed=this.quickSpeed;
      this.currentTarget=0;
      this.moveIt();      
}
SliderObject.prototype.moveLast=function()
{
      this.targetSpeed=this.quickSpeed;
      this.currentTarget=this.maxTarget-1;
      this.moveIt();    
}
//移动到某INDEX的位置
SliderObject.prototype.moveHere=function(index)
{      
      this.targetSpeed=this.quickSpeed;
      if((index>this.maxTarget-1)&&(index<0))
      {
        return;
      }
      if(((index)-this.currentTarget==1)||(this.currentTarget-(index)==1))
      {    
      //如果是相邻的项目，则速度减慢
        this.targetSpeed=this.slowSpeed;
      }
      this.currentTarget=index;
      this.moveIt();  
 }
 SliderObject.prototype.setClickStyle=function(target)
 {
 //
 var tid=this.targetId;
      if(target.className+""==tid+"TitleOnSelected")
    {    
       return;
    }
    target.className=this.targetId+"TitleOnSelected";

 }
 SliderObject.prototype.clearClickStyle=function(target)
 { 
 var tid=this.targetId;
      if(target.className+""==tid+"TitleNormal")
    {    
       return;
    }
    target.className=this.targetId+"TitleNormal";
}
 //鼠标移开后改变样式
 SliderObject.prototype.mouseOutChange=function(target)
 {
    var tid=this.targetId;
    
     if(target.className+""==tid+"TitleNormal")
    {    
       return;
    }
   
    if(target.className+""==tid+"TitleOnSelected")
    {    
       return;
    }
    
    
    target.className=this.targetId+"TitleNormal"; 
 }
 //鼠标覆盖时样式的变化
 SliderObject.prototype.mouseMoveChang=function(target)
 {
    var tid=this.targetId;
    if(target.className+""==tid+"TitleOnMouseOver")
    {    
       return;
    }
   
    if(target.className+""==tid+"TitleOnSelected")
    {    
       return;
    }
    target.className=this.targetId+"TitleOnMouseOver";
 }
 
 SliderObject.prototype.sideMoveChange=function(target)
 {
         var tid=this.targetId;

        if(target.className+""==tid+"SideEnd")
        {    
           return;
        }

 
    target.className=this.targetId+"SideOnMouseOver";
 }
 
 SliderObject.prototype.clearSideMoveStyle=function(target)
 {
     var tid=this.targetId;
     if(target.className+""==tid+"SideEnd")
     {    
        return;
     }
     this.clearSideStyle(target);
 
 }
 
 SliderObject.prototype.clearSideStyle=function(target)
 {
    var tid=this.targetId;
    if(target.className+""==tid+"SideNormal")
    {
       return;
    }
    
   if(((this.currentTarget==0)&&(target.id==this.TargetId+"SiderLeft"))||((this.currentTarget==this.maxTarget-1)&&(target.id==this.TargetId+"SiderRight")))
   {
   //防止最到末端时，被修改
        if(target.className+""==tid+"SideEnd")
        {    
           return;
        }
    }
    
    target.className=this.targetId+"SideNormal";
}
 //设置结尾处
 SliderObject.prototype.endSideStyle=function(target)
 {
    target.className=this.targetId+"SideEnd";
 }
 //这个方法负责现有图片的样式为普通状态
 SliderObject.prototype.clearAllClickStyle=function()
 {
   for(var i=0,j=this.maxTarget;i<j;i++)
   {
      this.clearClickStyle(document.getElementById(this.targetId+'_title_'+(i)));         
   }
}


//-----------sloshingImageADJS.js------------------
//prefix ǰ׺
//length ����
// speed �ٶ�
// imgwvidth ͼƬ���
//����ͼƬ��JS�ļ�
SloshingImage = function(prefix, length, speed, imgWidth)
{
    this.prefix = prefix;
    if(speed > 90)
        speed = 90;
    if(speed < 0)
        speed = 0;
    this.tick = 100 - speed;
    this.step = 0;
    this.img = document.images[this.prefix + '_SlosingImg']; 
    this.imgWidth = imgWidth;
    this.length = length;
    this.x_max = this.length - this.imgWidth;
    this.x = 0;
    var obj = this;  
    var timeId;
    clearTimeout(timeId); 
    
    this.Run = function ()
    {
        obj.img.style.marginLeft = obj.x;
        //����ͼƬ���򣬸����ܿ�Ƚ����л�
        if (obj.x >= obj.x_max / 2) 
        {
            obj.step--;
            if(obj.x < obj.x_max && obj.step == 0)
                obj.step = 1;
        }
        else  //��������趨�Ĳ���
        {
            obj.step++;
            if(obj.x > 0 && obj.step == 0)
                obj.step = -1;
        }
        obj.x += obj.step;
        if (obj.x >= obj.x_max) 
            obj.x = obj.x_max;
        if (obj.x <= 0) 
            obj.x = 0;
        timeId = setTimeout(obj.Run, obj.tick);
    }
}
//-----------SnakeTextEffect.js------------------
var SnakeTextEffect=new Object();
SnakeTextEffect=function(textArray,pathArray,fontSize,fontColor,identityId,maxLength)
{

    this.mes =textArray;
    this.maxtextlength=maxLength;
    this.path=pathArray;

    // 第二个信息间隔多久出现
    this.stoptime=5;

    // 字体的属性
    this.textfont="宋体";
    this.textsize=fontSize;
    this.textcolor=fontColor;

    // 字符的间距，如果你改变字体的大小也要改变这里
    this.letterspace=fontSize;

    this.tickerleft=this.path[this.path.length-2];
    this.tickertop=this.path[this.path.length-1];
    this.timer;
    this.finalxpos=this.tickerleft;
    this.i_mes=0;
    this.message="";
    this.i_path=0;
    this.stoptimemilli=this.stoptime*this.stoptime+1000;
    this.pathx= new Array();
    this.identityId=identityId;
    this.timer="";

    if (document.layers) {
    //other explorer
	    if (this.textsize>20) {this.textsize=6;}
	    else if (this.textsize>20) {this.textsize=5;}
	    else if (this.textsize>14) {this.textsize=4;} 
	    else if (this.textsize>10) {this.textsize=3;}
	    else if (this.textsize>8) {this.textsize=2;}
	    else if (this.textsize<=7) {this.textsize=1;}
    }
    
    this.ii=0;
    for (var i=0;i<=this.path.length-1;i=i+2) {
	    this.pathx[this.ii]=this.path[i];
	    this.ii++;
    }

    this.ii=0;

    this.pathy= new Array();
    for (var i=1;i<=this.path.length-1;i=i+2) {
	    this.pathy[this.ii]=this.path[i];
	    this.ii++;
    }
        
    this.xpos=new Array();
    for (i=0;i<=this.maxtextlength;i++) {
	    this.xpos[i]=5000;
    }

    this.ypos=new Array();
    for (i=0;i<=this.maxtextlength;i++) {
	    this.ypos[i]=5000;
    }

}
SnakeTextEffect.prototype.MakeSnake=function()
{
	if (this.i_path<=this.pathx.length-1) {
		for (i=this.message.length-1; i>=1; i--) {
   			this.xpos[i]=this.xpos[i-1];
			this.ypos[i]=this.ypos[i-1];
    	}
    	
		this.xpos[0]=this.pathx[this.i_path];
		this.ypos[0]=this.pathy[this.i_path];

        for(var i=0;i<this.message.length-1;i++)
        {
           if(document.getElementById(this.identityId+i)!=null)
           {
            var thisspan=document.getElementById(this.identityId+i).style;
                thisspan.posLeft=this.xpos[i];
				thisspan.posTop=this.ypos[i];
		   }
        }
		this.i_path++;
		var self=this;
        var tempF=function (){  self.MakeSnake(); };
		this.timer=setTimeout(tempF,20);
	}
	else {
		clearTimeout(this.timer);
		this.EndPosition();
	}
}

SnakeTextEffect.prototype.EndPosition=function()
{
         for(var i=0;i<this.message.length-1;i++)
         {
            if(document.getElementById(this.identityId+i)!=null)
           {
            var thisspan=document.getElementById(this.identityId+i).style;          
                thisspan.left=this.tickerleft+this.finalxpos;
                thisspan.top=this.tickertop;
                this.finalxpos=this.finalxpos+this.letterspace;     
            }
                                                  
         }
         var self=this;
         var tempF=function (){self.ClearMessage();};
	   	timer=setTimeout(tempF,this.stoptimemilli);
}

SnakeTextEffect.prototype.ClearMessage=function()
{
        this.finalxpos=this.tickertop;
		this.i_path=0;
		
		for (var i=0;i<this.maxtextlength;i++) {
			this.xpos[i]=5000;
		}
		
		for (i=0;i<this.maxtextlength;i++) {
		       
				var thisspan = document.getElementById(this.identityId+i)
				if(thisspan!=null)
				{
    			    thisspan.innerHTML=" ";
				    var thisspanStyle = thisspan.style;
    			    thisspanStyle.posLeft=this.xpos[i]=5000;
    			}
			}
		var self=this;
		var tempF=function (){self.ChangeMessage();};	
		timer=setTimeout(tempF,2000);
}
SnakeTextEffect.prototype.ChangeMessage=function()
{
        
        var messa=this.mes[this.i_mes];
	    this.message=messa.split("");
	    for(var i=0;i<this.message.length-1;i++)
	    {	    
	     if(document.getElementById(this.identityId+i)!=null)
           {
	      var thisspan=document.getElementById(this.identityId+i);
	          thisspan.innerHTML="<p>"+this.message[i]+"</p>";
	          }
	    }	    
	   this.i_mes++ ;
	   if (this.i_mes>=this.mes.length) {this.i_mes=0;}
	   this.finalxpos=this.tickertop;
	   this.i_path=0;
	   var self=this;
	   var tempF=function (){self.MakeSnake();};   
	  timer=setTimeout(tempF,10);
}
SnakeTextEffect.prototype.Start=function()
{
      
  for (var i=0;i<=this.maxtextlength;i++) {
    	document.write("<span id='"+(this.identityId+i)+"' class='spanstyle'>");
		document.write(this.message);
    	document.write("</span>");
	}
	
	this.ChangeMessage();

}

//-----------TransitColor.js------------------
function enHex(aDigit)
{
    return("0123456789ABCDEF".substring(aDigit, aDigit+1));
}
function deHex(aDigit)
{
    return("0123456789ABCDEF".indexOf(aDigit));
}

function toHex(n)
{
    return (enHex((0xf00000 & n) >> 20) +
            enHex((0x0f0000 & n) >> 16) +
            enHex((0x00f000 & n) >> 12) +
            enHex((0x000f00 & n) >>  8) +
            enHex((0x0000f0 & n) >>  4) +
            enHex((0x00000f & n) >>  0));
}
function toDecimal(hexNum)
{
   	var tmp = ""+hexNum.toUpperCase();
    while (tmp.length < 6) tmp = "0"+tmp
   	return ((deHex(tmp.substring(0,1)) << 20) +
       	    (deHex(tmp.substring(1,2)) << 16) + 
            (deHex(tmp.substring(2,3)) << 12) +
            (deHex(tmp.substring(3,4)) << 8) +
            (deHex(tmp.substring(4,5)) << 4) +
   	        (deHex(tmp.substring(5,6))));
}
function initArray(theArray, length, val)
	{
		for(i=0;i<length;i++)
		{
			theArray[i] = val;
		}       
	}
	
/* Main Class */
var TransitColorEffect=new Object();
TransitColorEffect=function(linkname,mouseOverColour, numberOfLinks, fadeOutColour)
{

   this.name="TransitColorEffect"; 
   this.linkname=linkname;
   this.rate = 1;
   this.numFadeLevels = 30; //The Color Fade number
   this.hoverColour = mouseOverColour;
   this.numLinks = numberOfLinks;
   this.bgR = '0000' + fadeOutColour.substring(1,3);
   this.bgG = '0000' + fadeOutColour.substring(3,5);
   this.bgB = '0000' + fadeOutColour.substring(5,7);
   this.currR = new Array(this.numLinks);
   this.currG = new Array(this.numLinks);
   this.currB = new Array(this.numLinks);
   this.count = new Array(this.numLinks);
   this.fadeOut = new Array(this.numLinks);
   this.continuous = new Array(this.numLinks);
   this.newColour = new Array(this.numLinks);
   this.tID = new Array(this.numLinks);
   this.redInterval = this.toDecimal(this.bgR) /this.numFadeLevels;
   this.greenInterval = this.toDecimal(this.bgG) / this.numFadeLevels;
   this.blueInterval = this.toDecimal(this.bgB) /this.numFadeLevels;
   this.initArray(this.currR,this.numLinks,0);
   this.initArray(this.currG,this.numLinks,0);
   this.initArray(this.currB,this.numLinks,0);
   this.initArray(this.count,this.numLinks,0);
   this.initArray(this.fadeOut,this.numLinks,true);
   this.initArray(this.continuous,this.numLinks,true);
   this.timeId="";
   
      
}
TransitColorEffect.prototype.enHex=enHex;
TransitColorEffect.prototype.deHex=deHex;
TransitColorEffect.prototype.toHex=toHex;
TransitColorEffect.prototype.toDecimal=toDecimal;
TransitColorEffect.prototype.initArray=initArray;

TransitColorEffect.prototype.startFade=function (id)
{

    var self = this;
	if(this.fadeOut[id] == true)
	{ /*by www.qpsh.com*/
	
		this.currR[id] += this.redInterval;
		this.currG[id] += this.greenInterval;
		this.currB[id] += this.blueInterval;
		this.newColour[id] = '#' + (this.toHex(this.currR[id])).substring(4,6) + (this.toHex(this.currG[id])).substring(4,6) + (this.toHex(this.currB[id])).substring(4,6);
		if(++this.count[id] == this.numFadeLevels)
		{
			this.fadeOut[id] = false;
		}
	}
	else
	{
		this.currR[id] -= this.redInterval;
		this.currG[id] -= this.greenInterval;
		this.currB[id] -= this.blueInterval;
		this.newColour[id] = '#' + (this.toHex(this.currR[id])).substring(4,6) + (this.toHex(this.currG[id])).substring(4,6) + (this.toHex(this.currB[id])).substring(4,6);

		if(--this.count[id] == 0)
		{
			this.fadeOut[id] = true;
		}
	}
	
	var linkid=this.linkname+id;	
	if(document.getElementById(linkid) == null)
	{
	   return;
	}
		
	if(linkid!=TranColorwhichCheck___)
	{   
		document.getElementById(linkid).style.color = this.newColour[id];		
	}
	else
	{
    	document.getElementById(linkid).style.color = this.hoverColour;
    	
	}  
	//alert(this.tID[id]); 
	//clearTimeout(this.tID[id]);	
	var tempF=function (){  self.startFade(id);  }; 
	if(this.tID[id]==null )
	{
       	
	}
	this.tID[id]=setTimeout(tempF,self.rate);
}

TransitColorEffect.prototype.Start=function()
{
    var self=this;
    if(this.timeId+""!="")
    {
       clearTimeout(this.timeId);
       for(var i=0,j=this.tID.length;i<j;i++)
       {
         clearTimeout(self.tID[i]);
       }
    //return;

    }
   var tempFa;
   for(var i=0;i<self.numLinks;i++)
   {       
  // clearTimeout(this.tID[i]);
   	 self.SetTimeStart(i,i*120);
   }
}
TransitColorEffect.prototype.SetTimeStart=function (index,rate)
{

    var self=this; 
  var tempF=function (){  self.startFade(index); };
  this.timeId= setTimeout(tempF,rate);
  
   //alert(this.timeId);
}
TransitColorEffect.prototype.ChangeState=function(mouseOverColour, numberOfLinks, fadeOutColour)
{

   // this.rate = 1;
  // this.numFadeLevels = 30; //The Color Fade number
//   for(var i=0;i<self.numLinks;i++)
//   {       
//     clearTimeout(this.tID[i]);
//   }
   this.hoverColour = mouseOverColour;
   this.numLinks = numberOfLinks;
   this.bgR = '0000' + fadeOutColour.substring(1,3);
   this.bgG = '0000' + fadeOutColour.substring(3,5);
   this.bgB = '0000' + fadeOutColour.substring(5,7);
   this.currR = new Array(this.numLinks);
   this.currG = new Array(this.numLinks);
   this.currB = new Array(this.numLinks);
   this.count = new Array(this.numLinks);
   this.fadeOut = new Array(this.numLinks);
   this.continuous = new Array(this.numLinks);
   this.newColour = new Array(this.numLinks);
   this.tID.length=this.numLinks;//修改时间ID数组容器的长度
//   this.tID = new Array(this.numLinks);
   this.redInterval = this.toDecimal(this.bgR) /this.numFadeLevels;
   this.greenInterval = this.toDecimal(this.bgG) / this.numFadeLevels;
   this.blueInterval = this.toDecimal(this.bgB) /this.numFadeLevels;
   this.initArray(this.currR,this.numLinks,0);
   this.initArray(this.currG,this.numLinks,0);
   this.initArray(this.currB,this.numLinks,0);
   this.initArray(this.count,this.numLinks,0);
   this.initArray(this.fadeOut,this.numLinks,true);
   this.initArray(this.continuous,this.numLinks,true);
   //this.timeId="";

}

TransitColorEffect.prototype.ClearTimeOut=function()
{

   for(var i=0,j=this.tID.length;i<j;i++)
   {

     if(this.tID[i]!=null)
     {
    
        clearTimeout(this.tID[i]);
     }
     else{
          alert(this.tID[i]);
     }
   
   }

}

    var TranColorwhichCheck___="";  // use it cnat find who it's under the mouse and set it color
    function stopFade(id)
    {
      TranColorwhichCheck___=id;
    }
    function continueFade(Trs,id)
    {
      TranColorwhichCheck___="";
    }
//-----------zoomImg.js------------------
var zoomImg = new Object();

zoomImg = function(prefix, picJson, showW, showH, sW, sH, bW, bH, zoomCoff, imgArr) {

    this.picbox = document.getElementById(prefix + 'picbox');
    this.view = document.getElementById(prefix + 'view');
    this.spic = document.getElementById(prefix + 'spic');
    this.picJson = picJson;
    this.imgArr = imgArr;


    this.sW = sW; //小图宽高
    this.sH = sH;
    this.bW = bW; //大图宽高
    this.bH = bH;
    this.zoomCoff = zoomCoff; //预览框与实际图片放大倍数比

    var pshow = document.createElement("div");
    pshow.style.cssText = "background-color:white;text-align:center;position:absolute;border:1px red solid;width:200;height:150;overflow:hidden;margin:0 auto;visibility:hidden;z-index:80000;";
    pshow.id = prefix + 'picshow2';
    var pimg = document.createElement("img");
    pimg.id = prefix + 'bpic2'
    pimg.src = this.picJson[0].bigPhotoSrc;
    pimg.style.cssText = "display:none";
    //pimg.onload=eval('z').ImgLoad;
    pshow.appendChild(pimg);

    //alert(document.body.firstChild);
    document.body.insertBefore(pshow, document.body.firstChild);

    this.picshow = document.getElementById(prefix + 'picshow2'); //大预览图div
    this.bpic = document.getElementById(prefix + 'bpic2'); //大图
    this.loading = document.getElementById(prefix + 'loading');


    this.dshowW = 450; //默认预览图宽度(可由小图的showW,showH动态指定)
    this.dshowH = 300; //默认预览图高度
    this.bborder = 1; //大图边框
    this.sborder = 1; //小图边框
    this.vborder = 1; //小预览图边框
    this.prefix = prefix;
    this.showW = showW;
    this.showH = showH;
    this.nflag = '';
    this.picstatus = null;
    this.tempo = null;
    this.abox = null;

    this.sload = false;
    this.bload = false;

    this.currentIndex = 0;
    this.pageSize = 4;
    this.pageIndex = 0;

    var sAgent = navigator.userAgent.toLowerCase();
    this.isIE = (sAgent.indexOf("msie") != -1) ? 1 : 0;

    this.bpic.style.display = "block";
    this.nview = this.view;

    this.spic.onload = new Function(this.SLoaded());
    this.bpic.onload = new Function(this.BLoaded());

    this.bpicMarginTop = 0;

    this.ChangeIndex(0);
}
zoomImg.prototype.SLoaded = function() {
    this.sload = true;
    this.ImgLoad();
}
zoomImg.prototype.BLoaded = function() {
    this.bload = true;
    this.ImgLoad();
}

zoomImg.prototype.loadpic = function(o) {
    // var view=getview(o);
    // var img=getimg(o);
    this.bpic.style.display = "none";
    this.nview = this.view; //标记活动小预览窗
    this.picstatus = "loading";
}

zoomImg.prototype.ChangeIndex = function(index) {
    if ((index > -1) && (index < this.picJson.length)) {

        if (this.picJson.length < 2) {
            return;  //避免单一内容时,无法切换内容
        }

        this.sload = false;
        this.bload = false;
        // this.bpic.style.display="none";
        document.getElementById(this.prefix + 'sitem' + this.currentIndex).style.border = "1px solid gray";
        this.currentIndex = index;
        this.spic.src = this.picJson[this.currentIndex + this.pageIndex].smallPhotoSrc;
        this.bpic.src = this.picJson[this.currentIndex + this.pageIndex].bigPhotoSrc;
        document.getElementById(this.prefix + 'sitem' + this.currentIndex).style.border = "2px solid gray";
        this.ImgLoad();


    }

}
zoomImg.prototype.ImgLoad = function() {

    //alert(this.spic.width);
    var self = this;
    if ((this.bpic.width == 0) || (this.spic.width == 0)) {
        //setTimeout(new Function(self.ImgLoad()), 300);
        //return;
    }

    //    if ((Img.height == 0) || (Img.width == 0)) {
    //        //延迟
    //        setTimeout(new Function(self.ImageLoad(Img)), 210);
    //        return;
    //    }
    //   this.smallW=this.spic.width;
    //   this.smallH=this.spic.height;
    //   this.bigW=this.bpic.width;
    //   this.bigH=this.bpic.height;
    //   var sImage=new Image();
    //   sImage.src=this.spic.src;
    var bImage = new Image();
    bImage.src = this.bpic.src;

    //   alert("old: "+this.smallH+"  "+this.bigH);
    //   alert("new width: "+sImage.width+"  "+bImage.width);
    //   this.smallW=sImage.width;
    //   this.smallH=sImage.height;
    //   this.bigW=bImage.width;
    //   this.bigH=bImage.height;   
    //     alert(bImage.height);

    this.smallW = this.sW;
    this.smallH = this.sH;
    //this.bigW = (bImage.width == 0) ? this.bW : bImage.width;
    //this.bigH = (bImage.height == 0) ? this.bH : bImage.height;
    this.bigW = this.bW;
    this.bigH = this.bH;

    //   alert("old: "+this.smallH+"  "+this.smallH;
    //   alert("new: "+sImage.width+"  "+sImage.height);


    if (this.showW > this.bigW) {//如果预览图比大图大,则等于大图
        this.showW = this.bigW;
        this.picshow.style.width = this.showW + this.isIE * this.bborder * 2;
    }
    if (this.showH > this.bigH) {
        this.showH = this.bigH;
        this.picshow.style.height = this.showH + this.isIE * this.bborder * 2;
    }
    this.zoomX = this.bigW / this.smallW;
    this.zoomY = this.bigH / this.smallH;

    this.viewW = this.showW * this.smallW / this.bigW;
    this.viewH = this.showH * this.smallH / this.bigH;
    this.nview.style.width = this.viewW - this.vborder * 2 * !this.isIE;
    this.nview.style.height = this.viewH - this.vborder * 2 * !this.isIE;
    this.nview.style.display = "block";
    // alert(this.sH);
    // alert(this.view.offsetHeight);
    //alert(this.zoomCoff);
    this.spic.style.top = -this.view.offsetHeight;
    // alert(this.spic.style.top);
    if (this.spic.style.top == '0px') {
        this.spic.style.top = -(this.showH / this.zoomCoff) + 'px';
        //  alert(this.showH / this.zoomCoff);
    }
    if (!this.view.style.left) this.view.style.left = 0;
    if (!this.view.style.top) this.view.style.top = 0;
    this.picstatus = "done";

    this.picshow.style.width = this.showW + this.isIE * this.bborder * 2;
    this.picshow.style.height = this.showH + this.isIE * this.bborder * 2;




    //alert( this.nview.style.width+" "+this.nview.style.height);

}


zoomImg.prototype.move = function(e, o, flag) {
    if ((this.sload == false) || (this.bload == false)) {
        //有图没有读取出来
    }

    this.nview.style.visibility = 'visible';
    this.picshow.style.visibility = 'visible';

    var vX;
    var vY;
    o = this.isIE ? o.parentElement : o.parentNode;

    var pleft = parseInt(this.getLeft(this.spic)) + parseInt(this.spic.width);
    var ptop = this.getTop(this.spic);



    this.picshow.style.left = pleft + 'px';
    this.picshow.style.top = ptop + 'px';

    if (picstatus = "done") { //如果大图载入完毕 
        if (this.nview.style.visibility = "hidden") this.nview.style.visibility = "visible";
        var e = this.isIE ? window.event : e;

        if (!this.isIE) { //分别获取FF或IE的view位置
            if (flag == 1) { //由于o的来源不同,使用不同的算法定位
                vX = e.layerX + parseInt(this.nview.style.left) - this.nview.offsetWidth / 2 - this.vborder;
                vY = e.layerY + parseInt(this.nview.style.top) - this.nview.offsetHeight / 2 - this.vborder;
            } else {
                vX = 1 - this.nview.offsetWidth / 2 - this.vborder;
                vY = 1 - this.nview.offsetHeight / 2 - this.vborder;
            }
        }
        else {
            vX = e.offsetX - this.nview.offsetWidth / 2;
            vY = e.offsetY - this.nview.offsetHeight / 2;
        }

        if (vX < 0) vX = 0; //边界判断,不能超出缩略图的范围
        if (vY < 0) vY = 0;
        if (vX > this.smallW - this.viewW) { vX = this.smallW - this.viewW; mX = this.bigW - this.showW } else { mX = vX * this.zoomX; }
        if (vY > this.smallH - this.viewH)
        { vY = this.smallH - this.viewH; mY = this.bigH - this.showH }
        else { mY = vY * this.zoomY; }

        this.nview.style.left = vX;
        this.nview.style.top = vY;

        this.bpic.style.marginLeft = -mX; //刷新预览窗口
        this.bpic.style.marginTop = -mY;



        //debugger;
    }

}
zoomImg.prototype.outPicBox = function() {
    this.nview.style.visibility = 'hidden';
    this.picshow.style.visibility = 'hidden';
}


zoomImg.prototype.getTop = function(e) {
    var self = this;
    var offset = e.offsetTop;
    if (e.offsetParent != null) offset += self.getTop(e.offsetParent);
    return offset;
}

zoomImg.prototype.getLeft = function(e) {
    var self = this;
    var offset = e.offsetLeft;
    if (e.offsetParent != null) offset += self.getLeft(e.offsetParent);
    return offset;
}
zoomImg.prototype.GoUrl = function(e) {
    //查看大图 4000
    if (this.picJson[this.currentIndex + this.pageIndex].realPhotoSrc + '' != '')
        window.open(this.picJson[this.currentIndex + this.pageIndex].realPhotoSrc);
}

zoomImg.prototype.PageUp = function() {
    if (this.pageIndex > 0) {
        this.pageIndex--;
        this.SetPageImg(this.pageIndex);

    }

}

zoomImg.prototype.PageDown = function() {

    if ((this.pageIndex + this.pageSize) < this.picJson.length) {
        this.pageIndex++;
        this.SetPageImg(this.pageIndex);
    }
}
zoomImg.prototype.SetPageImg = function(startIndex) {
    //更改底部小图片
    var strName = '';
    var tmpIndex = 0;
    for (var i = 0; i < this.pageSize; i++) {
        strName = this.prefix + 'simg' + i;
        tmpIndex = startIndex + i;
        document.getElementById(strName).src = this.picJson[tmpIndex].itemPhotoSrc;
    }

    if (this.pageIndex == 0) {
        this.ChangArrowPic('left', true);
    }
    else {
        this.ChangArrowPic('left', false);
    }

    if ((this.pageIndex + this.pageSize) == this.picJson.length) {
        this.ChangArrowPic('right', true);
    }
    else {
        this.ChangArrowPic('right', false);
    }

}

zoomImg.prototype.ChangArrowPic = function(direction, isEnd) {
    //根据参数，更改箭头图片 
    var picName = this.prefix + direction + 'Img';
    var arrowUrl = '';

    if (direction == 'left') {
        arrowUrl = (isEnd == true) ? this.imgArr[0] : this.imgArr[2];
    }
    else {
        arrowUrl = (isEnd == true) ? this.imgArr[1] : this.imgArr[3];
    }
    document.getElementById(picName).src = arrowUrl;

}



//-----------zoomImgAspect.js------------------
var zoomImgAspect = new Object();

zoomImgAspect = function(prefix, picJson, showW, showH, sW, sH, bW, bH, zoomCoff, imgArr, xmlDoc) {


    //  alert('1');

    this.picbox = document.getElementById(prefix + 'picbox');
    this.view = document.getElementById(prefix + 'view');
    this.spic = document.getElementById(prefix + 'spic');
    this.picJson = picJson;
    this.imgArr = imgArr;
    this.picshow = document.getElementById(prefix + 'picshow2'); //大预览图div
    this.bpic = document.getElementById(prefix + 'bpic2'); //大图
    this.loading = document.getElementById(prefix + 'loading');
    this.xmlDoc = xmlDoc;
    this.delaycount = 0;

    this.sW = sW; //小图宽高
    this.sH = sH;

    this.bW = bW; //大图宽高
    this.bH = bH;
    this.zoomCoff = zoomCoff; //预览框与实际图片放大倍数比

    //    var pshow = document.createElement("div");
    //    pshow.style.cssText = "background-color:white;text-align:center;position:absolute;border:1px red solid;width:200;height:150;overflow:hidden;margin:0 auto;visibility:hidden;z-index:80000;";
    //    pshow.id = prefix + 'picshow2';
    //    var pimg = document.createElement("img");
    //    pimg.id = prefix + 'bpic2'
    //    pimg.src = this.picJson[0].bigPhotoSrc;
    //    pimg.style.cssText = "display:none";
    //    //pimg.onload=eval('z').ImgLoad;
    //    pshow.appendChild(pimg);

    //alert(document.body.firstChild);
    //  document.body.insertBefore(pshow, document.body.firstChild);

    this.dshowW = 450; //默认预览图宽度(可由小图的showW,showH动态指定)
    this.dshowH = 300; //默认预览图高度
    this.bborder = 1; //大图边框
    this.sborder = 1; //小图边框
    this.vborder = 1; //小预览图边框
    this.prefix = prefix;
    this.showW = showW;
    this.showH = showH;
    this.nflag = '';
    this.picstatus = null;
    this.tempo = null;
    this.abox = null;

    this.sload = false;
    this.bload = false;

    this.currentIndex = 0;
    this.pageSize = 4;
    this.pageIndex = 0;

    var sAgent = navigator.userAgent.toLowerCase();
    this.isIE = (sAgent.indexOf("msie") != -1) ? 1 : 0;

    this.bpic.style.display = "block";
    this.nview = this.view;

    //  this.spic.onload = new Function(this.SLoaded());
    //  this.bpic.onload = new Function(this.BLoaded());

    this.bpicMarginTop = 0;

    //  setTimeout(new Function(this.ChangeIndex(0)), 3000);
}
zoomImgAspect.prototype.SLoaded = function() {
    this.sload = true;
    // this.ImgLoad();
}
zoomImgAspect.prototype.BLoaded = function(img) {
    //  alert(img.width);
    this.bload = true;
    this.ImgLoad();
}

zoomImgAspect.prototype.loadpic = function(o) {
    // var view=getview(o);
    // var img=getimg(o);
    this.bpic.style.display = "none";
    this.nview = this.view; //标记活动小预览窗
    this.picstatus = "loading";
}

zoomImgAspect.prototype.ChangeIndex = function(index) {
    if ((index > -1) && (index < this.picJson.length)) {

        if (this.picJson.length < 2) {
            return;  //避免单一内容时,无法切换内容
        }

        this.sload = false;
        this.bload = false;
        // this.bpic.style.display="none";
        // document.getElementById(this.prefix + 'sitem' + this.currentIndex).style.border = "1px solid gray";
        document.getElementById(this.prefix + 'sitem' + this.currentIndex).style.color = 'Gray';
        this.currentIndex = index;
        this.spic.src = this.picJson[this.currentIndex + this.pageIndex].smallPhotoSrc;
        this.bpic.src = this.picJson[this.currentIndex + this.pageIndex].bigPhotoSrc;
        document.getElementById(this.prefix + 'sitem' + this.currentIndex).style.color = '#000000';
        // document.getElementById(this.prefix + 'sitem' + this.currentIndex).style.border = "2px solid gray";
        //   this.ImgLoad();


    }

}
zoomImgAspect.prototype.ImgLoad = function() {

    //alert(this.spic.width);
    var self = this;

    //   this.smallW=this.spic.width;
    //   this.smallH=this.spic.height;
    //   this.bigW=this.bpic.width;
    //   this.bigH=this.bpic.height;
    var sImage = new Image();
    sImage.src = this.spic.src;
    var bImage = new Image();
    bImage.src = this.bpic.src;



    //   alert("old: "+this.smallH+"  "+this.bigH);
    //   alert("new width: "+sImage.width+"  "+bImage.width);

    //   this.bigW=bImage.width;
    //   this.bigH=bImage.height;   
    //     alert(bImage.height);

    // this.smallW = this.sW;
    // this.smallH = this.sH;
    this.smallW = (sImage.width == 0) ? this.sW : sImage.width;
    this.smallH = (sImage.height == 0) ? this.sH : sImage.height;

    this.bigW = (bImage.width == 0) ? this.bW : bImage.width;
    this.bigH = (bImage.height == 0) ? this.bH : bImage.height;


    // this.bigW = this.bW;
    // this.bigH = this.bH;

    //   alert("old: "+this.smallH+"  "+this.smallH;
    //   alert("new: "+sImage.width+"  "+sImage.height);


    if (this.showW > this.bigW) {//如果预览图比大图大,则等于大图
        this.showW = this.bigW;
        this.picshow.style.width = this.showW + this.isIE * this.bborder * 2;
    }
    if (this.showH > this.bigH) {
        this.showH = this.bigH;
        this.picshow.style.height = this.showH + this.isIE * this.bborder * 2;
    }
    this.zoomX = this.bigW / this.smallW;
    this.zoomY = this.bigH / this.smallH;

    this.viewW = parseInt(this.showW * this.smallW / this.bigW);
    this.viewH = parseInt(this.showH * this.smallH / this.bigH);
    //alert("w " + this.bpic.width + " h: " + this.bpic.height);
    // alert("bw " + this.bigW + " h: " + this.bigH);
    // alert("vw " + this.viewW + " h: " + this.viewH);


    this.nview.style.width = this.viewW - this.vborder * 2 * !this.isIE;
    this.nview.style.height = this.viewH - this.vborder * 2 * !this.isIE;
    this.nview.style.display = "block";
    // alert(this.sH);
    // alert(this.view.offsetHeight);
    //alert(this.zoomCoff);
    this.spic.style.top = -this.view.offsetHeight;
    // alert(this.spic.style.top);
    if (this.spic.style.top == '0px') {
        this.spic.style.top = -(this.showH / (this.bigH / this.smallH)) + 'px';
        //  alert(this.showH / this.zoomCoff);
    }
    if (!this.view.style.left) this.view.style.left = 0;
    if (!this.view.style.top) this.view.style.top = 0;
    this.picstatus = "done";

    this.picshow.style.width = this.showW + this.isIE * this.bborder * 2;
    this.picshow.style.height = this.showH + this.isIE * this.bborder * 2;

    //alert( this.nview.style.width+" "+this.nview.style.height);

}


zoomImgAspect.prototype.move = function(e, o, flag) {
    if ((this.sload == false) || (this.bload == false)) {
        //有图没有读取出来
    }

    this.nview.style.visibility = 'visible';
    this.picshow.style.visibility = 'visible';

    var vX;
    var vY;
    o = this.isIE ? o.parentElement : o.parentNode;

    var pleft = parseInt(this.getLeft(this.spic)) + parseInt(this.spic.width);
    var ptop = this.getTop(this.spic);



    //  this.picshow.style.left = pleft + 'px';
    // this.picshow.style.top = ptop + 'px';

    if (picstatus = "done") { //如果大图载入完毕 
        if (this.nview.style.visibility = "hidden") this.nview.style.visibility = "visible";
        var e = this.isIE ? window.event : e;

        if (!this.isIE) { //分别获取FF或IE的view位置
            if (flag == 1) { //由于o的来源不同,使用不同的算法定位
                vX = e.layerX + parseInt(this.nview.style.left) - this.nview.offsetWidth / 2 - this.vborder;
                vY = e.layerY + parseInt(this.nview.style.top) - this.nview.offsetHeight / 2 - this.vborder;
            } else {
                vX = 1 - this.nview.offsetWidth / 2 - this.vborder;
                vY = 1 - this.nview.offsetHeight / 2 - this.vborder;
            }
        }
        else {
            vX = e.offsetX - this.nview.offsetWidth / 2;
            vY = e.offsetY - this.nview.offsetHeight / 2;
        }

        if (vX < 0) vX = 0; //边界判断,不能超出缩略图的范围
        if (vY < 0) vY = 0;
        if (vX > this.smallW - this.viewW) { vX = this.smallW - this.viewW; mX = this.bigW - this.showW } else { mX = vX * this.zoomX; }
        if (vY > this.smallH - this.viewH)
        { vY = this.smallH - this.viewH; mY = this.bigH - this.showH }
        else { mY = vY * this.zoomY; }

        this.nview.style.left = vX - 60;
        this.nview.style.top = vY;

        this.bpic.style.marginLeft = -mX; //刷新预览窗口
        this.bpic.style.marginTop = -mY;

        //debugger;
    }

}
zoomImgAspect.prototype.outPicBox = function() {
    this.nview.style.visibility = 'hidden';
    //  this.picshow.style.visibility = 'hidden';
}


zoomImgAspect.prototype.getTop = function(e) {
    var self = this;
    var offset = e.offsetTop;
    if (e.offsetParent != null) offset += self.getTop(e.offsetParent);
    return offset;
}

zoomImgAspect.prototype.getLeft = function(e) {
    var self = this;
    var offset = e.offsetLeft;
    if (e.offsetParent != null) offset += self.getLeft(e.offsetParent);
    return offset;
}
zoomImgAspect.prototype.GoUrl = function(e) {
    //查看大图 4000
    if (this.picJson[this.currentIndex + this.pageIndex].realPhotoSrc + '' != '')
        window.open(this.picJson[this.currentIndex + this.pageIndex].realPhotoSrc);
}

zoomImgAspect.prototype.PageUp = function() {
    if (this.pageIndex > 0) {
        this.pageIndex--;
        this.SetPageImg(this.pageIndex);

    }

}

zoomImgAspect.prototype.PageDown = function() {

    if ((this.pageIndex + this.pageSize) < this.picJson.length) {
        this.pageIndex++;
        this.SetPageImg(this.pageIndex);
    }
}
zoomImgAspect.prototype.SetPageImg = function(startIndex) {
    //更改底部小图片
    var strName = '';
    var tmpIndex = 0;
    for (var i = 0; i < this.pageSize; i++) {
        strName = this.prefix + 'simg' + i;
        tmpIndex = startIndex + i;
        document.getElementById(strName).src = this.picJson[tmpIndex].itemPhotoSrc;
    }

    if (this.pageIndex == 0) {
        this.ChangArrowPic('left', true);
    }
    else {
        this.ChangArrowPic('left', false);
    }

    if ((this.pageIndex + this.pageSize) == this.picJson.length) {
        this.ChangArrowPic('right', true);
    }
    else {
        this.ChangArrowPic('right', false);
    }

}

zoomImgAspect.prototype.ChangArrowPic = function(direction, isEnd) {
    //根据参数，更改箭头图片 
    var picName = this.prefix + direction + 'Img';
    var arrowUrl = '';

    if (direction == 'left') {
        arrowUrl = (isEnd == true) ? this.imgArr[0] : this.imgArr[2];
    }
    else {
        arrowUrl = (isEnd == true) ? this.imgArr[1] : this.imgArr[3];
    }
    document.getElementById(picName).src = arrowUrl;

}

//zoomImgAspect.prototype.ChangeXmlStr = function() {
//    //在此处通过遍历JSON,然后给ID重新赋值的方法实现,保存XML

//    if (typeof this.xmlDoc != 'undefined') {

//        var root = this.xmlDoc.documentElement;

//        var matchStr = "pages/page";

//        var tempXml = root.selectNodes(matchStr);
//        for (var i = 0; i < tempXml.length; i++) {
//            alert(tempXml[i].getAttribute("id"));
//        }

//        var hfXml = document.getElementById(this.prefix + 'hv');

//        if (typeof hfXml != 'undefined') {
//           
//            //将保存后的XML数值保存到HIDDEN FIELD
//            hfXml.value = this.xmlDoc.xml;
//            var url = "/plugin/mynetsite/zoomSaveSession.aspx";
//            var param ="?skye="+this.xmlDoc.xml;
//            var rText = httpRequest(url + param);
//          

//        }
//    }

//}


zoomImgAspect.prototype.ChangeXmlStr = function() {
    //在此处通过遍历JSON,然后给ID重新赋值的方法实现,保存XML 
    var ret1 = ShowModalDialogInFrame("/plugin/mynetsite/ChangePage.aspx");
    if (ret1 == null) {
        return;
    }

    if (typeof this.xmlDoc != 'undefined') {
        var root = this.xmlDoc.documentElement;
        var ret = ret1.split("|")[0];

        var picJssonItem = this.picJson[this.currentIndex + this.pageIndex];
        var pageId = picJssonItem.Id;

        picJssonItem.smallPhotoSrc = picJssonItem.smallPhotoSrc.replace(picJssonItem.DocId, ret);
        picJssonItem.bigPhotoSrc = picJssonItem.bigPhotoSrc.replace(picJssonItem.DocId, ret);
        picJssonItem.DocId = ret;

        var matchStr = "pages/page[@id='" + pageId + "']";
        if (root != null) {
            var tempXml = root.selectNodes(matchStr);
            var node = tempXml[0];
            node.setAttribute("pageid", ret);       

        var hfXml = document.getElementById(this.prefix + 'hv');
        if (typeof hfXml != 'undefined') {
            //将保存后的XML数值保存到HIDDEN FIELD 
            hfXml.value = this.xmlDoc.xml;
            //            var url = "/plugin/mynetsite/zoomSaveSession.aspx";
            //            var param = "?skye=" + this.xmlDoc.xml;
            //            var rText = httpRequest(url + param);

        }
    }

        this.ChangeIndex(this.currentIndex + this.pageIndex);

    }
}

//获取成品页面的XML 
function Mynet_GetNewCPWXML() {
    var nextPrefix = "zOut_hv"; //last part of hidden field id
    var hiddenInputs = document.getElementsByTagName("input");
    var len = hiddenInputs.length;
    var retXml = "";
    for (var i = 0; i < len; i++) {
        var oneInput = hiddenInputs[i];
        if (oneInput.type == 'hidden' && oneInput.id.indexOf(nextPrefix) == oneInput.id.length - nextPrefix.length) {
            retXml = oneInput.value;
            break;
        }
    }

    return retXml;
}



