function iniForms(x) { for (var i in x) { var y=x[i].obj; var sClass=y.id.slice(0,4); if (sClass=='sbtn') { new addForm(x[i]); }
 if (sClass=='date') { new addCalendar(x[i]) }; } ujLoaded(); }
function appendHiddenInput(vNode,sName,sVal) { var vInput=document.createElement('input'); vInput.setAttribute('type','hidden');
 vInput.setAttribute('name',sName); vInput.setAttribute('value',sVal); vNode.appendChild(vInput); }
function addForm(x) { var that=this; var vObj=x.obj; var sId=vObj.id; var sAction=vObj.getAttribute('data-url');
 var sMethod=x.props['method']; var sTarget=x.props['target']; var sEncType=x.props['enctype']; var sOnReset=x.props['onreset'];
 var sOnSubmit=x.props['onsubmit']; var sName=x.props['name']; var sCustomCode=x.props['customcode'];
 var sRecipient=x.props['recipient']; var sSuccessPage=x.props['successpage']; var sErrorPage=x.props['errorpage'];
 var sTemplate=x.props['template']; var vLayer=vObj.parentNode; var vForm=document.createElement('form');
 if (sAction) { vForm.setAttribute('action',sAction); } if (sTarget) { vForm.setAttribute('target',sTarget); }
 if (sMethod) { vForm.setAttribute('method',sMethod); } if (sEncType) { vForm.setAttribute('enctype',sEncType); }
 if (sOnReset) { vForm.setAttribute('onreset',sOnReset); } if (sOnSubmit) { vForm.setAttribute('onsubmit',sOnSubmit); }
 if (sName) { vForm.setAttribute('name',sName); } if (sSuccessPage) { appendHiddenInput(vLayer,'successpage__',sSuccessPage); }
 if (sErrorPage) { appendHiddenInput(vLayer,'errorpage__',sErrorPage); }
 if (sTemplate) { appendHiddenInput(vLayer,'template__',sTemplate); }
 if (sRecipient) { appendHiddenInput(vLayer,'recipient__',sRecipient); } if (sCustomCode) {
 var vTmp=document.createElement('div'); vTmp.innerHTML=atob(sCustomCode); vLayer.appendChild(vTmp); }
 vLayer.parentNode.insertBefore(vForm,vLayer);
 vForm.addEventListener('submit',function(e){this.classList.remove('invalid'); if (!this.checkValidity()){e.preventDefault(); this.classList.add('invalid')}});
 vForm.appendChild(vLayer); }
