





var Class={create:function(){return function(){this.initialize.apply(this,arguments);}}}



var Abstract=new Object();Object.extend=function(destination,source){for(property in source){destination[property]=source[property];}
return destination;}

var PeriodicalExecuter=Class.create();PeriodicalExecuter.prototype={initialize:function(callback,frequency){this.callback=callback;this.frequency=frequency;this.currentlyExecuting=false;this.registerCallback();},registerCallback:function(){setInterval(this.onTimerEvent.bind(this),this.frequency*1000);},onTimerEvent:function(){if(!this.currentlyExecuting){try{this.currentlyExecuting=true;this.callback();}finally{this.currentlyExecuting=false;}}}}
function $(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element);}
return elements;}


Object();var $continue=new Object();var Enumerable={each:function(iterator){var index=0;try{this._each(function(value){try{iterator(value,index++);}catch(e){if(e!=$continue)throw e;}});}catch(e){if(e!=$break)throw e;}},all:function(iterator){var result=true;this.each(function(value,index){result=result&&!!(iterator||Prototype.K)(value,index);if(!result)throw $break;});return result;},any:function(iterator){var result=true;this.each(function(value,index){if(result=!!(iterator||Prototype.K)(value,index))
throw $break;});return result;},collect:function(iterator){var results=[];this.each(function(value,index){results.push(iterator(value,index));});return results;},detect:function(iterator){var result;this.each(function(value,index){if(iterator(value,index)){result=value;throw $break;}});return result;},findAll:function(iterator){var results=[];this.each(function(value,index){if(iterator(value,index))
results.push(value);});return results;},grep:function(pattern,iterator){var results=[];this.each(function(value,index){var stringValue=value.toString();if(stringValue.match(pattern))
results.push((iterator||Prototype.K)(value,index));})
return results;},include:function(object){var found=false;this.each(function(value){if(value==object){found=true;throw $break;}});return found;},inject:function(memo,iterator){this.each(function(value,index){memo=iterator(memo,value,index);});return memo;},invoke:function(method){var args=$A(arguments).slice(1);return this.collect(function(value){return value[method].apply(value,args);});},max:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(value>=(result||value))
result=value;});return result;},min:function(iterator){var result;this.each(function(value,index){value=(iterator||Prototype.K)(value,index);if(value<=(result||value))
result=value;});return result;},partition:function(iterator){var trues=[],falses=[];this.each(function(value,index){((iterator||Prototype.K)(value,index)?trues:falses).push(value);});return[trues,falses];},pluck:function(property){var results=[];this.each(function(value,index){results.push(value[property]);});return results;},reject:function(iterator){var results=[];this.each(function(value,index){if(!iterator(value,index))
results.push(value);});return results;},sortBy:function(iterator){return this.collect(function(value,index){return{value:value,criteria:iterator(value,index)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}).pluck('value');},toArray:function(){return this.collect(Prototype.K);},zip:function(){var iterator=Prototype.K,args=$A(arguments);if(typeof args.last()=='function')
iterator=args.pop();var collections=[this].concat(args).map($A);return this.map(function(value,index){iterator(value=collections.pluck(index));return value;});},inspect:function(){return'#<Enumerable:'+this.toArray().inspect()+'>';}}

