﻿function addEvent(e,c,a){if(e.addEventListener){e.addEventListener(c,a,false);return true}else{if(e.attachEvent){var b=e.attachEvent("on"+c,a);return b}else{return false}}}function removeEvent(f,e,b,a){if(f.removeEventListener){f.removeEventListener(e,b,a);return true}else{if(f.detachEvent){var c=f.detachEvent("on"+e,b);return c}else{alert("Handler could not be removed")}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){var b=17;var a=null;if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}}function getScrollTop(){if(self.pageYOffset){return self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else{if(document.body){return document.body.scrollTop}}}}function getScrollLeft(){if(self.pageXOffset){return self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft}else{if(document.body){return document.body.scrollLeft}}}}var PunctuationExp=/[$\\@\\\#%\^\*\(\)\[\]\+\_\{\}\`\~\=\|\.\!\<\?\/\,\>]/;var PunctuationExpStrict=/[$\\@\\\#%\^\*\(\)\[\]\+\_\{\}\`\~\=\|\.\!\<\?\/\,\>]/;var wordsearch=/ suite | ste /i;function CheckBlank(a){if(a.value==""){a.value="Closed"}}function SelectAll(a){a.select()}function dodacheck(a){if(a.value.match(wordsearch)){a.value=a.value.replace(/ suite/i,"").replace(/ ste/i,"")}}function isPlainText(b){var f;var c;var a;if(window.event){f=b.keyCode}else{if(b.which){f=b.which}}c=String.fromCharCode(f);return !PunctuationExp.test(c)}function isNumberKey(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)&&a!=45){return false}return true}function isSSN(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)){if(a!=32&&a!=45){return false}}return true}function isDoubleKey(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)){if(a!=46&&a!=45){return false}}return true}function isUSZip(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)){if(a!=45){return false}}return true}function isDate(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)){if(a!=47){return false}}return true}function isDateKey(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)&&a!=47){return false}return true}function addDays(a,b){return new Date(a.getTime()+b*24*60*60*1000)}function gaussianRound(a){var e=Math.abs(a);var b=a==0?0:(a<0?-1:1);var c=Math.floor(e);if(e-c!=0.5){return Math.round(e)*b}if(c%2==1){return Math.ceil(e)*b}return c*b}function gaussianRound2(a){return gaussianRound(a*100)/100}function isDate(a){return(!isNaN(new Date(a).getYear()))}function DateDiff(f,b){var e=new Date(f);var c=new Date(b);var a=1000*60*60*24;return gaussianRound((e-c)/(a))*-1}function addCommas(b){b+="";x=b.split(".");x1=x[0];x2=x.length>1?"."+x[1]:"";var a=/(\d+)(\d{3})/;while(a.test(x1)){x1=x1.replace(a,"$1,$2")}if(isNaN(b)==true){return""}else{return x1+x2}}function ForceZero(a){if(a==""){a=0}return a}function Right(b,c){if(c<=0){return""}else{if(c>String(b).length){return b}else{var a=String(b).length;return String(b).substring(a,a-c)}}}function InStr(b,a){for(i=0;i<Len(b);i++){if(a==Mid(b,i,1)){return i}}return -1}function FormatNumber(j,e,n,b,k,h){if(isNaN(parseInt(j))){return"NaN"}var c=j;var f=j<0?-1:1;c*=Math.pow(10,e);c=Math.round(Math.abs(c));c/=Math.pow(10,e);c*=f;var g=new String(c);if(!n&&j<1&&j>-1&&j!=0){if(j>0){g=g.substring(1,g.length)}else{g="-"+g.substring(2,g.length)}}if(k&&(j>=1000||j<=-1000)){var a=g.indexOf(".");if(a<0){a=g.length}a-=3;while(a>=1){if(a==1&&g.charAt(0)=="-"){}else{g=g.substring(0,a)+","+g.substring(a,g.length)}a-=3}}var l=g.indexOf(".")+1;if(h){if(l==0){g=g+".";l=g.length}if(l+e!=g.length){while(l+e!=g.length){g=g+"0"}}}if(b&&j<0){g="("+g.substring(1,g.length)+")"}if(e==0){g=g.replace(".","")}return g}function Automove(c,b,a){if(c==b){document.getElementById(a).focus()}}var dhtmlwindow={imagefiles:["/images/min.gif","/images/close.gif","/images/restore.gif","/images/resize.gif"],ajaxbustcache:true,ajaxloadinghtml:"<b>Loading Page. Please wait...</b>",minimizeorder:0,zIndexvalue:100,tobjects:[],lastactivet:{},init:function(b){var f=document.createElement("div");f.id=b;f.className="dhtmlwindow";var e="";e='<div class="drag-handle">';e+='DHTML Window <div class="drag-controls"><img src="'+this.imagefiles[0]+'" title="Minimize" /><img src="'+this.imagefiles[1]+'" title="Close" /></div>';e+="</div>";e+='<div class="drag-contentarea"></div>';e+='<div class="drag-statusarea"><div class="drag-resizearea" style="background: transparent url('+this.imagefiles[3]+') top right no-repeat;">&nbsp;</div></div>';e+="</div>";f.innerHTML=e;document.getElementById("dhtmlwindowholder").appendChild(f);var b=document.getElementById(b);var c=b.getElementsByTagName("div");for(var a=0;a<c.length;a++){if(/drag-/.test(c[a].className)){b[c[a].className.replace(/drag-/,"")]=c[a]}}b.handle._parent=b;b.resizearea._parent=b;b.controls._parent=b;b.onclose=function(){return true};b.onmousedown=function(){dhtmlwindow.setfocus(this)};b.handle.onmousedown=dhtmlwindow.setupdrag;b.resizearea.onmousedown=dhtmlwindow.setupdrag;b.controls.onclick=dhtmlwindow.enablecontrols;b.show=function(){dhtmlwindow.show(this)};b.hide=function(){dhtmlwindow.hide(this)};b.close=function(){dhtmlwindow.close(this)};b.setSize=function(g,j){dhtmlwindow.setSize(this,g,j)};b.moveTo=function(g,h){dhtmlwindow.moveTo(this,g,h)};b.isResize=function(g){dhtmlwindow.isResize(this,g)};b.isScrolling=function(g){dhtmlwindow.isScrolling(this,g)};b.load=function(g,h,j){dhtmlwindow.load(this,g,h,j)};this.tobjects[this.tobjects.length]=b;return b},open:function(l,e,k,h,f,j){var g=dhtmlwindow;function b(n){var o=new RegExp(n+"=([^,]+)","i");return(o.test(f))?parseInt(RegExp.$1):0}if(document.getElementById(l)==null){l=this.init(l)}else{l=document.getElementById(l)}this.setfocus(l);l.setSize(b(("width")),(b("height")));var c=b("center")?"middle":b("left");var a=b("center")?"middle":b("top");if(typeof j!="undefined"&&j=="recal"&&this.scroll_top==0){if(window.attachEvent&&!window.opera){this.addEvent(window,function(){setTimeout(function(){l.moveTo(c,a)},400)},"load")}else{this.addEvent(window,function(){l.moveTo(c,a)},"load")}}l.isResize(b("resize"));l.isScrolling(b("scrolling"));l.style.visibility="visible";l.style.display="block";l.contentarea.style.display="block";l.moveTo(c,a);l.load(e,k,h);if(l.state=="minimized"&&l.controls.firstChild.title=="Restore"){l.controls.firstChild.setAttribute("src",dhtmlwindow.imagefiles[0]);l.controls.firstChild.setAttribute("title","Minimize");l.state="fullview"}return l},setSize:function(b,a,c){b.style.width=Math.max(parseInt(a),150)+"px";b.contentarea.style.height=Math.max(parseInt(c),100)+"px"},moveTo:function(b,a,c){this.getviewpoint();b.style.left=(a=="middle")?this.scroll_left+(this.docwidth-b.offsetWidth)/2+"px":this.scroll_left+parseInt(a)+"px";b.style.top=(c=="middle")?this.scroll_top+(this.docheight-b.offsetHeight)/2+"px":this.scroll_top+parseInt(c)+"px"},isResize:function(a,b){a.statusarea.style.display=(b)?"block":"none";a.resizeBool=(b)?1:0},isScrolling:function(a,b){a.contentarea.style.overflow=(b)?"auto":"hidden"},load:function(c,b,e,f){if(c.isClosed){alert("DHTML Window has been closed, so no window to load contents into. Open/Create the window again.");return}var b=b.toLowerCase();if(typeof f!="undefined"){c.handle.firstChild.nodeValue=f}if(b=="inline"){c.contentarea.innerHTML=e}else{if(b=="div"){var a=document.getElementById(e);c.contentarea.innerHTML=(a.defaultHTML||a.innerHTML);if(!a.defaultHTML){a.defaultHTML=a.innerHTML}a.innerHTML="";a.style.display="none"}else{if(b=="iframe"){c.contentarea.style.overflow="hidden";if(!c.contentarea.firstChild||c.contentarea.firstChild.tagName!="IFRAME"){c.contentarea.innerHTML='<iframe src="" style="margin:0; padding:0; width:100%; height: 100%" name="_iframe-'+c.id+'"></iframe>'}window.frames["_iframe-"+c.id].location.replace(e)}else{if(b=="ajax"){this.ajax_connect(e,c)}}}}c.contentarea.datatype=b},setupdrag:function(b){var c=dhtmlwindow;var a=this._parent;c.etarget=this;var b=window.event||b;c.initmousex=b.clientX;c.initmousey=b.clientY;c.initx=parseInt(a.offsetLeft);c.inity=parseInt(a.offsetTop);c.width=parseInt(a.offsetWidth);c.contentheight=parseInt(a.contentarea.offsetHeight);if(a.contentarea.datatype=="iframe"){a.style.backgroundColor="#F8F8F8";a.contentarea.style.visibility="hidden"}document.onmousemove=c.getdistance;document.onmouseup=function(){if(a.contentarea.datatype=="iframe"){a.contentarea.style.backgroundColor="white";a.contentarea.style.visibility="visible"}c.stop()};return false},getdistance:function(b){var c=dhtmlwindow;var a=c.etarget;var b=window.event||b;c.distancex=b.clientX-c.initmousex;c.distancey=b.clientY-c.initmousey;if(a.className=="drag-handle"){c.move(a._parent,b)}else{if(a.className=="drag-resizearea"){c.resize(a._parent,b)}}return false},getviewpoint:function(){var b=document.all&&!window.opera;var a=document.documentElement&&parseInt(document.documentElement.clientWidth)||100000;this.standardbody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;this.scroll_top=(b)?this.standardbody.scrollTop:window.pageYOffset;this.scroll_left=(b)?this.standardbody.scrollLeft:window.pageXOffset;this.docwidth=(b)?this.standardbody.clientWidth:(/Safari/i.test(navigator.userAgent))?window.innerWidth:Math.min(a,window.innerWidth-16);this.docheight=(b)?this.standardbody.clientHeight:window.innerHeight},rememberattrs:function(a){this.getviewpoint();a.lastx=parseInt((a.style.left||a.offsetLeft))-dhtmlwindow.scroll_left;a.lasty=parseInt((a.style.top||a.offsetTop))-dhtmlwindow.scroll_top;a.lastwidth=parseInt(a.style.width)},move:function(a,b){a.style.left=dhtmlwindow.distancex+dhtmlwindow.initx+"px";a.style.top=dhtmlwindow.distancey+dhtmlwindow.inity+"px"},resize:function(a,b){a.style.width=Math.max(dhtmlwindow.width+dhtmlwindow.distancex,150)+"px";a.contentarea.style.height=Math.max(dhtmlwindow.contentheight+dhtmlwindow.distancey,100)+"px"},enablecontrols:function(b){var c=dhtmlwindow;var a=window.event?window.event.srcElement:b.target;if(/Minimize/i.test(a.getAttribute("title"))){c.minimize(a,this._parent)}else{if(/Restore/i.test(a.getAttribute("title"))){c.restore(a,this._parent)}else{if(/Close/i.test(a.getAttribute("title"))){c.close(this._parent)}}}return false},minimize:function(b,a){dhtmlwindow.rememberattrs(a);b.setAttribute("src",dhtmlwindow.imagefiles[2]);b.setAttribute("title","Restore");a.state="minimized";a.contentarea.style.display="none";a.statusarea.style.display="none";if(typeof a.minimizeorder=="undefined"){dhtmlwindow.minimizeorder++;a.minimizeorder=dhtmlwindow.minimizeorder}a.style.left="10px";a.style.width="200px";var c=a.minimizeorder*10;a.style.top=dhtmlwindow.scroll_top+dhtmlwindow.docheight-(a.handle.offsetHeight*a.minimizeorder)-c+"px"},restore:function(b,a){dhtmlwindow.getviewpoint();b.setAttribute("src",dhtmlwindow.imagefiles[0]);b.setAttribute("title","Minimize");a.state="fullview";a.style.display="block";a.contentarea.style.display="block";if(a.resizeBool){a.statusarea.style.display="block"}a.style.left=parseInt(a.lastx)+dhtmlwindow.scroll_left+"px";a.style.top=parseInt(a.lasty)+dhtmlwindow.scroll_top+"px";a.style.width=parseInt(a.lastwidth)+"px"},close:function(b){try{var a=b.onclose()}catch(c){var a=true}finally{if(typeof a=="undefined"){alert('An error has occured somwhere inside your "onclose" event handler');var a=true}}if(a){if(b.state!="minimized"){dhtmlwindow.rememberattrs(b)}if(window.frames["_iframe-"+b.id]){window.frames["_iframe-"+b.id].location.replace("about:blank")}else{b.contentarea.innerHTML=""}b.style.display="none";b.isClosed=true}return a},setopacity:function(a,b){if(!a){return}if(a.filters&&a.filters[0]){if(typeof a.filters[0].opacity=="number"){a.filters[0].opacity=b*100}else{a.style.filter="alpha(opacity="+b*100+")"}}else{if(typeof a.style.MozOpacity!="undefined"){a.style.MozOpacity=b}else{if(typeof a.style.opacity!="undefined"){a.style.opacity=b}}}},setfocus:function(a){this.zIndexvalue++;a.style.zIndex=this.zIndexvalue;a.isClosed=false;this.setopacity(this.lastactivet.handle,0.5);this.setopacity(a.handle,1);this.lastactivet=a},show:function(a){if(a.isClosed){alert("DHTML Window has been closed, so nothing to show. Open/Create the window again.");return}if(a.lastx){dhtmlwindow.restore(a.controls.firstChild,a)}else{a.style.display="block"}this.setfocus(a);a.state="fullview"},hide:function(a){a.style.display="none"},ajax_connect:function(a,b){var g=false;var f="";if(window.XMLHttpRequest){g=new XMLHttpRequest()}else{if(window.ActiveXObject){try{g=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{g=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}else{return false}}b.contentarea.innerHTML=this.ajaxloadinghtml;g.onreadystatechange=function(){dhtmlwindow.ajax_loadpage(g,b)};if(this.ajaxbustcache){f=(a.indexOf("?")!=-1)?"&"+new Date().getTime():"?"+new Date().getTime()}g.open("GET",a+f,true);g.send(null)},ajax_loadpage:function(b,a){if(b.readyState==4&&(b.status==200||window.location.href.indexOf("http")==-1)){a.contentarea.innerHTML=b.responseText}},stop:function(){dhtmlwindow.etarget=null;document.onmousemove=null;document.onmouseup=null},addEvent:function(b,c,a){var a=(window.addEventListener)?a:"on"+a;if(b.addEventListener){b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent(a,c)}}},cleanup:function(){for(var a=0;a<dhtmlwindow.tobjects.length;a++){dhtmlwindow.tobjects[a].handle._parent=dhtmlwindow.tobjects[a].resizearea._parent=dhtmlwindow.tobjects[a].controls._parent=null}window.onload=null}};document.write('<div id="dhtmlwindowholder"><span style="display:none">.</span></div>');window.onunload=dhtmlwindow.cleanup;var ss={fixAllLinks:function(){var b=document.getElementsByTagName("a");for(var a=0;a<b.length;a++){var c=b[a];if((c.href&&c.href.indexOf("#")!=-1)&&((c.pathname==location.pathname)||("/"+c.pathname==location.pathname))&&(c.search==location.search)){ss.addEvent(c,"click",ss.smoothScroll)}}},smoothScroll:function(j){if(window.event){target=window.event.srcElement}else{if(j){target=j.target}else{return}}if(target.nodeName.toLowerCase()!="a"){target=target.parentNode}if(target.nodeName.toLowerCase()!="a"){return}anchor=target.hash.substr(1);var h=document.getElementsByTagName("a");var a=null;for(var g=0;g<h.length;g++){var k=h[g];if(k.name&&(k.name==anchor)){a=k;break}}if(!a){a=document.getElementById(anchor)}if(!a){return true}var c=a.offsetLeft;var b=a.offsetTop;var f=a;while(f.offsetParent&&(f.offsetParent!=document.body)){f=f.offsetParent;c+=f.offsetLeft;b+=f.offsetTop}clearInterval(ss.INTERVAL);cypos=ss.getCurrentYPos();ss_stepsize=parseInt((b-cypos)/ss.STEPS);ss.INTERVAL=setInterval("ss.scrollWindow("+ss_stepsize+","+b+',"'+anchor+'")',10);if(window.event){window.event.cancelBubble=true;window.event.returnValue=false}if(j&&j.preventDefault&&j.stopPropagation){j.preventDefault();j.stopPropagation()}},scrollWindow:function(a,c,b){wascypos=ss.getCurrentYPos();isAbove=(wascypos<c);window.scrollTo(0,wascypos+a);iscypos=ss.getCurrentYPos();isAboveNow=(iscypos<c);if((isAbove!=isAboveNow)||(wascypos==iscypos)){window.scrollTo(0,c);clearInterval(ss.INTERVAL);location.hash=b}},getCurrentYPos:function(){if(document.body&&document.body.scrollTop){return document.body.scrollTop}if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}if(window.pageYOffset){return window.pageYOffset}return 0},addEvent:function(f,e,b,a){if(f.addEventListener){f.addEventListener(e,b,a);return true}else{if(f.attachEvent){var c=f.attachEvent("on"+e,b);return c}else{alert("Handler could not be removed")}}}};ss.STEPS=25;ss.addEvent(window,"load",ss.fixAllLinks);addEvent(window,"load",makeDDs);var currentMenus=[];function makeDDs(){if(!document.createElement){return}uls=document.getElementsByTagName("ul");for(uli=0;uli<uls.length;uli++){ul=uls[uli];if(ul.nodeName=="UL"&&ul.className=="aqdd"){processULDD(ul,0)}}}function processULDD(f,k){if(!f.childNodes||f.childNodes.length==0){return}for(var c=0;c<f.childNodes.length;c++){var h=f.childNodes[c];if(h.nodeName=="LI"){var b;var g;for(var j=0;j<h.childNodes.length;j++){var e=h.childNodes[j];switch(e.nodeName){case"A":b=e;break;case"UL":g=e;processULDD(g,1);break}}if(k){if(g){associateDD(b,g);b.className+=" submenuheader";g.style.left=h.offsetLeft+h.offsetWidth+"px";g.style.top=h.offsetTop+"px";g.style.width="200px";g.style.display="none"}else{}}else{if(g){associateDD(b,g);g.style.display="none";tp=DL_GetElementTop(h)+h.offsetHeight;g.style.top=tp+"px"}}}}}function associateDD(b,c){b.onclick=function(){if(c.style.display=="none"){ancestors=[];cn=c;do{if(cn.nodeName=="UL"){ancestors[ancestors.length]=cn}cn=cn.parentNode}while(cn.className!="aqdd");hideChildren(cn,cn);for(var a=0;a<ancestors.length;a++){ancestors[a].style.display="block"}}else{hideChildren(c,c);c.style.display="none"}return false}}function hideChildren(c,a){if(c.childNodes&&c.childNodes.length>0){for(var b=0;b<c.childNodes.length;b++){hideChildren(c.childNodes[b],a)}}if(c.nodeName=="UL"&&c!=a){c.style.display="none"}}function addEvent(e,c,a){if(e.addEventListener){e.addEventListener(c,a,false);return true}else{if(e.attachEvent){var b=e.attachEvent("on"+c,a);return b}else{return false}}}function DL_GetElementLeft(b){var a=b.offsetLeft;var c=b.offsetParent;while(c!=null){a+=c.offsetLeft;c=c.offsetParent}return a}function DL_GetElementTop(b){var a=b.offsetTop;var c=b.offsetParent;while(c!=null){a+=c.offsetTop;c=c.offsetParent}return a}var restart=true;var stIsIE=
/*@cc_on!@*/
false;var inputs;var imgFalse="/images/icons/false.png";var imgTrue="/images/icons/true.png";var checkboxesdone=false;function replaceChecks(){inputs=document.getElementsByTagName("input");for(var b=0;b<inputs.length;b++){if(inputs[b].getAttribute("type")=="checkbox"){var a=document.createElement("img");if(inputs[b].checked){a.src=imgTrue}else{a.src=imgFalse}a.id="checkImage"+b;a.onclick=new Function("checkChange("+b+")");a.style.display="inline";a.style.marginLeft="2px";inputs[b].parentNode.insertBefore(a,inputs[b]);inputs[b].style.display="none";if(inputs[b].onclick){dean_addEvent(a,"click",inputs[b].onclick)}}}}function checkChange(a){if(inputs[a].checked){inputs[a].checked="";document.getElementById("checkImage"+a).src=imgFalse}else{inputs[a].checked="checked";document.getElementById("checkImage"+a).src=imgTrue}}sorttable={init:function(){if(restart){arguments.callee.done=false;restart=false;replaceChecks()}if(arguments.callee.done){return}arguments.callee.done=true;if(_timer){clearInterval(_timer)}if(!document.createElement||!document.getElementsByTagName){return}sorttable.DATE_RE=/^(\d\d?)[\/\.-](\d\d?)[\/\.-]((\d\d)?\d\d)$/;forEach(document.getElementsByTagName("table"),function(a){if(a.className.search(/\bsortable\b/)!=-1){sorttable.makeSortable(a)}})},makeSortable:function(b){if(b.getElementsByTagName("thead").length==0){the=document.createElement("thead");the.appendChild(b.rows[0]);b.insertBefore(the,b.firstChild)}for(a=1;a<b.rows.length;a++){b.rows[a].className=b.rows[a].className.replace("arow","").replace("prow","");if(a%2==0){b.rows[a].className=b.rows[a].className+" prow"}else{b.rows[a].className=b.rows[a].className+" arow"}}if(b.tHead==null){b.tHead=b.getElementsByTagName("thead")[0]}if(b.tHead.rows.length!=1){return}sortbottomrows=[];for(var a=0;a<b.rows.length;a++){if(b.rows[a].className.search(/\bsortbottom\b/)!=-1){sortbottomrows[sortbottomrows.length]=b.rows[a]}}if(sortbottomrows){if(b.tFoot==null){tfo=document.createElement("tfoot");b.appendChild(tfo)}for(var a=0;a<sortbottomrows.length;a++){tfo.appendChild(sortbottomrows[a])}delete sortbottomrows}headrow=b.tHead.rows[0].cells;for(var a=0;a<headrow.length;a++){if(!headrow[a].className.match(/\bsorttable_nosort\b/)){mtch=headrow[a].className.match(/\bsorttable_([a-z0-9]+)\b/);if(mtch){override=mtch[1]}if(mtch&&typeof sorttable["sort_"+override]=="function"){headrow[a].sorttable_sortfunction=sorttable["sort_"+override]}else{headrow[a].sorttable_sortfunction=sorttable.guessType(b,a)}headrow[a].sorttable_columnindex=a;headrow[a].sorttable_tbody=b.tBodies[0];dean_addEvent(headrow[a],"click",function(g){var f=document.getElementById("scrollcontainer");if(f){scrollcontainer.scrollTop=0}if(this.className.search(/\bsorttable_sorted\b/)!=-1){sorttable.reverse(this.sorttable_tbody);this.className=this.className.replace("sorttable_sorted","sorttable_sorted_reverse");this.removeChild(document.getElementById("sorttable_sortfwdind"));sortrevind=document.createElement("span");sortrevind.id="sorttable_sortrevind";sortrevind.innerHTML=stIsIE?'&nbsp<font face="webdings">5</font>':"&nbsp;&#x25B4;";this.appendChild(sortrevind);return}if(this.className.search(/\bsorttable_sorted_reverse\b/)!=-1){sorttable.reverse(this.sorttable_tbody);this.className=this.className.replace("sorttable_sorted_reverse","sorttable_sorted");this.removeChild(document.getElementById("sorttable_sortrevind"));sortfwdind=document.createElement("span");sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML=stIsIE?'&nbsp<font face="webdings">6</font>':"&nbsp;&#x25BE;";this.appendChild(sortfwdind);return}theadrow=this.parentNode;forEach(theadrow.childNodes,function(e){if(e.nodeType==1){e.className=e.className.replace("sorttable_sorted_reverse","");e.className=e.className.replace("sorttable_sorted","")}});sortfwdind=document.getElementById("sorttable_sortfwdind");if(sortfwdind){sortfwdind.parentNode.removeChild(sortfwdind)}sortrevind=document.getElementById("sorttable_sortrevind");if(sortrevind){sortrevind.parentNode.removeChild(sortrevind)}this.className+=" sorttable_sorted";sortfwdind=document.createElement("span");sortfwdind.id="sorttable_sortfwdind";sortfwdind.innerHTML=stIsIE?'&nbsp<font face="webdings">6</font>':"&nbsp;&#x25BE;";this.appendChild(sortfwdind);row_array=[];col=this.sorttable_columnindex;rows=this.sorttable_tbody.rows;for(var c=0;c<rows.length;c++){row_array[row_array.length]=[sorttable.getInnerText(rows[c].cells[col]),rows[c]]}row_array.sort(this.sorttable_sortfunction);tb=this.sorttable_tbody;for(var c=0;c<row_array.length;c++){tb.appendChild(row_array[c][1])}for(a=1;a<b.rows.length;a++){b.rows[a].className=b.rows[a].className.replace("arow","").replace("prow","");if(a%2==0){b.rows[a].className=b.rows[a].className+" prow"}else{b.rows[a].className=b.rows[a].className+" arow"}}delete row_array})}}},guessType:function(c,b){sortfn=sorttable.sort_alpha;for(var a=0;a<c.tBodies[0].rows.length;a++){text=sorttable.getInnerText(c.tBodies[0].rows[a].cells[b]);if(text!=""){if(text.match(/^-?[�$�]?[\d,.]+%?$/)){return sorttable.sort_numeric}possdate=text.match(sorttable.DATE_RE);if(possdate){first=parseInt(possdate[1]);second=parseInt(possdate[2]);if(first>12){return sorttable.sort_ddmm}else{if(second>12){return sorttable.sort_mmdd}else{sortfn=sorttable.sort_ddmm}}}}}return sortfn},getInnerText:function(b){hasInputs=(typeof b.getElementsByTagName=="function")&&b.getElementsByTagName("input").length;if(b.getAttribute("sorttable_customkey")!=null){return b.getAttribute("sorttable_customkey")}else{if(typeof b.textContent!="undefined"&&!hasInputs){return b.textContent.replace(/^\s+|\s+$/g,"")}else{if(typeof b.innerText!="undefined"&&!hasInputs){return b.innerText.replace(/^\s+|\s+$/g,"")}else{if(typeof b.text!="undefined"&&!hasInputs){return b.text.replace(/^\s+|\s+$/g,"")}else{switch(b.nodeType){case 3:if(b.nodeName.toLowerCase()=="input"){return b.value.replace(/^\s+|\s+$/g,"")}case 4:return b.nodeValue.replace(/^\s+|\s+$/g,"");break;case 1:case 11:var c="";for(var a=0;a<b.childNodes.length;a++){c+=sorttable.getInnerText(b.childNodes[a])}return c.replace(/^\s+|\s+$/g,"");break;default:return""}}}}}},reverse:function(a){newrows=[];for(var b=0;b<a.rows.length;b++){newrows[newrows.length]=a.rows[b]}for(var b=newrows.length-1;b>=0;b--){a.appendChild(newrows[b])}delete newrows},sort_numeric:function(e,c){aa=parseFloat(e[0].replace(/[^0-9.-]/g,""));if(isNaN(aa)){aa=0}bb=parseFloat(c[0].replace(/[^0-9.-]/g,""));if(isNaN(bb)){bb=0}return aa-bb},sort_alpha:function(e,c){if(e[0]==c[0]){return 0}if(e[0]<c[0]){return -1}return 1},sort_ddmm:function(e,c){mtch=e[0].match(sorttable.DATE_RE);y=mtch[3];m=mtch[2];d=mtch[1];if(m.length==1){m="0"+m}if(d.length==1){d="0"+d}dt1=y+m+d;mtch=c[0].match(sorttable.DATE_RE);y=mtch[3];m=mtch[2];d=mtch[1];if(m.length==1){m="0"+m}if(d.length==1){d="0"+d}dt2=y+m+d;if(dt1==dt2){return 0}if(dt1<dt2){return -1}return 1},sort_mmdd:function(e,c){mtch=e[0].match(sorttable.DATE_RE);y=mtch[3];d=mtch[2];m=mtch[1];if(m.length==1){m="0"+m}if(d.length==1){d="0"+d}dt1=y+m+d;mtch=c[0].match(sorttable.DATE_RE);y=mtch[3];d=mtch[2];m=mtch[1];if(m.length==1){m="0"+m}if(d.length==1){d="0"+d}dt2=y+m+d;if(dt1==dt2){return 0}if(dt1<dt2){return -1}return 1},shaker_sort:function(h,f){var a=0;var e=h.length-1;var j=true;while(j){j=false;for(var c=a;c<e;++c){if(f(h[c],h[c+1])>0){var g=h[c];h[c]=h[c+1];h[c+1]=g;j=true}}e--;if(!j){break}for(var c=e;c>a;--c){if(f(h[c],h[c-1])<0){var g=h[c];h[c]=h[c-1];h[c-1]=g;j=true}}a++}}};if(document.addEventListener){document.addEventListener("DOMContentLoaded",sorttable.init,false);
/*@cc_on@*/
/*@if (@_win32)
document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
var script = document.getElementById("__ie_onload");
script.onreadystatechange = function() {
    if (this.readyState == "complete") {
        sorttable.init(); // call the onload handler
    }
};
/*@end@*/
}if(/WebKit/i.test(navigator.userAgent)){var _timer=setInterval(function(){if(/loaded|complete/.test(document.readyState)){sorttable.init()}},10)}window.onload=sorttable.init;function dean_addEvent(b,e,c){if(b.addEventListener){b.addEventListener(e,c,false)}else{if(!c.$$guid){c.$$guid=dean_addEvent.guid++}if(!b.events){b.events={}}var a=b.events[e];if(!a){a=b.events[e]={};if(b["on"+e]){a[0]=b["on"+e]}}a[c.$$guid]=c;b["on"+e]=handleEvent}}dean_addEvent.guid=1;function removeEvent(a,c,b){if(a.removeEventListener){a.removeEventListener(c,b,false)}else{if(a.events&&a.events[c]){delete a.events[c][b.$$guid]}}}function handleEvent(e){var c=true;e=e||fixEvent(((this.ownerDocument||this.document||this).parentWindow||window).event);var a=this.events[e.type];for(var b in a){this.$$handleEvent=a[b];if(this.$$handleEvent(e)===false){c=false}}return c}function fixEvent(a){a.preventDefault=fixEvent.preventDefault;a.stopPropagation=fixEvent.stopPropagation;return a}fixEvent.preventDefault=function(){this.returnValue=false};fixEvent.stopPropagation=function(){this.cancelBubble=true};if(!Array.forEach){Array.forEach=function(e,c,b){for(var a=0;a<e.length;a++){c.call(b,e[a],a,e)}}}Function.prototype.forEach=function(a,e,c){for(var b in a){if(typeof this.prototype[b]=="undefined"){e.call(c,a[b],b,a)}}};String.forEach=function(a,c,b){Array.forEach(a.split(""),function(f,e){c.call(b,f,e,a)})};var forEach=function(a,e,b){if(a){var c=Object;if(a instanceof Function){c=Function}else{if(a.forEach instanceof Function){a.forEach(e,b);return}else{if(typeof a=="string"){c=String}else{if(typeof a.length=="number"){c=Array}}}}c.forEach(a,e,b)}};var ZeroClipboard={clients:{},moviePath:"ZeroClipboard.swf",nextId:1,$:function(a){if(typeof(a)=="string"){a=document.getElementById(a)}if(!a.addClass){a.hide=function(){this.style.display="none"};a.show=function(){this.style.display=""};a.addClass=function(b){this.removeClass(b);this.className+=" "+b};a.removeClass=function(b){this.className=this.className.replace(new RegExp("\\s*"+b+"\\s*")," ").replace(/^\s+/,"").replace(/\s+$/,"")};a.hasClass=function(b){return !!this.className.match(new RegExp("\\s*"+b+"\\s*"))}}return a},setMoviePath:function(a){this.moviePath=a},dispatch:function(e,b,c){var a=this.clients[e];if(a){a.receiveEvent(b,c)}},register:function(b,a){this.clients[b]=a},getDOMObjectPosition:function(b){var a={left:0,top:0,width:b.width?b.width:b.offsetWidth,height:b.height?b.height:b.offsetHeight};while(b){a.left+=b.offsetLeft;a.top+=b.offsetTop;b=b.offsetParent}return a},Client:function(a){this.id=ZeroClipboard.nextId++;this.movieId="ZeroClipboardMovie_"+this.id;ZeroClipboard.register(this.id,this);if(a){this.glue(a)}}};ZeroClipboard.Client.prototype={id:0,ready:false,movie:null,clipText:"",handCursorEnabled:true,cssEffects:true,handlers:{},glue:function(e){this.domElement=ZeroClipboard.$(e);var f=99;if(this.domElement.style.zIndex){f=parseInt(this.domElement.style.zIndex)+1}var c=ZeroClipboard.getDOMObjectPosition(this.domElement);this.div=document.createElement("div");var b=this.div.style;b.position="absolute";b.left=""+c.left+"px";b.top=""+c.top+"px";b.width=""+c.width+"px";b.height=""+c.height+"px";b.zIndex=f;var a=document.getElementsByTagName("body")[0];a.appendChild(this.div);this.div.innerHTML=this.getHTML(c.width,c.height)},getHTML:function(c,a){var b="";if(navigator.userAgent.match(/MSIE/)){var e=location.href.match(/^https/i)?"https://":"http://";b+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+e+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+c+'" height="'+a+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="id='+this.id+'"/><param name="wmode" value="transparent"/></object>'}else{b+='<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+c+'" height="'+a+'" name="'+this.movieId+'" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="id='+this.id+'" wmode="transparent" />'}return b},hide:function(){if(this.div){this.div.style.left="-2000px"}},show:function(){this.reposition()},destroy:function(){if(this.domElement&&this.div){this.hide();this.div.innerHTML="";var a=document.getElementsByTagName("body")[0];try{a.removeChild(this.div)}catch(b){}this.domElement=null;this.div=null}},reposition:function(c){if(c){this.domElement=ZeroClipboard.$(c);if(!this.domElement){this.hide()}}if(this.domElement&&this.div){var b=ZeroClipboard.getDOMObjectPosition(this.domElement);var a=this.div.style;a.left=""+b.left+"px";a.top=""+b.top+"px"}},setText:function(a){this.clipText=a;if(this.ready){this.movie.setText(a)}},addEventListener:function(a,b){a=a.toString().toLowerCase().replace(/^on/,"");if(!this.handlers[a]){this.handlers[a]=[]}this.handlers[a].push(b)},setHandCursor:function(a){this.handCursorEnabled=a;if(this.ready){this.movie.setHandCursor(a)}},setCSSEffects:function(a){this.cssEffects=!!a},receiveEvent:function(e,f){e=e.toString().toLowerCase().replace(/^on/,"");switch(e){case"load":this.movie=ZeroClipboard.$(this.movieId);if(!this.movie){var c=this;setTimeout(function(){c.receiveEvent("load",null)},1);return}if(!this.ready&&navigator.userAgent.match(/Firefox/)&&navigator.userAgent.match(/Windows/)){var c=this;setTimeout(function(){c.receiveEvent("load",null)},100);this.ready=true;return}this.ready=true;this.movie.setText(this.clipText);this.movie.setHandCursor(this.handCursorEnabled);break;case"mouseover":if(this.domElement&&this.cssEffects){this.domElement.addClass("hover");if(this.recoverActive){this.domElement.addClass("active")}}break;case"mouseout":if(this.domElement&&this.cssEffects){this.recoverActive=false;if(this.domElement.hasClass("active")){this.domElement.removeClass("active");this.recoverActive=true}this.domElement.removeClass("hover")}break;case"mousedown":if(this.domElement&&this.cssEffects){this.domElement.addClass("active")}break;case"mouseup":if(this.domElement&&this.cssEffects){this.domElement.removeClass("active");this.recoverActive=false}break}if(this.handlers[e]){for(var b=0,a=this.handlers[e].length;b<a;b++){var g=this.handlers[e][b];if(typeof(g)=="function"){g(this,f)}else{if((typeof(g)=="object")&&(g.length==2)){g[0][g[1]](this,f)}else{if(typeof(g)=="string"){window[g](this,f)}}}}}}};
/*!
 * jQuery corner plugin: simple corner rounding
 * Examples and documentation at: http://jquery.malsup.com/corner/
 * version 1.99 (28-JUL-2009)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */

/**
 *  corner() takes a single string argument:  $('#myDiv').corner("effect corners width")
 *
 *  effect:  name of the effect to apply, such as round, bevel, notch, bite, etc (default is round). 
 *  corners: one or more of: top, bottom, tr, tl, br, or bl. 
 *           by default, all four corners are adorned. 
 *  width:   width of the effect; in the case of rounded corners this is the radius. 
 *           specify this value using the px suffix such as 10px (and yes, it must be pixels).
 *
 * @name corner
 * @type jQuery
 * @param String options Options which control the corner style
 * @cat Plugins/Corner
 * @return jQuery
 * @author Dave Methvin (http://methvin.com/jquery/jq-corner.html)
 * @author Mike Alsup   (http://jquery.malsup.com/corner/)
 */
;(function($) { 

var expr = (function() {
	if (! $.browser.msie) return false;
    var div = document.createElement('div');
    try { div.style.setExpression('width','0+0'); }
    catch(e) { return false; }
    return true;
})();
    
function sz(el, p) { 
    return parseInt($.css(el,p))||0; 
};
function hex2(s) {
    var s = parseInt(s).toString(16);
    return ( s.length < 2 ) ? '0'+s : s;
};
function gpc(node) {
    for ( ; node && node.nodeName.toLowerCase() != 'html'; node = node.parentNode ) {
        var v = $.css(node,'backgroundColor');
        if (v == 'rgba(0, 0, 0, 0)')
            continue; // webkit
        if (v.indexOf('rgb') >= 0) { 
            var rgb = v.match(/\d+/g); 
            return '#'+ hex2(rgb[0]) + hex2(rgb[1]) + hex2(rgb[2]);
        }
        if ( v && v != 'transparent' )
            return v;
    }
    return '#ffffff';
};

function getWidth(fx, i, width) {
    switch(fx) {
    case 'round':  return Math.round(width*(1-Math.cos(Math.asin(i/width))));
    case 'cool':   return Math.round(width*(1+Math.cos(Math.asin(i/width))));
    case 'sharp':  return Math.round(width*(1-Math.cos(Math.acos(i/width))));
    case 'bite':   return Math.round(width*(Math.cos(Math.asin((width-i-1)/width))));
    case 'slide':  return Math.round(width*(Math.atan2(i,width/i)));
    case 'jut':    return Math.round(width*(Math.atan2(width,(width-i-1))));
    case 'curl':   return Math.round(width*(Math.atan(i)));
    case 'tear':   return Math.round(width*(Math.cos(i)));
    case 'wicked': return Math.round(width*(Math.tan(i)));
    case 'long':   return Math.round(width*(Math.sqrt(i)));
    case 'sculpt': return Math.round(width*(Math.log((width-i-1),width)));
    case 'dog':    return (i&1) ? (i+1) : width;
    case 'dog2':   return (i&2) ? (i+1) : width;
    case 'dog3':   return (i&3) ? (i+1) : width;
    case 'fray':   return (i%2)*width;
    case 'notch':  return width; 
    case 'bevel':  return i+1;
    }
};

$.fn.corner = function(o) {
    // in 1.3+ we can fix mistakes with the ready state
	if (this.length == 0) {
        if (!$.isReady && this.selector) {
            var s = this.selector, c = this.context;
            $(function() {
                $(s,c).corner(o);
            });
        }
        return this;
	}

    o = (o||"").toLowerCase();
    var keep = /keep/.test(o);                       // keep borders?
    var cc = ((o.match(/cc:(#[0-9a-f]+)/)||[])[1]);  // corner color
    var sc = ((o.match(/sc:(#[0-9a-f]+)/)||[])[1]);  // strip color
    var width = parseInt((o.match(/(\d+)px/)||[])[1]) || 10; // corner width
    var re = /round|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dog/;
    var fx = ((o.match(re)||['round'])[0]);
    var edges = { T:0, B:1 };
    var opts = {
        TL:  /top|tl/.test(o),       TR:  /top|tr/.test(o),
        BL:  /bottom|bl/.test(o),    BR:  /bottom|br/.test(o)
    };
    if ( !opts.TL && !opts.TR && !opts.BL && !opts.BR )
        opts = { TL:1, TR:1, BL:1, BR:1 };
    var strip = document.createElement('div');
    strip.style.overflow = 'hidden';
    strip.style.height = '1px';
    strip.style.backgroundColor = sc || 'transparent';
    strip.style.borderStyle = 'solid';
    return this.each(function(index){
        var pad = {
            T: parseInt($.css(this,'paddingTop'))||0,     R: parseInt($.css(this,'paddingRight'))||0,
            B: parseInt($.css(this,'paddingBottom'))||0,  L: parseInt($.css(this,'paddingLeft'))||0
        };

        if (typeof this.style.zoom != undefined) this.style.zoom = 1; // force 'hasLayout' in IE
        if (!keep) this.style.border = 'none';
        strip.style.borderColor = cc || gpc(this.parentNode);
        var cssHeight = $.curCSS(this, 'height');

        for (var j in edges) {
            var bot = edges[j];
            // only add stips if needed
            if ((bot && (opts.BL || opts.BR)) || (!bot && (opts.TL || opts.TR))) {
                strip.style.borderStyle = 'none '+(opts[j+'R']?'solid':'none')+' none '+(opts[j+'L']?'solid':'none');
                var d = document.createElement('div');
                $(d).addClass('jquery-corner');
                var ds = d.style;

                bot ? this.appendChild(d) : this.insertBefore(d, this.firstChild);

                if (bot && cssHeight != 'auto') {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.bottom = ds.left = ds.padding = ds.margin = '0';
                    if (expr)
                        ds.setExpression('width', 'this.parentNode.offsetWidth');
                    else
                        ds.width = '100%';
                }
                else if (!bot && $.browser.msie) {
                    if ($.css(this,'position') == 'static')
                        this.style.position = 'relative';
                    ds.position = 'absolute';
                    ds.top = ds.left = ds.right = ds.padding = ds.margin = '0';
                    
                    // fix ie6 problem when blocked element has a border width
                    if (expr) {
                        var bw = sz(this,'borderLeftWidth') + sz(this,'borderRightWidth');
                        ds.setExpression('width', 'this.parentNode.offsetWidth - '+bw+'+ "px"');
                    }
                    else
                        ds.width = '100%';
                }
                else {
                	ds.position = 'relative';
                    ds.margin = !bot ? '-'+pad.T+'px -'+pad.R+'px '+(pad.T-width)+'px -'+pad.L+'px' : 
                                        (pad.B-width)+'px -'+pad.R+'px -'+pad.B+'px -'+pad.L+'px';                
                }

                for (var i=0; i < width; i++) {
                    var w = Math.max(0,getWidth(fx,i, width));
                    var e = strip.cloneNode(false);
                    e.style.borderWidth = '0 '+(opts[j+'R']?w:0)+'px 0 '+(opts[j+'L']?w:0)+'px';
                    bot ? d.appendChild(e) : d.insertBefore(e, d.firstChild);
                }
            }
        }
    });
};

$.fn.uncorner = function() { 
	$('div.jquery-corner', this).remove();
	return this;
};
    
})(jQuery);
