Animation={};Animation.setupHiddenContent=function(element,show){element=$(element);var parentNode=element.parentNode;parentNode.setAttribute("naturalHeight",element.offsetHeight);parentNode.style.overflow="hidden";if(document.all)parentNode.style.height="1px";else parentNode.style.height="0px";parentNode.style.visibility="visible";parentNode.style.position="relative";parentNode.style.top="0px";if(typeof(show)!='undefined'&&show!=null)Animation.showHiddenContent(element);};Animation.showHiddenContent=function(element){if(typeof element=='string')element=document.getElementById(element);var when_done=function(){if(document.all)element.style.setExpression("height","Animation.getInnerHeight(this)+'px'");else element.style.height="auto";};Animation.miniTween(element,'height',0,parseInt(element.getAttribute('naturalHeight')),"open",when_done);};Animation.getInnerHeight=function(element){element=$(element);var height=0;for(var i=0;i<element.childNodes.length;++i)height+=element.childNodes[i].offsetHeight;return height;};Animation.hideHiddenContent=function(element){element=$(element);element.setAttribute("naturalHeight",element.offsetHeight);if(document.all)element.style.removeExpression("height");Animation.miniTween(element,'height',0,element.offsetHeight,"close");};Animation.miniTween=function(element,property,closed_value,open_value,action,done_function){element=$(element);var steps=[0,1,3,6,10,15,21,28,36,45,55,64,72,79,85,90,94,97,99,100];var index=(action=="open"?0:steps.length-1);var inc=(action=="open"?1:-1);var timer=null;var delay=25;var oldValue=null;timer=window.setInterval(function(){var newValue;if(index==steps.length||index==-1){window.clearInterval(timer);if(typeof(done_function)=="function"){done_function();}}else{newValue=Math.floor((closed_value+((open_value-closed_value)*steps[index]/100)));if(document.all&&property=="height"){if(newValue<1){element.style[property]="1px";}else{element.style[property]=newValue+"px";}}else{element.style[property]=newValue+"px";}index+=inc;oldValue=newValue;}},delay);};Animation.oExtraData={iTimeoutID:null};function showExtraData(elem,level,bAll){elem=$(elem);var aElems=[],extraDataTR=elem.getParent().getParent().getNext(),setDisplay="",toggleFrom="plus",toggleTo="minus",oElem,oNextExtraDataTR;if(Animation.oExtraData.iTimeoutID!=null){window.clearTimeout(Animation.oExtraData.iTimeoutID);}if(bAll){if(level>0){aElems.push(elem);oNextExtraDataTR=extraDataTR;do{if(oNextExtraDataTR.hasClass("level"+level)){oElem=oNextExtraDataTR.getElement("img.extra_data_toggle");if(oElem){aElems.push(oElem);}}oNextExtraDataTR=oNextExtraDataTR.getNext();}while(oNextExtraDataTR&&!(oNextExtraDataTR.hasClass("level"+(level-1))))}else{aElems=$$("img.extra_data_toggle");}if(extraDataTR.getStyle("display")!='none'){toggleFrom="minus";toggleTo="plus";setDisplay="none";}}else{aElems=[elem];if(extraDataTR.getStyle("display")!='none'){toggleFrom="minus";toggleTo="plus";setDisplay="none";}}var _showExtraData=function(oElem){var toggleImage;var origLevel=level;extraDataTR=oElem.getParent().getParent().getNext();if(oElem.hasClass(toggleFrom)){oElem.removeClass(toggleFrom).addClass(toggleTo);extraDataTR.setStyle("display",setDisplay);do{if(toggleImage=extraDataTR.getElement("IMG.extra_data_toggle")){if(toggleImage.hasClass("minus")&&extraDataTR.hasClass("level"+(level+1))){level++;}}extraDataTR=extraDataTR.getNext();if(extraDataTR.hasClass("level"+(level-1))){level--;}if(setDisplay=="none"&&extraDataTR.hasClassRegex("level["+level+"-9]")){extraDataTR.setStyle("display",setDisplay);}else if(extraDataTR.hasClassRegex("level[0-"+(level+1)+"]")){extraDataTR.setStyle("display",setDisplay);}}while(extraDataTR.className!="extra_data_divider level"+(origLevel+1));}};Animation.oExtraData.iTimeoutID=window.setTimeout(function(){aElems.each(function(oElem){_showExtraData(oElem);});},250);};
//------------------------
Communication={toolTipDiv:null,toolTipTimer:null,toolTipIframe:null,debug_elem:null};try{if(window.top!=window){Communication.debug_elem=window.top.Communication.debug_elem;}}catch(e){}Communication.getQueryVariable=function(variable){var query=document.location.search.substring(1);var vars=query.split("&");for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");if(pair[0]==variable){return decodeURIComponent(pair[1].replace(/\+/g," "));}}return"";};Communication.getParamsFromQueryString=function(query){var vars=query.split("&");var obj={};var arrays={};for(var i=0;i<vars.length;i++){var pair=vars[i].split("=");var bracketIndex=null;if(pair&&pair.length>1){if(pair[0].indexOf("[]")!=-1){var name=pair[0].substring(0,pair[0].indexOf("[]"));if(typeof(obj[name])!="object"){obj[name]={};}obj[name][Object.count(obj[name])]=decodeURIComponent(pair[1].replace(/\+/g," "));}else if((bracketIndex=pair[0].indexOf("["))!=-1){var name=pair[0].substring(0,bracketIndex);var secondBracket=pair[0].indexOf("]");obj[name]=$merge(Communication.getParamsFromQueryString(pair[0].substring(bracketIndex+1,secondBracket)+pair[0].substring(secondBracket+1)+"="+pair[1]),$pick(obj[name],{}));}else if(pair[1]!=""){obj[pair[0]]=decodeURIComponent(pair[1].replace(/\+/g," "));}else if(pair[0]!=""){obj[pair[0]]="";}}}return obj;};Communication.getQueryStringFromParams=function(params,prefix){var query="";prefix=prefix||"";var first=true;for(var x in params){if(typeof(params[x])=="undefined"||params[x]===params.constructor.prototype[x]){continue;}var new_prefix=prefix+(prefix==""?x:"["+x+"]");if(!first){query+="&";}if(params[x]&&typeof(params[x])=="object"){query+=this.getQueryStringFromParams(params[x],new_prefix);}else if(params[x]!=null){query+=new_prefix+"="+encodeURIComponent(params[x]);}first=false;}return query;};Communication.createCookie=function(name,value,days){var expires="";if(typeof(days)!="undefined"){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));expires="; expires="+date.toGMTString();}document.cookie=name+"="+value+expires+"; path=/";};Communication.readCookie=function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' '){c=c.substring(1,c.length);}if(c.indexOf(nameEQ)==0){return c.substring(nameEQ.length,c.length);}}return null;};Communication.eraseCookie=function(name){this.createCookie(name,"",-1);};Communication.outputDebugInfo=function(info,use_alert){var debug_elem=Communication.debug_elem;var output=info;if(debug_elem&&!use_alert){if(debug_elem.nodeName=='DIV'){debug_elem.innerHTML="<pre>"+output+"</pre>";}else if(debug_elem.nodeName=='TEXTAREA'){debug_elem.value=output;}}else{alert(info);}};Communication.showToolTip=function(aParams){var toolTipSettings={"_default_":{"divPosition":"toolTip","displayTime":2500,"innerHTML":"","textStyle":"padding-left: 3px; padding-right: 3px; overflow: visible;","style":{"backgroundColor":"#FEFEC9","backgroundImage":"","backgroundRepeat":"","backgroundPosition":"","paddingLeft":"","border":"1px solid black","color":"black","visibility":"hidden","overflow":"hidden","display":"block","fontSize":"11px"}},"leftArrow":{"divPosition":"leftArrow","displayTime":0,"style":{"border":"","backgroundRepeat":"no-repeat","backgroundColor":"","backgroundImage":"url("+window.theme_image_dir+"backgrounds/tooltip_arrow_left.gif)"},"textStyle":"width: 220px; height: 182px; padding-left: 15px; overflow: auto;","innerHTML":"<img style=\"cursor: pointer; position: absolute; top: 2px; right: 22px;\" on"+"click=\"Communication.hideToolTip(); return false;\" border=\"0\" src=\""+window.theme_image_dir+"icons/close.gif\"/>"},helpInfo:{divPosition:"bottom left",displayTime:0,style:{backgroundColor:"#DDDDDD"}},formHelp:{divPosition:"top right",displayTime:500,style:{border:"",borderStyle:"solid",borderWidth:"1px",borderColor:"#7F9DB9 #7F9DB9 #B0D3CE #7F9DB9"}},blank:{divPosition:"toolTip",displayTime:0,style:{border:"",borderStyle:"solid",borderWidth:"0px",borderColor:"",backgroundColor:"",overflow:"visible"}}};var settings;if(toolTipSettings[aParams.type]){settings=Object.merge(toolTipSettings[aParams.type],toolTipSettings._default_);}else{settings=toolTipSettings._default_;}var scrollIntoView=aParams.scrollIntoView||settings.scrollIntoView;var displayTime=aParams.displayTime||settings.displayTime;settings.divPosition=aParams.divPosition||settings.divPosition;var headingWidth=aParams.headingWidth||"100%";var style=settings.style;var heading=aParams.heading;var elem=aParams.element;var events=aParams.events||{};elem=$(elem);var text=aParams.text;var mouseX=DOM.mouseX;if(this.toolTipDiv===null){this.toolTipDiv=new Element("DIV",{styles:{position:"absolute","z-index":"10005"}});this.toolTipIframe=document.createElement("IFRAME");this.toolTipIframe.src="javascript:false;";with(this.toolTipIframe.style){position="absolute";display="none";filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)';}document.body.appendChild(this.toolTipIframe);document.body.appendChild(this.toolTipDiv);}else if(this.toolTipDiv.style.display!='none'){Communication.hideToolTip();}for(var x in style){this.toolTipDiv.style[x]=style[x];}for(x in events){this.toolTipDiv[x]=new Function(events[x]);}var html="";if(heading){html+="<div style=\"width: "+headingWidth+"; text-align: center; background-color: #CCCCCC; text-weight: bold;\">"+heading+"</div>";}if(text){html+=settings.innerHTML+"<div style=\""+settings.textStyle+"\">"+text+"</div>";}this.toolTipDiv.innerHTML=html;if(aParams.dom_node){this.toolTipDiv.adopt(aParams.dom_node);}with(this.toolTipDiv.style){if(settings.divPosition.match(/leftArrow/)){if(Browser.Engine.trident4){this.toolTipDiv.style.backgroundAttachment="fixed";}top=(DOM.getElementPageY(elem)+Math.round(elem.offsetHeight/2))-23+"px";left=DOM.getElementPageX(elem)+elem.offsetWidth+"px";bottom="";right="";}else if(settings.divPosition.match(/toolTip/)){top=DOM.mouseY+22+(Browser.Engine.trident?document.documentElement.scrollTop:0)+"px";left=DOM.mouseX+"px";bottom="";right="";}else if(elem){var parents=[];var dad=$(elem);while(dad&&dad!=dad.ownerDocument.body){parents.push(dad);dad=dad.getParent();if(!dad){break;}}var elemCoord=elem.getCoordinates(parents);var toolTipCoord=this.toolTipDiv.getCoordinates();elemCoord.middle=elemCoord.top-Math.round(elemCoord.height/2);elemCoord.center=elemCoord.left-Math.round((toolTipCoord.width-elemCoord.width)/2);elemCoord.right=elemCoord.right-toolTipCoord.width;if(settings.divPosition.match(/inside/)){elemCoord.bottom=elemCoord.bottom-toolTipCoord.height;}else{elemCoord.top=elemCoord.top-toolTipCoord.height;}bottom="";right="";if(settings.divPosition.match(/top/)){top=elemCoord.top+"px";}else if(settings.divPosition.match(/middle/)){top=elemCoord.middle+"px";}else{top=elemCoord.bottom+"px";}if(settings.divPosition.match(/left/)){left=elemCoord.left+"px";}else if(settings.divPosition.match(/right/)){left=elemCoord.right+"px";}else{left=elemCoord.center+"px";}}visibility="visible";}if(Browser.Engine.trident){this.toolTipIframe.style.width=this.toolTipDiv.offsetWidth;this.toolTipIframe.style.height=this.toolTipDiv.offsetHeight;this.toolTipIframe.style.top=this.toolTipDiv.style.top;this.toolTipIframe.style.left=this.toolTipDiv.style.left;this.toolTipIframe.style.right=this.toolTipDiv.style.right;this.toolTipIframe.style.bottom=this.toolTipDiv.style.bottom;this.toolTipIframe.style.zIndex=this.toolTipDiv.style.zIndex-1;this.toolTipIframe.style.display="block";}if(scrollIntoView){this.toolTipDiv.scrollIntoView();document.body.scrollTop-=20;}if(this.toolTipTimer!=null){clearTimeout(this.toolTipTimer);}if(displayTime!=0){this.toolTipTimer=setTimeout("Communication.hideToolTip()",displayTime);}};Communication.hideToolTip=function(){if(this.toolTipDiv!=null){this.toolTipIframe.style.display="none";this.toolTipDiv.style.display="none";this.toolTipDiv.style.top=0;}};if(!window.XMLHttpRequest){window.XMLHttpRequest=function(){try{return new ActiveXObject('MSXML2.XMLHTTP.3.0');}catch(ex){return null;}};}AjaxRequestPool={};AjaxRequestIndices=[];AjaxRequestsAlive=0;MaxAjaxRequests=10;window.setInterval(function(){if(AjaxRequestIndices.length&&AjaxRequestsAlive<MaxAjaxRequests){var id=AjaxRequestIndices[0];AjaxRequestIndices.splice(0,1);if(AjaxRequestPool[id]){AjaxRequestPool[id]();delete AjaxRequestPool[id];++AjaxRequestsAlive;}}},200);AjaxRequest=new Class({Implements:[Chain,Events,Options],Extends:Request,options:{type:"request",returnType:"data",requestParams:{},delay:0},initialize:function(options){while((typeof(options.id)=='undefined'||options.id==null)||AjaxRequestPool[options.id]!=null){options.id="Request"+Math.random();}options.onComplete=this.onComplete;this.setOptions(options);this._initPostVars();this._initURL();this.parent(this.options.url,options);this.AjaxRequest.delay(this.options.delay,this);},_initPostVars:function(){if(typeof(this.options.postVars)=="string"){this.options.postVars=Communication.getParamsFromQueryString(this.options.postVars);}this.options.requestParams=this.options.postVars||{};},_initURL:function(){var getVars={};var queryStringMarker;if((queryStringMarker=this.options.url.indexOf("?"))!=-1){getVars=Communication.getParamsFromQueryString(this.options.url.substring(queryStringMarker+1));this.options.requestParams=Object.merge(this.options.requestParams,getVars);this.options.url=this.options.url.substring(0,queryStringMarker);}var hashMarker;if((hashMarker=this.options.url.indexOf("#"))!=-1){this.options.url=this.options.url.substring(0,hashMarker);}},getElapsedTime:function(){var elapsed=(new Date()).getTime()-this.startTime;return Math.floor(elapsed/1000);},AjaxRequest:function(){this.options.requestParams.AjaxRequest=1;var urlEncodedRequest=Communication.getQueryStringFromParams(this.options.requestParams);this.startTime=(new Date()).getTime();AjaxRequestPool[this.options.id]=function(){this.send(urlEncodedRequest);}.bind(this);AjaxRequestIndices[AjaxRequestIndices.length]=this.options.id;},onComplete:function(){--AjaxRequestsAlive;var content_type=this.xhr.getAllResponseHeaders().match(/Content-Type: ([^\r\n^;]+)/)[1];var xmlHttp=this.xhr;var oRetval={errors:{},warnings:{},notifications:[],debugs:[],data:null,request:this.options.requestParams};var aErrors=oRetval.errors;var aWarnings=oRetval.warnings;var aNotifications=oRetval.notifications;var aDebug=oRetval.debugs;if(window.debug&&window.phpEdDebuggingOn==false){Communication.eraseCookie("DBGSESSID");}if(this.options.returnType!="text"&&this.options.returnType!="xml"){if(xmlHttp.responseXML&&content_type=="text/xml"){try{var requestStatus=xmlHttp.responseXML.getElementsByTagName("requestStatus")[0].firstChild.nodeValue;oRetval.data=xmlHttp.responseXML.getElementsByTagName("responseData")[0].firstChild.nodeValue;var aNodes=xmlHttp.responseXML.getElementsByTagName("error");var strErrors="";for(var i=0;i<aNodes.length;++i){var strID=aNodes[i].getElementsByTagName("id")[0].firstChild.data;var strMessage=(aNodes[i].getElementsByTagName("message")[0].firstChild!=null?aNodes[i].getElementsByTagName("message")[0].firstChild.data:strID);aErrors[strID]=strMessage;strErrors+=strMessage;if(typeof(Tools)!='undefined'){Tools.postToolsEvent("error",strMessage);}}aNodes=xmlHttp.responseXML.getElementsByTagName("warning");var strWarnings="";for(i=0;i<aNodes.length;++i){var strID=aNodes[i].getElementsByTagName("id")[0].firstChild.data;var strMessage=aNodes[i].getElementsByTagName("message")[0].firstChild.data;aWarnings[strID]=strMessage;strWarnings+=strMessage;if(typeof(Tools)!='undefined'){Tools.postToolsEvent("warning",strMessage);}}aNodes=xmlHttp.responseXML.getElementsByTagName("notification");var strNotifications="";for(i=0;i<aNodes.length;++i){var strMessage=aNodes[i].firstChild.data;aNotifications[aNotifications.length]=strMessage;strNotifications+=strMessage;if(typeof(Tools)!='undefined'){Tools.postToolsEvent("notification",strMessage);}}aNodes=xmlHttp.responseXML.getElementsByTagName("debug");var strDebug="";for(i=0;i<aNodes.length;++i){if(typeof(aNodes[i].firstChild.data)!='undefined'){var strMessage=aNodes[i].firstChild.data;}else{var strMessage='<a href="'+aNodes[i].getElementsByTagName("fetch_uri")[0].textContent+'" target="_blank">'+aNodes[i].getElementsByTagName("asn")[0].getElementsByTagName("asn")[0].textContent+'</a>';}aDebug[aDebug.length]=strMessage;strDebug+=strMessage;if(typeof(Tools)!='undefined'){Tools.postToolsEvent("notification",strMessage);}}}catch(e){if(window.debug){Communication.outputDebugInfo(xmlHttp.responseText);}}}else if(content_type=="text/json"){var response=eval("("+xmlHttp.responseText+")");oRetval.data=response.data;oRetval.summary=response.summary;if(response.status!="Success"){aErrors[response.fault.code]=response.fault.reason;if(typeof(Tools)!='undefined'){Tools.postToolsEvent("error",response.fault.reason);}}oRetval.errors=aErrors;}else{data=xmlHttp.responseText;Communication.outputDebugInfo(data);}if(this.options.returnType=="html"||this.options.returnType=="data"){this.options.responseHandler(oRetval.data);}else{this.options.responseHandler(oRetval);}}else if(this.options.returnType=="text"){this.options.responseHandler(xmlHttp.responseText);}else if(this.options.returnType=="xml"){this.options.responseHandler(xmlHttp.responseXML);}},onFailure:function(oRetval){--AjaxRequestsAlive;if(typeof oRetval=="undefined"){oRetval={errors:{0:"Please try again."},warnings:{},notifications:[],debugs:[],data:{},request:this.options.requestParams,http_code:500};}if(this.options.type=="request"){if(this.options.returnType=="status"||typeof oRetval=="undefined"){alert("The server had a problem handling your request.  Please try again.");}this.options.responseHandler(oRetval);}this.parent(oRetval);}});APIRequest=new Class({Extends:AjaxRequest,initialize:function(options){if(options.service.substr(0,1)!="/"){options.service="/"+options.service;}var call_url='/api'+options.service+'.json';var post=options.parameters;options.url=call_url;options.postVars=post;options.responseHandler=options.handler;this.parent(options)}});if(!window.console){window.console={dir:function(obj){},log:function(obj){},warn:function(obj){},error:function(obj){},show:function(obj){},hide:function(obj){},clear:function(obj){}};}function debugObj(obj,bAlert){if(bAlert){alert("Debug object = {"+LINE_BREAK+_debugObj(obj,1)+"}");}else{if(DEBUG_TO_CONSOLE==true){try{console.dir(obj);}catch(error){alert(error.message);}}if(DEBUG_TO_PAGE==true){try{var output="Debug object = {"+LINE_BREAK+_debugObj(obj,1)+"}";$('debug_area').innerHTML=output;}catch(error){alert(error.message);}}}};function _debugObj(obj,level){level=level-0;var result="";if(level>MAX_RECURSION_LEVEL){return pad(level)+thing+" = RECURSION_LIMIT";}var o=null;for(thing in obj){try{if(obj[thing]===obj.constructor.prototype[thing]){continue;}}catch(error){}result+=pad(level)+thing+" = ";try{o=obj[thing];switch(typeof o){case"undefined":result+="[undefined]";break;case"function":result+="[Function]";break;case"object":if(o==null){result+="[null]";}else{result+="{"+LINE_BREAK+_debugObj(o,level+1)+pad(level)+"}";}break;default:result+=o.toString();break;}result+=LINE_BREAK;}catch(error){result+=error;}}return result;};
//------------------------
DOM={mouseX:50,mouseY:100};DOM.processElementJavascript=function(elem){elem=$(elem);if(!elem){return;}var d=elem.getElementsByTagName("script");var d_copy=$A(d);var length=d.length;for(var x=0;x<length;x++){with(window){try{eval(d[x].text);}catch(e){if(!document.all){var line=e.lineNumber-21;var codeLines=d[x].text.split('\n');var code="";for(var i=line-5;i<=line;++i)if(i>=0){if(i==line)code+="ERROR ==>"+codeLines[i]+"<==\n";else code+=codeLines[i]+"\n";}var message="There was a problem processing the javascript:\n";message+="Error Type: "+e.name+"\n";message+="Error Message: "+e.message+"\n";message+="Line Number: "+e.lineNumber+"\n";message+="Code:\n"+code;alert(message);}else{var message="There was a problem processing the javascript:\n";message+="Error Type: "+e.name+"\n";message+="Error Message: "+e.message+"\n";message+="Code:\n"+d[x].text;alert(message);}return false;}}d=$A(d_copy);}};DOM.get_form_data=function(elem,omit_empty_values){elem=$(elem);if(!elem||typeof(elem)=="undefined"){return"";}var submission_string="";var inputs=elem.getElements("input");var ignoreElems=elem.getElements("*[ignore=true]");ignoreElems.each(function(element){if(!["input","select","textarea"].contains(element.tagName)){this.extend(element.getElements("input, select, textarea"));}},ignoreElems);for(var i=0;i<inputs.length;++i){if(inputs[i].disabled||(inputs[i].getAttribute("ignore")&&inputs[i].getAttribute("ignore")!="false")||(ignoreElems.contains(inputs[i]))){continue;}if(inputs[i].getAttribute('type')=="text"||inputs[i].getAttribute('type')=="hidden"||inputs[i].getAttribute('type')==""||inputs[i].getAttribute('type')==null||inputs[i].getAttribute('type')=="password"){if(inputs[i].getAttribute('vtype')=="array"){var value_array=inputs[i].value.split(",");for(var j=0;j<value_array.length;++j){submission_string+=inputs[i].name+"[]="+encodeURIComponent(value_array[j])+"&";}}else{submission_string+=inputs[i].name+"="+encodeURIComponent(inputs[i].value)+"&";}}else if(inputs[i].getAttribute('type')=="radio"&&inputs[i].checked){if(inputs[i].value!="unset"){submission_string+=inputs[i].name+"="+encodeURIComponent(inputs[i].value)+"&";}}else if(inputs[i].getAttribute('type')=="checkbox"&&inputs[i].checked){if(inputs[i].value!="unset"){submission_string+=inputs[i].name+"="+encodeURIComponent(inputs[i].value)+"&";}}}inputs=elem.getElementsByTagName("TEXTAREA");for(var i=0;i<inputs.length;++i){if(inputs[i].disabled||inputs[i].getAttribute("ignore")||(ignoreElems.contains(inputs[i]))){continue;}submission_string+=inputs[i].name+"="+encodeURIComponent(inputs[i].value)+"&";}inputs=elem.getElements("SELECT");inputs.each(function(input){var bContinue=false;if(input.disabled||input.getProperty("ignore")||(ignoreElems.contains(input))){bContinue=true;}var multiple=input.getProperty("multiple");var getall=input.getProperty("getall");if((input.selectedIndex==null||input.selectedIndex==-1)&&!getall){bContinue=true;}if(!bContinue){if(multiple!=null&&multiple!=""&&multiple!=false){for(var j=0;j<input.length;++j){if(input.options[j].selected||getall){var value=input.options[j].value;if(value==""){value=input.options[j].text;}var param=input.options[j].getAttribute("parameter");if(param){var parts=value.split(":");var param_id=parts[0];value=parts[1];submission_string+=input.name+"["+param+"]["+param_id+"]="+encodeURIComponent(value)+"&";}else{submission_string+=input.name+"[]="+encodeURIComponent(value)+"&";}}}}else{var value=input.options[input.selectedIndex].value;if(value==""){value=input.options[input.selectedIndex].text;}if(value!="unset"&&value!="Please Select"){submission_string+=input.name+"="+encodeURIComponent(value)+"&";}}}});if(omit_empty_values==true){var vals=submission_string.split("&");var new_submission_string="";for(var i=vals.length-1;i>=0;--i){var parts=vals[i].split("=");if(parts[1]!=""&&typeof(parts[1])!=="undefined"){new_submission_string+=parts[0]+"="+parts[1]+"&";}}submission_string=new_submission_string;}return submission_string;};DOM.getEventHandler=function(elem,event){elem=$(elem);if(!elem){return"";}var eventCode=elem.getAttribute("on"+event);var eventHandler;if(typeof(eventCode)=="string"){if(document.all&&eventCode!=null){eventCode=eventCode.toString().replace(/^([^\{]+)\{/,'').replace(/\}$/,'');}eventHandler=new Function(eventCode);}else if(typeof(elem["on"+event])=="function"){eventHandler=elem["on"+event];}return eventHandler;};DOM.triggerEvent=function(elem,event){elem=$(elem);var eventHandler=this.getEventHandler(elem,event),e;if(eventHandler!=null){e={type:event};eventHandler.call(elem,e);}};DOM.attachEventHandler=function(srcElement,eventName,handlerObject,handlerMethodName){if(srcElement[eventName+'__handlers__']==null){srcElement[eventName+'__handlers__']={};if(srcElement[eventName]!=null){srcElement[eventName+'__handlers__'][srcElement[eventName]]=srcElement[eventName];}srcElement[eventName]=function(e){var handlers=this[eventName+"__handlers__"],x;for(x in handlers){if(handlers[x](e)===false){return false;}}};}srcElement[eventName+'__handlers__'][handlerObject[handlerMethodName]]=function(e){if(Browser.Engine.trident&&!e){e=window.event;try{e.pageX=e.clientX+document.body.scrollLeft;e.pageY=e.clientY+document.body.scrollTop;e.target=e.srcElement;e.stopPropagation=new Function('this.cancelBubble = true');e.preventDefault=new Function('this.returnValue = false');}catch(exception){}}if(typeof(handlerMethodName)=='undefined'){return handlerObject.apply(srcElement,[e]);}else{return handlerObject[handlerMethodName](e);}};};DOM.detachEventHandler=function(srcElement,eventName,handlerObject,handlerMethodName){if(srcElement[eventName+'__handlers__']!=null&&srcElement[eventName+'__handlers__'][handlerObject[handlerMethodName]]!=null){delete srcElement[eventName+'__handlers__'][handlerObject[handlerMethodName]];}};DOM.insertRowToTable=function(tableElement,rowElement){tableElement=this.getTableBodyElement(tableElement);tableElement.insertBefore(rowElement,tableElement.firstChild);};DOM.appendRowToTable=function(tableElement,rowElement){tableElement=this.getTableBodyElement(tableElement);tableElement.appendChild(rowElement);};DOM.deleteTableRow=function(tableElement,rowElement){tableElement=this.getTableBodyElement(tableElement);tableElement.removeChild(rowElement);};DOM.countTableRows=function(tableElement){tableElement=this.getTableBodyElement(tableElement);return tableElement.rows.length;};DOM.getTableBodyElement=function(tableElement){tableElement=$(tableElement);var tableBodyElement=tableElement;if(tableElement.tBodies&&tableElement.tBodies.length>0){tableBodyElement=tableElement.tBodies[tableElement.tBodies.length-1];}return tableBodyElement;};DOM.emptyTable=function(tableElement){tableElement=this.getTableBodyElement(tableElement);if(tableElement.rows!=null){while(tableElement.rows.length){tableElement.rows[tableElement.rows.length-1].parentNode.removeChild(tableElement.rows[tableElement.rows.length-1]);}}};DOM.delayedFocus=function(element){element=$(element);if(!element){return false;}window.setTimeout(function(){element.focus();},50);};DOM.getElementPageX=function(element){element=$(element);if(!element){return null;}var x=0;while(element){if(typeof(element.offsetLeft)!='undefined'){x+=element.offsetLeft;}element=(typeof(element.offsetParent)!='undefined')?element.offsetParent:null;}return x;};DOM.getElementPageY=function(element){element=$(element);if(!element){return null;}var y=0;while(element){if(typeof(element.offsetTop)!='undefined'){y+=element.offsetTop;}element=(typeof(element.offsetParent)!='undefined')?element.offsetParent:null;}return y;};DOM.isVisible=function(element){element=$(element);if(!element){return false;}var x,y,w,h,e_x,e_y,e_w,e_h;if(self.innerWidth){w=self.innerWidth;h=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientWidth){w=document.documentElement.clientWidth;h=document.documentElement.clientHeight;}else if(document.body){w=document.body.clientWidth;h=document.body.clientHeight;}if(self.pageXOffset){x=self.pageXOffset;y=self.pageYOffset;}else if(document.documentElement&&document.documentElement.clientWidth){x=document.documentElement.scrollLeft;y=document.documentElement.scrollTop;}else if(document.body){x=document.body.scrollLeft;y=document.body.scrollTop;}e_x=DOM.getElementPageX(element);e_y=DOM.getElementPageY(element);e_w=element.offsetWidth;e_h=element.offsetHeight;if(y<(e_y+e_h)&&(y+h)>e_y&&x<(e_x+e_w)&&(x+w)>e_x){return true;}else{return false;}};DOM.updateMouseCoordinates=function(event){try{if(typeof(event.pageX)!='undefined'){this.mouseX=event.pageX;this.mouseY=event.pageY;}else{this.mouseX=event.clientX;this.mouseX+=(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);this.mouseY=event.clientY;this.mouseY+=(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop);}}catch(e){}};DOM.attachEventHandler(document,"onmousemove",DOM,"updateMouseCoordinates");DOM.toggleDisplay=function(element,bDisplay){element=$(element);if(!element){return null;}if(bDisplay!=null){if(bDisplay){element.style.display='';return'';}else{element.style.display='none';return'none';}}else{if(element.style.display=='none'){element.style.display='';return'';}else{element.style.display='none';return'none';}}};DOM.setOpacity=function(obj,opacity){obj=$(obj);obj.style.filter="alpha(opacity:"+opacity+")";obj.style.KHTMLOpacity=opacity/100;obj.style.MozOpacity=opacity/100;obj.style.opacity=opacity/100;};DOM.createElement=function(tagName,attrs,style,text){var e=document.createElement(tagName);if(attrs){for(key in attrs){if(key=='class'){e.className=attrs[key];}else if(key=='colspan'){e.colSpan=attrs[key];}else if(key=='id'){e.id=attrs[key];}else if(typeof(attrs[key])=='function'){e[key]=attrs[key];}else{e.setAttribute(key,attrs[key]);}}}if(style){for(key in style){e.style[key]=style[key];}}if(text){e.appendChild(document.createTextNode(text));}return e;};DOM.getComputedStyle=function(element,style){element=$(element);var nstyle=style;if(style.toLowerCase().indexOf('float')!=-1){nstyle=(document.all)?'styleFloat':'cssFloat';}var value=element.style[nstyle.camelCase()];if(!value){if(document.defaultView&&document.defaultView.getComputedStyle&&document.defaultView.getComputedStyle(element,"")){value=document.defaultView.getComputedStyle(element,"").getPropertyValue(style);}else if(element.currentStyle){value=element.currentStyle[nstyle.camelCase()];}}if(style.toLowerCase().indexOf('float')!=-1){value=(value=='')?'none':value;}if(window.opera&&['left','top','right','bottom'].include(style)){value=(Element.getStyle(element,'position')=='static')?'auto':value;}value=(value=='auto')?null:value;return value;};DOM.associatedContentZIndex=200;DOM.placeAssociatedContent=function(aParams){var element=(aParams.element=="mouse"?"mouse":$(aParams.element)),d,iframeShim;var side=aParams.side;var align=aParams.alignment;var location={x:null,y:null,w:null,h:null};var anchor=document.body;var anchor_h=((Browser.Engine.trident)?document.documentElement.clientHeight:window.innerHeight);var anchor_w=document.body.scrollWidth;if(element=="mouse"){location.x=DOM.mouseX;location.y=DOM.mouseY;location.w=11;location.h=19;}else if(Browser.Engine.trident){location.x=DOM.getElementPageX(element)-10;location.y=DOM.getElementPageY(element)-10;location.w=element.offsetWidth;location.h=element.offsetHeight;anchor_h=location.h;anchor_w=location.w;anchor=DOM.createElement("div",false,{position:"absolute",height:location.h+"px",width:location.w+"px",padding:"0px",zIndex:++DOM.associatedContentZIndex});document.body.insertBefore(anchor,document.body.firstChild);}else{location.w=element.offsetWidth;location.h=element.offsetHeight;var valign=DOM.getComputedStyle(element.parentNode,"vertical-align");var talign=DOM.getComputedStyle(element.parentNode,"text-align");var cssFloat=DOM.getComputedStyle(element,"float");var left=DOM.getComputedStyle(element,"left");var right=DOM.getComputedStyle(element,"right");var bottomAnchor=DOM.createElement("div",false,{position:"absolute",height:"1px",width:"0px",padding:"0px",marginRight:"auto",marginLeft:"auto"});anchor=DOM.createElement("div",false,{position:"relative",height:location.h+"px",width:location.w+"px",padding:"0px",zIndex:++DOM.associatedContentZIndex});anchor_h=location.h;anchor_w=location.w;element.parentNode.insertBefore(bottomAnchor,element.parentNode.firstChild);bottomAnchor.appendChild(anchor);if(valign=="middle"){location.y=0;}else{location.y=element.offsetTop-DOM.getComputedStyle(element.parentNode,"padding-top").toInt();}if(cssFloat!="none"){bottomAnchor.style.position="";bottomAnchor.style.styleFloat=cssFloat;bottomAnchor.style.cssFloat=cssFloat;location.x=-location.w;}else{location.x=element.offsetLeft-DOM.getComputedStyle(element.parentNode,"padding-left").toInt();}}if(Browser.Engine.trident){iframeShim=DOM.createElement("iframe",{allowtransparency:"true",frameborder:"0"},{position:"absolute",height:"0px",width:"0px",opacity:"0",MozOpacity:"0",filter:"progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)"});iframeShim.src="javascript:false;";anchor.appendChild(iframeShim);}if(typeof(aParams.content)=="string"){d=document.createElement("div");d.innerHTML=aParams.content;anchor.appendChild(d);}else{anchor.appendChild(aParams.content);}var content=anchor.lastChild;content.style.position="absolute";if(side=="top"||side=="bottom"){if(side=="top"){content.style.bottom=(anchor_h-location.y)+"px";}else{content.style.top=(anchor_h+location.h+1)+"px";}if(align=="leftEdge"){content.style.left=location.x+"px";}else if(align=="leftCenter"){content.style.left=(location.x+location.w/2)+"px";}else if(align=="center"){content.style.left=(location.x+location.w/2-content.offsetWidth/2)+"px";}else if(align=="rightEdge"){content.style.right=(-location.x)+"px";}else if(align=="rightCenter"){content.style.right=(location.w/2-location.x)+"px";}}else if(side=="left"||side=="right"){if(side=="left"){content.style.right=(-location.x+location.w)+"px";}else{content.style.left=(location.x+location.w)+"px";}if(align=="topEdge"){content.style.top=location.y+"px";}else if(align=="topMiddle"){content.style.top=(location.y+location.h/2)+"px";}else if(align=="middle"){content.style.top=(location.y+location.h/2-content.offsetHeight/2)+"px";}else if(align=="bottomEdge"){content.style.bottom=(-location.y)+"px";}else if(align=="bottomMiddle"){content.style.bottom=(location.h/2-location.y)+"px";}}if(Browser.Engine.trident){iframeShim.style.width=content.offsetWidth+"px";iframeShim.style.height=content.offsetHeight+"px";iframeShim.style.left=content.style.left;iframeShim.style.right=content.style.right;iframeShim.style.top=content.style.top;iframeShim.style.bottom=content.style.bottom;}return anchor;};DOM.cloneTemplate=function(strTemplateId,strOptionalNewId){var result=null;if(strTemplateId&&strTemplateId!=null&&strTemplateId!=''){var nTemplate=$(strTemplateId);result=nTemplate.clone();if(strOptionalNewId&&strOptionalNewId!=null&&strOptionalNewId!=''){result.setAttribute('id',strOptionalNewId);}}else{alert("Error: DOM.cloneTemplate("+strTemplateId+")");}return result;};DOM.packTemplateWithData=function(nTemplate,aData){if(nTemplate&&aData&&nTemplate!=null&&aData!=null){var containerList=nTemplate.getElements("*.insertionPoint");var numInList=containerList.length;for(var x=0;x<numInList;x++){var container=containerList[x];var data=aData[x]||'[no-data]';var textNode=document.createTextNode(data);container.appendChild(textNode);}}else{alert("Error: DOM.packTemplateWithData("+nTemplate+", "+aData+")");}return nTemplate;};DOM.packTemplateWithNodes=function(nTemplate,aNodes){if(nTemplate&&aNodes&&nTemplate!=null&&aNodes!=null){var containerList=nTemplate.getElements("*.insertionPoint");var numInList=containerList.length;for(var x=0;x<numInList;x++){var container=containerList[x];var nodeList=aNodes[x]||null;if(nodeList!=null){var numNodes=nodeList.length;for(var y=0;y<numNodes;y++){container.appendChild(nodeList[y]);}}}}else{alert("Error: DOM.packTemplateWithNodes("+nTemplate+", "+aNodes+")");}return nTemplate;};DOM.packTemplateWithAllNodes=function(nTemplate,aNodes){if(nTemplate&&aNodes&&nTemplate!=null&&aNodes!=null){var containerList=$(nTemplate).getElements("*.insertionPoint");var numInList=containerList.length;var numNodes=aNodes.length;for(var x=0;x<numInList;x++){var container=containerList[x];for(var y=0;y<numNodes;y++){var node=aNodes[y]||null;if(node!=null){container.appendChild(node);}}}}else{alert("Error: DOM.packTemplateWithAllNodes("+nTemplate+", "+aNodes+")");}return nTemplate;};
//------------------------
window.strNullToken='<![[NULL]]>';window.strNotNullToken='<![[!NULL]]>';function $N(el){var retval=false;if(typeof(el)=='string'){retval=document.getElementsByName(el);}else if($type(el)=="element"){retval=[el];}else{retval=el;}if(!retval||retval.length===0){retval=$(el);}else{$each(retval,function(element){element=$(element);});if(retval.length==1){retval=retval[0];}}return retval;}String.prototype.escapeHTML=function(use_nbsps){var chr=this.toString();var encChr='';var storeUniQty=0;var storeUniChar=[];for(var x=0;x<chr.length;x++){encChr+="&#"+chr.charCodeAt(x)+";";if(parseInt(chr.charCodeAt(x))>255){storeUniChar[storeUniQty]=chr.charAt(x);storeUniQty++;}}return encChr;};String.prototype.convertMSWordCharacters=function(){var string=this.toString();string=string.replace(eval("/"+String.fromCharCode(8220)+"/g"),"\"");string=string.replace(eval("/"+String.fromCharCode(8221)+"/g"),"\"");string=string.replace(eval("/"+String.fromCharCode(8222)+"/g"),"\"");string=string.replace(eval("/"+String.fromCharCode(8218)+"/g"),"'");string=string.replace(eval("/"+String.fromCharCode(8216)+"/g"),"'");string=string.replace(eval("/"+String.fromCharCode(8217)+"/g"),"'");string=string.replace(eval("/"+String.fromCharCode(8226)+"/g"),"*");string=string.replace(eval("/"+String.fromCharCode(8211)+"/g"),"-");string=string.replace(eval("/"+String.fromCharCode(8212)+"/g"),"-");return string;};String.prototype.formatAsMoney=Number.prototype.format=function(decimals,dec_point,thousands_sep){var n=!isFinite(+this)?0:+this,prec=!isFinite(+decimals)?0:Math.abs(decimals),sep=(typeof thousands_sep==='undefined')?',':thousands_sep,dec=(typeof dec_point==='undefined')?'.':dec_point,s='',toFixedFix=function(n,prec){var k=Math.pow(10,prec);return''+Math.round(n*k)/k;};s=(prec?toFixedFix(n,prec):''+Math.round(n)).split('.');if(s[0].length>3){s[0]=s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,sep);}if((s[1]||'').length<prec){s[1]=s[1]||'';s[1]+=new Array(prec-s[1].length+1).join('0');}return s.join(dec);};String.prototype.strip_tags=function(allowed_tags){var str=this,key='',allowed=false;var matches=[];var allowed_array=[];var allowed_tag='';var i=0;var k='';var html='';var replacer=function(search,replace,str){return str.split(search).join(replace);};if(allowed_tags){allowed_array=allowed_tags.match(/([a-zA-Z0-9]+)/gi);}str+='';matches=str.match(/(<\/?[\S][^>]*>)/gi);for(key in matches){if(isNaN(key)){continue;}html=matches[key].toString();allowed=false;for(k in allowed_array){allowed_tag=allowed_array[k];i=-1;if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+'>');}if(i!=0){i=html.toLowerCase().indexOf('<'+allowed_tag+' ');}if(i!=0){i=html.toLowerCase().indexOf('</'+allowed_tag);}if(i==0){allowed=true;break;}}if(!allowed){str=replacer(html,"",str);}}return str;};Date.prototype.toMySQLString=function(bIncludeTimeString){if(typeof(bIncludeTimeString)=='undefined'||bIncludeTimeString==null||bIncludeTimeString!==false)bIncludeTimeString=true;return this.getUTCFullYear()+'-'+(this.getUTCMonth()+1)+'-'+this.getUTCDate()+(bIncludeTimeString?" "+this.getUTCHours()+":"+this.getUTCMinutes()+":"+this.getUTCSeconds():"");};Object.count=function(theObj){var i=0,j;if(theObj&&typeof(theObj)=="object"&&theObj.constructor==Array){return theObj.length;}else{for(j in theObj){if(theObj[j]===Object.prototype[j]){continue;}++i;}return i;}};Object.dump=function(theObj,use_alert,depth,maxdepth){var output="";var props=[];if(typeof(depth)=="undefined"){depth=0;}if(typeof(maxdepth)=="undefined"){maxdepth=5;}if(depth>maxdepth){return"";}var padding="";for(var i=0;i<depth;++i){padding+="    ";}for(i in theObj){if(typeof(theObj[i])=="undefined"||theObj[i]===Object.prototype[i]||i=='prototype'){continue;}props.push(i);}props.sort();for(i=0;i<props.length;i++){if(typeof(props[i])=="undefined"||props[i]===Object.prototype[i]){continue;}output+=padding+props[i];try{if(typeof(theObj[props[i]])=="string"){output+=" => "+theObj[props[i]]+"\n";}else{output+=": (obj)\n"+padding+"{\n"+Object.dump(theObj[props[i]],use_alert,depth+1,maxdepth)+padding+"}\n";}}catch(e){}}if(depth===0){if(Communication&&Communication.outputDebugInfo){Communication.outputDebugInfo(output,use_alert);}else{alert(output);}}else{return output;}};Object.merge=function(objA,objB){return $merge(objB,objA);};Object.copy=function(obj,copyflag){var retobj={};for(var i in obj){if(obj[i]===Object.prototype[i]){continue;}if(typeof(obj[i])==="object"&&copyflag!==false&&obj[i]!==null){retobj[i]=Object.copy(obj[i]);}else{retobj[i]=obj[i];}}return retobj;};Element.implement({hasClassRegex:function(className){return this.className.test('(?:^|\\s)'+className+'(?:\\s|$)');}});function setUTCTimeZoneCookie(){var rightNow=new Date();var date1=new Date(rightNow.getFullYear(),0,1,0,0,0,0);var date2=new Date(rightNow.getFullYear(),6,1,0,0,0,0);var temp=date1.toGMTString();var date3=new Date(temp.substring(0,temp.lastIndexOf(" ")-1));temp=date2.toGMTString();var date4=new Date(temp.substring(0,temp.lastIndexOf(" ")-1));var hoursDiffStdTime=(date1-date3)/(1000*60*60);var hoursDiffDaylightTime=(date2-date4)/(1000*60*60);if(hoursDiffStdTime==hoursDiffDaylightTime){Cookie.write("dst","false",{duration:false});}else{Cookie.write("dst","true",{duration:false});}var aTZ=(hoursDiffStdTime.toString()).split(".");if(typeof(aTZ[1])=='undefined'){aTZ[1]=0;}var utc_timezone=(100*aTZ[0])+(60*aTZ[1])+"";if(utc_timezone.length<5&&utc_timezone!="0000"){aTZ=utc_timezone.split("");aTZ.splice(1,0,"0");while(aTZ.length<4)aTZ.push("0");utc_timezone=aTZ.join("");}Cookie.write("utc_timezone",utc_timezone,{duration:false});};function enumCellIndexes(table){var tr,td,iRow,iCell;for(iRow=0;table&&iRow<table.rows.length;iRow++){tr=table.rows[iRow];for(iCell=0;iCell<tr.cells.length;iCell++){td=tr.cells[iCell];$(td).setProperty("_cellIndex",iCell);}}}function getAbsoluteIndex(t,relIndex){var countnotvisible=0;var countvisible=0;for(i=0;i<t.cells.length;i++){cell=t.cells(i);if(cell.style.display=='none')countnotvisible++;else countvisible++;if(countvisible>relIndex)return i;}return i;}function resizeDimensions(width,height,max){if(max==null||max=='')max=75;width=parseInt(width);height=parseInt(height);if(width>=height&&width>max){height=max*height/width;width=max;}else if(height>=width&&height>max){width=max*width/height;height=max;}return{width:Math.floor(width),height:Math.floor(height)};};Element.implement({resizeDimensions:function(options){options=$merge({max:75},options);var oDim=this.getDimensions(),oNewDim={};width=parseInt(oDim.width);height=parseInt(oDim.height);if(width>=height&&width>options.max){oNewDim.height=Math.floor(options.max*height/width);oNewDim.width=options.max;}else if(height>=width&&height>options.max){oNewDim.width=Math.floor(options.max*width/height);oNewDim.height=options.max;}this.setStyles(oNewDim);},getDimensions:function(options){options=$merge({computeSize:false},options);var dim={};function getSize(el,options){if(options.computeSize)dim=el.getComputedSize(options);else{dim.width=el.getSize().x;dim.height=el.getSize().y;}return dim;}try{dim=getSize(this,options);}catch(e){}if(this.getStyle('display')=='none'||this.offsetWidth==0){clone=this.clone();clone.id=null;clone.setStyles({visibility:'hidden',display:'block',position:'absolute'});clone.injectInside(document.body);dim=getSize(clone,options);clone.remove();delete clone;}return $merge(dim,{x:dim.width,y:dim.height});},getComputedSize:function(options){options=$merge({styles:['padding','border'],plains:{height:['top','bottom'],width:['left','right']},mode:'both'},options);var size={width:0,height:0};switch(options.mode){case'vertical':delete size.width;delete options.plains.width;break;case'horizontal':delete size.height;delete options.plains.height;break;}var getStyles=[];$each(options.plains,function(plain,key){plain.each(function(edge){options.styles.each(function(style){getStyles.push((style=="border")?style+'-'+edge+'-'+'width':style+'-'+edge);});});});var styles=this.getStyles.apply(this,getStyles);var subtracted=[];$each(options.plains,function(plain,key){size['total'+key.capitalize()]=0;size['computed'+key.capitalize()]=0;plain.each(function(edge){size['computed'+edge.capitalize()]=0;getStyles.each(function(style,i){if(style.test(edge)){styles[style]=styles[style].toInt();if(isNaN(styles[style]))styles[style]=0;size['total'+key.capitalize()]=size['total'+key.capitalize()]+styles[style];size['computed'+edge.capitalize()]=size['computed'+edge.capitalize()]+styles[style];}if(style.test(edge)&&key!=style&&(style.test('border')||style.test('padding'))&&!subtracted.test(style)){subtracted.push(style);size['computed'+key.capitalize()]=size['computed'+key.capitalize()]-styles[style];}});});});if($chk(size.width)){size.width=size.width+this.offsetWidth+size.computedWidth;size.totalWidth=size.width+size.totalWidth;delete size.computedWidth;}if($chk(size.height)){size.height=size.height+this.offsetHeight+size.computedHeight;size.totalHeight=size.height+size.totalHeight;delete size.computedHeight;}return $merge(styles,size);}});var FastDOM=new Class({element:null,parent:null,initialize:function(object){return this.evaluate(object);},evaluate:function(object){var parent=new Element(object[0]);var current=parent;!$defined(this.element)?this.element=this.parent=parent:this.parent.adopt(parent);for(var i=1;i<object.length;i++){this.parent=current;if($type(object[i])==="string")parent.set("html",object[i]);if($type(object[i])==="object")parent.set(object[i]);if($type(object[i])==="array")this.evaluate(object[i]);}return this.element;}});function fillTemplateUsingIDs(mParams,strPrefix){if(!['object','array'].contains($type(mParams)))return;$each(mParams,function(mParam,strKey){var fillElem=$(strPrefix+strKey);if(fillElem&&fillElem.tagName){switch(fillElem.getProperty("data_type")){case"bool":{if(mParam==1){mParam="Yes";}else{mParam="No";}break;}default:{break;}}switch(fillElem.tagName.toLowerCase()){case"a":{fillElem.setProperties({"href":mParam});if(!fillElem.getProperty('preserve_innerhtml')||fillElem.getProperty('preserve_innerhtml')=="false"){fillElem.set("html",mParam)}break;}case"ul":{fillElem.empty();$each(mParam,function(mLI,strKey){var bContinue=true;if(js=fillElem.getProperty("js")){eval(js);}if(bContinue){fillElem.adopt(new Element("LI").set("html",mLI));}});break;}case"img":{if(js=fillElem.getProperty("js")){eval(js);}fillElem.src=mParam;break;}case"input":{if(js=fillElem.getProperty("js")){eval(js);}switch(fillElem.type){case"hidden":case"text":{fillElem.value=mParam;break;}}break;}case"div":case"span":default:{if(js=fillElem.getProperty("js")){eval(js);}fillElem.set("html",mParam);break;}}}var strNextPrefix=strPrefix+strKey+"_";fillTemplateUsingIDs(mParam,strNextPrefix);});return;};Element.Properties.name={get:function(){if(Browser.Engine.trident&&typeof this.name!='undefined'){return this.name;}else{return this.getProperty("name");}},set:function(strName){if(Browser.Engine.trident){this.name=strName;}this.setProperty("name",strName);}};Date.rangeToArray=function(strDateRange){var aRetval=[],oDate=new Date(),iQuarterHour;switch(strDateRange){case"last_3_quarter_hours":{aRetval.unshift(oDate.format("Y-m-d H:i:s"));oDate.setTime(oDate.getTime()-(45000*60));iQuarterHour=parseInt(oDate.format("i"),10);aRetval.unshift(oDate.format("Y-m-d H:"+(iQuarterHour<15?"0":"")+(iQuarterHour-(iQuarterHour%15))+":00"));break;}case"last_45_minutes":{aRetval.unshift(oDate.format("Y-m-d H:i:s"));oDate.setTime(oDate.getTime()-(45000*60));aRetval.unshift(oDate.format("Y-m-d H:i:s"));break;}case"today":{aRetval.push(oDate.format("Y-m-d 00:00:00"));aRetval.push(oDate.format("Y-m-d H:i:s"));break;}case"yesterday":{oDate.setTime(oDate.getTime()-86400000);aRetval.push(oDate.format("Y-m-d 00:00:00"));aRetval.push(oDate.format("Y-m-d 23:59:59"));break;}case"last_7_days":{oDate.setTime(oDate.getTime()-604800000);aRetval.push(oDate.format("Y-m-d 00:00:00"));oDate.setTime(oDate.getTime()+518400000);aRetval.push(oDate.format("Y-m-d 23:59:59"));break;}case"month_to_date":{oDate.setTime(oDate.getTime()-604800000);aRetval.push(oDate.format("Y-m-d 00:00:00"));oDate.setTime(oDate.getTime()+518400000);aRetval.push(oDate.format("Y-m-d 23:59:59"));break;}case"last_month":{oDate.setTime(oDate.getTime()-604800000);aRetval.push(oDate.format("Y-m-d 00:00:00"));oDate.setTime(oDate.getTime()+518400000);aRetval.push(oDate.format("Y-m-d 23:59:59"));break;}default:{if(strDateRange.indexOf("|")!=-1){aRetval=strDateRange.split("|");if(aRetval[0].indexOf(":")==-1){aRetval[0]+=" 00:00:00";}if(aRetval[1].indexOf(":")==-1){if(aRetval[1]==oDate.format("Y-m-d")){aRetval[1]+=" "+oDate.format("H:i:s");}else{aRetval[1]+=" 23:59:59";}}}}}return aRetval;};function booyah_datetime_enum_range(strFromDate,strToDate,strResolution,iResolutionFactor,bPadResult){strResolution=strResolution||"day";iResolutionFactor=iResolutionFactor||1;bPadResult=$pick(bPadResult,true);var mRetval=[],oFromDate,iFromDate,oToDate,iToDate,bDesc=true,iTmpDate,iYearFactor,iMonthFactor,iDayFactor,iHourFactor,iMinFactor,iSecFactor,strDateFormat="",iDateTime,iIdx,iSampling;if(strToDate=="date_range"){var aDateRange=Date.rangeToArray(strFromDate);strFromDate=aDateRange[0];strToDate=aDateRange[1];}iFromDate=Date.parseMySQL(strFromDate);iToDate=Date.parseMySQL(strToDate);bDesc=iToDate<iFromDate;if(bDesc){iTmpDate=iToDate;iToDate=iFromDate;iFromDate=iTmpDate;}oFromDate=new Date(iFromDate);oToDate=new Date(iToDate);iYear=parseInt(oFromDate.getUTCFullYear(),10);iYearFactor=0;iMonth=parseInt(oFromDate.getUTCMonth(),10)+1;iMonthFactor=0;iDay=parseInt(oFromDate.getUTCDate(),10);iDayFactor=0;iHour=0;iHourFactor=0;iMin=0;iMinFactor=0;iSec=0;iSecFactor=0;iSampling=booyah_datetime_calc_sampling(strFromDate,strToDate,strResolution,iResolutionFactor);switch(strResolution.toLowerCase()){case("year"):{iYearFactor=iResolutionFactor;iDay=1;iMonth=1;strDateFormat="Y";break;}case("month"):{iMonthFactor=iResolutionFactor;iDay=1;strDateFormat="Y-m";break;}case("hour"):{iHour=parseInt(oFromDate.format("H"),10);iHourFactor=iResolutionFactor;strDateFormat="Y-m-d H"+(bPadResult?":00:00":"");break;}case("min"):{iHour=parseInt(oFromDate.format("H"),10);iMin=parseInt(oFromDate.format("i"),10);iMinFactor=iResolutionFactor;strDateFormat="Y-m-d H:i"+(bPadResult?":00":"");break;}case("sec"):{iHour=parseInt(oFromDate.format("H"),10);iMin=parseInt(oFromDate.format("i"),10);iSec=parseInt(oFromDate.format("s"),10);iSecFactor=iResolutionFactor;strDateFormat="Y-m-d H:i:s";break;}case("day"):default:{iDayFactor=iResolutionFactor;strDateFormat="Y-m-d";break;}}for(iIdx=0;iSampling>iIdx;iIdx++){iDateTime=Date.mktime(iHour+(iIdx*iHourFactor),iMin+(iIdx*iMinFactor),iSec+(iIdx*iSecFactor),iMonth+(iIdx*iMonthFactor),iDay+(iIdx*iDayFactor),iYear+(iIdx*iYearFactor))*1000;mRetval.push((new Date(iDateTime)).format(strDateFormat));}if(bDesc){mRetval.reverse();}return mRetval;}function booyah_datetime_calc_sampling(mFromDate,mToDate,strResolution,iResolutionFactor){var iRetval=false,iFromDate,oFromDate,iToDate,oToDate,iTmpFrom,bDesc,iFromYear,iToYear,iFromMonth,iToMonth,iFromDay,iToDay,iFromHour,iToHour,iFromMin,iToMin,iFromSec,iToSec,iDaysInFromMonth,iCompFromTime,iCompToTime,oCompFromDate,oCompToDate;strResolution=strResolution||"day";iResolutionFactor=iResolutionFactor||1;if(!isNaN(mFromDate)){iFromDate=mFromDate;}else{iFromDate=Date.parseMySQL(mFromDate);}if(!isNaN(mToDate)){iToDate=mToDate;}else{iToDate=Date.parseMySQL(mToDate);}bDesc=iToDate<iFromDate;if(bDesc){iTmpFrom=iFromDate;iFromDate=iToDate;iToDate=iTmpFrom;}oFromDate=new Date(iFromDate);oToDate=new Date(iToDate);switch(strResolution.toLowerCase()){case("year"):{iRetval=parseInt(oToDate.getUTCFullYear(),10)-parseInt(oFromDate.getUTCFullYear(),10);break;}case("month"):{iFromYear=parseInt(oFromDate.getUTCFullYear(),10);iToYear=parseInt(oToDate.getUTCFullYear(),10);if(iFromYear==iToYear){iRetval=parseInt(oToDate.getUTCMonth(),10)-parseInt(oFromDate.getUTCMonth(),10);}else{iRetval=11-parseInt(oFromDate.getUTCMonth(),10);iRetval+=parseInt(oToDate.getUTCMonth(),10)+1;if(1<(iToYear-iFromYear)){iRetval+=12*((iToYear-1)-(iFromYear+1));}}break;}case("hour"):{iFromHour=parseInt(oFromDate.getUTCHours(),10);iToHour=parseInt(oToDate.getUTCHours(),10);if(oToDate.format("Y-m-d")==oFromDate.format("Y-m-d")){iRetval=iToHour-iFromHour;}else{iRetval=24-iFromHour;iRetval+=iToHour;if((oToDate.format("Y-m")!=oFromDate.format("Y-m"))||((oToDate.format("Y-m")==oFromDate.format("Y-m"))&&(1<(parseInt(oToDate.format("d"),10)-parseInt(oFromDate.format("d"),10))))){iCompFromTime=Date.parse(oFromDate.format("M ")+(parseInt(oFromDate.format("d"),10)+1)+oFromDate.format(" Y 00:00:00"));iCompToTime=Date.parse(oToDate.format("M ")+(parseInt(oToDate.format("d"),10)-1)+oToDate.format(" Y 23:59:59"));iRetval+=(iCompToTime-iCompFromTime)/(60*60*1000);}}break;}case("min"):{iFromMin=parseInt(oFromDate.format("i"),10);iToMin=parseInt(oToDate.format("i"),10);if(oToDate.format("Y-m-d H")==oFromDate.format("Y-m-d H")){iRetval=iToMin-iFromMin;}else{iRetval=60-iFromMin;iRetval+=iToMin;if((oToDate.format("Y-m-d")!=oFromDate.format("Y-m-d"))||((oToDate.format("Y-m-d")==oFromDate.format("Y-m-d"))&&(1<(parseInt(oToDate.format("H"),10)-parseInt(oFromDate.format("H"),10))))){iCompFromTime=Date.parse(oFromDate.format("M d Y ")+(parseInt(oFromDate.format("H"),10)+1)+":00:00");iCompToTime=Date.parse(oToDate.format("M d Y ")+(parseInt(oToDate.format("H"),10)-1)+":59:59");iRetval+=(iCompToTime-iCompFromTime)/(60*1000);}}break;}case("sec"):case("date"):{iFromSec=parseInt(oFromDate.format("s"),10);iToSec=parseInt(oToDate.format("s"),10);if(oToDate.format("Y-m-d H:i")==oFromDate.format("Y-m-d H:i")){iRetval=iToSec-iFromSec;}else{iRetval=60-iFromSec;iRetval+=iToSec;if((oToDate.format("Y-m-d H")!=oFromDate.format("Y-m-d H"))||((oToDate.format("Y-m-d H")==oFromDate.format("Y-m-d H"))&&(1<(parseInt(oToDate.format("i"),10)-parseInt(oFromDate.format("i"),10))))){iCompFromTime=Date.parse(oFromDate.format("M d Y H:")+(parseInt(oFromDate.format("i"),10)+1)+":00");iCompToTime=Date.parse(oToDate.format("M d Y H:")+(parseInt(oToDate.format("i"),10)-1)+":59");iRetval+=(iCompToTime-iCompFromTime)/1000;}}break;}case("day"):default:{iFromDay=parseInt(oFromDate.format("d"),10);iToDay=parseInt(oToDate.format("d"),10);if(oToDate.format("Y-m")==oFromDate.format("Y-m")){iRetval=iToDay-iFromDay;}else{iDaysInFromMonth=parseInt(oFromDate.format("t"),10);iRetval=iDaysInFromMonth-iFromDay;iRetval+=iToDay;if((oToDate.format("Y")!=oFromDate.format("Y"))||((oToDate.format("Y")==oFromDate.format("Y"))&&(1<(parseInt(oToDate.format("m"),10)-parseInt(oFromDate.format("m"),10))))){oCompFromDate=new Date(oFromDate.getTime()-((oFromDate.getUTCDay()+1)*86400000));iCompFromTime=Date.parse(oCompFromDate.format("M d Y 00:00:00"));oCompToDate=new Date(oToDate.getTime()-((oToDate.getUTCDay()+1)*86400000));iCompToTime=Date.parse(oCompToDate.format("M d Y 23:59:59"));iRetval+=(iCompToTime-iCompFromTime)/(60*60*24*1000);}}break;}}iRetval+=1;iRetval=Math.round(iRetval/iResolutionFactor);return iRetval;}Date.parseMySQL=function(strDate){var iRetval=0,oDate=new Date(),aMatches=strDate.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?: (\d{2}):(\d{2}):(\d{2}))?$/);if(aMatches==null){iRetval=Date.parse(strDate);}else if(aMatches.length>0){aMatches[3]=aMatches[3].replace(/^0/,'');aMatches[2]=aMatches[2].replace(/^0/,'');oDate.setUTCFullYear(parseInt(aMatches[1],10));oDate.setUTCMonth(parseInt(aMatches[2],10)-1);oDate.setUTCDate(parseInt(aMatches[3],10));if(aMatches[4]!=null){oDate.setUTCHours(aMatches[4]);oDate.setUTCMinutes(aMatches[5]);oDate.setUTCSeconds(aMatches[6]);}iRetval=oDate.getTime();}return iRetval;};Date.prototype.format=function(format,iTimeStamp){if(iTimeStamp!=null){this.constructor(iTimeStamp);}var returnStr='';var replace=Date.replaceChars;for(var i=0;i<format.length;i++){var curChar=format.charAt(i);if(replace[curChar]){returnStr+=replace[curChar].call(this);}else{returnStr+=curChar;}}return returnStr;};Date.replaceChars={shortMonths:['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'],longMonths:['January','February','March','April','May','June','July','August','September','October','November','December'],shortDays:['Sun','Mon','Tue','Wed','Thu','Fri','Sat'],longDays:['Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'],daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],d:function(){return(this.getUTCDate()<10?'0':'')+this.getUTCDate();},D:function(){return Date.replaceChars.shortDays[this.getUTCDay()];},j:function(){return this.getUTCDate();},l:function(){return Date.replaceChars.longDays[this.getUTCDay()];},N:function(){return this.getUTCDay()+1;},S:function(){return(this.getUTCDate()%10==1&&this.getUTCDate()!=11?'st':(this.getUTCDate()%10==2&&this.getUTCDate()!=12?'nd':(this.getUTCDate()%10==3&&this.getUTCDate()!=13?'rd':'th')));},w:function(){return this.getUTCDay();},z:function(){return"Not Yet Supported";},W:function(){return"Not Yet Supported";},F:function(){return Date.replaceChars.longMonths[this.getUTCMonth()];},m:function(){return(this.getUTCMonth()<9?'0':'')+(this.getUTCMonth()+1);},M:function(){return Date.replaceChars.shortMonths[this.getUTCMonth()];},n:function(){return this.getUTCMonth()+1;},t:function(){var iMonth=this.getUTCMonth(),iRetval=Date.replaceChars.daysInMonth[iMonth];if(iMonth==1&&this.format("L")==1){iRetval=29;}return iRetval;},L:function(){return(((this.getUTCFullYear()%4==0)&&(this.getUTCFullYear()%100!=0))||(this.getUTCFullYear()%400==0))?'1':'0';},o:function(){return"Not Supported";},Y:function(){return this.getUTCFullYear();},y:function(){return(''+this.getUTCFullYear()).substr(2);},a:function(){return this.getUTCHours()<12?'am':'pm';},A:function(){return this.getUTCHours()<12?'AM':'PM';},B:function(){return"Not Yet Supported";},g:function(){return this.getUTCHours()%12||12;},G:function(){return this.getUTCHours();},h:function(){return((this.getUTCHours()%12||12)<10?'0':'')+(this.getUTCHours()%12||12);},H:function(){return(this.getUTCHours()<10?'0':'')+this.getUTCHours();},i:function(){return(this.getUTCMinutes()<10?'0':'')+this.getUTCMinutes();},s:function(){return(this.getSeconds()<10?'0':'')+this.getSeconds();},e:function(){return"Not Yet Supported";},I:function(){return"Not Supported";},O:function(){return(-this.getTimezoneOffset()<0?'-':'+')+(Math.abs(this.getTimezoneOffset()/60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()/60))+'00';},P:function(){return(-this.getTimezoneOffset()<0?'-':'+')+(Math.abs(this.getTimezoneOffset()/60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()/60))+':'+(Math.abs(this.getTimezoneOffset()%60)<10?'0':'')+(Math.abs(this.getTimezoneOffset()%60));},T:function(){var m=this.getUTCMonth();this.setUTCMonth(0);var result=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,'$1');this.setUTCMonth(m);return result;},Z:function(){return-this.getTimezoneOffset()*60;},c:function(){return this.format("Y-m-d")+"T"+this.format("H:i:sP");},r:function(){return this.toString();},U:function(){return this.getTime()/1000;}};Date.mktime=function(){var d=new Date(),r=arguments,i=0,e=['Hours','Minutes','Seconds','Month','Date','FullYear'];for(i=0;i<e.length;i++){if(typeof r[i]==='undefined'){r[i]=d['getUTC'+e[i]]();r[i]+=(i===3);}else{r[i]=parseInt(r[i],10);if(isNaN(r[i])){return false;}}}r[5]+=(r[5]>=0?(r[5]<=69?2e3:(r[5]<=100?1900:0)):0);d.setUTCFullYear(r[5],r[3]-1,r[4]);d.setUTCHours(r[0],r[1],r[2]);return(d.getTime()/1e3>>0)-(d.getTime()<0);};Number.prototype.toShortString=function(){var iThisValue=this,oSteps={1000000000000:{name:"T"},1000000000:{name:"B"},1000000:{name:"MM"},1000:{name:"K"}},oStep={name:""},iDecimals=0;for(var iNum in oSteps){iNum=parseInt(iNum,10);if(iThisValue>=iNum){iThisValue/=iNum;if(iThisValue<10){iDecimals=2;}else if(iThisValue<100){iDecimals=1;}oStep=oSteps[iNum];break;}}if(arguments.length>=1){if(arguments[0]=="auto"){arguments[0]=iDecimals;}iThisValue=iThisValue.format.apply(iThisValue,arguments);}return iThisValue.toString()+oStep.name;};
//------------------------
