function CreateXMLHttpRequest() {var r;try {r=new XMLHttpRequest();} catch(e1) {try {r=new ActiveXObject('Microsoft.XMLHTTP');} catch(e2) {try {r=new ActiveXObject('Msxml2.XMLHTTP');} catch(e2) {r=null;}}} return r;} function HttpGet(url,okCallback,failCallback,progressCallback) {if(failCallback==null) failCallback=DefaultFailCallback;var request=CreateXMLHttpRequest();request.open('GET',url,true);request.setRequestHeader('Referer',location.href);var data={okCallback:okCallback,failCallback:failCallback,progressCallback:progressCallback,prevProgressReport:null};request.onreadystatechange=MakeCaller(HttpGetRequestChecker,request,data);request.send(null);} function HttpGetRequestChecker(request,data) {if(request.readyState==4) if(request.status==200) {if(data.okCallback!=null) data.okCallback(request);} else {if(data.failCallback!=null) data.failCallback(request);} else {if(data.progressCallback!=null) {var now=new Date();if(data.prevProgressReport==null||now.getTime()-data.prevProgressReport.getTime()>=250) {if(request.responseText.length>0) {var cl=null;try {cl=request.getResponseHeader('content-length');} catch(e) {} var progress;if(cl!=null) progress=Math.round(request.responseText.length*100/cl)+'%';else progress=request.responseText.length+' bytes';data.progressCallback(request,progress);} data.prevProgressReport=now;}}}} function DefaultFailCallback(request) {if(request==null) alert('XMLHttpRequest create failed!');else alert('XML fetch failed! ('+request.status+' '+request.statusText+')');} function HttpGetProxy(url,okCallback,failCallback,progressCallback) {if(url.substring(0,7)=='http://') {var host=url.substring(7);var slash=host.indexOf('/');if(slash!=-1) host=host.substring(0,slash);if(host!=window.location.host) url='/resources/proxy.cgi?url='+encodeURIComponent(url);} HttpGet(url,okCallback,failCallback,progressCallback);} function GetXmlText(element) {var value='';var child=element.firstChild;while(child!=null) {if(value!='') value+=' ';value+=child.nodeValue;child=child.nextSibling;} return value;} function GetXmlValue(elements) {var values='';for(var i=0;i';else if(entity=='amp')outStr+='&';else outStr+='&'+entity+';';i+=entity.length+1;}}} return outStr;} function DeEntityize(inStr) {var outStr='';for(var i=0;i',i);if(gt!=-1) i=gt;}} return outStr;} function DeHtmlize(str) {return DeEntityize(EntityToIso8859(DeElementize(str)));} function QuoteHtml(inStr) {var outStr='';for(var i=0;i':outStr+='>';break;case'&':outStr+='&';break;default:outStr+=c;break;}} return outStr;} function MakeCaller(func,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) {return function(){func(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);};} function MakeEventCaller(func,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10) {return function(e){func(e,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);};} function GetEvent(e) {if(e) return e;if(event) return event;if(window.event) return window.event;return null;} function GetParameters() {var query_string=location.search.substring(1,location.search.length);var namevals=query_string.split('&');var params=[];for(var i=0;i0) {if(str.substr(0,fromLen)==from) {newStr+=to;str=str.substr(fromLen);} else {newStr+=str.charAt(0);str=str.substr(1);}} return newStr;} function Props(o) {var s='';for(p in o) {if(s.length!=0) s+='\n';s+=p+': '+o[p];} return s;} function GetBrowserWidth() {var width=null;try {width=innerWidth;} catch(e1) {try {width=document.documentElement.offsetWidth;} catch(e2) {try {width=document.documentElement.clientWidth;} catch(e2) {try {width=document.body.clientWidth;} catch(e2) {}}}} return width;} function GetBrowserHeight() {var height=null;try {height=innerHeight;} catch(e1) {try {height=document.documentElement.offsetHeight;} catch(e2) {try {height=document.documentElement.clientHeight;} catch(e2) {try {height=document.body.clientHeight;} catch(e2) {}}}} return height;} function AppendElement(parent,elementType,properties) {var element=document.createElement(elementType);if(properties!=null) for(property in properties) if(property=='style') for(nestedProperty in properties[property]) element.style[nestedProperty]=properties['style'][nestedProperty];else element[property]=properties[property];parent.appendChild(element);return element;} function AppendText(parent,text) {var element=document.createTextNode(text);parent.appendChild(element);return element;} function ClearElement(element) {while(element.firstChild!=null) {ClearElement(element.firstChild);element.removeChild(element.firstChild);}} function DestroyElement(element) {ClearElement(element);element.parentNode.removeChild(element);} function instanceOf(object,clas) {while(object!=null) {if(object==clas.prototype) return true;object=object.__proto__;} return false;} function GetComputedStyle(element,style) {var camelStyle=Camelize(style);if(element.currentStyle!=null) return element.currentStyle[camelStyle];if(window.getComputedStyle!=null) return window.getComputedStyle(element,null)[camelStyle];return null;} var camelizeTable=[];camelizeTable['background-attachment']='backgroundAttachment';camelizeTable['background-color']='backgroundColor';camelizeTable['background-image']='backgroundImage';camelizeTable['background-position']='backgroundPosition';camelizeTable['background-repeat']='backgroundRepeat';camelizeTable['border-bottom']='borderBottom';camelizeTable['border-bottom-color']='borderBottomColor';camelizeTable['border-bottom-style']='borderBottomStyle';camelizeTable['border-bottom-width']='borderBottomWidth';camelizeTable['border-color']='borderColor';camelizeTable['border-left']='borderLeft';camelizeTable['border-left-color']='borderLeftColor';camelizeTable['border-left-style']='borderLeftStyle';camelizeTable['border-left-width']='borderLeftWidth';camelizeTable['border-right']='borderRight';camelizeTable['border-right-color']='borderRightColor';camelizeTable['border-right-style']='borderRightStyle';camelizeTable['border-right-width']='borderRightWidth';camelizeTable['border-style']='borderStyle';camelizeTable['border-top']='borderTop';camelizeTable['border-top-color']='borderTopColor';camelizeTable['border-top-style']='borderTopStyle';camelizeTable['border-top-width']='borderTopWidth';camelizeTable['border-width']='borderWidth';camelizeTable['font-family']='fontFamily';camelizeTable['font-size']='fontSize';camelizeTable['font-variant']='fontVariant';camelizeTable['font-weight']='fontWeight';camelizeTable['letter-spacing']='letterSpacing';camelizeTable['line-height']='lineHeight';camelizeTable['list-style']='listStyle';camelizeTable['list-style-image']='listStyleImage';camelizeTable['list-style-position']='listStylePosition';camelizeTable['list-style-type']='listStyleType';camelizeTable['margin-bottom']='marginBottom';camelizeTable['margin-left']='marginLeft';camelizeTable['margin-right']='marginRight';camelizeTable['margin-top']='marginTop';camelizeTable['padding-bottom']='paddingBottom';camelizeTable['padding-left']='paddingLeft';camelizeTable['padding-right']='paddingRight';camelizeTable['padding-top']='paddingTop';camelizeTable['page-break-after']='pageBreakAfter';camelizeTable['page-break-before']='pageBreakBefore';camelizeTable['float']='cssFloat';camelizeTable['text-align']='textAlign';camelizeTable['text-decoration']='textDecoration';camelizeTable['text-indent']='textIndent';camelizeTable['text-transform']='textTransform';camelizeTable['vertical-align']='verticalAlign';camelizeTable['z-index']='zIndex';function Camelize(styleName) {var camelStyleName=camelizeTable[styleName];if(camelStyleName!=null) return camelStyleName;else return styleName;} var oldCursor;var startTime,endTime,elapsed;function SortTable(table,columnNumber,compare) {startTime=new Date();oldCursor=table.style.cursor;table.style.cursor='wait';setTimeout(MakeCaller(SortTableLater,table,columnNumber,compare),100);} function SortTableLater(table,columnNumber,compare) {var container=table;var child=table.firstChild;while(child!=null) {if(child.nodeName=='TBODY') {container=child;break;} child=child.nextSibling;} if(compare==null||compare==false) compare=function(v1,v2){return v1>v2;};else if(compare==true) compare=function(v1,v2){return v10) rows.push(columns);} row=row.nextSibling;} for(var i=0;ito;i-=inc) results.push(i);return results;} function ArraySearch(a,v) {for(var i in a) if(a[i]==v) return i;return null;} function MergeObjects(o1,o2) {var o={};if(o1!=null) for(var n in o1) o[n]=o1[n];if(o2!=null) for(var n in o2) o[n]=o2[n];return o;} var currentPopup=null;function PopUpInternal(anchorElement,styles) {var nonContainers=['AREA','BASE','BR','COL','HR','IMG','INPUT','LINK','META','PARAM','TITLE'];if(ArraySearch(nonContainers,anchorElement.nodeName)!=null) anchorElement=anchorElement.parentNode;PopDown();anchorElement.style.position='relative';var outerDiv=AppendElement(anchorElement,'div',{onclick:NoBubble,style:{position:'relative'}});var innerStyles=MergeObjects({position:'absolute',right:'25px',top:'3px',zIndex:'1000000',backgroundColor:'#ffffff'},styles);var innerDiv=AppendElement(outerDiv,'div',{style:innerStyles});currentPopup=outerDiv;return innerDiv;} function PopUpAddClose(div) {AppendElement(div,'img',{src:'http://www.acme.com/resources/images/close.gif',onclick:PopDown,style:{width:'14px',height:'13px',border:'0px solid #ffffff',position:'absolute',right:'2px',top:'2px'}});} function PopUp(anchorElement,styles) {var p=PopUpInternal(anchorElement,styles);PopUpAddClose(p);return p;} function PopUpHtml(anchorElement,html,styles) {var p=PopUpInternal(anchorElement,styles);p.innerHTML=html;PopUpAddClose(p);return p;} function PopDown() {if(!currentPopup) return;DestroyElement(currentPopup);currentPopup=null;} function NoBubble(e) {e=GetEvent(e);if(e) e.cancelBubble=true;} function PopUpColorPicker(anchorElement,styles,callback) {var hexits=['0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f'];var p=PopUpInternal(anchorElement,MergeObjects({width:'144px',height:'96px'},styles));var table=AppendElement(p,'table',{border:'0',cellSpacing:'0',cellPadding:'0'});var tbody=AppendElement(table,'tbody');r=g=b=0;for(var y=0;y<12;++y) {var tr=AppendElement(tbody,'tr');for(var x=0;x<18;++x) {var c=hexits[r>>4]+hexits[r&15]+ hexits[g>>4]+hexits[g&15]+ hexits[b>>4]+hexits[b&15];var td=AppendElement(tr,'td',{title:c,style:{width:'8px',height:'8px',backgroundColor:'#'+c}});td.onclick=MakePopDownCallback(callback,c);b+=51;if(b>=256) {b=0;g+=51;if(g>=256) {g=0;r+=51;}}}}} function MakePopDownCallback(callback,arg) {return function(){PopDown();callback(arg);};} function Join(strArray,separator) {var results='';for(i in strArray) {if(results!='') results+=separator;results+=strArray[i];} return results;}