function addCalendar(x) { function calcHostOffset() { function dateReady(sDate) { var iDT;
 if (Date.parse(sDate)) { iDT=new Date(sDate) } else { iDT=new Date('1/21/2000 00:00') } alert( sDate+' - '+iDT );
 iOffset=new Date().getTime()-iDT.getTime() } getHttpField('Date',window.location.href,this.dateReady); }
 function addPopupCal() { var x=document.getElementById('datetime'); if (!x) { x=document.createElement('style');
 x.id='datetime';
 var sCss='.dateBorder { border-top:solid 1px #AAAAAA } .datevert { line-height:30px } .datecell { float:left; width:32px; height:32px; overflow:hidden; text-align:center; background:url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAgCAYAAADT5RIaAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAACeSURBVHjaYvj//78DQAAxMTAw/AcIIBDxDyCAwARAAIEJgAACEwABBCL+AgQQmAUQQGAWQACBCYAAAhMAAQQmAAIITAAEEJgACCAwARBADECjGAACCMRiBQggMAEQQCCCHSCAwARAAIEIDoAAAhGcAAEEJgACCEwABBCI4AIIIDALIIDABEAAgQmAAAKrAwggsA6AAAITAAEENgUgwACIfhTPmXSpiQAAAABJRU5ErkJggg==\') top left repeat-x } .dateClose { position:absolute; top:-10px; left:-10px; width:30px; height:30px; background:url(\'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAcDSURBVHjaYvz//z8DsYARCPDJ/yfBMIAAYiHBMkYoZoLyYfQ/GA1UCrL4PzGOAAggFgIWIlvGjESzoFn8B4j/Qtl/kR2BywEAAcRCwFJmKGaDYnYohvFB4BcU/4RiGB/kgL8go7BZDhBALDgshfmMFYg5gZgXiPlZWVmFREVF9Tk4OHSBWA2k/sePH7eA+PLr168v/v79+x1Q6CMQfwbi70D8G2r5P3TLAQKIEZmPZCkL1GfcQCzEw8OjoqCgUMXCwmLMzs7OpKen98/Q0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BNV8ptbW1kHASmQZ0NDPQPwe1OQGWpK1Zs0a7e7ubjEZGRnOLVu2CAIbLm7AqGsFZrc3wPLkxdmzZ0GNGF1ownNHahEJoKcpgADCVnuxQuNdFhp89sAKKhDYF+gHtg8OAEPlE1LfBNYW+AsM9utAx9Vra2uDUrkZNMhBltsBsSY05WPkKoAAYkQvZ4DZngkaHWzQolkAqSHBzsXFxQTsJ8gAOxvsIiIiLMAu2tdp06bdBEbTT6jjYVH0D9oBeQvFX2AlK3LhBhBAjNgKOmjhwwQ1iB1qOS+0Pc+FZAkjlr4fqNL5Ce0BfYDWpt+xWQ4CAAHEiKukhToC2SFs0JzABaXZkRzCgNQM+wn1+Tco/gl1FNZiHSCAGAkV9UgOgeUUFihmRarbGaEOgBWzMPwX2mbEaQlAADGS0j1H6m4zImVBJqQo+IdGMxCqzAACDABYsrQyxaIXcQAAAABJRU5ErkJggg==\') } .dateActive { background-color:#00B8FF }';
 document.getElementsByTagName('head')[0].appendChild(x);
 if (x.styleSheet) { x.styleSheet.cssText=sCss } else { x.innerHTML=sCss }; } x=document.createElement('div'); x.id='abcde';
 x.className='abs';
 x.style.cssText='visibility:hidden; width:362px; height:226px; z-index:9999; border:solid 1px gray; background-color:#999999; box-shadow:0 0 15px rgba(0,0,0,0.35); -moz-box-shadow:0 0 15px rgba(0,0,0,0.35); -webkit-box-shadow:0 0 15px rgba(0,0,0,0.35)';
 x.style.left=(+iX+10)+'px'; x.style.top=(+iY+10)+'px';
 vObj.onclick=new Function('document.getElementById("abcde").style.visibility="visible"'); var y=document.createElement('div');
 y.style.cssText='float:left; width:136px; height:100%; background-color:silver'; var y0=document.createElement('div');
 y0.className='datecell y'; y0.style.cssText='width:100%'; y0.innerHTML='<div class="datevert">'+'2011'+'</div>';
 y.appendChild(y0); for (var i in aMOY) { var y1=document.createElement('div'); var sCN='dateBorder datecell m'+i;
 if (i==0) { sCN='dateActive '+sCN }; y1.className=sCN; y1.style.cssText='width:50%';
 y1.innerHTML='<div class="datevert">'+aMOY[i].slice(0,3)+'</div>'; y.appendChild(y1); } var z=document.createElement('div');
 z.style.cssText='float:left; width:224px; height:100%'; for (var i in aDOW) { var z1=document.createElement('div');
 z1.className='datecell'; z1.innerHTML='<div class="datevert">'+aDOW[i].slice(0,2)+'</div>'; z.appendChild(z1); }
 for (var i=0; i<38; i++) { var z1=document.createElement('div'); var sCN='dateBorder datecell d'+i;
 if (i==21) { sCN='dateActive '+sCN }; z1.className=sCN; sCN='datevert'; if (i==16) { sCN='dateToday '+sCN };
 z1.innerHTML='<div class="'+sCN+'">'+i+'</div>'; z.appendChild(z1); } var z1=document.createElement('div');
 z1.className='dateBorder datecell today'; z1.style.cssText='width:128px';
 z1.innerHTML='<div class="dateToday" style="float:left; width:32px; height:32px"></div><div class="datevert" style="float:left">'+'Today'+'</div>';
 z.appendChild(z1); z1=document.createElement('div'); z1.className='dateClose'; z.appendChild(z1); x.appendChild(y);
 x.appendChild(z); document.body.appendChild(x); } this.showDate=function() {
 if (sGetDateFrom=='visitor') { var iDate=new Date() }
 else if (sGetDateFrom=='page') { var iDate=new Date(document.lastModified) }
 else if (sGetDateFrom=='host') { var iDate=new Date(); iDate.setTime(iDate.getTime()-iOffset) }; if (sDisplayDate) {
 if (sDisplayDate=='full') { var sDate=aDOW[iDate.getDay()]+', '+iDate.getDate()+' '+aMOY[iDate.getMonth()]+' '+iDate.getFullYear() };
 if (sDisplayDate=='ddm') { var sDate=aDOW[iDate.getDay()]+', '+iDate.getDate()+' '+aMOY[iDate.getMonth()] };
 if (sDisplayDate=='dmy') { var sDate=iDate.getDate()+' '+aMOY[iDate.getMonth()]+' '+iDate.getFullYear() };
 if (sDisplayDate=='dm') { var sDate=iDate.getDate()+' '+aMOY[iDate.getMonth()] };
 if (sDisplayDate=='my') { var sDate=aMOY[iDate.getMonth()]+' '+iDate.getFullYear() };
 if (sDisplayDate=='m') { var sDate=aMOY[iDate.getMonth()] }; if (sDisplayDate=='y') { var sDate=iDate.getFullYear() };
 if (sDisplayTime) { sDate=sDate+' ' }; } else var sDate=''; if (sDisplayTime) {
 var sHours=iDate.getHours(); sHours=(sHours<=9?'0'+sHours:sHours);
 var sMins=iDate.getMinutes(); sMins=(sMins<=9?'0'+sMins:sMins); var sSecs=iDate.getSeconds(); sSecs=(sSecs<=9?'0'+sSecs:sSecs);
 if (sDisplayTime=='hm') { var sTime=sHours+':'+sMins }; if (sDisplayTime=='hms') { var sTime=sHours+':'+sMins+':'+sSecs };
 if (sDisplayTime=='hm12') { var sTime=(sHours>12?sHours-12:sHours)+':'+sMins+(sHours>11?'pm':'am') }; sDate=sDate+sTime; };
 if (sPick) { document.getElementById(sId+'date').value=sDate }
 else { document.getElementById(sId+'date').innerHTML=sDate; document.getElementById(sId+'hf').value=sDate };
if (sRun=='true') { setTimeout(that.showDate,999) }; }; var that=this; var vObj=x.obj; var sId=vObj.id;
 var iX=stripPx(vObj.style.left); var iY=stripPx(vObj.style.top); var iOffset=0; var sPick=x.props['pick'];
 var aDOW=x.props['days'].split(','); var aMOY=x.props['months'].split(','); var sDisplayDate=x.props['date'];
 var sDisplayTime=x.props['time']; var sGetDateFrom=x.props['src']; var sRun=x.props['run']; if (sPick) { addPopupCal() };
 if (sGetDateFrom=='host') { calcHostOffset() }; this.showDate(); }
iniForms(aUjTree['form']);