Object.extend(Array.prototype,Enumerable);Array.prototype._reverse=Array.prototype.reverse;Object.extend(Array.prototype,{_each:function(iterator){for(var i=0;i<this.length;i++)
iterator(this[i]);},clear:function(){this.length=0;return this;},first:function(){return this[0];},last:function(){return this[this.length-1];},compact:function(){return this.select(function(value){return value!=undefined||value!=null;});},flatten:function(){return this.inject([],function(array,value){return array.concat(value.constructor==Array?value.flatten():[value]);});},without:function(){var values=$A(arguments);return this.select(function(value){return!values.include(value);});},indexOf:function(object){for(var i=0;i<this.length;i++)
if(this[i]==object)return i;return-1;},reverse:function(inline){return(inline!==false?this:this.toArray())._reverse();},shift:function(){var result=this[0];for(var i=0;i<this.length-1;i++)
this[i]=this[i+1];this.length--;return result;},inspect:function(){return'['+this.map(Object.inspect).join(', ')+']';}});var Hash={_each:function(iterator){for(key in this){var value=this[key];if(typeof value=='function')continue;var pair=[key,value];pair.key=key;pair.value=value;iterator(pair);}},keys:function(){return this.pluck('key');},values:function(){return this.pluck('value');},merge:function(hash){return $H(hash).inject($H(this),function(mergedHash,pair){mergedHash[pair.key]=pair.value;return mergedHash;});},toQueryString:function(){return this.map(function(pair){return pair.map(encodeURIComponent).join('=');}).join('&');},inspect:function(){return'#<Hash:{'+this.map(function(pair){return pair.map(Object.inspect).join(': ');}).join(', ')+'}>';}}
function $H(object){var hash=Object.extend({},object||{});Object.extend(hash,Enumerable);Object.extend(hash,Hash);return hash;}
ObjectRange=Class.create();Object.extend(ObjectRange.prototype,Enumerable);Object.extend(ObjectRange.prototype,{initialize:function(start,end,exclusive){this.start=start;this.end=end;this.exclusive=exclusive;},_each:function(iterator){var value=this.start;do{iterator(value);value=value.succ();}while(this.include(value));},include:function(value){if(value<this.start)
return false;if(this.exclusive)
return value<this.end;return value<=this.end;}});var $R=function(start,end,exclusive){return new ObjectRange(start,end,exclusive);}
var Ajax={getTransport:function(){return Try.these(function(){return new ActiveXObject('Msxml2.XMLHTTP')},function(){return new ActiveXObject('Microsoft.XMLHTTP')},function(){return new XMLHttpRequest()})||false;},activeRequestCount:0}
Ajax.Responders={responders:[],_each:function(iterator){this.responders._each(iterator);},register:function(responderToAdd){if(!this.include(responderToAdd))
this.responders.push(responderToAdd);},unregister:function(responderToRemove){this.responders=this.responders.without(responderToRemove);},dispatch:function(callback,request,transport,json){this.each(function(responder){if(responder[callback]&&typeof responder[callback]=='function'){try{responder[callback].apply(responder,[request,transport,json]);}catch(e){}}});}};Object.extend(Ajax.Responders,Enumerable);Ajax.Responders.register({onCreate:function(){Ajax.activeRequestCount++;},onComplete:function(){Ajax.activeRequestCount--;}});Ajax.Base=function(){};Ajax.Base.prototype={setOptions:function(options){this.options={method:'post',asynchronous:true,parameters:''}
Object.extend(this.options,options||{});},responseIsSuccess:function(){return this.transport.status==undefined||this.transport.status==0||(this.transport.status>=200&&this.transport.status<300);},responseIsFailure:function(){return!this.responseIsSuccess();}}
Ajax.Request=Class.create();Ajax.Request.Events=['Uninitialized','Loading','Loaded','Interactive','Complete'];Ajax.Request.prototype=Object.extend(new Ajax.Base(),{initialize:function(url,options){this.transport=Ajax.getTransport();this.setOptions(options);this.request(url);},request:function(url){var parameters=this.options.parameters||'';if(parameters.length>0)parameters+='&_=';try{this.url=url;if(this.options.method=='get'&&parameters.length>0)
this.url+=(this.url.match(/\?/)?'&':'?')+parameters;Ajax.Responders.dispatch('onCreate',this,this.transport);this.transport.open(this.options.method,this.url,this.options.asynchronous);if(this.options.asynchronous){this.transport.onreadystatechange=this.onStateChange.bind(this);setTimeout((function(){this.respondToReadyState(1)}).bind(this),10);}
this.setRequestHeaders();var body=this.options.postBody?this.options.postBody:parameters;this.transport.send(this.options.method=='post'?body:null);}catch(e){this.dispatchException(e);}},setRequestHeaders:function(){var requestHeaders=['X-Requested-With','XMLHttpRequest','X-Prototype-Version',Prototype.Version];if(this.options.method=='post'){requestHeaders.push('Content-type','application/x-www-form-urlencoded');if(this.transport.overrideMimeType)
requestHeaders.push('Connection','close');}
if(this.options.requestHeaders)
requestHeaders.push.apply(requestHeaders,this.options.requestHeaders);for(var i=0;i<requestHeaders.length;i+=2)
this.transport.setRequestHeader(requestHeaders[i],requestHeaders[i+1]);},onStateChange:function(){var readyState=this.transport.readyState;if(readyState!=1)
this.respondToReadyState(this.transport.readyState);},header:function(name){try{return this.transport.getResponseHeader(name);}catch(e){}},evalJSON:function(){try{return eval(this.header('X-JSON'));}catch(e){}},evalResponse:function(){try{return eval(this.transport.responseText);}catch(e){this.dispatchException(e);}},respondToReadyState:function(readyState){var event=Ajax.Request.Events[readyState];var transport=this.transport,json=this.evalJSON();if(event=='Complete'){try{(this.options['on'+this.transport.status]||this.options['on'+(this.responseIsSuccess()?'Success':'Failure')]||Prototype.emptyFunction)(transport,json);}catch(e){this.dispatchException(e);}
if((this.header('Content-type')||'').match(/^text\/javascript/i))
this.evalResponse();}
try{(this.options['on'+event]||Prototype.emptyFunction)(transport,json);Ajax.Responders.dispatch('on'+event,this,transport,json);}catch(e){this.dispatchException(e);}
if(event=='Complete')
this.transport.onreadystatechange=Prototype.emptyFunction;},dispatchException:function(exception){(this.options.onException||Prototype.emptyFunction)(this,exception);Ajax.Responders.dispatch('onException',this,exception);}});Ajax.Updater=Class.create();Object.extend(Object.extend(Ajax.Updater.prototype,Ajax.Request.prototype),{initialize:function(container,url,options){this.containers={success:container.success?$(container.success):$(container),failure:container.failure?$(container.failure):(container.success?null:$(container))}
this.transport=Ajax.getTransport();this.setOptions(options);var onComplete=this.options.onComplete||Prototype.emptyFunction;this.options.onComplete=(function(transport,object){this.updateContent();onComplete(transport,object);}).bind(this);this.request(url);},updateContent:function(){var receiver=this.responseIsSuccess()?this.containers.success:this.containers.failure;var response=this.transport.responseText;if(!this.options.evalScripts)
response=response.stripScripts();if(receiver){if(this.options.insertion){new this.options.insertion(receiver,response);}else{Element.update(receiver,response);}}
if(this.responseIsSuccess()){if(this.onComplete)
setTimeout(this.onComplete.bind(this),10);}}});Ajax.PeriodicalUpdater=Class.create();Ajax.PeriodicalUpdater.prototype=Object.extend(new Ajax.Base(),{initialize:function(container,url,options){this.setOptions(options);this.onComplete=this.options.onComplete;this.frequency=(this.options.frequency||2);this.decay=(this.options.decay||1);this.updater={};this.container=container;this.url=url;this.start();},start:function(){this.options.onComplete=this.updateComplete.bind(this);this.onTimerEvent();},stop:function(){this.updater.onComplete=undefined;clearTimeout(this.timer);(this.onComplete||Prototype.emptyFunction).apply(this,arguments);},updateComplete:function(request){if(this.options.decay){this.decay=(request.responseText==this.lastText?this.decay*this.options.decay:1);this.lastText=request.responseText;}
this.timer=setTimeout(this.onTimerEvent.bind(this),this.decay*this.frequency*1000);},onTimerEvent:function(){this.updater=new Ajax.Updater(this.container,this.url,this.options);}});document.getElementsByClassName=function(className,parentElement){var children=($(parentElement)||document.body).getElementsByTagName('*');return $A(children).inject([],function(elements,child){if(child.className.match(new RegExp("(^|\\s)"+className+"(\\s|$)")))
elements.push(child);return elements;});}
if(!window.Element){var Element=new Object();}
Object.extend(Element,{visible:function(element){return $(element).style.display!='none';},toggle:function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);Element[Element.visible(element)?'hide':'show'](element);}},hide:function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);element.style.display='none';}},show:function(){for(var i=0;i<arguments.length;i++){var element=$(arguments[i]);element.style.display='';}},remove:function(element){element=$(element);element.parentNode.removeChild(element);},update:function(element,html){$(element).innerHTML=html.stripScripts();setTimeout(function(){html.evalScripts()},10);},getHeight:function(element){element=$(element);return element.offsetHeight;},classNames:function(element){return new Element.ClassNames(element);},hasClassName:function(element,className){if(!(element=$(element)))return;return Element.classNames(element).include(className);},addClassName:function(element,className){if(!(element=$(element)))return;return Element.classNames(element).add(className);},removeClassName:function(element,className){if(!(element=$(element)))return;return Element.classNames(element).remove(className);},cleanWhitespace:function(element){element=$(element);for(var i=0;i<element.childNodes.length;i++){var node=element.childNodes[i];if(node.nodeType==3&&!/\S/.test(node.nodeValue))
Element.remove(node);}},empty:function(element){return $(element).innerHTML.match(/^\s*$/);},scrollTo:function(element){element=$(element);var x=element.x?element.x:element.offsetLeft,y=element.y?element.y:element.offsetTop;window.scrollTo(x,y);},getStyle:function(element,style){element=$(element);var value=element.style[style.camelize()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle){var css=document.defaultView.getComputedStyle(element,null);value=css?css.getPropertyValue(style):null;}else if(element.currentStyle){value=element.currentStyle[style.camelize()];}}
if(window.opera&&['left','top','right','bottom'].include(style))
if(Element.getStyle(element,'position')=='static')value='auto';return value=='auto'?null:value;},setStyle:function(element,style){element=$(element);for(name in style)
element.style[name.camelize()]=style[name];},getDimensions:function(element){element=$(element);if(Element.getStyle(element,'display')!='none')
return{width:element.offsetWidth,height:element.offsetHeight};var els=element.style;var originalVisibility=els.visibility;var originalPosition=els.position;els.visibility='hidden';els.position='absolute';els.display='';var originalWidth=element.clientWidth;var originalHeight=element.clientHeight;els.display='none';els.position=originalPosition;els.visibility=originalVisibility;return{width:originalWidth,height:originalHeight};},makePositioned:function(element){element=$(element);var pos=Element.getStyle(element,'position');if(pos=='static'||!pos){element._madePositioned=true;element.style.position='relative';if(window.opera){element.style.top=0;element.style.left=0;}}},undoPositioned:function(element){element=$(element);if(element._madePositioned){element._madePositioned=undefined;element.style.position=element.style.top=element.style.left=element.style.bottom=element.style.right='';}},makeClipping:function(element){element=$(element);if(element._overflow)return;element._overflow=element.style.overflow;if((Element.getStyle(element,'overflow')||'visible')!='hidden')
element.style.overflow='hidden';},undoClipping:function(element){element=$(element);if(element._overflow)return;element.style.overflow=element._overflow;element._overflow=undefined;}});var Toggle=new Object();Toggle.display=Element.toggle;Abstract.Insertion=function(adjacency){this.adjacency=adjacency;}
Abstract.Insertion.prototype={initialize:function(element,content){this.element=$(element);this.content=content.stripScripts();if(this.adjacency&&this.element.insertAdjacentHTML){try{this.element.insertAdjacentHTML(this.adjacency,this.content);}catch(e){if(this.element.tagName.toLowerCase()=='tbody'){this.insertContent(this.contentFromAnonymousTable());}else{throw e;}}}else{this.range=this.element.ownerDocument.createRange();if(this.initializeRange)this.initializeRange();this.insertContent([this.range.createContextualFragment(this.content)]);}
setTimeout(function(){content.evalScripts()},10);},contentFromAnonymousTable:function(){var div=document.createElement('div');div.innerHTML='<table><tbody>'+this.content+'</tbody></table>';return $A(div.childNodes[0].childNodes[0].childNodes);}}
var Insertion=new Object();Insertion.Before=Class.create();Insertion.Before.prototype=Object.extend(new Abstract.Insertion('beforeBegin'),{initializeRange:function(){this.range.setStartBefore(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element);}).bind(this));}});Insertion.Top=Class.create();Insertion.Top.prototype=Object.extend(new Abstract.Insertion('afterBegin'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(true);},insertContent:function(fragments){fragments.reverse(false).each((function(fragment){this.element.insertBefore(fragment,this.element.firstChild);}).bind(this));}});Insertion.Bottom=Class.create();Insertion.Bottom.prototype=Object.extend(new Abstract.Insertion('beforeEnd'),{initializeRange:function(){this.range.selectNodeContents(this.element);this.range.collapse(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.appendChild(fragment);}).bind(this));}});Insertion.After=Class.create();Insertion.After.prototype=Object.extend(new Abstract.Insertion('afterEnd'),{initializeRange:function(){this.range.setStartAfter(this.element);},insertContent:function(fragments){fragments.each((function(fragment){this.element.parentNode.insertBefore(fragment,this.element.nextSibling);}).bind(this));}});Element.ClassNames=Class.create();Element.ClassNames.prototype={initialize:function(element){this.element=$(element);},_each:function(iterator){this.element.className.split(/\s+/).select(function(name){return name.length>0;})._each(iterator);},set:function(className){this.element.className=className;},add:function(classNameToAdd){if(this.include(classNameToAdd))return;this.set(this.toArray().concat(classNameToAdd).join(' '));},remove:function(classNameToRemove){if(!this.include(classNameToRemove))return;this.set(this.select(function(className){return className!=classNameToRemove;}).join(' '));},toString:function(){return this.toArray().join(' ');}}
Object.extend(Element.ClassNames.prototype,Enumerable);var Field={clear:function(){for(var i=0;i<arguments.length;i++)
$(arguments[i]).value='';},focus:function(element){$(element).focus();},present:function(){for(var i=0;i<arguments.length;i++)
if($(arguments[i]).value=='')return false;return true;},select:function(element){$(element).select();},activate:function(element){element=$(element);element.focus();if(element.select)
element.select();}}

