// mattkruse.js

function getAnchorPosition(anchorname){var useWindow=false;var coordinates=new Object();var x=0,y=0;var use_gebi=false,use_css=false,use_layers=false;if(document.getElementById){use_gebi=true;}else if(document.all){use_css=true;}else if(document.layers){use_layers=true;}if(use_gebi&&document.all){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_gebi){var o=document.getElementById(anchorname);x=AnchorPosition_getPageOffsetLeft(o);y=AnchorPosition_getPageOffsetTop(o);}else if(use_css){x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);}else if(use_layers){var found=0;for(var i=0;i<document.anchors.length;i++){if(document.anchors[i].name==anchorname){found=1;break;}}if(found==0){coordinates.x=0;coordinates.y=0;return coordinates;}x=document.anchors[i].x;y=document.anchors[i].y;}else{coordinates.x=0;coordinates.y=0;return coordinates;}coordinates.x=x;coordinates.y=y;return coordinates;}
function getAnchorWindowPosition(anchorname){var coordinates=getAnchorPosition(anchorname);var x=0;var y=0;if(document.getElementById){if(isNaN(window.screenX)){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else{x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}}else if(document.all){x=coordinates.x-document.body.scrollLeft+window.screenLeft;y=coordinates.y-document.body.scrollTop+window.screenTop;}else if(document.layers){x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;}coordinates.x=x;coordinates.y=y;return coordinates;}
function AnchorPosition_getPageOffsetLeft(el){var ol=el.offsetLeft;while((el=el.offsetParent)!=null){ol+=el.offsetLeft;}return ol;}
function AnchorPosition_getWindowOffsetLeft(el){return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;}
function AnchorPosition_getPageOffsetTop(el){var ot=el.offsetTop;while((el=el.offsetParent)!=null){ot+=el.offsetTop;}return ot;}
function AnchorPosition_getWindowOffsetTop(el){return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;}
function PopupWindow_getXYPosition(anchorname){var coordinates;if(this.type=="WINDOW"){coordinates=getAnchorWindowPosition(anchorname);}else{coordinates=getAnchorPosition(anchorname);}this.x=coordinates.x;this.y=coordinates.y;}
function PopupWindow_setSize(width,height){this.width=width;this.height=height;}
function PopupWindow_populate(contents){this.contents=contents;this.populated=false;}
function PopupWindow_setUrl(url){this.url=url;}
function PopupWindow_setWindowProperties(props){this.windowProperties=props;}
function PopupWindow_refresh(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).innerHTML=this.contents;}else if(this.use_css){document.all[this.divName].innerHTML=this.contents;}else if(this.use_layers){var d=document.layers[this.divName];d.document.open();d.document.writeln(this.contents);d.document.close();}}else{if(this.popupWindow!=null&&!this.popupWindow.closed){if(this.url!=""){this.popupWindow.location.href=this.url;}else{this.popupWindow.document.open();this.popupWindow.document.writeln(this.contents);this.popupWindow.document.close();}this.popupWindow.focus();}}}
function PopupWindow_showPopup(anchorname){this.getXYPosition(anchorname);this.x+=this.offsetX;this.y+=this.offsetY;if(!this.populated&&(this.contents!="")){this.populated=true;this.refresh();}if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.left=this.x+"px";document.getElementById(this.divName).style.top=this.y+"px";document.getElementById(this.divName).style.visibility="visible";}else if(this.use_css){document.all[this.divName].style.left=this.x;document.all[this.divName].style.top=this.y;document.all[this.divName].style.visibility="visible";}else if(this.use_layers){document.layers[this.divName].left=this.x;document.layers[this.divName].top=this.y;document.layers[this.divName].visibility="visible";}}else{if(this.popupWindow==null||this.popupWindow.closed){if(this.x<0){this.x=0;}if(this.y<0){this.y=0;}if(screen&&screen.availHeight){if((this.y+this.height)>screen.availHeight){this.y=screen.availHeight-this.height;}}if(screen&&screen.availWidth){if((this.x+this.width)>screen.availWidth){this.x=screen.availWidth-this.width;}}var avoidAboutBlank=window.opera||(document.layers&&!navigator.mimeTypes['*'])||navigator.vendor=='KDE'||(document.childNodes&&!document.all&&!navigator.taintEnabled);this.popupWindow=window.open(avoidAboutBlank?"":"about:blank","window_"+anchorname,this.windowProperties+",width="+this.width+",height="+this.height+",screenX="+this.x+",left="+this.x+",screenY="+this.y+",top="+this.y+"");}this.refresh();}}
function PopupWindow_hidePopup(){if(this.divName!=null){if(this.use_gebi){document.getElementById(this.divName).style.visibility="hidden";}else if(this.use_css){document.all[this.divName].style.visibility="hidden";}else if(this.use_layers){document.layers[this.divName].visibility="hidden";}}else{if(this.popupWindow&&!this.popupWindow.closed){this.popupWindow.close();this.popupWindow=null;}}}
function PopupWindow_isClicked(e){if(this.divName!=null){if(this.use_layers){var clickX=e.pageX;var clickY=e.pageY;var t=document.layers[this.divName];if((clickX>t.left)&&(clickX<t.left+t.clip.width)&&(clickY>t.top)&&(clickY<t.top+t.clip.height)){return true;}else{return false;}}else if(document.all){var t=window.event.srcElement;while(t.parentElement!=null){if(t.id==this.divName){return true;}t=t.parentElement;}return false;}else if(this.use_gebi&&e){var t=e.originalTarget;while(t.parentNode!=null){if(t.id==this.divName){return true;}t=t.parentNode;}return false;}return false;}return false;}
function PopupWindow_hideIfNotClicked(e){if(this.autoHideEnabled&&!this.isClicked(e)){this.hidePopup();}}
function PopupWindow_autoHide(){this.autoHideEnabled=true;}
function PopupWindow_hidePopupWindows(e){for(var i=0;i<popupWindowObjects.length;i++){if(popupWindowObjects[i]!=null){var p=popupWindowObjects[i];p.hideIfNotClicked(e);}}}
function PopupWindow_attachListener(){if(document.layers){document.captureEvents(Event.MOUSEUP);}window.popupWindowOldEventListener=document.onmouseup;if(window.popupWindowOldEventListener!=null){document.onmouseup=new Function("window.popupWindowOldEventListener();PopupWindow_hidePopupWindows();");}else{document.onmouseup=PopupWindow_hidePopupWindows;}}
function PopupWindow(){if(!window.popupWindowIndex){window.popupWindowIndex=0;}if(!window.popupWindowObjects){window.popupWindowObjects=new Array();}if(!window.listenerAttached){window.listenerAttached=true;PopupWindow_attachListener();}this.index=popupWindowIndex++;popupWindowObjects[this.index]=this;this.divName=null;this.popupWindow=null;this.width=0;this.height=0;this.populated=false;this.visible=false;this.autoHideEnabled=false;this.contents="";this.url="";this.windowProperties="toolbar=no,location=no,status=no,menubar=no,scrollbars=auto,resizable,alwaysRaised,dependent,titlebar=no";if(arguments.length>0){this.type="DIV";this.divName=arguments[0];}else{this.type="WINDOW";}this.use_gebi=false;this.use_css=false;this.use_layers=false;if(document.getElementById){this.use_gebi=true;}else if(document.all){this.use_css=true;}else if(document.layers){this.use_layers=true;}else{this.type="WINDOW";}this.offsetX=0;this.offsetY=0;this.getXYPosition=PopupWindow_getXYPosition;this.populate=PopupWindow_populate;this.setUrl=PopupWindow_setUrl;this.setWindowProperties=PopupWindow_setWindowProperties;this.refresh=PopupWindow_refresh;this.showPopup=PopupWindow_showPopup;this.hidePopup=PopupWindow_hidePopup;this.setSize=PopupWindow_setSize;this.isClicked=PopupWindow_isClicked;this.autoHide=PopupWindow_autoHide;this.hideIfNotClicked=PopupWindow_hideIfNotClicked;}
var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');function LZ(x){return(x<0||x>9?"":"0")+x}
function isDate(val,format){var date=getDateFromFormat(val,format);if(date==0){return false;}return true;}
function compareDates(date1,dateformat1,date2,dateformat2){var d1=getDateFromFormat(date1,dateformat1);var d2=getDateFromFormat(date2,dateformat2);if(d1==0||d2==0){return-1;}else if(d1>d2){return 1;}return 0;}
function formatDate(date,format){format=format+"";var result="";var i_format=0;var c="";var token="";var y=date.getYear()+"";var M=date.getMonth()+1;var d=date.getDate();var E=date.getDay();var H=date.getHours();var m=date.getMinutes();var s=date.getSeconds();var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;var value=new Object();if(y.length<4){y=""+(y-0+1900);}value["y"]=""+y;value["yyyy"]=y;value["yy"]=y.substring(2,4);value["M"]=M;value["MM"]=LZ(M);value["MMM"]=MONTH_NAMES[M-1];value["NNN"]=MONTH_NAMES[M+11];value["d"]=d;value["dd"]=LZ(d);value["E"]=DAY_NAMES[E+7];value["EE"]=DAY_NAMES[E];value["H"]=H;value["HH"]=LZ(H);if(H==0){value["h"]=12;}else if(H>12){value["h"]=H-12;}else{value["h"]=H;}value["hh"]=LZ(value["h"]);if(H>11){value["K"]=H-12;}else{value["K"]=H;}value["k"]=H+1;value["KK"]=LZ(value["K"]);value["kk"]=LZ(value["k"]);if(H>11){value["a"]="PM";}else{value["a"]="AM";}value["m"]=m;value["mm"]=LZ(m);value["s"]=s;value["ss"]=LZ(s);while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++);}if(value[token]!=null){result=result+value[token];}else{result=result+token;}}return result;}
function _isInteger(val){var digits="1234567890";for(var i=0;i<val.length;i++){if(digits.indexOf(val.charAt(i))==-1){return false;}}return true;}
function _getInt(str,i,minlength,maxlength){for(var x=maxlength;x>=minlength;x--){var token=str.substring(i,i+x);if(token.length<minlength){return null;}if(_isInteger(token)){return token;}}return null;}
function getDateFromFormat(val,format){val=val+"";format=format+"";var i_val=0;var i_format=0;var c="";var token="";var token2="";var x,y;var now=new Date();var year=now.getYear();var month=now.getMonth()+1;var date=1;var hh=now.getHours();var mm=now.getMinutes();var ss=now.getSeconds();var ampm="";while(i_format<format.length){c=format.charAt(i_format);token="";while((format.charAt(i_format)==c)&&(i_format<format.length)){token+=format.charAt(i_format++);}if(token=="yyyy"||token=="yy"||token=="y"){if(token=="yyyy"){x=4;y=4;}if(token=="yy"){x=2;y=2;}if(token=="y"){x=2;y=4;}year=_getInt(val,i_val,x,y);if(year==null){return 0;}i_val+=year.length;if(year.length==2){if(year>70){year=1900+(year-0);}else{year=2000+(year-0);}}}else if(token=="MMM"||token=="NNN"){month=0;for(var i=0;i<MONTH_NAMES.length;i++){var month_name=MONTH_NAMES[i];if(val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()){if(token=="MMM"||(token=="NNN"&&i>11)){month=i+1;if(month>12){month-=12;}i_val+=month_name.length;break;}}}if((month<1)||(month>12)){return 0;}}else if(token=="EE"||token=="E"){for(var i=0;i<DAY_NAMES.length;i++){var day_name=DAY_NAMES[i];if(val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()){i_val+=day_name.length;break;}}}else if(token=="MM"||token=="M"){month=_getInt(val,i_val,token.length,2);if(month==null||(month<1)||(month>12)){return 0;}i_val+=month.length;}else if(token=="dd"||token=="d"){date=_getInt(val,i_val,token.length,2);if(date==null||(date<1)||(date>31)){return 0;}i_val+=date.length;}else if(token=="hh"||token=="h"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>12)){return 0;}i_val+=hh.length;}else if(token=="HH"||token=="H"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>23)){return 0;}i_val+=hh.length;}else if(token=="KK"||token=="K"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<0)||(hh>11)){return 0;}i_val+=hh.length;}else if(token=="kk"||token=="k"){hh=_getInt(val,i_val,token.length,2);if(hh==null||(hh<1)||(hh>24)){return 0;}i_val+=hh.length;hh--;}else if(token=="mm"||token=="m"){mm=_getInt(val,i_val,token.length,2);if(mm==null||(mm<0)||(mm>59)){return 0;}i_val+=mm.length;}else if(token=="ss"||token=="s"){ss=_getInt(val,i_val,token.length,2);if(ss==null||(ss<0)||(ss>59)){return 0;}i_val+=ss.length;}else if(token=="a"){if(val.substring(i_val,i_val+2).toLowerCase()=="am"){ampm="AM";}else if(val.substring(i_val,i_val+2).toLowerCase()=="pm"){ampm="PM";}else{return 0;}i_val+=2;}else{if(val.substring(i_val,i_val+token.length)!=token){return 0;}else{i_val+=token.length;}}}if(i_val!=val.length){return 0;}if(month==2){if(((year%4==0)&&(year%100!=0))||(year%400==0)){if(date>29){return 0;}}else{if(date>28){return 0;}}}if((month==4)||(month==6)||(month==9)||(month==11)){if(date>30){return 0;}}if(hh<12&&ampm=="PM"){hh=hh-0+12;}else if(hh>11&&ampm=="AM"){hh-=12;}var newdate=new Date(year,month-1,date,hh,mm,ss);return newdate.getTime();}
function parseDate(val){var preferEuro=(arguments.length==2)?arguments[1]:false;generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');dateFirst=new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst');var d=null;for(var i=0;i<checkList.length;i++){var l=window[checkList[i]];for(var j=0;j<l.length;j++){d=getDateFromFormat(val,l[j]);if(d!=0){return new Date(d);}}}return null;}
function CalendarPopup(){var c;if(arguments.length>0){c=new PopupWindow(arguments[0]);}else{c=new PopupWindow();c.setSize(150,175);}c.offsetX=-152;c.offsetY=25;c.autoHide();c.monthNames=new Array("January","February","March","April","May","June","July","August","September","October","November","December");c.monthAbbreviations=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");c.dayHeaders=new Array("S","M","T","W","T","F","S");c.returnFunction="CP_tmpReturnFunction";c.returnMonthFunction="CP_tmpReturnMonthFunction";c.returnQuarterFunction="CP_tmpReturnQuarterFunction";c.returnYearFunction="CP_tmpReturnYearFunction";c.weekStartDay=0;c.isShowYearNavigation=false;c.displayType="date";c.disabledWeekDays=new Object();c.disabledDatesExpression="";c.yearSelectStartOffset=2;c.currentDate=null;c.todayText="Today";c.cssPrefix="";c.isShowNavigationDropdowns=false;c.isShowYearNavigationInput=false;window.CP_calendarObject=null;window.CP_targetInput=null;window.CP_dateFormat="MM/dd/yyyy";c.copyMonthNamesToWindow=CP_copyMonthNamesToWindow;c.setReturnFunction=CP_setReturnFunction;c.setReturnMonthFunction=CP_setReturnMonthFunction;c.setReturnQuarterFunction=CP_setReturnQuarterFunction;c.setReturnYearFunction=CP_setReturnYearFunction;c.setMonthNames=CP_setMonthNames;c.setMonthAbbreviations=CP_setMonthAbbreviations;c.setDayHeaders=CP_setDayHeaders;c.setWeekStartDay=CP_setWeekStartDay;c.setDisplayType=CP_setDisplayType;c.setDisabledWeekDays=CP_setDisabledWeekDays;c.addDisabledDates=CP_addDisabledDates;c.setYearSelectStartOffset=CP_setYearSelectStartOffset;c.setTodayText=CP_setTodayText;c.showYearNavigation=CP_showYearNavigation;c.showCalendar=CP_showCalendar;c.hideCalendar=CP_hideCalendar;c.getStyles=getCalendarStyles;c.refreshCalendar=CP_refreshCalendar;c.getCalendar=CP_getCalendar;c.select=CP_select;c.setCssPrefix=CP_setCssPrefix;c.showNavigationDropdowns=CP_showNavigationDropdowns;c.showYearNavigationInput=CP_showYearNavigationInput;c.copyMonthNamesToWindow();return c;}
function CP_copyMonthNamesToWindow(){if(typeof(window.MONTH_NAMES)!="undefined"&&window.MONTH_NAMES!=null){window.MONTH_NAMES=new Array();for(var i=0;i<this.monthNames.length;i++){window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthNames[i];}for(var i=0;i<this.monthAbbreviations.length;i++){window.MONTH_NAMES[window.MONTH_NAMES.length]=this.monthAbbreviations[i];}}}
function CP_tmpReturnFunction(y,m,d){if(window.CP_targetInput!=null){var dt=new Date(y,m-1,d,0,0,0);if(window.CP_calendarObject!=null){window.CP_calendarObject.copyMonthNamesToWindow();}window.CP_targetInput.value=formatDate(dt,window.CP_dateFormat);}else{alert('Use setReturnFunction() to define which function will get the clicked results!');}}
function CP_tmpReturnMonthFunction(y,m){alert('Use setReturnMonthFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , month='+m);}
function CP_tmpReturnQuarterFunction(y,q){alert('Use setReturnQuarterFunction() to define which function will get the clicked results!\nYou clicked: year='+y+' , quarter='+q);}
function CP_tmpReturnYearFunction(y){alert('Use setReturnYearFunction() to define which function will get the clicked results!\nYou clicked: year='+y);}
function CP_setReturnFunction(name){this.returnFunction=name;}
function CP_setReturnMonthFunction(name){this.returnMonthFunction=name;}
function CP_setReturnQuarterFunction(name){this.returnQuarterFunction=name;}
function CP_setReturnYearFunction(name){this.returnYearFunction=name;}
function CP_setMonthNames(){for(var i=0;i<arguments.length;i++){this.monthNames[i]=arguments[i];}this.copyMonthNamesToWindow();}
function CP_setMonthAbbreviations(){for(var i=0;i<arguments.length;i++){this.monthAbbreviations[i]=arguments[i];}this.copyMonthNamesToWindow();}
function CP_setDayHeaders(){for(var i=0;i<arguments.length;i++){this.dayHeaders[i]=arguments[i];}}
function CP_setWeekStartDay(day){this.weekStartDay=day;}
function CP_showYearNavigation(){this.isShowYearNavigation=(arguments.length>0)?arguments[0]:true;}
function CP_setDisplayType(type){if(type!="date"&&type!="week-end"&&type!="month"&&type!="quarter"&&type!="year"){alert("Invalid display type! Must be one of: date,week-end,month,quarter,year");return false;}this.displayType=type;}
function CP_setYearSelectStartOffset(num){this.yearSelectStartOffset=num;}
function CP_setDisabledWeekDays(){this.disabledWeekDays=new Object();for(var i=0;i<arguments.length;i++){this.disabledWeekDays[arguments[i]]=true;}}
function CP_addDisabledDates(start,end){if(arguments.length==1){end=start;}if(start==null&&end==null){return;}if(this.disabledDatesExpression!=""){this.disabledDatesExpression+="||";}if(start!=null){start=parseDate(start);start=""+start.getFullYear()+LZ(start.getMonth()+1)+LZ(start.getDate());}if(end!=null){end=parseDate(end);end=""+end.getFullYear()+LZ(end.getMonth()+1)+LZ(end.getDate());}if(start==null){this.disabledDatesExpression+="(ds<="+end+")";}else if(end==null){this.disabledDatesExpression+="(ds>="+start+")";}else{this.disabledDatesExpression+="(ds>="+start+"&&ds<="+end+")";}}
function CP_setTodayText(text){this.todayText=text;}
function CP_setCssPrefix(val){this.cssPrefix=val;}
function CP_showNavigationDropdowns(){this.isShowNavigationDropdowns=(arguments.length>0)?arguments[0]:true;}
function CP_showYearNavigationInput(){this.isShowYearNavigationInput=(arguments.length>0)?arguments[0]:true;}
function CP_hideCalendar(){if(arguments.length>0){window.popupWindowObjects[arguments[0]].hidePopup();}else{this.hidePopup();}}
function CP_refreshCalendar(index){var calObject=window.popupWindowObjects[index];if(arguments.length>1){calObject.populate(calObject.getCalendar(arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]));}else{calObject.populate(calObject.getCalendar());}calObject.refresh();}
function CP_showCalendar(anchorname){if(arguments.length>1){if(arguments[1]==null||arguments[1]==""){this.currentDate=new Date();}else{this.currentDate=new Date(parseDate(arguments[1]));}}this.populate(this.getCalendar());this.showPopup(anchorname);}
function CP_select(inputobj,linkname,format){var selectedDate=(arguments.length>3)?arguments[3]:null;if(!window.getDateFromFormat){alert("calendar.select: To use this method you must also include 'date.js' for date formatting");return;}if(this.displayType!="date"&&this.displayType!="week-end"){alert("calendar.select: This function can only be used with displayType 'date' or 'week-end'");return;}if(inputobj.type!="text"&&inputobj.type!="hidden"&&inputobj.type!="textarea"){alert("calendar.select: Input object passed is not a valid form input object");window.CP_targetInput=null;return;}if(inputobj.disabled){return;}window.CP_targetInput=inputobj;window.CP_calendarObject=this;this.currentDate=null;var time=0;if(selectedDate!=null){time=getDateFromFormat(selectedDate,format)}else if(inputobj.value!=""){time=getDateFromFormat(inputobj.value,format);}if(selectedDate!=null||inputobj.value!=""){if(time==0){this.currentDate=null;}else{this.currentDate=new Date(time);}}window.CP_dateFormat=format;this.showCalendar(linkname);}
function getCalendarStyles(){var result="";var p="";if(this!=null&&typeof(this.cssPrefix)!="undefined"&&this.cssPrefix!=null&&this.cssPrefix!=""){p=this.cssPrefix;}result+="<STYLE>\n";result+="."+p+"cpYearNavigation,."+p+"cpMonthNavigation{background-color:#C0C0C0;text-align:center;vertical-align:center;text-decoration:none;color:#000000;font-weight:bold;}\n";result+="."+p+"cpDayColumnHeader, ."+p+"cpYearNavigation,."+p+"cpMonthNavigation,."+p+"cpCurrentMonthDate,."+p+"cpCurrentMonthDateDisabled,."+p+"cpOtherMonthDate,."+p+"cpOtherMonthDateDisabled,."+p+"cpCurrentDate,."+p+"cpCurrentDateDisabled,."+p+"cpTodayText,."+p+"cpTodayTextDisabled,."+p+"cpText{font-family:arial;font-size:8pt;}\n";result+="TD."+p+"cpDayColumnHeader{text-align:right;border:solid thin #C0C0C0;border-width:0px 0px 1px 0px;}\n";result+="."+p+"cpCurrentMonthDate, ."+p+"cpOtherMonthDate, ."+p+"cpCurrentDate{text-align:right;text-decoration:none;}\n";result+="."+p+"cpCurrentMonthDateDisabled, ."+p+"cpOtherMonthDateDisabled, ."+p+"cpCurrentDateDisabled{color:#D0D0D0;text-align:right;text-decoration:line-through;}\n";result+="."+p+"cpCurrentMonthDate, .cpCurrentDate{color:#000000;}\n";result+="."+p+"cpOtherMonthDate{color:#808080;}\n";result+="TD."+p+"cpCurrentDate{color:white;background-color: #C0C0C0;border-width:1px;border:solid thin #800000;}\n";result+="TD."+p+"cpCurrentDateDisabled{border-width:1px;border:solid thin #FFAAAA;}\n";result+="TD."+p+"cpTodayText, TD."+p+"cpTodayTextDisabled{border:solid thin #C0C0C0;border-width:1px 0px 0px 0px;}\n";result+="A."+p+"cpTodayText, SPAN."+p+"cpTodayTextDisabled{height:20px;}\n";result+="A."+p+"cpTodayText{color:black;}\n";result+="."+p+"cpTodayTextDisabled{color:#D0D0D0;}\n";result+="."+p+"cpBorder{border:solid thin #808080;}\n";result+="</STYLE>\n";return result;}
function CP_getCalendar(){var now=new Date();if(this.type=="WINDOW"){var windowref="window.opener.";}else{var windowref="";}var result="";if(this.type=="WINDOW"){result+="<HTML><HEAD><TITLE>Calendar</TITLE>"+this.getStyles()+"</HEAD><BODY MARGINWIDTH=0 MARGINHEIGHT=0 TOPMARGIN=0 RIGHTMARGIN=0 LEFTMARGIN=0>\n";result+='<CENTER><TABLE WIDTH=100% BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>\n';}else{result+='<TABLE CLASS="'+this.cssPrefix+'cpBorder" WIDTH=144 BORDER=1 BORDERWIDTH=1 CELLSPACING=0 CELLPADDING=1>\n';result+='<TR><TD ALIGN=CENTER>\n';result+='<CENTER>\n';}if(this.displayType=="date"||this.displayType=="week-end"){if(this.currentDate==null){this.currentDate=now;}if(arguments.length>0){var month=arguments[0];}else{var month=this.currentDate.getMonth()+1;}if(arguments.length>1&&arguments[1]>0&&arguments[1]-0==arguments[1]){var year=arguments[1];}else{var year=this.currentDate.getFullYear();}var daysinmonth=new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);if(((year%4==0)&&(year%100!=0))||(year%400==0)){daysinmonth[2]=29;}var current_month=new Date(year,month-1,1);var display_year=year;var display_month=month;var display_date=1;var weekday=current_month.getDay();var offset=0;offset=(weekday>=this.weekStartDay)?weekday-this.weekStartDay:7-this.weekStartDay+weekday;if(offset>0){display_month--;if(display_month<1){display_month=12;display_year--;}display_date=daysinmonth[display_month]-offset+1;}var next_month=month+1;var next_month_year=year;if(next_month>12){next_month=1;next_month_year++;}var last_month=month-1;var last_month_year=year;if(last_month<1){last_month=12;last_month_year--;}var date_class;if(this.type!="WINDOW"){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";}result+='<TR>\n';var refresh=windowref+'CP_refreshCalendar';var refreshLink='javascript:'+refresh;if(this.isShowNavigationDropdowns){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="78" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onChange="'+refresh+'('+this.index+',this.options[this.selectedIndex].value-0,'+(year-0)+');">';for(var monthCounter=1;monthCounter<=12;monthCounter++){var selected=(monthCounter==month)?'SELECTED':'';result+='<option value="'+monthCounter+'" '+selected+'>'+this.monthNames[monthCounter-1]+'</option>';}result+='</select></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="56" COLSPAN="3"><select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+'('+this.index+','+month+',this.options[this.selectedIndex].value-0);">';for(var yearCounter=year-this.yearSelectStartOffset;yearCounter<=year+this.yearSelectStartOffset;yearCounter++){var selected=(yearCounter==year)?'SELECTED':'';result+='<option value="'+yearCounter+'" '+selected+'>'+yearCounter+'</option>';}result+='</select></TD>';}else{if(this.isShowYearNavigation){result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+last_month+','+last_month_year+');">&lt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="58"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+'</SPAN></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+next_month+','+next_month_year+');">&gt;</A></TD>';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="10">&nbsp;</TD>';result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+'('+this.index+','+month+','+(year-1)+');">&lt;</A></TD>';if(this.isShowYearNavigationInput){result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this.index+','+month+',this.value-0);"></TD>';}else{result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="36"><SPAN CLASS="'+this.cssPrefix+'cpYearNavigation">'+year+'</SPAN></TD>';}result+='<TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="10"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="'+refreshLink+'('+this.index+','+month+','+(year+1)+');">&gt;</A></TD>';}else{result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+last_month+','+last_month_year+');">&lt;&lt;</A></TD>\n';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="100"><SPAN CLASS="'+this.cssPrefix+'cpMonthNavigation">'+this.monthNames[month-1]+' '+year+'</SPAN></TD>\n';result+='<TD CLASS="'+this.cssPrefix+'cpMonthNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpMonthNavigation" HREF="'+refreshLink+'('+this.index+','+next_month+','+next_month_year+');">&gt;&gt;</A></TD>\n';}}result+='</TR></TABLE>\n';result+='<TABLE WIDTH=120 BORDER=0 CELLSPACING=0 CELLPADDING=1 ALIGN=CENTER>\n';result+='<TR>\n';for(var j=0;j<7;j++){result+='<TD CLASS="'+this.cssPrefix+'cpDayColumnHeader" WIDTH="14%"><SPAN CLASS="'+this.cssPrefix+'cpDayColumnHeader">'+this.dayHeaders[(this.weekStartDay+j)%7]+'</TD>\n';}result+='</TR>\n';for(var row=1;row<=6;row++){result+='<TR>\n';for(var col=1;col<=7;col++){var disabled=false;if(this.disabledDatesExpression!=""){var ds=""+display_year+LZ(display_month)+LZ(display_date);eval("disabled=("+this.disabledDatesExpression+")");}var dateClass="";if((display_month==this.currentDate.getMonth()+1)&&(display_date==this.currentDate.getDate())&&(display_year==this.currentDate.getFullYear())){dateClass="cpCurrentDate";}else if(display_month==month){dateClass="cpCurrentMonthDate";}else{dateClass="cpOtherMonthDate";}if(disabled||this.disabledWeekDays[col-1]){result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><SPAN CLASS="'+this.cssPrefix+dateClass+'Disabled">'+display_date+'</SPAN></TD>\n';}else{var selected_date=display_date;var selected_month=display_month;var selected_year=display_year;if(this.displayType=="week-end"){var d=new Date(selected_year,selected_month-1,selected_date,0,0,0,0);d.setDate(d.getDate()+(7-col));selected_year=d.getYear();if(selected_year<1000){selected_year+=1900;}selected_month=d.getMonth()+1;selected_date=d.getDate();}result+=' <TD CLASS="'+this.cssPrefix+dateClass+'"><A HREF="javascript:'+windowref+this.returnFunction+'('+selected_year+','+selected_month+','+selected_date+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+this.cssPrefix+dateClass+'">'+display_date+'</A></TD>\n';}display_date++;if(display_date>daysinmonth[display_month]){display_date=1;display_month++;}if(display_month>12){display_month=1;display_year++;}}result+='</TR>';}var current_weekday=now.getDay()-this.weekStartDay;if(current_weekday<0){current_weekday+=7;}result+='<TR>\n';result+=' <TD COLSPAN=7 ALIGN=CENTER CLASS="'+this.cssPrefix+'cpTodayText">\n';if(this.disabledDatesExpression!=""){var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());eval("disabled=("+this.disabledDatesExpression+")");}if(disabled||this.disabledWeekDays[current_weekday+1]){result+='  <SPAN CLASS="'+this.cssPrefix+'cpTodayTextDisabled">'+this.todayText+'</SPAN>\n';}else{result+='  <A CLASS="'+this.cssPrefix+'cpTodayText" HREF="javascript:'+windowref+this.returnFunction+'(\''+now.getFullYear()+'\',\''+(now.getMonth()+1)+'\',\''+now.getDate()+'\');'+windowref+'CP_hideCalendar(\''+this.index+'\');">'+this.todayText+'</A>\n';}result+='  <BR>\n';result+=' </TD></TR></TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="month"||this.displayType=="quarter"||this.displayType=="year"){if(arguments.length>0){var year=arguments[0];}else{if(this.displayType=="year"){var year=now.getFullYear()-this.yearSelectStartOffset;}else{var year=now.getFullYear();}}if(this.displayType!="year"&&this.isShowYearNavigation){result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+='<TR>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-1)+');">&lt;&lt;</A></TD>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="100">'+year+'</TD>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="22"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+1)+');">&gt;&gt;</A></TD>\n';result+='</TR></TABLE>\n';}}if(this.displayType=="month"){result+='<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<4;i++){result+='<TR>';for(var j=0;j<3;j++){var monthindex=((i*3)+j);result+='<TD WIDTH=33% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnMonthFunction+'('+year+','+(monthindex+1)+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+this.monthAbbreviations[monthindex]+'</A></TD>';}result+='</TR>';}result+='</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="quarter"){result+='<BR><TABLE WIDTH=120 BORDER=1 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<2;i++){result+='<TR>';for(var j=0;j<2;j++){var quarter=((i*2)+j+1);result+='<TD WIDTH=50% ALIGN=CENTER><BR><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnQuarterFunction+'('+year+','+quarter+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">Q'+quarter+'</A><BR><BR></TD>';}result+='</TR>';}result+='</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.displayType=="year"){var yearColumnSize=4;result+="<TABLE WIDTH=144 BORDER=0 BORDERWIDTH=0 CELLSPACING=0 CELLPADDING=0>";result+='<TR>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year-(yearColumnSize*2))+');">&lt;&lt;</A></TD>\n';result+=' <TD CLASS="'+this.cssPrefix+'cpYearNavigation" WIDTH="50%"><A CLASS="'+this.cssPrefix+'cpYearNavigation" HREF="javascript:'+windowref+'CP_refreshCalendar('+this.index+','+(year+(yearColumnSize*2))+');">&gt;&gt;</A></TD>\n';result+='</TR></TABLE>\n';result+='<TABLE WIDTH=120 BORDER=0 CELLSPACING=1 CELLPADDING=0 ALIGN=CENTER>\n';for(var i=0;i<yearColumnSize;i++){for(var j=0;j<2;j++){var currentyear=year+(j*yearColumnSize)+i;result+='<TD WIDTH=50% ALIGN=CENTER><A CLASS="'+this.cssPrefix+'cpText" HREF="javascript:'+windowref+this.returnYearFunction+'('+currentyear+');'+windowref+'CP_hideCalendar(\''+this.index+'\');" CLASS="'+date_class+'">'+currentyear+'</A></TD>';}result+='</TR>';}result+='</TABLE></CENTER></TD></TR></TABLE>\n';}if(this.type=="WINDOW"){result+="</BODY></HTML>\n";}return result;}
ColorPicker_targetInput=null;function ColorPicker_writeDiv(){document.writeln("<DIV ID=\"colorPickerDiv\" STYLE=\"position:absolute;visibility:hidden;\"> </DIV>");}
function ColorPicker_show(anchorname){this.showPopup(anchorname);}
function ColorPicker_pickColor(color,obj){obj.hidePopup();pickColor(color);}
function pickColor(color){if(ColorPicker_targetInput==null){alert("Target Input is null, which means you either didn't use the 'select' function or you have no defined your own 'pickColor' function to handle the picked color!");return;}ColorPicker_targetInput.value=color;}
function ColorPicker_select(inputobj,linkname){if(inputobj.type!="text"&&inputobj.type!="hidden"&&inputobj.type!="textarea"){alert("colorpicker.select: Input object passed is not a valid form input object");window.ColorPicker_targetInput=null;return;}window.ColorPicker_targetInput=inputobj;this.show(linkname);}
function ColorPicker_highlightColor(c){var thedoc=(arguments.length>1)?arguments[1]:window.document;var d=thedoc.getElementById("colorPickerSelectedColor");d.style.backgroundColor=c;d=thedoc.getElementById("colorPickerSelectedColorValue");d.innerHTML=c;}
function ColorPicker(){var windowMode=false;if(arguments.length==0){var divname="colorPickerDiv";}else if(arguments[0]=="window"){var divname='';windowMode=true;}else{var divname=arguments[0];}if(divname!=""){var cp=new PopupWindow(divname);}else{var cp=new PopupWindow();cp.setSize(225,250);}cp.currentValue="#FFFFFF";cp.writeDiv=ColorPicker_writeDiv;cp.highlightColor=ColorPicker_highlightColor;cp.show=ColorPicker_show;cp.select=ColorPicker_select;var colors=new Array("#000000","#000033","#000066","#000099","#0000CC","#0000FF","#330000","#330033","#330066","#330099","#3300CC","#3300FF","#660000","#660033","#660066","#660099","#6600CC","#6600FF","#990000","#990033","#990066","#990099","#9900CC","#9900FF","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#003300","#003333","#003366","#003399","#0033CC","#0033FF","#333300","#333333","#333366","#333399","#3333CC","#3333FF","#663300","#663333","#663366","#663399","#6633CC","#6633FF","#993300","#993333","#993366","#993399","#9933CC","#9933FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#006600","#006633","#006666","#006699","#0066CC","#0066FF","#336600","#336633","#336666","#336699","#3366CC","#3366FF","#666600","#666633","#666666","#666699","#6666CC","#6666FF","#996600","#996633","#996666","#996699","#9966CC","#9966FF","#CC6600","#CC6633","#CC6666","#CC6699","#CC66CC","#CC66FF","#FF6600","#FF6633","#FF6666","#FF6699","#FF66CC","#FF66FF","#009900","#009933","#009966","#009999","#0099CC","#0099FF","#339900","#339933","#339966","#339999","#3399CC","#3399FF","#669900","#669933","#669966","#669999","#6699CC","#6699FF","#999900","#999933","#999966","#999999","#9999CC","#9999FF","#CC9900","#CC9933","#CC9966","#CC9999","#CC99CC","#CC99FF","#FF9900","#FF9933","#FF9966","#FF9999","#FF99CC","#FF99FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#66CC00","#66CC33","#66CC66","#66CC99","#66CCCC","#66CCFF","#99CC00","#99CC33","#99CC66","#99CC99","#99CCCC","#99CCFF","#CCCC00","#CCCC33","#CCCC66","#CCCC99","#CCCCCC","#CCCCFF","#FFCC00","#FFCC33","#FFCC66","#FFCC99","#FFCCCC","#FFCCFF","#00FF00","#00FF33","#00FF66","#00FF99","#00FFCC","#00FFFF","#33FF00","#33FF33","#33FF66","#33FF99","#33FFCC","#33FFFF","#66FF00","#66FF33","#66FF66","#66FF99","#66FFCC","#66FFFF","#99FF00","#99FF33","#99FF66","#99FF99","#99FFCC","#99FFFF","#CCFF00","#CCFF33","#CCFF66","#CCFF99","#CCFFCC","#CCFFFF","#FFFF00","#FFFF33","#FFFF66","#FFFF99","#FFFFCC","#FFFFFF");var total=colors.length;var width=18;var cp_contents="";var windowRef=(windowMode)?"window.opener.":"";if(windowMode){cp_contents+="<HTML><HEAD><TITLE>Select Color</TITLE></HEAD>";cp_contents+="<BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0><CENTER>";}cp_contents+="<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=0>";var use_highlight=(document.getElementById||document.all)?true:false;for(var i=0;i<total;i++){if((i%width)==0){cp_contents+="<TR>";}if(use_highlight){var mo='onMouseOver="'+windowRef+'ColorPicker_highlightColor(\''+colors[i]+'\',window.document)"';}else{mo="";}cp_contents+='<TD BGCOLOR="'+colors[i]+'"><FONT SIZE="-3"><A HREF="#" onClick="'+windowRef+'ColorPicker_pickColor(\''+colors[i]+'\','+windowRef+'window.popupWindowObjects['+cp.index+']);return false;" '+mo+' STYLE="text-decoration:none;">&nbsp;&nbsp;&nbsp;</A></FONT></TD>';if(((i+1)>=total)||(((i+1)%width)==0)){cp_contents+="</TR>";}}if(document.getElementById){var width1=Math.floor(width/2);var width2=width=width1;cp_contents+="<TR><TD COLSPAN='"+width1+"' BGCOLOR='#ffffff' ID='colorPickerSelectedColor'>&nbsp;</TD><TD COLSPAN='"+width2+"' ALIGN='CENTER' ID='colorPickerSelectedColorValue'>#FFFFFF</TD></TR>";}cp_contents+="</TABLE>";if(windowMode){cp_contents+="</CENTER></BODY></HTML>";}cp.populate(cp_contents+"\n");cp.offsetY=25;cp.autoHide();return cp;}// behaviour.js

