function uniqueVar(){return((new Date().valueOf())+Math.round(Math.random()*1000000))}function isTrue(c,a){a=(typeof(a)=="undefined"?false:a);if(typeof(c)=="undefined"||c==null){return a}var b=c.toString().toLowerCase();return((b=="y"||b=="true"||b=="1")?true:((b=="n"||b=="false"||b=="0")?false:a))}function getElementsWithAttribute(g,d,f,e){var b,a=new Array(),c=(e||document).getElementsByTagName(f||"*");for(b=0;b<c.length;b++){if(!g||hasAttribute(c[b],g,d)){a.push(c[b])}}return a}function hasAttribute(c,b,a){if(!b){return false}if(b=="class"||b=="className"){if(!a){return !!(c.className)}return isClass(c,a)}else{if(b=="for"||b=="htmlFor"){return((c.htmlFor&&c.htmlFor==a)||(c.getAttribute("for")&&c.getAttribute("for")==a))}else{if(!a){return !!(c.getAttribute(b))}return(c.getAttribute(b)==a)}}return false}var ESC={AJAX:{dropdown:{get:function(a,d){var b=d.selectToPopulate;var c=b.options[0].text;d.idField=d.idField||"Id";b.options[0].text="loading...";b.selectedIndex=0;b.options.length=1;d.originalText=d.originalText||c;yuiConnect.asyncRequest("GET",a,{success:ESC.AJAX.dropdown.set,argument:d})},set:function(xhr){var selectOptions=eval("("+xhr.responseText+")");var selectBox=xhr.argument.selectToPopulate;selectBox.options[0].text=xhr.argument.originalText;if(selectOptions!=null){selectOptions.forEach(function(selectOption){var newOption=new Option(selectOption.Name,selectOption[xhr.argument.idField],false,false);selectBox.options[selectBox.options.length]=newOption})}selectBox.disabled=false}}},CALENDAR:{calendarContainer:null,init:function(b,a){this.calendarContainer=b;yuiEvent.addListener(a,"click",ESC.CALENDAR.toggleCalendarBridge);return true},toggleCalendarBridge:function(a){ESC.CALENDAR.toggleCalendar(a,this);return true},toggleCalendar:function(d,a){if(this.calendarContainer.display=="block"){this.calendarContainer.display="none"}else{var b=yuiDom.getXY(a);var c=(b[0]+20)+","+(b[1]-10);yuiDom.setStyle(this.calendarContainer,"left",b[0]+20+"px");yuiDom.setStyle(this.calendarContainer,"top",b[1]-10+"px");yuiDom.setStyle(this.calendarContainer,"display","block")}var d=d||window.event;d.cancelBubble=true;if(d.stopPropagation){d.stopPropagation()}},closeCalendarBridge:function(a){ESC.CALENDAR.closeCalendar(this);return true},closeCalendar:function(a){yuiDom.setStyle(this.calendarContainer,"display","none")}}};