function populatePeoplesDropdown(obj,active,clientID,assignedManagersOnly,preselectedAssigneeID,preselectedOwnerID){var managersOnly=0;var uri='/index';if(obj){var projectID=obj.options[obj.selectedIndex].value;}
if(clientID==0){assignedManagersOnly=0;if(!projectID){managersOnly=1;}}else if(!clientID){clientID=0;}
if(!assignedManagersOnly){assignedManagersOnly=0;}
var jx=new Ajax.Request(uri,{method:'get',parameters:'module=people&action=list&f_ID='+(projectID>0?projectID:'')+'&f_active='+(active!=undefined?active:'')+'&f_clientID='+clientID+'&f_assignedManagersOnly='+assignedManagersOnly+'&f_managersOnly='+managersOnly+'&f_excludeExecutives=1'+'&f_assigneeID='+(preselectedAssigneeID!=undefined?preselectedAssigneeID:'')+'&f_ownerID='+(preselectedOwnerID!=undefined?preselectedOwnerID:''),onSuccess:buildPeoples,onFailure:displayError});}
function buildPeoples(response){assignees=$('list_assignees');var indexInc=1;if(assignees){var assigneeSelectedId=assignees.options[assignees.selectedIndex].value;var firstAssigneeOption=assignees.options[0].text;assignees.options.length=0;assignees.options[0]=new Option(firstAssigneeOption,0);}
owners=$('list_owners');if(owners){var ownerSelectedId=owners.options[owners.selectedIndex].value;var firstOwnerOption=owners.options[0].text;owners.options.length=0;owners.options[0]=new Option(firstOwnerOption,0);}
managers=$('list_managers');if(managers){var managerSelectedId=managers.options[managers.selectedIndex].value;var firstManagerOption=managers.options[0].text;var secondManagerOption=managers.options[1].text;managers.options.length=0;managers.options[0]=new Option(firstManagerOption,0);managers.options[1]=new Option(secondManagerOption,0);indexInc++;}
var xmlObj=response.responseXML;var arrIDs=xmlObj.getElementsByTagName('id');var arrNames=xmlObj.getElementsByTagName('name');for(i=0;i<arrIDs.length;i++){if(assignees){var assigneeSelected=false;if(assigneeSelectedId==arrIDs.item(i).firstChild.nodeValue){assigneeSelected=true;}
assignees.options[i+indexInc]=new Option(arrNames.item(i).firstChild.nodeValue,arrIDs.item(i).firstChild.nodeValue,assigneeSelected,assigneeSelected);}
if(owners){var ownerSelected=false;if(ownerSelectedId==arrIDs.item(i).firstChild.nodeValue){ownerSelected=true;}
owners.options[i+indexInc]=new Option(arrNames.item(i).firstChild.nodeValue,arrIDs.item(i).firstChild.nodeValue,ownerSelected,ownerSelected);}
if(managers){var managerSelected=false;if(managerSelectedId==arrIDs.item(i).firstChild.nodeValue){managerSelected=true;}
managers.options[i+indexInc]=new Option(arrNames.item(i).firstChild.nodeValue,arrIDs.item(i).firstChild.nodeValue,managerSelected,managerSelected);}}}
function populateModulesXrefDropdown(obj,active,preselectedModuleID){var uri='/index';var projectID=obj.options[obj.selectedIndex].value;var jx=new Ajax.Request(uri,{method:'get',parameters:'module=projects&action=listmodulesxref&f_ID='+(projectID>0?projectID:'')+'&f_active='+(active!=undefined?active:'')+'&f_moduleID='+(preselectedModuleID!=undefined?preselectedModuleID:''),onSuccess:buildModulesXref,onFailure:displayError});}
function buildModulesXref(response){modules=$('list_modules');var moduleSelectedId=modules.options[modules.selectedIndex].value;var firstOption=modules.options[0].text;modules.options.length=0;var xmlObj=response.responseXML;var arrIDs=xmlObj.getElementsByTagName('moduleid');var arrNames=xmlObj.getElementsByTagName('module');modules.options[0]=new Option(firstOption,0);for(i=0;i<arrIDs.length;i++){var moduleSelected=false;if(moduleSelectedId==arrIDs.item(i).firstChild.nodeValue){moduleSelected=true;}
modules.options[i+1]=new Option(arrNames.item(i).firstChild.nodeValue,arrIDs.item(i).firstChild.nodeValue,moduleSelected,moduleSelected);}}
var selectedWorktypeID;function populateBudgetDropdown(obj,active,worktypeID){selectedWorktypeID=worktypeID;var uri='/index';var projectID=obj.options[obj.selectedIndex].value;var jx=new Ajax.Request(uri,{method:'get',parameters:'module=projects&action=listbudget&f_ID='+(projectID>0?projectID:'')+'&f_active='+(active!=undefined?active:''),onSuccess:buildBudget,onFailure:displayError});}
function buildBudget(response){budget=$('list_budget');var firstOption=budget.options[0].text;budget.options.length=0;var xmlObj=response.responseXML;var arrIDs=xmlObj.getElementsByTagName('worktypeid');var arrNames=xmlObj.getElementsByTagName('worktype');budget.options[0]=new Option(firstOption,0);for(i=0;i<arrIDs.length;i++){budget.options[i+1]=new Option(arrNames.item(i).firstChild.nodeValue,arrIDs.item(i).firstChild.nodeValue);if(arrIDs.item(i).firstChild.nodeValue==selectedWorktypeID&&selectedWorktypeID>0){budget.options.selectedIndex=(i+1);}}}
function displayError(response){var xmlObj=response.responseXML;alert(xmlObj.getElementsByTagName('error')[0].firstChild.nodeValue);}
var oXml=null;function timerRequest(uri){oXmlInit();uri+=new Date().getTime()+"/";if(oXml!=null){oXml.open("GET",uri,true);oXml.onreadystatechange=function(){if(oXml.readyState==4){if(oXml.status==200){var timerID=(new RegExp(/([0-9]+)/gi).exec(uri)[1]);var oTimer=eval("ekTicker"+timerID);var newTime=(new Function("return "+oXml.responseText.toString())());if(uri.indexOf('start')!=-1){oTimer.toggleStart('none');oTimer.toggleStop('block');oTimer.toggleIcon(1);oTimer.init(newTime);oTimer.tick(1);}else if(uri.indexOf('stop')!=-1){oTimer.time=0;oTimer.counter=0;oTimer.init(newTime);oTimer.toggleStart('block');oTimer.toggleStop('none');oTimer.toggleIcon(0);oTimer.timer.clearTimeout(oTimer.timerID);}else if(uri.indexOf('clear')!=-1){oTimer.time=0;oTimer.counter=0;oTimer.init(newTime);oTimer.timer.clearTimeout(oTimer.timerID);oTimer.destroy();}}}}
oXml.send(null);}}
function oXmlInit(){try{oXml=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{oXml=new ActiveXObject("Microsoft.XMLHTTP");}catch(oc){oXml=null;}}
if(!oXml&&typeof XMLHttpRequest!="undefined"){oXml=new XMLHttpRequest();}}
document.getElementsByClassName=function(className){var children=document.getElementsByTagName('*')||document.all;var elements=new Array();for(var i=0;i<children.length;i++){var child=children[i];var classNames=child.className.split(' ');for(var j=0;j<classNames.length;j++){if(classNames[j]==className){elements.push(child);break;}}}
return elements;}
document.addEvent=function(object,eventType,fn,useCapture){if(object.addEventListener){object.addEventListener(eventType,fn,useCapture);return true;}else{if(object.attachEvent){var r=object.attachEvent("on"+eventType,fn);return r;}}}
document.getElementLeft=function(element){var left=element.offsetLeft;var parentElement=element.offsetParent;while(parentElement!=null){left+=parentElement.offsetLeft;parentElement=parentElement.offsetParent;}
return left;}
document.getElementTop=function(element){var top=element.offsetTop;var parentElement=element.offsetParent;while(parentElement!=null){top+=parentElement.offsetTop;parentElement=parentElement.offsetParent;}
return top;}
document.getEventSource=function(e){var node=e.target||e.srcElement;if(node.nodeType==3){node=node.parentNode;}
if(node.nodeName.toLowerCase()=='a'){return node;}else{return node.parentNode;}}