var Behaviour={list:new Array,register:function(sheet){Behaviour.list.push(sheet);},start:function(){Behaviour.addLoadEvent(function(){Behaviour.apply();});},apply:function(){for(h=0;sheet=Behaviour.list[h];h++){for(selector in sheet){list=document.getElementsBySelector(selector);if(!list){continue;}
for(i=0;element=list[i];i++){sheet[selector](element);}}}},addLoadEvent:function(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){oldonload();func();}}}}
Behaviour.start();function getAllChildren(e){return e.all?e.all:e.getElementsByTagName('*');}
document.getElementsBySelector=function(selector){if(!document.getElementsByTagName){return new Array();}
var tokens=selector.split(' ');var currentContext=new Array(document);for(var i=0;i<tokens.length;i++){token=tokens[i].replace(/^\s+/,'').replace(/\s+$/,'');;if(token.indexOf('#')>-1){var bits=token.split('#');var tagName=bits[0];var id=bits[1];var element=document.getElementById(id);if(tagName&&element.nodeName.toLowerCase()!=tagName){return new Array();}
currentContext=new Array(element);continue;}
if(token.indexOf('.')>-1){var bits=token.split('.');var tagName=bits[0];var className=bits[1];if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(currentContext[h]){if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(found[k].className&&found[k].className.match(new RegExp('\\b'+className+'\\b'))){currentContext[currentContextIndex++]=found[k];}}
continue;}
if(token.match(/^(\w*)\[(\w+)([=~\|\^\$\*]?)=?"?([^\]"]*)"?\]$/)){var tagName=RegExp.$1;var attrName=RegExp.$2;var attrOperator=RegExp.$3;var attrValue=RegExp.$4;if(!tagName){tagName='*';}
var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements;if(currentContext[h]){if(tagName=='*'){elements=getAllChildren(currentContext[h]);}else{elements=currentContext[h].getElementsByTagName(tagName);}
for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}}
currentContext=new Array;var currentContextIndex=0;var checkFunction;switch(attrOperator){case'=':checkFunction=function(e){return(e.getAttribute(attrName)==attrValue);};break;case'~':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('\\b'+attrValue+'\\b')));};break;case'|':checkFunction=function(e){return(e.getAttribute(attrName).match(new RegExp('^'+attrValue+'-?')));};break;case'^':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)==0);};break;case'$':checkFunction=function(e){return(e.getAttribute(attrName).lastIndexOf(attrValue)==e.getAttribute(attrName).length-attrValue.length);};break;case'*':checkFunction=function(e){return(e.getAttribute(attrName).indexOf(attrValue)>-1);};break;default:checkFunction=function(e){return e.getAttribute(attrName);};}
currentContext=new Array;var currentContextIndex=0;for(var k=0;k<found.length;k++){if(checkFunction(found[k])){currentContext[currentContextIndex++]=found[k];}}
continue;}
if(!currentContext[0]){return;}
tagName=token;var found=new Array;var foundCount=0;for(var h=0;h<currentContext.length;h++){var elements=currentContext[h].getElementsByTagName(tagName);for(var j=0;j<elements.length;j++){found[foundCount++]=elements[j];}}
currentContext=found;}
return currentContext;}// md5.js

