Chainable={chain:function(f){if(typeof(f)=="function")f();return Chainable}};function ex$(o,p,x){var elm;if(typeof(o)=="string"){if(o.indexOf("*")!=0)elm=document.getElementById(o);else{var ar=p?p.getElementsByTagName(o.split("*")[1]):document.getElementsByTagName(o.split("*")[1]),l=ar.length,i=0,m=typeof(x)=="object",g,e=[];for(i;i<l;i=i+1){if(m){g=true;for(a in x){if(!ar[i][a]){g=false;break}else if(ar[i][a]!=x[a]){g=false;break}}if(g)e.push(ex$(ar[i]))}else{e.push(ex$(ar[i]))}}return ex$(e)}}else if(typeof(o)=="object"){elm=o}if(!elm)return;if(elm.addStyle)return elm;elm.chain=function(f){if(typeof(f)=="function")f();return this};elm.addStyle=elm.addStyles=function(s,a){if(s&&a)this.style[s]=a;else{if(typeof(s)=="string"){if(s.indexOf(":")>-1){s=s.split(":");this.style[s[0]]=s[1]}}else if(typeof(s)=="object"){for(n in s){this.style[n]=s[n]}}}return this};elm.getScrollLeft=function(){return this.scrollLeft*1};elm.setScrollLeft=function(l){this.scrollLeft=l};elm.getScrollTop=function(){return this.scrollTop*1};elm.setScrollTop=function(l){this.scrollTop=l};elm.removeStyle=elm.removeStyles=function(s){if(s){if(typeof(s)=="string"){this.style[s]=""}}return this};elm.addEvent=elm.addEvents=function(e){if(typeof(e)=="object"){for(n in e){this[n]=e[n]}}return this};elm.getWidth=function(){if(typeof(ex$Anim)=="object"&&this.style.width.length>0)return ex$Anim._on(this.style.width);return parseInt(this.offsetWidth)};elm.getHeight=function(){if(typeof(ex$Anim)=="object"&&this.style.height.length>0)return ex$Anim._on(this.style.height);return parseInt(this.offsetHeight)};elm.getLeft=function(){return this.position().left};elm.getTop=function(){return this.position().top};elm.getText=function(){if(!this.innerText)return this.textContent;else return this.innerText};elm.hide=function(){return this.addStyle({display:"none"})};elm.show=function(){return this.addStyle({display:""})};elm.setOpacity=function(o){if(o>1)o=o/100.0;return this.addStyles({opacity:o,filter:"alpha(opacity="+(o*100)+")"})};elm.getOpacity=function(){if(typeof(this.style.opacity)=="string"){if(this.style.opacity.length>0)return this.style.opacity*100;else return 100}else if(typeof(this.style.filter)=="string"){if(this.style.filter.length>0){var pts=this.style.filter.split("=");return parseInt(pts[1].substring(0,pts[1].length))}else return 100}};elm.each=function(f){if(typeof(this.length)=="number"&&typeof(f)=="function"){var l=this.length,i=0;for(i;i<l;i=i+1){f(this[i])}}return this};elm.contains=function(e){if(typeof(this.length)=="number"&&typeof(f)=="function"){var l=this.length,i=0;for(i;i<l;i=i+1){if(this[i]==e)return true}}return false};elm.position=function(){var o=this,fbq=true,l=0,t=0,op=null,oo=o,el=o,cs;op=o.offsetParent;while(el.parentNode!=null){el=el.parentNode;if(el.offsetParent!=null){cs=true;if(fbq&&window.opera)if(el==oo.parentNode||el.nodeName=="TR")cs=false;if(cs){if(el.scrollTop&&el.scrollTop>0)t=t-el.scrollTop;if(el.scrollLeft&&el.scrollLeft>0)l=l-el.scrollLeft}}if(el==op){l=l+o.offsetLeft;if(el.clientLeft&&el.nodeName!="TABLE")l=l+el.clientLeft;t+=o.offsetTop;if(el.clientTop&&el.nodeName!="TABLE")t=t+el.clientTop;o=el;if(o.offsetParent==null){if(o.offsetLeft)l=l+o.offsetLeft;if(o.offsetTop)t=t+o.offsetTop}op=o.offsetParent}}return{'left':l,'top':t}};elm.trackMouseMovement=function(y){if(y==true||y==undefined){this._tracking_mouse=true;this._trackMouse()}else{if(this.omv)this.onmousemove=this.omv;this._tracking_mouse=false}};elm._trackMouse=function(){t=this;t.onmousemove=function(ev){if(!ev)ev=window.event;if(typeof(ev.clientX)=="number"){t.X=ev.clientX+document.body.scrollLeft;t.Y=ev.clientY+document.body.scrollTop}else{t.X=e.pageX;t.Y=e.pageY}if(t.X<0)t.X=0;if(t.Y<0)t.Y=0;return true}};elm.getMousePosition=function(){if(this._tracking_mouse)return{X:this.X,Y:this.Y};else return{X:-1,Y:-1}};return elm}ex$.onready=(function(){var e=[],t,s,n,i,o,d=document,w=window,r='readyState',c='onreadystatechange',x=function(){n=1;clearInterval(t);while(i=e.shift())i();if(s)s[c]=''};return function(f){if(n)return f();if(!e[0]){d.addEventListener&&d.addEventListener("DOMContentLoaded",x,false);/*@cc_on@*//*@if(@_win32)d.write("<script id=__ie_onload defer src=//0><\/scr"+"ipt>");s=d.getElementById("__ie_onload");s[c]=function(){s[r]=="complete"&&x()};/*@end@*/if(/WebKit/i.test(navigator.userAgent))t=setInterval(function(){/loaded|complete/.test(d[r])&&x()},10);o=w.onload;w.onload=function(){x();o&&o()}}e.push(f)}})();
if("object"!=typeof(EDialog)){var EDialog=new function(){var d=6,titleHeight=23,centerHeight,closeWidth=19;var e='<div class="shadow-ltc" id="edialog-shadow"></div><div class="shadow-tb" id="edialog-shadow"></div><div class="shadow-rtc" id="edialog-shadow"></div><div class="shadow-m" id="edialog-shadow"></div><div id="edialog-center">';var f='</div></div><div class="shadow-m" id="edialog-shadow"></div><div class="shadow-lbc" id="edialog-shadow"></div><div class="shadow-tb" id="edialog-shadow"></div><div class="shadow-rbc" id="edialog-shadow"></div>';this.rem=function(){if(ex$("edialog-container"))ex$("edialog-container").parentNode.removeChild(ex$("edialog-container"));if(ex$("edialog-modal-bg"))ex$("edialog-modal-bg").parentNode.removeChild(ex$("edialog-modal-bg"));this.clearRS()};this.show=function(v){if("boolean"==typeof(continueResizing))continueResizing=false;if(!this.doc)this.doc=document.compatMode=='CSS1Compat'?document.documentElement:document.body;this.rem();var c=document.createElement("div"),html=e;if(!v.bgOpacity)v.bgOpacity=50;bgOpacity=v.bgOpacity;c.id="edialog-container";ex$(c).addStyles({display:"none",position:"absolute",top:"0px",left:"0px",zIndex:10000});if(!v.width)v.width=300;if(false!=v.showTitle){html+='<div id="edialog-title-bar">'+(v.title?v.title:" ")+'</div>';if(false!=v.showClose){html+='<div id="edialog-close"><a href="javascript:;" title="Close" onclick="return EDialog.close()"></a></div>'}if(v.height)centerHeight=v.height+titleHeight;else centerHeight=200+titleHeight}else{if(v.height)centerHeight=v.height;else centerHeight=200}if(v.src)v.content="<iframe frameborder='0' name='edialog-iframe' id='edialog-iframe' src='about:blank' style='height:100%; width:100%'></iframe>";html+='<div id="edialog-content">'+v.content+f;c.innerHTML=html;document.body.appendChild(c);this.setupSizes(c,v);var a=EDialog.getWS();if(v.modal){this.addModalBG(a)}c.ie6=/msie|MSIE 6/.test(navigator.userAgent);if(c.ie6)this.hideSelectBoxes();c.style.display="block";this.pos();window.ors=window.onresize;window.onresize=this.rs;window.rs=true;if(v.src)ex$("edialog-iframe").src=v.src;return Chainable};this.rs=function(){EDialog.pos();EDialog.rsBg();if(window.ors)window.ors()};this.rsBg=function(){var a=ex$("edialog-modal-bg");if(a){var c=EDialog.getWS(),b;a.addStyles({height:c.height>EDialog.doc.scrollHeight?c.height+"px":EDialog.doc.scrollHeight+"px",width:c.width<EDialog.doc.scrollWidth?c.width+"px":EDialog.doc.scrollWidth+"px"})}};this.pos=function(){var c=ex$("edialog-container"),ws=EDialog.getWS(),t=Math.ceil(EDialog.doc.scrollTop+(ws.height/2)-(c.offsetHeight/2)),l=Math.ceil((ws.width/2)-(c.offsetWidth/2));c.style.left=l>0?l+"px":0+"px";c.style.top=t>0?t+"px":0+"px";if(EDialog.doc.scrollTop>t){EDialog.doc.scrollTop=(t-10)+"px"}};this.setupSizes=function(c,v){c.style.width=(v.width+(d*2))+"px";ex$("*div",ex$("edialog-container"),{className:"shadow-m"}).each(function(t){t.addStyle({height:centerHeight+"px"})});ex$("*div",ex$("edialog-container"),{className:"shadow-tb"}).each(function(t){t.addStyle({width:v.width+"px"})});ex$("edialog-content").addStyle({height:v.height+"px",width:v.width+"px"});ex$("edialog-center").addStyle({width:v.width+"px"});if(false!=v.showTitle){if(false!=v.showClose){ex$("edialog-title-bar").addStyle({width:(v.width-closeWidth)+"px"})}else{ex$("edialog-title-bar").addStyle({width:v.width+"px"})}}};this.addModalBG=function(a){var b=document.createElement("div");b.id="edialog-modal-bg";ex$(b).addStyles({position:"absolute",zIndex:"1000",top:"0px",left:"0px",filter:"alpha(opacity=0)",opacity:0});document.body.appendChild(b);EDialog.rsBg();ex$(b).setOpacity(bgOpacity)};this.close=function(){var c=ex$("edialog-container"),bg=ex$("edialog-modal-bg"),that=this,ie6=c.ie6;if(c){ex$(c).hide();c.parentNode.removeChild(c);if(bg){ex$(bg).hide();bg.parentNode.removeChild(bg);if(ie6)that.showSelectBoxes();if("boolean"==typeof(continueResizing))continueResizing=true}}this.clearRS();return false};this.getWS=function(){return{height:self.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,width:self.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}};this.hideSelectBoxes=function(){ex$("*select",document.body).each(function(a){a.__ov=a.style.visibility;a.addStyle({visibility:"hidden"})})};this.showSelectBoxes=function(){ex$("*select",document.body).each(function(a){a.addStyle({visibility:a.__ov})})};this.clearRS=function(){if(window.ors){window.onresize=window.ors}else{if(window.rs)window.onresize=function(){}}window.rs=false};return this}}
