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=function(numOfDecimals){var mnt=this.toString();mnt-=0.00000;var extraZeros="";if(numOfDecimals===null||typeof(numOfDecimals)=='undefined'){numOfDecimals=2;}var multiplier=Math.pow(10,numOfDecimals);for(var i=0;i<numOfDecimals;i++){mnt=(Math.round(mnt*multiplier))/multiplier;if(mnt*multiplier==Math.floor(mnt*multiplier)){if(i==numOfDecimals){extraZeros=".";}else{extraZeros="";}for(var j=0;j<i;j++){extraZeros+="0";}return mnt+extraZeros;}else{multiplier=multiplier/10;}}return mnt;};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"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);}};
//------------------------