var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(s){return binl2hex(core_md5(str2binl(s),s.length*chrsz));}
function b64_md5(s){return binl2b64(core_md5(str2binl(s),s.length*chrsz));}
function str_md5(s){return binl2str(core_md5(str2binl(s),s.length*chrsz));}
function hex_hmac_md5(key,data){return binl2hex(core_hmac_md5(key,data));}
function b64_hmac_md5(key,data){return binl2b64(core_hmac_md5(key,data));}
function str_hmac_md5(key,data){return binl2str(core_hmac_md5(key,data));}
function md5_vm_test()
{return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72";}
function core_md5(x,len)
{x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193;var b=-271733879;var c=-1732584194;var d=271733878;for(var i=0;i<x.length;i+=16)
{var olda=a;var oldb=b;var oldc=c;var oldd=d;a=md5_ff(a,b,c,d,x[i+0],7,-680876936);d=md5_ff(d,a,b,c,x[i+1],12,-389564586);c=md5_ff(c,d,a,b,x[i+2],17,606105819);b=md5_ff(b,c,d,a,x[i+3],22,-1044525330);a=md5_ff(a,b,c,d,x[i+4],7,-176418897);d=md5_ff(d,a,b,c,x[i+5],12,1200080426);c=md5_ff(c,d,a,b,x[i+6],17,-1473231341);b=md5_ff(b,c,d,a,x[i+7],22,-45705983);a=md5_ff(a,b,c,d,x[i+8],7,1770035416);d=md5_ff(d,a,b,c,x[i+9],12,-1958414417);c=md5_ff(c,d,a,b,x[i+10],17,-42063);b=md5_ff(b,c,d,a,x[i+11],22,-1990404162);a=md5_ff(a,b,c,d,x[i+12],7,1804603682);d=md5_ff(d,a,b,c,x[i+13],12,-40341101);c=md5_ff(c,d,a,b,x[i+14],17,-1502002290);b=md5_ff(b,c,d,a,x[i+15],22,1236535329);a=md5_gg(a,b,c,d,x[i+1],5,-165796510);d=md5_gg(d,a,b,c,x[i+6],9,-1069501632);c=md5_gg(c,d,a,b,x[i+11],14,643717713);b=md5_gg(b,c,d,a,x[i+0],20,-373897302);a=md5_gg(a,b,c,d,x[i+5],5,-701558691);d=md5_gg(d,a,b,c,x[i+10],9,38016083);c=md5_gg(c,d,a,b,x[i+15],14,-660478335);b=md5_gg(b,c,d,a,x[i+4],20,-405537848);a=md5_gg(a,b,c,d,x[i+9],5,568446438);d=md5_gg(d,a,b,c,x[i+14],9,-1019803690);c=md5_gg(c,d,a,b,x[i+3],14,-187363961);b=md5_gg(b,c,d,a,x[i+8],20,1163531501);a=md5_gg(a,b,c,d,x[i+13],5,-1444681467);d=md5_gg(d,a,b,c,x[i+2],9,-51403784);c=md5_gg(c,d,a,b,x[i+7],14,1735328473);b=md5_gg(b,c,d,a,x[i+12],20,-1926607734);a=md5_hh(a,b,c,d,x[i+5],4,-378558);d=md5_hh(d,a,b,c,x[i+8],11,-2022574463);c=md5_hh(c,d,a,b,x[i+11],16,1839030562);b=md5_hh(b,c,d,a,x[i+14],23,-35309556);a=md5_hh(a,b,c,d,x[i+1],4,-1530992060);d=md5_hh(d,a,b,c,x[i+4],11,1272893353);c=md5_hh(c,d,a,b,x[i+7],16,-155497632);b=md5_hh(b,c,d,a,x[i+10],23,-1094730640);a=md5_hh(a,b,c,d,x[i+13],4,681279174);d=md5_hh(d,a,b,c,x[i+0],11,-358537222);c=md5_hh(c,d,a,b,x[i+3],16,-722521979);b=md5_hh(b,c,d,a,x[i+6],23,76029189);a=md5_hh(a,b,c,d,x[i+9],4,-640364487);d=md5_hh(d,a,b,c,x[i+12],11,-421815835);c=md5_hh(c,d,a,b,x[i+15],16,530742520);b=md5_hh(b,c,d,a,x[i+2],23,-995338651);a=md5_ii(a,b,c,d,x[i+0],6,-198630844);d=md5_ii(d,a,b,c,x[i+7],10,1126891415);c=md5_ii(c,d,a,b,x[i+14],15,-1416354905);b=md5_ii(b,c,d,a,x[i+5],21,-57434055);a=md5_ii(a,b,c,d,x[i+12],6,1700485571);d=md5_ii(d,a,b,c,x[i+3],10,-1894986606);c=md5_ii(c,d,a,b,x[i+10],15,-1051523);b=md5_ii(b,c,d,a,x[i+1],21,-2054922799);a=md5_ii(a,b,c,d,x[i+8],6,1873313359);d=md5_ii(d,a,b,c,x[i+15],10,-30611744);c=md5_ii(c,d,a,b,x[i+6],15,-1560198380);b=md5_ii(b,c,d,a,x[i+13],21,1309151649);a=md5_ii(a,b,c,d,x[i+4],6,-145523070);d=md5_ii(d,a,b,c,x[i+11],10,-1120210379);c=md5_ii(c,d,a,b,x[i+2],15,718787259);b=md5_ii(b,c,d,a,x[i+9],21,-343485551);a=safe_add(a,olda);b=safe_add(b,oldb);c=safe_add(c,oldc);d=safe_add(d,oldd);}
return Array(a,b,c,d);}
function md5_cmn(q,a,b,x,s,t)
{return safe_add(bit_rol(safe_add(safe_add(a,q),safe_add(x,t)),s),b);}
function md5_ff(a,b,c,d,x,s,t)
{return md5_cmn((b&c)|((~b)&d),a,b,x,s,t);}
function md5_gg(a,b,c,d,x,s,t)
{return md5_cmn((b&d)|(c&(~d)),a,b,x,s,t);}
function md5_hh(a,b,c,d,x,s,t)
{return md5_cmn(b^c^d,a,b,x,s,t);}
function md5_ii(a,b,c,d,x,s,t)
{return md5_cmn(c^(b|(~d)),a,b,x,s,t);}
function core_hmac_md5(key,data)
{var bkey=str2binl(key);if(bkey.length>16)bkey=core_md5(bkey,key.length*chrsz);var ipad=Array(16),opad=Array(16);for(var i=0;i<16;i++)
{ipad[i]=bkey[i]^0x36363636;opad[i]=bkey[i]^0x5C5C5C5C;}
var hash=core_md5(ipad.concat(str2binl(data)),512+data.length*chrsz);return core_md5(opad.concat(hash),512+128);}
function safe_add(x,y)
{var lsw=(x&0xFFFF)+(y&0xFFFF);var msw=(x>>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF);}
function bit_rol(num,cnt)
{return(num<<cnt)|(num>>>(32-cnt));}
function str2binl(str)
{var bin=Array();var mask=(1<<chrsz)-1;for(var i=0;i<str.length*chrsz;i+=chrsz)
bin[i>>5]|=(str.charCodeAt(i/chrsz)&mask)<<(i%32);return bin;}
function binl2str(bin)
{var str="";var mask=(1<<chrsz)-1;for(var i=0;i<bin.length*32;i+=chrsz)
str+=String.fromCharCode((bin[i>>5]>>>(i%32))&mask);return str;}
function binl2hex(binarray)
{var hex_tab=hexcase?"0123456789ABCDEF":"0123456789abcdef";var str="";for(var i=0;i<binarray.length*4;i++)
{str+=hex_tab.charAt((binarray[i>>2]>>((i%4)*8+4))&0xF)+
hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF);}
return str;}
function binl2b64(binarray)
{var tab="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var str="";for(var i=0;i<binarray.length*4;i+=3)
{var triplet=(((binarray[i>>2]>>8*(i%4))&0xFF)<<16)|(((binarray[i+1>>2]>>8*((i+1)%4))&0xFF)<<8)|((binarray[i+2>>2]>>8*((i+2)%4))&0xFF);for(var j=0;j<4;j++)
{if(i*8+j*6>binarray.length*32)str+=b64pad;else str+=tab.charAt((triplet>>6*(3-j))&0x3F);}}
return str;}// Hyphenator.js