function makeFalse(){return false;}



var Tooltip={x:0,y:0,tooltip:null,prepare:function(){if(!document.getElementById||!document.getElementsByTagName){return;}
var hrefs=document.getElementsByClassName('tooltip');for(var i=0;i<hrefs.length;i++){document.addEvent(hrefs[i],'mouseover',Tooltip.over,false);document.addEvent(hrefs[i],'mouseout',Tooltip.out,false);hrefs[i].removeAttribute('title');hrefs[i].removeAttribute('alt');var imgs=hrefs[i].getElementsByTagName("IMG");for(var j=0;j<imgs.length;j++){imgs[j].removeAttribute('title');imgs[j].removeAttribute('alt');}
if(hrefs[i].getAttribute('disablenavigateurl')==null){document.addEvent(hrefs[i],'click',makeFalse,false);hrefs[i].setAttribute('onclick',"return false");}}},show:function(nodeName){var tooltip=document.getElementById(nodeName);if(tooltip!=null){tooltip.style.opacity='.1';tooltip.style.display='block';if(tooltip.style.marginTop==''){tooltip.style.marginTop='20px';}
Tooltip.fade(nodeName,10);}},fade:function(nodeName,opacity){var tooltip=document.getElementById(nodeName);var opacity=parseInt(opacity)+(navigator.userAgent.indexOf('MSIE')>0?35:10);if(opacity<85){tooltip.style.opacity='.'+opacity;tooltip.style.filter="alpha(opacity:"+opacity+")";window.opacityID=setTimeout("Tooltip.fade('"+nodeName+"','"+opacity+"')",5);}
else{tooltip.style.opacity='1';tooltip.style.filter="alpha(opacity:100)";}},over:function(e){Tooltip.tooltip=document.getEventSource(e);Tooltip.x=document.getElementLeft(Tooltip.tooltip);Tooltip.y=document.getElementTop(Tooltip.tooltip);tooltipID=setTimeout("Tooltip.show('"+Tooltip.tooltip.getAttribute('for')+"')",100);},out:function(e){Tooltip.tooltip=document.getEventSource(e);if(window.tooltipID){clearTimeout(tooltipID);}
if(window.opacityID){clearTimeout(opacityID);}
var tooltip=document.getElementById(Tooltip.tooltip.getAttribute('for'));tooltip.style.display='none';tooltip.style.opacity='.1';}};document.addEvent(window,'load',Tooltip.prepare,false);
