var Utils={getElementsComputedStyle:function(a,b,c){if(arguments.length==2)c=b;$(a)},createXmlDocument:function(){if(document.implementation&&document.implementation.createDocument){var a=document.implementation.createDocument("","",null);if(a.readyState==null){a.readyState=1;a.addEventListener("load",function(){a.readyState=4;typeof a.onreadystatechange=="function"&&a.onreadystatechange()},false)}return a}if(window.ActiveXObject)return Try.these(function(){return new ActiveXObject("MSXML2.DomDocument")},
function(){return new ActiveXObject("Microsoft.DomDocument")},function(){return new ActiveXObject("MSXML.DomDocument")},function(){return new ActiveXObject("MSXML3.DomDocument")})||false;return null},getContentAsString:function(a){return a.xml!=undefined?this._getContentAsStringIE(a):this._getContentAsStringMozilla(a)},_getContentAsStringIE:function(a){for(var b="",c=0;c<a.childNodes.length;c++){var d=a.childNodes[c];b+=d.nodeType==4?d.nodeValue:d.xml}return b},_getContentAsStringMozilla:function(a){for(var b=
new XMLSerializer,c="",d=0;d<a.childNodes.length;d++){var e=a.childNodes[d];c+=e.nodeType==4?e.nodeValue:b.serializeToString(e)}return c},toViewportPosition:function(a){return this._toAbsolute(a,Prototype.Browser.Opera||Prototype.Browser.WebKit?true:false)},toDocumentPosition:function(a){return this._toAbsolute(a,Prototype.Browser.Opera||Prototype.Browser.WebKit?true:false)},_toAbsolute:function(a,b){var c=this.getLeftPos(a),d=this.getTopPos(a);if(b){c-=this.docScrollLeft();d-=this.docScrollTop()}return{x:c,
y:d}},docScrollLeft:function(){return window.pageXOffset?window.pageXOffset:document.documentElement&&document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body?document.body.scrollLeft:0},docScrollTop:function(){return window.pageYOffset?window.pageYOffset:document.documentElement&&document.documentElement.scrollTop?document.documentElement.scrollTop:document.body?document.body.scrollTop:0},getClientHeight:function(){return window.innerHeight?window.height-window.innerHeight:
document.body.scrollHeight-(document.documentElement.clientHeight?document.documentElement.clientHeight:document.body.clientHeight)},getViewportWidth:function(){var a=self.innerWidth,b=document.compatMode;if(b||Prototype.Browser.IE)a=b=="CSS1Compat"?document.documentElement.clientWidth:document.body.clientWidth;return a},getViewportHeight:function(){var a=self.innerHeight,b=document.compatMode;if((b||Prototype.Browser.IE)&&!Prototype.Browser.Opera)a=b=="CSS1Compat"?document.documentElement.clientHeight:
document.body.clientHeight;return a},getLeftPos:function(a){var b=0;try{do{b+=a.offsetLeft||0;a=a.offsetParent}while(a)}catch(c){}return b},getTopPos:function(a){var b=0;try{do{b+=a.offsetTop||0;a=a.offsetParent}while(a)}catch(c){}return b},cumulativeOffset:function(a){var b=0,c=0;try{do{b+=a.offsetTop||0;c+=a.offsetLeft||0;a=a.offsetParent}while(a)}catch(d){}return[c,b]},getContainerLeftOffset:function(){var a=document.getElementsByTagName("body")[0].getElementsBySelector('div[class="Container"]');
if(a&&a[0])return this.getLeftPos(a[0]);return 0},callInProgress:function(a){switch(a.readyState){case 1:case 2:case 3:return true;default:return false}},getCookie:function(a){a=a+"=";var b=document.cookie.indexOf(a);if(b==-1)return null;var c=document.cookie.indexOf(";",b+a.length);if(c==-1)c=document.cookie.length;return unescape(document.cookie.substring(b+a.length,c))},setCookie:function(a,b,c,d,e,g){a=a+"="+escape(b);if(c)a+="; expires="+c.toGMTString();a+=d?"; path="+d:"; path=/";if(e)a+="; domain="+
e;if(g)a+="; secure";document.cookie=a},deleteCookie:function(a){this.setCookie(a,"null",new Date(0),null,null,false)},evalGlobally:function(a){var b;a=a.replace(/(^\s+)|(<!--)/gim,"");a=a.replace(/(\/\/--\>)|(\s+$)/gim,"");if(0<a.length)try{b=window.execScript?window.execScript(a):Prototype.WebKit?setTimeout(a,0):eval.apply(window,[a])}catch(c){alert(c)}return b},setLoadingEffect:function(a,b,c){if(a){var d=false,e=false,g=false;if(arguments.length>3){var f=arguments[3];if(f.width!="undefined")d=
f.width;if(f.height!="undefined")e=f.height;if(f.left!="undefined")g=f.left}f=document.getElementsByTagName("body")[0];var h=document.createElement("div");h.id=b;if(h){$(h).addClassName(c);$(h).setStyle({width:(d?d:a.getWidth())+"px",height:(e?e:a.getHeight())+"px",left:(g?g:Utils.getLeftPos(a))+"px",top:Utils.getTopPos(a)+"px"});f.appendChild(h)}}},removeLoadingEffect:function(a){(a=$(a))&&a.remove()}};