var Hyphenator=(function(){var AppBasePath=window.parent.location.href;AppBasePath=AppBasePath.slice(0,AppBasePath.lastIndexOf('/')+1);var debug=true;var basepath=AppBasePath+'system/libraries/';var bookmarklet=false;var languages={'de':true,'en':true,'fr':true};var prompterStrings={'de':'Die Sprache dieser Webseite konnte nicht automatisch bestimmt werden. Bitte Sprache angeben: \n\nDeutsch: de\tEnglisch: en\tFranz%F6sisch: fr','en':'The language of these website could not be determined automatically. Please indicate main language: \n\nEnglish: en\tGerman: de\tFrench: fr','fr':'La langue de cette site ne pouvait pas %EAtre d%E9termin%E9e automatiquement. Veuillez indiquer une langue: \n\nFran%E7ais: fr\tAnglais: en\tAllemand: de'};var hyphenateclass='hyphenate';var patternsloaded={};var preparestate=0;var mainlanguage='de';var donthyphenate={'script':true,'code':true,'pre':true,'img':true,'br':true};var zerowidthspace='';function _createZeroWidthSpace(){var ua=navigator.userAgent.toLowerCase();if(ua.indexOf('firefox')!=-1||ua.indexOf('msie 7')!=-1){zerowidthspace=String.fromCharCode(8203);}}
function _hasAttribute(el,a){try{return(el.getAttribute(a)!=''&&el.getAttribute(a)!=null)?true:false;}catch(e){return false;}};function _checkIfBookmarklet(){var loc=null;var jsArray=document.getElementsByTagName('script');for(var i=0;i<jsArray.length;i++){if(_hasAttribute(jsArray[i],'src')){loc=jsArray[i].getAttribute('src');}
if(!loc){continue;}else if(loc.indexOf('Hyphenator.js?bm=true')!=-1){bookmarklet=true;}}};function _autoSetMainLanguage(){var el=document.getElementsByTagName('html')[0];mainlanguage=_getLang(el);if(!mainlanguage){var m=document.getElementsByTagName('meta');for(var i=0;i<m.length;i++){if(_hasAttribute(m[i],'http-equiv')&&(m[i].getAttribute('http-equiv')=='content-language')){mainlanguage=m[i].getAttribute('content').substring(0,2);}
if(_hasAttribute(m[i],'name')&&(m[i].getAttribute('name')=='DC.Language')){mainlanguage=m[i].getAttribute('content').substring(0,2);}
if(_hasAttribute(m[i],'name')&&(m[i].getAttribute('name')=='language')){mainlanguage=m[i].getAttribute('content').substring(0,2);}}}
if(!mainlanguage){var text='';var ul=(navigator.language)?navigator.language:navigator.userLanguage;ul=ul.substring(0,2);if(languages[ul]){text=prompterStrings[ul];}else{text=prompterStrings.en;}
var lang=window.prompt(unescape(text),ul);if(languages[lang]){mainlanguage=lang;}}};function _getLang(el){if(_hasAttribute(el,'lang')){return el.getAttribute('lang').substring(0,2);}
if(_hasAttribute(el,'xml:lang')){return el.getAttribute('xml:lang').substring(0,2);}
if(mainlanguage){return mainlanguage;}
return null;};function _loadPatterns(lang){if(Hyphenator.debug)
window.console.log("load patterns "+lang);if(languages[lang]&&!patternsloaded[lang]){var url=basepath+'patterns/'+lang+'.js';}else{return;}
if(document.createElement){var head=document.getElementsByTagName('head').item(0);var script=document.createElement('script');script.src=url;script.type='text/javascript';head.appendChild(script);}
if(Hyphenator.debug)
window.console.log('Loading '+url);};function _autoinit(){for(var lang in languages){patternsloaded[lang]=false;}
_autoSetMainLanguage();_createZeroWidthSpace();_checkIfBookmarklet();};function _runHyphenation(min,hyphen){var body=document.getElementsByTagName('body')[0];if(Hyphenator.isBookmarklet()){Hyphenator.hyphenateElement(body,min,hyphen);}else{var elements=body.getElementsByTagName('*');for(var i=0;i<elements.length;i++)
{if(elements[i].className.indexOf(hyphenateclass)>=0){Hyphenator.hyphenateElement(elements[i],min,hyphen);}}}};_autoinit();return{patterns:{},isPatternLoaded:function(lang){return patternsloaded[lang];},updatePatternsLoadState:function(lang,bool){patternsloaded[lang]=bool;},isBookmarklet:function(){return bookmarklet;},prepare:function(){if(Hyphenator.debug)
window.console.log("preparing-state: 1 (loading)");preparestate=1;var languages={};languages[mainlanguage]=true;var root=document.getElementsByTagName('body')[0];var elements=root.getElementsByTagName('*');var lang=null;for(var i=0;i<elements.length;i++){if((lang=_getLang(elements[i]))&&!languages[lang]){languages[lang]=true;}}
if(Hyphenator.debug){for(var l in languages){window.console.log("language found: "+l);}}
for(lang in languages){_loadPatterns(lang);}
interval=window.setInterval(function(){finishedLoading=false;for(lang in languages){if(!patternsloaded[lang]){finishedLoading=false;break;}else{finishedLoading=true;}}
if(finishedLoading){window.clearInterval(interval);preparestate=2;if(Hyphenator.debug)
window.console.log("preparing-state: 2 (loaded)");}},500);},hyphenateDocument:function(min,hyphen){if(Hyphenator.debug)
window.console.log("hyphenateDocument");if(!min){var min=6;}
if(!hyphen){var hyphen=String.fromCharCode(173);}
if(preparestate!=2){if(preparestate==0){Hyphenator.prepare();}
var interval=window.setInterval(function(){if(preparestate==2){window.clearInterval(interval);_runHyphenation(min,hyphen);}},10);}else{_runHyphenation(min,hyphen);}},hyphenateElement:function(el,min,hyphen,lang){if(Hyphenator.debug)
window.console.log("hyphenateElement: "+el.tagName+" id: "+el.id);if(!min){var min=6;}
if(!hyphen){var hyphen=String.fromCharCode(173);}
if(!lang){if(Hyphenator.debug)
window.console.log("lang not set");var lang=_getLang(el);if(Hyphenator.debug)
window.console.log("set lang to "+lang);}else{if(Hyphenator.debug)
window.console.log("got lang from parent ("+lang+")");var newlang=_getLang(el);if(newlang!=lang){var lang=newlang;if(Hyphenator.debug)
window.console.log("but element has own lang ("+lang+")");}}
if(Hyphenator.debug)
window.console.log("language: "+lang);var cn=el.childNodes;for(var i=0;i<cn.length;i++){if(cn[i].nodeType==3){var w=cn[i].data.split(' ');var reg=/((ftp|http|https):\/\/)+(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))+/i;for(var j=0;j<w.length;j++){if(reg.test(w[j])){w[j]=Hyphenator.hyphenateURL(w[j]);}else if(w[j].indexOf('-')!=-1){var w2=w[j].split('-');for(var k=0;k<w2.length;k++){w2[k]=Hyphenator.hyphenateWord(lang,w2[k],hyphen);}
w[j]=w2.join('-'+zerowidthspace);}else if(w[j].length>=min&&w[j].indexOf(String.fromCharCode(173))==-1){w[j]=Hyphenator.hyphenateWord(lang,w[j],hyphen);}}
cn[i].data=w.join(' ');}else if(cn[i].nodeType==1&&!donthyphenate[cn[i].nodeName.toLowerCase()]){Hyphenator.hyphenateElement(cn[i],min,hyphen,lang);}}},hyphenateWord:function(lang,word,hyphen,leftmin,rightmin){if(Hyphenator.debug)
window.console.log("hyphenateWord: "+word);var positions=new Array();var result=new Array();if(!leftmin){var leftmin=2;}
if(!rightmin){var rightmin=3;}
var w='_'+word.toLowerCase()+'_';for(var i=0;i<w.length;i++){positions[i]=0;}
for(var s=0;s<w.length;s++){var maxl=w.length-s;for(var l=1;l<=maxl;l++){var part=w.substring(s).substring(0,l);var values=null;if((values=Hyphenator.patterns[lang][part])!=null){var i=s;for(var p=0;p<values.length;p++){if(parseInt(values.charAt(p))>positions[i]){positions[i]=parseInt(values.charAt(p));}
i++;}}}}
positions.pop();positions.shift();for(i=0;i<word.length;i++){if(parseInt(positions[i])%2!=0&&i!=0&&i>=leftmin&&i<=word.length-rightmin){result.push(word.substring(result.join('').length,i));}}
result.push(word.substring(result.join('').length,i));if(hyphen=='&shy;'){hyphen=String.fromCharCode(173);}
return result.join(hyphen);},hyphenateURL:function(url){var parts=url.split('/');return parts.join('/'+String.fromCharCode(8203));}};})();if(Hyphenator.isBookmarklet()){Hyphenator.hyphenateDocument(6);}// shortcut.js

shortcut={'all_shortcuts':{},'add':function(shortcut_combination,callback,opt){var default_options={'type':'keydown','propagate':false,'disable_in_input':false,'target':document,'keycode':false}
if(!opt)opt=default_options;else{for(var dfo in default_options){if(typeof opt[dfo]=='undefined')opt[dfo]=default_options[dfo];}}
var ele=opt.target
if(typeof opt.target=='string')ele=document.getElementById(opt.target);var ths=this;shortcut_combination=shortcut_combination.toLowerCase();var func=function(e){e=e||window.event;if(opt['disable_in_input']){var element;if(e.target)element=e.target;else if(e.srcElement)element=e.srcElement;if(element.nodeType==3)element=element.parentNode;if(element.tagName=='INPUT'||element.tagName=='TEXTAREA')return;}
if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;var character=String.fromCharCode(code).toLowerCase();if(code==188)character=",";if(code==190)character=".";var keys=shortcut_combination.split("+");var kp=0;var shift_nums={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",".":">","/":"?","\\":"|"}
var special_keys={'esc':27,'escape':27,'tab':9,'space':32,'return':13,'enter':13,'backspace':8,'scrolllock':145,'scroll_lock':145,'scroll':145,'capslock':20,'caps_lock':20,'caps':20,'numlock':144,'num_lock':144,'num':144,'pause':19,'break':19,'insert':45,'home':36,'delete':46,'end':35,'pageup':33,'page_up':33,'pu':33,'pagedown':34,'page_down':34,'pd':34,'left':37,'up':38,'right':39,'down':40,'f1':112,'f2':113,'f3':114,'f4':115,'f5':116,'f6':117,'f7':118,'f8':119,'f9':120,'f10':121,'f11':122,'f12':123}
var modifiers={shift:{wanted:false,pressed:false},ctrl:{wanted:false,pressed:false},alt:{wanted:false,pressed:false},meta:{wanted:false,pressed:false}};if(e.ctrlKey)modifiers.ctrl.pressed=true;if(e.shiftKey)modifiers.shift.pressed=true;if(e.altKey)modifiers.alt.pressed=true;if(e.metaKey)modifiers.meta.pressed=true;for(var i=0;k=keys[i],i<keys.length;i++){if(k=='ctrl'||k=='control'){kp++;modifiers.ctrl.wanted=true;}else if(k=='shift'){kp++;modifiers.shift.wanted=true;}else if(k=='alt'){kp++;modifiers.alt.wanted=true;}else if(k=='meta'){kp++;modifiers.meta.wanted=true;}else if(k.length>1){if(special_keys[k]==code)kp++;}else if(opt['keycode']){if(opt['keycode']==code)kp++;}else{if(character==k)kp++;else{if(shift_nums[character]&&e.shiftKey){character=shift_nums[character];if(character==k)kp++;}}}}
if(kp==keys.length&&modifiers.ctrl.pressed==modifiers.ctrl.wanted&&modifiers.shift.pressed==modifiers.shift.wanted&&modifiers.alt.pressed==modifiers.alt.wanted&&modifiers.meta.pressed==modifiers.meta.wanted){callback(e);if(!opt['propagate']){e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault();}
return false;}}}
this.all_shortcuts[shortcut_combination]={'callback':func,'target':ele,'event':opt['type']};if(ele.addEventListener)ele.addEventListener(opt['type'],func,false);else if(ele.attachEvent)ele.attachEvent('on'+opt['type'],func);else ele['on'+opt['type']]=func;},'remove':function(shortcut_combination){shortcut_combination=shortcut_combination.toLowerCase();var binding=this.all_shortcuts[shortcut_combination];delete(this.all_shortcuts[shortcut_combination])
if(!binding)return;var type=binding['event'];var ele=binding['target'];var callback=binding['callback'];if(ele.detachEvent)ele.detachEvent('on'+type,callback);else if(ele.removeEventListener)ele.removeEventListener(type,callback,false);else ele['on'+type]=false;}}// ajaxICC.js

var AcronymerDB;var Acronymer={exclude:{'script':true,'code':true,'pre':true,'img':true,'br':true,'dfn':true},run:function(el){el=$(el);if(!AcronymerDB){setTimeout('Acronymer.run(\''+el.identify()+'\');',100);}else{var w,s,ins,ww;var lng=ICC.getActiveLanguage();var ch=el.firstChild;if(!ch)return;do{if(ch.nodeType==3){s=ch.data;w=s.split(/\W/);for(var i=0;i<w.length;i++){ww=w[i].toUpperCase();if(typeof(AcronymerDB[ww])!='undefined'){if(typeof(AcronymerDB[ww][lng])!='undefined'){s=s.replace(w[i],'<dfn title="'+AcronymerDB[ww][lng]+'">'+w[i]+'</dfn>');}else if(typeof(AcronymerDB[ww]['*'])!='undefined'){s=s.replace(w[i],'<dfn title="'+AcronymerDB[ww]['*']+'">'+w[i]+'</dfn>');}else{s=s.replace(w[i],'<dfn title="'+AcronymerDB[ww]+'">'+w[i]+'</dfn>');}}}
if(ch.data!=s){ch.data='';Element.insert(ch,{after:s});}}else if(ch.nodeType==1&&!this.exclude[ch.nodeName.toLowerCase()]){Acronymer.run(ch);}
ch=ch.nextSibling;}while(ch!=null);}}}
var ICCLang;var ICC={Version:'$Revision: 1.21 $',BasePath:'/',load:function(){if(typeof Prototype=='undefined'){throw('moonedge.icc requires prototype.js');}
if(typeof Scriptaculous=='undefined'){throw('moonedge.icc requires scriptaculous.js');}
if(ICC.ExtendedUI&&(typeof Behaviour=='undefined')){throw('moonedge.icc requires behaviour.js');}
var pat=location.pathname;this.BasePath=pat.slice(0,pat.lastIndexOf('/')+1);this.loadLanguageFile();},msg:function(){var txt=arguments[0];for(var i=1;i<arguments.length;i++){txt=txt.replace('%'+i,arguments[i]);}
return txt;},ExtendedUI:false,MenuBehaviour:true,FormBehaviour:true,ListBehaviour:true,ListHighlightColor:'#FFFFDD',Hyphenate:false,Acronymer:false,Shortcuts:false,ContextMenu:false,Tooltips:false,AjaxCommandOptions:false,WikiEditing:true,HTMLEditing:true,defaultLanguage:'en',userLanguage:'',availableLanguages:{en:'English',de:'Deutsch',fr:'Francais',it:'Italiano'},setActiveLanguage:function(lng){this.userLanguage=lng;this.loadLanguageFile();},getActiveLanguage:function(){var sUsrLng;if(this.userLanguage===''){if(navigator.userLanguage){sUsrLng=navigator.userLanguage.toLowerCase();}else if(navigator.language){sUsrLng=navigator.language.toLowerCase();}else{return this.defaultLanguage;}}else{sUsrLng=this.userLanguage;}
if(sUsrLng.length>=5){sUsrLng=sUsrLng.substr(0,5);if(this.availableLanguages[sUsrLng]){return sUsrLng;}}
if(sUsrLng.length>=2){sUsrLng=sUsrLng.substr(0,2);if(this.availableLanguages[sUsrLng]){return sUsrLng;}}
return this.defaultLanguage;},loadLanguageFile:function(){this.loadScript('system/libraries/icc_'+this.getActiveLanguage()+'.js');},setAcronymerDB:function(fil){this.Acronymer=(fil!='');if(this.Acronymer)this.loadScript(fil);},loadedScripts:[],loadScript:function(src){var a;if(!this.loadedScripts[src]){a=new Ajax.Request(src,{method:'get',onSuccess:function(r){eval(r.responseText);},onFailure:function(r){alert('Error loading '+src);}});this.loadedScripts[src]=true;}},loadScriptNoCache:function(src){var ms=new Date().getTime().toString();this.loadScript(src+'?'+ms);},absolutizeHTML:function(bas,txt){if(bas.charAt(bas.length-1)=='/'){bas=bas.slice(0,-1);}
txt=txt.replace(/http:/ig,'-http:-');txt=txt.replace(/mailto:/ig,'-mailto:-');txt=txt.replace(/javascript:/ig,'-javascript:-');txt=txt.replace(/href\s*=\s*(["']?)\s*(\/)/ig,'href=$1'+bas+'$2');txt=txt.replace(/href\s*=\s*(["']?)\s*([a-z0-9])/ig,'href=$1'+bas+'/$2');txt=txt.replace(/src\s*=\s*(["']?)\s*(\/)/ig,'src=$1'+bas+'$2');txt=txt.replace(/src\s*=\s*(["']?)\s*([a-z0-9])/ig,'src=$1'+bas+'/$2');txt=txt.replace(/-javascript:-/ig,'javascript:');txt=txt.replace(/-mailto:-/ig,'mailto:');txt=txt.replace(/-http:-/ig,'http:');return txt;}};ICC.load();var iccElementMethods={iccGetDimensions:function(el){el=$(el);var dx=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0;var dy=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;var co=Position.cumulativeOffset(el);co[0]=(co[0]||parseInt(el.getStyle('left')));co[1]=(co[1]||parseInt(el.getStyle('top')));var ro=Position.realOffset(el);var dim=el.getDimensions();return{left:co[0],top:co[1],screenleft:co[0]-dx,screentop:co[1]-dy,width:dim.width,height:dim.height,dx:dx,dy:dy};},iccSetPosition:function(el,x,y){el=$(el);var ih=(window.innerHeight)?window.innerHeight:document.body.clientHeight;var iw=(window.innerWidth)?window.innerWidth:document.body.clientWidth;el.style.left=-10000;el.style.top=-10000;el.style.display="block";var dim=Element.iccGetDimensions(el);el.style.display="none";if(x+dim.width+15<=iw){el.style.left=(x+10+dim.dx)+"px";}else{el.style.left=(x-dim.width-10+dim.dx)+"px";}
if(y+dim.height<=ih||y<dim.height){el.style.top=(y+10+dim.dy)+"px";}else{el.style.top=(y-dim.height-10+dim.dy)+"px";}}};Element.addMethods(iccElementMethods);var iccTextareaMethods={iccOriginalSource:true,iccGetFormat:function(el){el=$(el);if(el.value.toLowerCase().indexOf('<wiki>')===0){return('wiki');}
if(el.value.toLowerCase().indexOf('<html>')===0){return('html');}
return('text');},iccSetFormat:function(el){el=$(el);if(el.iccOriginalSource)return;var oEditor;var fmt=el.form.elements['fmt'+el.id];var val=el.value;if(el.__selIdx.wiki&&fmt[el.__selIdx.wiki].checked){el.value='<wiki>'+val;}else if(el.__selIdx.html&&fmt[el.__selIdx.html].checked){try{oEditor=FCKeditorAPI.GetInstance('FCK'+el.id);val=oEditor.GetXHTML();}catch(e){}
el.value='<html>'+val;}
el.iccOriginalSource=true;},iccInit:function(el){var ins;var typ=el.iccGetFormat();el.__selIdx=[];switch(typ){case'text':break;case'wiki':el.value=el.value.replace(/<\/?wiki>/g,'');break;case'html':el.value=el.value.replace(/<\/?html>/g,'');el.iccShowFCK();break;}
el.iccOriginalSource=false;var s='<div style="margin-bottom: 2px;">';var i=0;if(ICC.WikiEditing||ICC.HTMLEditing||typ=='wiki'||typ=='html'){s+='<input style="vertical-align:-2px;" type="radio" name="fmt'+el.id+'" value="text"'+(typ=='text'?' checked':'')+' onclick="$(\''+el.id+'\').iccHideFCK()"> text ';el.__selIdx.text=i++;}
if(ICC.WikiEditing||typ=='wiki'){s+='<input style="vertical-align:-2px;" type="radio" name="fmt'+el.id+'" value="wiki"'+(typ=='wiki'?' checked':'')+' onclick="$(\''+el.id+'\').iccHideFCK()"> wiki ';el.__selIdx.wiki=i++;}
if(ICC.HTMLEditing||typ=='html'){s+='<input style="vertical-align:-2px;" type="radio" name="fmt'+el.id+'" value="html"'+(typ=='html'?' checked':'')+' onclick="$(\''+el.id+'\').iccShowFCK()"> html ';el.__selIdx.html=i++;}
s+='&nbsp;&nbsp;<a href="" id="zoomButton'+el.id+'" onclick="$(\''+el.id+'\').iccZoom();return(false);">Zoom</a>';s+='</div>';ins=new Insertion.Before(el,s);FormChecker.addfunction(el.form,'$(\''+el.id+'\').iccSetFormat();');},iccUpdate:function(el){var typ=el.iccGetFormat();var fmt=el.form.elements['fmt'+el.id];var val=el.value;el.iccHideFCK();el.value=val;switch(typ){case'text':fmt[el.__selIdx.text].checked=true;break;case'wiki':el.value=el.value.replace(/<\/?wiki>/g,'');fmt[el.__selIdx.wiki].checked=true;break;case'html':el.value=el.value.replace(/<\/?html>/g,'');fmt[el.__selIdx.html].checked=true;el.iccShowFCK();break;}
el.iccOriginalSource=false;},iccShowFCK:function(el){el=$(el);var ins,oEditor,dim;if(el.rows>5&&el.value.search(/<\/?script|<\/?textarea|<\/?embed|<\/?object|<\/?applet/g)<0){if(!$('FCK'+el.id)){ICC.loadScript('system/libraries/FCKEditor/fckeditor.js');dim=Element.iccGetDimensions(el);s='';s+='<textarea name="FCK'+el.id+'" id="FCK'+el.id+'" cols="50" rows="10" style="display:none">'+el.value+'</textarea>';s+='<input type="hidden" id="FCK'+el.id+'___Config" value="CustomConfigurationsPath='+ICC.BasePath+'system/libraries/fckeditor.config.js" />';s+='<iframe id="FCK'+el.id+'___Frame" src="system/libraries/FCKEditor/editor/fckeditor.html?InstanceName=FCK'+el.id+'&Toolbar=Basic" width="'+dim.width+'" height="'+dim.height+'" frameborder="0" scrolling="no">';s+='</iframe>';ins=new Insertion.After(el,s);}else{oEditor=FCKeditorAPI.GetInstance('FCK'+el.id);oEditor.SetHTML(el.value);}
$('FCK'+el.id+'___Frame').style.display='inline';el.style.display='none';}},iccHideFCK:function(el){el=$(el);var oEditor;if($('FCK'+el.id)&&$('FCK'+el.id+'___Frame').style.display=='inline'){$('FCK'+el.id+'___Frame').style.display='none';oEditor=FCKeditorAPI.GetInstance('FCK'+el.id);val=oEditor.GetXHTML();el.value=val;}
el.style.display='inline';},iccZoom:function(el){el=$(el);var fmt,dim;try{fmt=el.form.elements['fmt'+el.id];if(el.__selIdx.html&&fmt[el.__selIdx.html].checked&&el.value.search(/<\/?script|<\/?textarea|<\/?embed|<\/?object|<\/?applet/g)<0){dim=Element.iccGetDimensions($('zoomButton'+el.id));if(typeof FCK_STATUS_COMPLETE=='undefined'){Indicator.show(dim.screenleft,dim.screentop+dim.height);}
zoomFCKEditor.show(el);}else{zoomEditor.show(el);}}catch(e){zoomEditor.show(el);}}};Element.addMethods('TEXTAREA',iccTextareaMethods);var Cookie={get:function(nam){var prefix=nam+"=";var begin=document.cookie.indexOf(prefix);if(begin==-1)return null;var end=document.cookie.indexOf(";",begin);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(begin+prefix.length,end));},set:function(nam,val,exp,pat,dom,sec){document.cookie=nam+"="+escape(val)+
((exp)?"; expires="+exp.toGMTString():"")+
((pat)?"; path="+pat:"")+
((dom)?"; domain="+dom:"")+
((sec)?"; secure":"");},remove:function(nam,pat,dom){if(Cookie.get(nam)){document.cookie=nam+"="+
((pat)?"; path="+pat:"")+
((dom)?"; domain="+dom:"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT";}}};var SessionCookie={fix:function(timeout){if(isIE){var cookies=document.cookie.split('; ')
for(i=0;i<cookies.length;i++){var arrTmp=cookies[i].split('=')
if(arrTmp[0].substring(0,12)=='ASPSESSIONID'){var exp=new Date()
exp.setTime((timeout*60000)+exp.getTime())
Cookie.set(arrTmp[0],arrTmp[1],exp)}}}},remove:function(){if(isIE){var cookies=document.cookie.split('; ')
for(i=0;i<cookies.length;i++){var arrTmp=cookies[i].split('=')
if(arrTmp[0].substring(0,12)=='ASPSESSIONID'){Cookie.remove(arrTmp[0])}}}}};var Toggler={h:null,getState:function(id){return(this.h.get(id));},setState:function(id,val){this.h.set(id,val);Cookie.set('classToggler',this.h.toJSON());},init:function(el,def){if(!this.h){this.h=new Hash();var c=Cookie.get('classToggler');if(c){this.h.update(c.evalJSON());}};el=$(el);if(el){var cls=this.getState(el.id);el.className=(cls!=null&&cls!='')?cls:def;this.setState(el.id,el.className)}
return false;},toggle:function(el,on,off){el=$(el);if(el){el.className=(el.className==on)?off:on;this.setState(el.id,el.className)}
return false;},setall:function(typ,pat,on){if(document.getElementsByTagName){var nodeList=document.getElementsByTagName(typ);for(var i=0;i<nodeList.length;i++){if(nodeList[i].id.indexOf(pat)==0&&this.getState(nodeList[i].id)){nodeList[i].className=on;this.setState(nodeList[i].id,on)}}}
return false;},setparents:function(typ,pat,el,on){var par
el=$(el);while(el){if(el.id){if(el.id.indexOf(pat)==0&&this.getState(el.id)){el.className=on;this.setState(el.id,on);}}
el=el.parentNode}
return false;}}
function getGravatarURL(id,email,siz){var s='http://www.gravatar.com/avatar.php?';s=s+'gravatar_id='+hex_md5(email);s=s+'&rating=G';if(typeof(siz)!='undefined'){s=s+'&size='+siz;}
$(id).src=s;}
var Indicator={el:null,init:function(){var ins;if(!Indicator.el){if(!$('ctxindicator')){ins=new Insertion.Top(document.body,"<div id='ctxindicator'></div>");}
Indicator.el=$('ctxindicator');Indicator.el.setStyle({position:'absolute',display:'none',zIndex:'10000'});}},show:function(x,y){Indicator.init();Indicator.el.innerHTML='<div align="center"><img src="system/libraries/ajaxindicator.gif"></div>';Indicator.el.style.display="block";var dim=Element.iccGetDimensions(Indicator.el);Indicator.el.style.left=(x-dim.width/2+dim.dx)+"px";Indicator.el.style.top=(y-dim.height/2+dim.dy)+"px";},hide:function(){Indicator.init();Indicator.el.style.display="none";}};var ctxPopup={delay:600,el:null,init:function(){var ins,s;if(!this.el){if(!$('ctxpopup')){s='';s+='<div id="ctxpopup">';s+='</div>';ins=new Insertion.Top(document.body,s);}
this.el=$('ctxpopup');this.el.setStyle({position:'absolute',display:'none',padding:'5px',border:'1px outset #000',backgroundColor:'#FFFFFF',width:'auto',zIndex:'10000'});this.el.addClassName('ctxPopup');}},click:function(x,y){this.init();var dim=Element.iccGetDimensions(this.el);if(this.el.visible()&&((x<dim.screenleft)||(x>(dim.screenleft+dim.width))||(y<dim.screentop)||(y>(dim.screentop+dim.height)))){this.el.innerHTML="";this.el.style.display="none";}
this.el.style.__mouseleft=x;this.el.style.__mousetop=y;},show:function(id,cnt,x,y){id=$(id);this.init();this.el.innerHTML=cnt;id.__content=cnt;Element.iccSetPosition(this.el,x,y);this.el.style.display="block";},hide:function(){this.init();this.el.style.display="none";},showcached:function(id,x,y){id=$(id);this.init();if(id.__content){ctxPopup.show(id,id.__content,x,y);return true;}else{return false;}}};var ctxMenu={el:null,x:0,y:0,replaceCtx:false,init:function(){var ins;if(!$('ctxmenu_window')){s='';s+='<div id="ctxmenu_window">';s+='<iframe id="ctxmenu_iframe" width="0" height="0" src="" scrolling="no" frameborder="0"></iframe>';s+='<div id="ctxmenu">';s+='</div>';s+='</div>';ins=new Insertion.Top(document.body,s);ctxMenu.el=$('ctxmenu_window');ctxMenu.el.setStyle({position:'absolute',top:'-10000',left:'-10000',width:'auto',height:'auto',fontSize:'0.8em',padding:'0px',backgroundColor:'#FFFFFF',zIndex:'10000'});$('ctxmenu').setStyle({padding:'5px',border:'1px solid #ACA899'});$('ctxmenu').addClassName('ctxmenu');document.body.onmousedown=ctxMenu.mDown;document.body.oncontextmenu=ctxMenu.show;}},mDown:function(e){ctxMenu.x=(document.all)?event.clientX:e.clientX;ctxMenu.y=(document.all)?event.clientY:e.clientY;if(ctxMenu.isMouseOver(ctxMenu.el))return true;var btn=(document.all)?event.button:e.button;if(btn==2){ctxMenu.replaceCtx=true;}else{ctxMenu.hide();}
return true;},isMouseOver:function(el){var dim=Element.iccGetDimensions(el);return((ctxMenu.x>=dim.screenleft)&&(ctxMenu.x<=(dim.screenleft+dim.width))&&(ctxMenu.y>=dim.screentop)&&(ctxMenu.y<=(dim.screentop+dim.height)));},show:function(e){ctxMenu.init();if(ctxMenu.isMouseOver(ctxMenu.el))return;if(ctxMenu.replaceCtx){var id=(document.all)?event.srcElement:e.target;if(id.__ctxMenuLoadFunction){if(typeof(id.__ctxMenuLoaded)=='undefined'||!id.__ctxMenuLoaded){id.__ctxMenuLoadFunction();}else{$('ctxmenu').innerHTML=id.__ctxMenu;ctxMenu.el.style.display="block";var dim=Element.iccGetDimensions(ctxMenu.el);$('ctxmenu_iframe').setStyle({position:'absolute',top:'0px',left:'0px',width:dim.width+'px',height:dim.height+'px',zIndex:'-1000'});Element.iccSetPosition(ctxMenu.el,ctxMenu.x,ctxMenu.y);ctxMenu.el.style.display="block";}
return false;}
ctxMenu.hide();return true;}},hide:function(){ctxMenu.el.style.display="none";},setContent:function(id,cnt){id.__ctxMenu=cnt;id.__ctxMenuLoaded=true;$('ctxmenu').innerHTML=cnt;ctxMenu.el.style.display="block";var dim=Element.iccGetDimensions(ctxMenu.el);$('ctxmenu_iframe').setStyle({position:'absolute',top:'0px',left:'0px',width:dim.width+'px',height:dim.height+'px',zIndex:'-1000'});Element.iccSetPosition(ctxMenu.el,ctxMenu.x,ctxMenu.y);ctxMenu.el.style.display="block";}};var toolTip={delay:1000,el:null,init:function(){var ins,s;if(!$('ttwin')){s='';s+='<div id="ttwin_window">';s+='<iframe id="ttwin_iframe" width="0" height="0" src="" scrolling="no" frameborder="0"></iframe>';s+='<div id="ttwin">';s+='<div id="ttwin_content">';s+='</div>';s+='</div>';s+='</div>';ins=new Insertion.Top(document.body,s);$('ttwin_window').setStyle({position:'absolute',top:'-10000',left:'-10000',width:'auto',height:'auto',fontSize:'0.8em',padding:'0px',backgroundColor:'#FFFFFF',zIndex:'10000'});$('ttwin').setStyle({border:'1px solid #ACA899'});$('ttwin_content').setStyle({padding:'2px',overflow:'auto',width:'250px',height:'auto'});$('ttwin').addClassName('tooltip');}},show:function(id,cnt){toolTip.el=$(id);this.init();$('ttwin_content').innerHTML=cnt;var el=$('ttwin_window');var dim=Element.iccGetDimensions(el);$('ttwin_iframe').setStyle({position:'absolute',top:'0px',left:'0px',width:dim.width+'px',height:dim.height+'px',zIndex:'-1000'});Element.iccSetPosition(el,toolTip.el.__x,toolTip.el.__y);el.style.display="block";},click:function(e){if(toolTip.el){toolTip.el.onmousemove=null;}},move:function(e){toolTip.el=(document.all)?event.srcElement:e.target;toolTip.el.__x=(document.all)?event.clientX:e.clientX;toolTip.el.__y=(document.all)?event.clientY:e.clientY;var el=$('ttwin_window');if(el){var vis=(el.style.display!='none');Element.iccSetPosition(el,toolTip.el.__x,toolTip.el.__y);if(vis){el.style.display="block";}}},hide:function(e){toolTip.el.onmousemove=null;$('ttwin_window').style.display="none";}};var popupWindow={init:function(opt){var id,width,height,ins,s,drg;id='popwin';width=400;height=150;if(typeof(opt)!='undefined'){if(typeof(opt.id)!='undefined')id=opt.id;if(typeof(opt.width)!='undefined')width=opt.width;if(typeof(opt.height)!='undefined')height=opt.height;}
if(!$(id+'_window')){s='';s+='<div id="'+id+'_window">';s+='<iframe id="'+id+'_iframe" src="" width="0" height="0" frameborder="0"></iframe>';s+='<div id="'+id+'">';s+='<div id="'+id+'_handle"></div>';s+='<div id="'+id+'_cmdClose" onclick="popupWindow.close(\''+id+'\');">x</div>';if(typeof(opt)!='undefined'&&typeof(opt.minmax)!='undefined'){s+='<div id="'+id+'_cmdMin" onclick="popupWindow.minimize(\''+id+'\');">-</div>';s+='<div id="'+id+'_cmdMax" onclick="popupWindow.maximize(\''+id+'\');">+</div>';}
s+='<div id="'+id+'_content"></div>';s+='</div>';s+='</div>';ins=new Insertion.Top(document.body,s);$(id+'_window').setStyle({position:'absolute',top:'-10000',left:'-10000',padding:'0px',backgroundColor:'#FFFFFF',zIndex:'10000'});$(id).setStyle({border:'1px outset #000'});$(id+'_handle').setStyle({width:width+'px',padding:'5px',fontWeight:'bold',color:'#FFFFFF',backgroundColor:'#0000CC',cursor:'move'});$(id+'_cmdClose').setStyle({position:'absolute',top:'1px',right:'6px',padding:'5px',color:'#FFFFFF',fontWeight:'bold',cursor:'pointer'});if(typeof(opt)!='undefined'&&typeof(opt.minmax)!='undefined'){$(id+'_cmdMin').setStyle({position:'absolute',top:'1px',right:'22px',padding:'5px',color:'#FFFFFF',fontWeight:'bold',cursor:'pointer'});$(id+'_cmdMax').setStyle({position:'absolute',display:'none',top:'1px',right:'22px',padding:'5px',color:'#FFFFFF',fontWeight:'bold',cursor:'pointer'});}
$(id+'_content').setStyle({padding:'5px',overflow:'auto',width:width+'px',height:height+'px'});$(id+'_window').addClassName(id);drg=new Draggable(id+'_window',{handle:id+'_handle',starteffect:false,endeffect:false});}
return id;},show:function(cap,cnt,opt){var ih=(window.innerHeight)?window.innerHeight:document.body.clientHeight;var iw=(window.innerWidth)?window.innerWidth:document.body.clientWidth;var id=this.init(opt);$(id+'_handle').innerHTML=cap;$(id+'_content').innerHTML=cnt;var el=$(id+'_window');var dim=Element.iccGetDimensions(el);$(id+'_iframe').setStyle({position:'absolute',top:'0px',left:'0px',width:dim.width+'px',height:dim.height+'px',zIndex:'-1000'});Element.iccSetPosition(el,(iw-dim.width)/2,(ih-dim.height)/2);el.style.display="block";},close:function(id){$(id+'_window').style.display="none";},minimize:function(id){$(id+'_cmdMin').style.display="none";$(id+'_cmdMax').style.display="block";Effect.BlindUp($(id+'_content'),{duration:0.4,afterUpdate:function(e){$(id+'_iframe').style.height=$(id).getHeight();},afterFinish:function(e){$(id+'_iframe').style.height=$(id).getHeight();}});},maximize:function(id){$(id+'_cmdMin').style.display="block";$(id+'_cmdMax').style.display="none";Effect.BlindDown($(id+'_content'),{duration:0.4,afterUpdate:function(e){$(id+'_iframe').style.height=$(id).getHeight();},afterFinish:function(e){$(id+'_iframe').style.height=$(id).getHeight();}});}};var messageWindow={show:function(tit,dsc,cap,opt){var caption,content;caption=(typeof(cap)!='undefined')?cap:tit;content='<h2>'+tit+'</h2>'+dsc;popupWindow.show(caption,content,{minmax:true,id:'msgwin'});}};var zoomEditor={el:null,show:function(id){var caption,content;id=$(id);this.el=id;content='';content+='<form name="zoomeditor" method=POST>';content+='<textarea id="zoomeditor_area" style="display:none;"></textarea>';content+='<div id="zoomeditor_buttons" align="center" style="height:30px;width:auto;background-color: #FFFFFF">';content+='<input type="button" value="'+ICC.msg(ICCLang.btnSave)+'" name="Save" LANGUAGE="javascript" onclick="return(zoomEditor.save());">';content+='<input type="button" value="'+ICC.msg(ICCLang.btnReset)+'" name="Back" LANGUAGE="javascript" onclick="return(zoomEditor.close());">';content+='</div>';content+='</form>';popupWindow.show('Text Editor',content,{width:800,height:500,minmax:true,id:'zoomeditor'});var w=$('zoomeditor_content').getWidth()-10;var h=$('zoomeditor_content').getHeight()-10-35;$('zoomeditor_area').setStyle({display:'block',width:w+'px',height:h+'px'});$('zoomeditor_area').value=id.value;},save:function(){if(this.el){this.el.value=$('zoomeditor_area').value;}
popupWindow.close('zoomeditor');},close:function(){popupWindow.close('zoomeditor');}};var zoomFCKEditor={el:null,left:0,top:0,loadContent:function(){var val,oSrcEditor,oTgtEditor;var caption,content;if(!$('zoomfckeditor_area').__loaded){setTimeout('zoomFCKEditor.loadContent();',100);}else{val=this.el.value;if($('FCK'+this.el.id)){oSrcEditor=FCKeditorAPI.GetInstance('FCK'+this.el.id);val=oSrcEditor.GetXHTML();}
oTgtEditor=FCKeditorAPI.GetInstance('zoomfckeditor_area');oTgtEditor.SetHTML(val);$('zoomfckeditor_window').style.left=this.left;$('zoomfckeditor_window').style.top=this.top;}},show:function(id){id=$(id);this.el=id;if(!$('zoomfckeditor'))ICC.loadScript('system/libraries/FCKEditor/fckeditor.js');content='';content+='<form name="zoomfckeditor" method=POST>';content+='<textarea id="zoomfckeditor_area" cols="50" rows="10" style="display:none"></textarea>';content+='<input type="hidden" id="zoomfckeditor_area___Config" value="CustomConfigurationsPath='+ICC.BasePath+'system/libraries/fckeditor.config.js" />';content+='<iframe id="zoomfckeditor_area___Frame" src="system/libraries/FCKEditor/editor/fckeditor.html?InstanceName=zoomfckeditor_area&Toolbar=Default" width="800" height="500" frameborder="0" scrolling="no">';content+='</iframe>';content+='<div id="zoomfckeditor_buttons" align="center" style="height:30px;width:auto;background-color: #FFFFFF">';content+='<input type="button" value="'+ICC.msg(ICCLang.btnSave)+'" name="Save" LANGUAGE="javascript" onclick="return(zoomFCKEditor.save());">';content+='<input type="button" value="'+ICC.msg(ICCLang.btnReset)+'" name="Back" LANGUAGE="javascript" onclick="return(zoomFCKEditor.close());">';content+='</div>';content+='</form>';popupWindow.show('Rich Text Editor',content,{width:800,height:500,minmax:true,id:'zoomfckeditor'});this.left=$('zoomfckeditor_window').style.left;$('zoomfckeditor_window').style.left=-10000;this.top=$('zoomfckeditor_window').style.top;$('zoomfckeditor_window').style.top=-10000;var w=$('zoomfckeditor_content').getWidth()-10;var h=$('zoomfckeditor_content').getHeight()-10-35;$('zoomfckeditor_area___Frame').setStyle({width:w+'px',height:h+'px'});zoomFCKEditor.loadContent();},save:function(){var oSrcEditor,val,oTgtEditor;if(this.el){oSrcEditor=FCKeditorAPI.GetInstance('zoomfckeditor_area');val=oSrcEditor.GetXHTML();if($('FCK'+this.el.id)){oTgtEditor=FCKeditorAPI.GetInstance('FCK'+this.el.id);oTgtEditor.SetHTML(val);}else{this.el.value=val;}}
this.close();},close:function(){popupWindow.close('zoomfckeditor');}};function FCKeditor_OnComplete(id){$(id.Name).__loaded=true;Indicator.hide();}
window.onload=function(){document.onmousedown=mDown;if(ICC.ExtendedUI){try{if(ICC.MenuBehaviour){Behaviour.register(iccMenuRules);}
if(ICC.FormBehaviour){Behaviour.register(iccFormRules);}
if(ICC.ListBehaviour){Behaviour.register(iccListRules);}
if(ICC.Hyphenate){if(typeof Hyphenator=='undefined'){throw('Hyphenating text requires hyphenate.js');}
Behaviour.register(iccHyphenationRules);}
if(ICC.ContextMenu){ctxMenu.init();}
if(ICC.Acronymer!=''){Behaviour.register(iccAcronymerRules);}
if(ICC.Tooltips){Behaviour.register(iccTooltipsRules);}
Behaviour.apply();if(ICC.Hyphenate){Hyphenator.hyphenateDocument(6);}
if(ICC.Shortcuts){defineShortcuts();}}catch(e){}}};function DisableEvent(){return false;}
var _mouseButton;var _mouseX;var _mouseY;function mDown(e){_mouseButton=(document.all)?event.button:e.which;_mouseX=(document.all)?event.clientX:e.clientX;_mouseY=(document.all)?event.clientY:e.clientY;if(_mouseButton==1){ctxPopup.click(_mouseX,_mouseY);}}
function ac(fld,div,sql){new Ajax.Autocompleter(fld,div,"app_icc/xt_obj_ajax.asp?cmd=AUTOCOMPLETE&fld="+fld+"&sql="+sql,{frequency:0.1,minChars:3,choices:10,ignoreCase:true,paramName:'content'});}
function cancelTimout(){Indicator.hide();clearTimeout(this.__timeoutid);return true;}
function getPageCommandsExec(id,oid,cid){var dim=Element.iccGetDimensions(id);if(ctxPopup.showcached(id,dim.screenleft,dim.screentop+dim.height)){return;}
var a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETPAGECOMMANDS&oid="+oid+"&cid="+cid,{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxPopup.show(id,r.responseText,dim.screenleft,dim.screentop+dim.height);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCommandsNotLoaded));}});}
function getPageCommands(id,oid,cid){id.id="pagcmd"+oid;id.__timeoutid=setTimeout('getPageCommandsExec("'+id.id+'",'+oid+','+cid+')',ctxPopup.delay);id.onmouseout=cancelTimout;id.onclick=cancelTimout;}
function getPageCommands2(id,oid,cid){var dim=Element.iccGetDimensions(id);id.id="pagcmd"+oid;var a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETPAGECOMMANDS&oid="+oid+"&cid="+cid,{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxMenu.setContent(id,r.responseText);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCommandsNotLoaded));}});}
function getClipboardContent(id){var dim=Element.iccGetDimensions(id);var a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETCLIPBOARD",{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxMenu.setContent(id,r.responseText);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCommandsNotLoaded));}});}
function getCalendarExec(id,yy,mm){var a;var dim=Element.iccGetDimensions(id);yy=typeof(yy)!='undefined'?yy:2006;mm=typeof(mm)!='undefined'?mm:5;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETCALENDAR&id="+$(id).id+"&year="+yy+"&month="+mm,{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxPopup.show(id,r.responseText,dim.screenleft,dim.screentop+dim.height);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCalendarNotLoaded));}});}
function getCalendar(id,fld){dat=($(fld).value!=='')?parseDate($(fld).value,true):new Date();id.id="cal"+fld;id.__fldid=$(fld);var yy=dat.getYear()+1900;var mm=dat.getMonth()+1;id.__timeoutid=setTimeout('getCalendarExec("'+id.id+'",'+yy+','+mm+')',ctxPopup.delay);id.onmouseout=cancelTimout;id.onclick=cancelTimout;}
function updateCalendar(id,yy,mm){getCalendarExec(id,yy,mm);}
function checkContextMenu(){return(ICC.ContextMenu&&document.body.oncontextmenu);}
function containsIcon(el){return(el.innerHTML.search(/class=["']?icon["']?/i)>0);}
function createContextPopup(el){var arr;if(!containsIcon(el)){arr1=el.href.match('oid=([0-9]*)');arr2=el.href.match('cid=([0-9]*)');if(arr1&&arr1[1]>0){if(arr2&&arr2[1]>0){getPageCommands(el,arr1[1],arr2[1]);}else{getPageCommands(el,arr1[1],0);}}}}
function createContextMenu(el){var arr;el=$(el);if(!containsIcon(el)){arr1=el.href.match('oid=([0-9]*)');arr2=el.href.match('cid=([0-9]*)');if(arr1&&arr1[1]>0){if(arr2&&arr2[1]>0){getPageCommands2(el,arr1[1],arr2[1]);}else{getPageCommands2(el,arr1[1],0);}}}}
function createClipboardMenu(el){el=$(el);clipBoard.hook=el;getClipboardContent(el);}
function hideEditorLinks(el){if(el.onclick.toString().search(/Popup.*(zoomedit\.asp|htmledit\.asp)/i)>0){el.style.display="none";}}
function createTooltipExec(id){var el=$(id);toolTip.show(el,el.__Tooltip);el.onmouseout=toolTip.hide;}
function createTooltip(el,cnt,e){el=$(el);if((typeof(cnt)!='undefined'&&cnt!='')||(typeof(el.__Tooltip)!='undefined'&&el.__Tooltip!='')){el.identify();el.onmousemove=toolTip.move;el.onmousedown=toolTip.click;el.onmouseout=cancelTimout;if(typeof(cnt)!='undefined'&&cnt!='')el.__Tooltip=cnt;el.title='';el.__timeoutid=setTimeout('createTooltipExec("'+el.id+'")',toolTip.delay);}}
function defineShortcuts(){if(typeof shortcut=='undefined'){throw('moonedge.icc requires shortcut.js');}
shortcut.add("Ctrl+C",function(){clipBoard.add();},{'target':document,'propagate':false,'disable_in_input':true});shortcut.add("Ctrl+V",function(){clipBoard.paste(0);},{'target':document,'propagate':false,'disable_in_input':true});shortcut.add("Ctrl+Shift+V",function(){clipBoard.paste(2);},{'target':document,'propagate':false,'disable_in_input':true});shortcut.add("Ctrl+Alt+V",function(){clipBoard.paste(3);},{'target':document,'propagate':false,'disable_in_input':true});shortcut.add("Ctrl+S",function(){saveForm();},{'type':'keypress','target':document,'propagate':false,'disable_in_input':false});}
var clipBoard={hook:null,add:function(oid){if(typeof(oid)=='undefined'){var arr=location.href.match('oid=([0-9]*)');if(!arr||arr[1]<=0)return;oid=arr[1];}
var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=ADDCLIPBOARD&oid="+oid,{method:'get',onSuccess:function(r){if(clipBoard.hook)clipBoard.hook.__ctxMenuLoaded=false;if($('tit'+oid)){new Effect.Highlight($('tit'+oid));}else if(ctxMenu.el&&ctxMenu.el.style.display=='block'){ctxMenu.hide();}},onFailure:function(r){alert("adding to clipboard failed");}});},remove:function(oid){if(typeof(oid)=='undefined'){var arr=location.href.match('oid=([0-9]*)');if(!arr||arr[1]<=0)return;oid=arr[1];}
var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=REMOVECLIPBOARD&oid="+oid,{method:'get',onSuccess:function(r){if(clipBoard.hook)clipBoard.hook.__ctxMenuLoaded=false;if(ctxMenu.el&&ctxMenu.el.style.display=='block')ctxMenu.hide();},onFailure:function(r){alert("removing from clipboard failed");}});},paste:function(cmd,oid,cid){if(typeof(oid)=='undefined')oid='';if(typeof(cid)=='undefined'){var arr=location.href.match('oid=([0-9]*)');if(!arr||arr[1]<=0)return;cid=arr[1];}
var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=PASTECLIPBOARD&oid="+oid+"&cid="+cid+"&sub="+cmd,{method:'get',onSuccess:function(r){location.href=location.href;},onFailure:function(r){alert("pasting from clipboard failed");}});},clear:function(){var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=CLEARCLIPBOARD",{method:'get',onSuccess:function(r){if(clipBoard.hook)clipBoard.hook.__ctxMenuLoaded=false;if(ctxMenu.el&&ctxMenu.el.style.display=='block')ctxMenu.hide();},onFailure:function(r){alert("clearing the clipboard failed");}});},show:function(el){el=$(el);if(!el){el=clipBoard.hook;if(!el)return;}else{clipBoard.hook=el;}
var dim=Element.iccGetDimensions(el);var a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETCLIPBOARD",{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxMenu.setContent(el,r.responseText);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCommandsNotLoaded));}});}}
var bookMarks={hook:null,add:function(oid){if(typeof(oid)=='undefined'||oid<=0)return;var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=ADDBOOKMARK&oid="+oid,{method:'get',onSuccess:function(r){if(bookMarks.hook)bookMarks.hook.__ctxMenuLoaded=false;if($('tit'+oid)){new Effect.Highlight($('tit'+oid));}else if(ctxMenu.el&&ctxMenu.el.style.display=='block'){ctxMenu.hide();}},onFailure:function(r){alert("adding to bookmarks failed");}});},remove:function(id){if(typeof(id)=='undefined')return;var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=REMOVEBOOKMARK&id="+id,{method:'get',onSuccess:function(r){if(bookMarks.hook)bookMarks.hook.__ctxMenuLoaded=false;if(ctxMenu.el&&ctxMenu.el.style.display=='block')ctxMenu.hide();},onFailure:function(r){alert("removing from clipboard failed");}});},show:function(el){el=$(el);if(!el){el=bookMarks.hook;if(!el)return;}else{bookMarks.hook=el;}
var dim=Element.iccGetDimensions(el);var a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETBOOKMARKS",{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxMenu.setContent(el,r.responseText);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCommandsNotLoaded));}});}}
var objectRemarks={hook:null,remove:function(oid){if(typeof(oid)=='undefined')return;var a;a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=REMOVEREMARK&oid="+oid,{method:'get',onSuccess:function(r){if(objectRemarks.hook)objectRemarks.hook.__ctxMenuLoaded=false;if(ctxMenu.el&&ctxMenu.el.style.display=='block')ctxMenu.hide();},onFailure:function(r){alert("removing remark failed");}});},show:function(el){el=$(el);if(!el){el=objectRemarks.hook;if(!el)return;}else{objectRemarks.hook=el;}
var dim=Element.iccGetDimensions(el);var a=new Ajax.Request("app_icc/xt_obj_ajax.asp?cmd=GETREMARKS",{method:'get',onLoading:function(){Indicator.show(dim.screenleft,dim.screentop+dim.height);},onSuccess:function(r){Indicator.hide();ctxMenu.setContent(el,r.responseText);},onFailure:function(r){Indicator.hide();alert(ICC.msg(ICCLang.ajaxCommandsNotLoaded));}});}}
function saveForm(){var arr=document.getElementsByClassName("submit");for(var i=0;i<arr.length;++i){if(arr[i].nodeName.toLowerCase()=='input')arr[i].form.submit();}}
var iccMenuRules={'#Int .List a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int #ObjTOC a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .AlphaList .Title a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .ClassList .Title a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .ImageList .Image a':function(el){if(checkContextMenu()){for(var i=0;i<el.childNodes.length;i++){if(el.childNodes[i].nodeName.toLowerCase()=='img'){el.childNodes[i].__ctxMenuLoadFunction=function(e){createContextMenu(this.parentNode);};}}
el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .SymbolList .Title a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .Treeview .title a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .lgbComment .Title a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .BlogComment .Title a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#Int .BlogEntry h3 a':function(el){if(checkContextMenu()){el.__ctxMenuLoadFunction=function(e){createContextMenu(this);};el=null;}else{el.onmouseover=function(){createContextPopup(this);};el=null;}},'#pagcmdADDCLIPBOARD img.icon':function(el){if(ICC.AjaxCommandOptions){var s='<a href="javascript:clipBoard.show(\'pagcmdADDCLIPBOARD\')"><img src="app_icc/images/icons/open_options.gif"></a>'
Element.insert(el.parentNode,{after:s});}},'#pagcmdADDBOOKMARK img.icon':function(el){if(ICC.AjaxCommandOptions){var s='<a href="javascript:bookMarks.show(\'pagcmdADDBOOKMARK\')"><img src="app_icc/images/icons/open_options.gif"></a>'
Element.insert(el.parentNode,{after:s});}},'#pagcmdNEWREMARK img.icon':function(el){if(ICC.AjaxCommandOptions){var s='<a href="javascript:objectRemarks.show(\'pagcmdNEWREMARK\')"><img src="app_icc/images/icons/open_options.gif"></a>'
Element.insert(el.parentNode,{after:s});}}};var iccFormRules={'#Int .FormEDIT .frmFld textarea':function(el){el.iccInit();el=null;},'#Int .FormADD .frmFld textarea':function(el){el.iccInit();el=null;},'.FormEDIT .frmFld a':function(el){hideEditorLinks(el);el=null;},'.FormADD .frmFld a':function(el){hideEditorLinks(el);el=null;},'#Int .List .frmFld textarea':function(el){el.iccInit();el=null;},'.List .frmFld a':function(el){hideEditorLinks(el);el=null;}};var iccListRules={'#Int .List tbody':function(el){if(Element.classNames(el)==''){el.onmouseover=function(){this.__oriBackground=this.style.backgroundColor;this.style.backgroundColor=ICC.ListHighlightColor;}
el.onmouseout=function(){this.style.backgroundColor=this.__oriBackground;}}
el=null;}};var iccHyphenationRules={'.ObjLead':function(el){Element.addClassName(el,'hyphenate');el=null;},'.ObjText':function(el){Element.addClassName(el,'hyphenate');el=null;}};var iccAcronymerRules={'.ObjLead':function(el){Acronymer.run(el);el=null;},'.ObjText':function(el){Acronymer.run(el);el=null;}};var iccTooltipsRules={'#Int .FormEDIT .frmFld input':function(el){el.onmouseover=function(e){createTooltip(this,this.title,e);};el=null;},'#Int .FormADD .frmFld input':function(el){el.onmouseover=function(e){createTooltip(this,this.title,e);};el=null;}};// forms2.0.js

var FormChecker={Version:'2.0',fldList:new Array(),annList:new Array(),load:function(){if(typeof ICC=='undefined')throw('forms.js requires ajaxICC.js');},msg:function(fld,nr){var cap,mi,ma;cap=fld.__Caption;mi=fld.__Minimum;ma=fld.__Maximum;switch(nr){case 0:return ICC.msg(ICCLang.frmValueMandatory,cap);case 1:return ICC.msg(ICCLang.frmValueToShort,mi,cap);case 2:return ICC.msg(ICCLang.frmValueToLong,ma,cap);case 3:return ICC.msg(ICCLang.frmValueToSmall,mi,cap);case 4:return ICC.msg(ICCLang.frmValueToBig,ma,cap);case 5:return ICC.msg(ICCLang.frmInvalidInteger,cap);case 6:return ICC.msg(ICCLang.frmInvalidDouble,cap);case 7:return ICC.msg(ICCLang.frmInvalidDate,cap);case 8:return ICC.msg(ICCLang.frmInvalidTime,cap);case 9:return ICC.msg(ICCLang.frmInvalidMail,cap);case 10:return ICC.msg(ICCLang.frmInvalidURL,cap);}},setAutocomplete:function(id1,id2){var fld=$(id1);var sel=$(id2);fld.__sel=id2;fld.onkeyup=FormChecker.autocomplete;sel.__fld=id1;sel.onchange=FormChecker.selectitem;},selectitem:function(){var fld=$(this.__fld);fld.value=this.value;},autocomplete:function(evt){var found=false;var sel=$(this.__sel)
for(var i=0;i<sel.options.length;i++){if(sel.options[i].value.toUpperCase().indexOf(this.value.toUpperCase())==0){found=true;break;}}
if(found){sel.selectedIndex=i;}else{sel.selectedIndex=-1;}
if(!evt){evt=event;}
var key=evt.keyCode;if(key<32||(key>=33&&key<=46)||(key>=112&&key<=123)){}else{var oldVal=this.value;var newVal=found?sel.options[i].value:oldVal;if(this.createTextRange){if(newVal!=this.value){this.value=newVal;var rNew=this.createTextRange();rNew.moveStart('character',oldVal.length);rNew.select();}}else if(this.setSelectionRange){if(newVal!=this.value){this.value=newVal;this.setSelectionRange(oldVal.length,newVal.length);}}}},add:function(id,typ,cap,mnd,mi,ma){var o=$(id)
if(o){o.__Type=typeof typ!='undefined'?typ.toString():'str';o.__Caption=typeof cap!='undefined'?cap.toString():'';o.__Mandatory=typeof mnd!='undefined'?mnd.toString()!='':false;o.__Minimum=typeof mi!='undefined'?parseFloat(mi):'';o.__Maximum=typeof ma!='undefined'?parseFloat(ma):'';this.fldList[this.fldList.length]=o;}},addfunction:function(frm,fnc){if(!frm.__fncList)frm.__fncList=new Array;frm.__fncList[frm.__fncList.length]=fnc;},setannotation:function(id,def){var o=$(id)
if(o){o.__Annotation=typeof def!='undefined'?def.toString():'';o.__OriginalColor=o.style.color;o.style.color='#CCCCCC';if(o.value=='')o.value=o.__Annotation;o.onfocus=this.onfocus;o.onblur=this.onblur;this.annList[this.annList.length]=o;}},onfocus:function(e){o=(document.all)?event.srcElement:e.target;if(o.value==o.__Annotation)o.value='';o.style.color=o.__OriginalColor;},onblur:function(e){o=(document.all)?event.srcElement:e.target;if(o.value==''){o.style.color='#CCCCCC';o.value=o.__Annotation;}},check:function(frm){var fld,val,len;if(frm){for(var i=0;i<this.fldList.length;i++){fld=this.fldList[i];if(fld.form==frm){val=fld.value;len=val.length
if(val==fld.__Annotation){val='';len=0};if(fld.__Mandatory&&(len==0)){alert(this.msg(fld,0));fld.focus();fld.select();return(false);}
if(len>0){switch(fld.__Type){case'str':case'pwd':if((fld.__Minimum!='')&&(len<fld.__Minimum)){alert(this.msg(fld,1));fld.focus();fld.select();return(false);}
if((fld.__Maximum!='')&&(len>fld.__Maximum)){alert(this.msg(fld,2));fld.focus();fld.select();return(false);}
break;case'eml':var re=/^\s*([a-z0-9_\-]+)(\.[a-z0-9_\-]+)*@([a-z0-9_\-]+\.)+([a-z]{2,7})\s*$/i;if(!re.test(val)){alert(this.msg(fld,9));fld.focus();fld.select();return(false);}
break;case'hyp':var re=/^\s*(((http|ftp|https):\/\/)|(.\/)|(..\/)|(\/))?[a-z0-9_\-]+(\.[a-z0-9_\-]+)+([a-z0-9_\-\.,\@\?^=%&:/~\+#]*[a-z0-9_\-\@\?^=%&/~\+#])?\s*$/i;if(!re.test(val)){alert(this.msg(fld,10));fld.focus();fld.select();return(false);}
break;case'int':var re=/^\s*[+-]?[0-9]*\s*$/;if(re.test(val)){val=parseFloat(val)
if((fld.__Minimum!='')&&(val<fld.__Minimum)){alert(this.msg(fld,3));fld.focus();fld.select();return(false);}
if((fld.__Maximum!='')&&(val>fld.__Maximum)){alert(this.msg(fld,4));fld.focus();fld.select();return(false);}}else{alert(this.msg(fld,5));fld.focus();fld.select();return(false);}
break;case'dbl':var re=/^\s*[+-]?([0-9]*\.?[0-9]+|[0-9]+\.?[0-9]*)([e][+-]?[0-9]+)?\s*$/i;if(re.test(val)){val=parseFloat(val)
if((fld.__Minimum!='')&&(val<fld.__Minimum)){alert(this.msg(fld,3));fld.focus();fld.select();return(false);}
if((fld.__Maximum!='')&&(val>fld.__Maximum)){alert(this.msg(fld,4));fld.focus();fld.select();return(false);}}else{alert(this.msg(fld,6));fld.focus();fld.select();return(false);}
break;case'dat':var re=new RegExp(ICCLang.frmRegExDate);if(!re.test(val)){alert(this.msg(fld,7));fld.focus();fld.select();return(false);}
break;case'tim':var re=new RegExp(ICCLang.frmRegExTime);if(!re.test(val)){alert(this.msg(fld,8));fld.focus();fld.select();return(false);}
break;}}}}
if(frm.__fncList){for(var i=0;i<frm.__fncList.length;i++){if(!eval(frm.__fncList[i]+'(frm)'))return(false);}}
for(var i=0;i<this.annList.length;i++){if(this.annList[i].value==this.annList[i].__Annotation)this.annList[i].value='';}
return(true);}}};FormChecker.load();