// Copyright © 2008 Smazzle Inc - All rights Reserved.
var SmzLib={};SmzLib.widget={};SmzLib.mouseX=function(e){if(!e){e=window.event;}if(e.pageX){return e.pageX;}else{if(e.clientX){return e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;}}};SmzLib.mouseY=function(e){if(!e){e=window.event;}if(e.pageY){return e.pageY;}else{if(e.clientY){return e.clientY+document.body.scrollTop+document.documentElement.scrollTop;}}};SmzLib.hideParent=function(e){var _191=SmzLib.getTarget(e);if(_191){_191.parentNode.style.display="none";}};SmzLib.showTimedMsg=function(_192,_193){var d=document.getElementById(_192);if(d){d.style.display="";d.innerHTML=_193;setTimeout("SmzLib.clearAndHide(\""+_192+"\")",10000);}};SmzLib.clearAndHide=function(_195){var d=document.getElementById(_195);if(d){d.style.display="none";d.innerHTML="";}};SmzLib.showMessage=function(_197,_198){var d=document.getElementById(_197);if(d){d.style.display="";d.innerHTML=_198;}};SmzLib.cancelBubble=function(e){if(!e){e=window.event;}e.cancelBubble=true;};SmzLib.getTarget=function(e){var targ;if(!e||e==undefined){e=window.event;}if(e.target){targ=e.target;}else{if(e.srcElement){targ=e.srcElement;}}if(targ.nodeType==3){targ=targ.parentNode;}return targ;};SmzLib.showDetail=function(_19d,cnt1,cnt2,_1a0){if(_1a0=="more>>"){_1a0="less<<";}else{_1a0="more>>";}document.getElementById(_19d).innerHTML=document.getElementById(cnt1).innerHTML+"..<a style=\"font-size:small;\" href=\"javascript:SmzLib.showDetail('"+_19d+"', '"+cnt2+"', '"+cnt1+"','"+_1a0+"');\">"+_1a0+"</a>";};SmzLib.formatNum=function(num){var _1a2=false;if(num<0){_1a2=true;}num=num.toString().replace(/\$|\,/g,"");if(isNaN(num)){num="0";}sign=(num==(num=Math.abs(num)));num=Math.floor(num*100+0.50000000001);cents=num%100;num=Math.floor(num/100).toString();if(cents<10){cents="0"+cents;}if(_1a2){return "-"+num+"."+cents;}else{return num+"."+cents;}};SmzLib.registerError=function(elm,msg){elm.style.backgroundColor="#F57900";elm.title=msg;};SmzLib.removeError=function(elm){elm.style.backgroundColor="";elm.title="";};SmzLib.curvBrdrDOM=function(){var _1a6=document.createElement("table");_1a6.className="rborder";var _1a7=document.createElement("tbody");var _1a8=document.createElement("tr");var _1a9=document.createElement("td");_1a9.className="rtl";var _1aa=document.createElement("td");_1aa.className="rtm";var _1ab=document.createElement("td");_1ab.className="rtr";_1a8.appendChild(_1a9);_1a8.appendChild(_1aa);_1a8.appendChild(_1ab);var _1ac=document.createElement("tr");var _1ad=document.createElement("td");_1ad.className="rcl";var _1ae=document.createElement("td");_1ae.className="rcont";var _1af=document.createElement("td");_1af.className="rcr";_1ac.appendChild(_1ad);_1ac.appendChild(_1ae);_1ac.appendChild(_1af);var _1b0=document.createElement("tr");var _1b1=document.createElement("td");_1b1.className="rbl";var _1b2=document.createElement("td");_1b2.className="rbm";var _1b3=document.createElement("td");_1b3.className="rbr";_1b0.appendChild(_1b1);_1b0.appendChild(_1b2);_1b0.appendChild(_1b3);_1a7.appendChild(_1a8);_1a7.appendChild(_1ac);_1a7.appendChild(_1b0);_1a6.appendChild(_1a7);return [_1a6,_1ae];};SmzLib.onHideClk=function(e){SmzLib.hide(SmzLib.getTarget(e));};SmzLib.onShowClk=function(e){SmzLib.show(SmzLib.getTarget(e));};SmzLib.hide=function(elm){var p=elm.parentNode;if(p.className=="templateClose"){SmzLib.show(elm);return;}p.className="templateClose";elm.onclick=SmzLib.onShowClk;};SmzLib.show=function(elm){var p=elm.parentNode;if(p.className=="templateOpen"){SmzLib.hide(elm);return;}p.className="templateOpen";elm.onclick=SmzLib.onHideClk;};SmzLib.expandAll=function(_1ba){var d,i=0;while(true){d=document.getElementById(_1ba+i);if(d){d.className="templateOpen";}else{break;}i=i+1;}};SmzLib.collapseAll=function(_1bc){var d,i=0;while(true){d=document.getElementById(_1bc+i);if(d){d.className="templateClose";}else{break;}i=i+1;}};SmzLib.selectAll=function(_1be){var d,i=0;while(true){d=document.getElementById(_1be+i);if(d){d.checked=true;}else{break;}i=i+1;}};SmzLib.selectNone=function(_1c0){var d,i=0;while(true){d=document.getElementById(_1c0+i);if(d){d.checked=false;}else{break;}i=i+1;}};SmzLib.showTooltip=function(e,elm,w){var tt=document.getElementById("__tt");var n=false;if(!tt){tt=document.createElement("span");tt.className="ttc";tt.id="__tt";n=true;}elm.onmouseout=function(){SmzLib.closeToolTip(elm);};var spn=elm.parentNode.getElementsByTagName("span");tt.innerHTML=spn[0].innerHTML;tt.className="tts";var diff=document.body.clientWidth-e.clientX;var l=parseInt(SmzLib.mouseX(e),10);var t=parseInt(SmzLib.mouseY(e),10);if(!w){w=300;}if(diff<w){l=l-w;}diff=document.body.clientHeight-e.clientY;if(diff<50){t=t-50;}tt.style.top=""+(t+12)+"px";tt.style.left=""+l+"px";tt.style.width=""+w+"px";if(n){document.body.appendChild(tt);}};SmzLib.closeToolTip=function(elm){var tt=document.getElementById("__tt");tt.className="ttc";};var sc=1;var msi;SmzLib.sMessage=function(c,t,i){sc=1;var m=document.getElementById("u_mes");var mn=false;if(!m){m=document.createElement("div");m.id="u_mes";m.className="status";m.style.display="";m.style.zIndex="1000000";mn=true;}if("e"==t){clr="#FF6600";i=0;}else{clr="#FFFF00";}if(c=="Loading"){c=c+"&nbsp;<b class=\"huge\">...</b>&nbsp;";}m.innerHTML="<span style=\"background-color:"+clr+"\" class=\"msg\"><b>"+c+"</b></span>";if(mn){document.body.appendChild(m);}else{m.style.display="";}};SmzLib.cMessage=function(m){if(!m){m=document.getElementById("u_mes");}m.style.display="none";m.innerHTML="";};SmzLib.mesDisp=function(){var m=document.getElementById("u_mes");m.style.top=SmzLib.getY()+"px";m.style.left="0px";if(sc>200){clearInterval(msi);SmzLib.cMessage(m);}else{sc=sc+1;}};SmzLib.getY=function(){return document.body.scrollTop;};SmzLib.getDialogDivName=function(){return "_smazzleD_";};SmzLib.errorDialog=function(_1d4){var _1d5=document.getElementById("_errorContainer");if(!_1d5){alert("Error Occured");}else{var _1d6=document.getElementById("_masterErrorContainer");_1d6.style.display="none";_1d5=_1d6.getElementsByTagName("span")[0];_1d5.innerHTML="<div>"+SmzLib.trim(_1d4)+"</div><br/><center><button onclick=\"SmzLib.closeDialog();\">Close</button></center>";SmzLib.displayDialog(null,_1d6.innerHTML);setTimeout("SmzLib.btnFocus();",100);}};var _btnFunc;var _btnCnt;SmzLib.msgDialog=function(_1d7,_1d8){var _1d9=document.getElementById("_messageContainer");if(_1d9){var _1da=document.getElementById("_masterMessageContainer");_1da.style.display="none";_1d9=_1da.getElementsByTagName("span")[0];var txt="<div>"+SmzLib.trim(_1d7)+"</div><br/><center>";if(_1d8){if(!_btnFunc){_btnFunc={};_btnCnt=0;}for(var _1dc in _1d8){_btnFunc["b"+_btnCnt]=_1d8[_1dc];txt=txt+"<button style=\"margin-left:5px;\" onclick=\"SmzLib.msgFunc('b"+_btnCnt+"')\">"+_1dc+"</button>";_btnCnt++;}}txt=txt+"</center>";_1d9.innerHTML=txt;var _1dd=_1da.innerHTML;SmzLib.displayDialog(null,_1dd.replace("msg.png","quest.png"));setTimeout("SmzLib.btnFocus();",100);}};SmzLib.msgFunc=function(_1de){if(_btnFunc){if(_btnFunc[_1de]){_btnFunc[_1de]();SmzLib.confClose();}}};SmzLib.confClose=function(){if(_btnFunc){delete _btnFunc;_btnCnt=0;}SmzLib.closeDialog();};SmzLib.btnFocus=function(){var _1df=document.getElementById(SmzLib.getDialogDivName());if(_1df){var elms=_1df.getElementsByTagName("button");elms[elms.length-1].focus();}};SmzLib.displayDialog=function(cUrl,cont){SmzLib.loadModule("dojo.widget.Dialog");var d=dojo.widget.byId(SmzLib.getDialogDivName());if(!d){var dv=document.createElement("div");dv.id=SmzLib.getDialogDivName();dv.style.border="solid 1px";dv.style.height="80%";dv.style.width="80%";dv.style.position="absolute";document.body.appendChild(dv);d=dojo.widget.createWidget("Dialog",{widgetId:SmzLib.getDialogDivName(),bgColor:"#eeeeee",bgOpacity:"0.80",toggle:"fade",toggleDuration:250,loadingMessage:"<div class=\"messageDiv\">Loading...</div>"},dv);}if(cUrl){d.setUrl(cUrl);}if(cont){d.setContent(cont);}d.show();};SmzLib.closeDialog=function(){if(document.getElementById(SmzLib.getDialogDivName())){var d=dojo.widget.byId(SmzLib.getDialogDivName());if(d){d.hide();}}};SmzLib.displayPopup=function(e,_1e7,_1e8,_1e9,cont,_1eb){SmzLib.loadModule("dojo.widget.FloatingPane");var pane=dojo.widget.byId("_popupWindow_");if(!pane){var _1ed={hasShadow:true,displayMaximizeAction:true,displayCloseAction:true,executeScripts:true,scriptSeparation:false,title:_1e7,id:"_popupWindow_"};var node=document.createElement("div");node.id="_popupWindow_";if(!_1e8){_1e8="50%";}if(!_1e9){_1e9="50%";}node.style.width=_1e8;node.style.height=_1e9;var left=parseInt(SmzLib.mouseX(e),10)-document.documentElement.scrollLeft;left=parseInt((document.documentElement.scrollLeft+left/2),10);var top=parseInt(SmzLib.mouseY(e))-document.documentElement.scrollTop;top=parseInt((document.documentElement.scrollTop+top/2),10);node.style.top=""+top+"px";node.style.left=""+left+"px";node.style.zIndex=10;document.body.appendChild(node);pane=dojo.widget.createWidget("FloatingPane",_1ed,node);}if(cont){pane.setContent(cont);}else{if(_1eb){pane.setUrl(_1eb);}}};SmzLib.newWindow=function(_1f1){if(!_1f1){_1f1="secondWindow";}var _1f2=open("","secondWindow","left=20,top=20,width=550,height=400,scrollbars=yes,toolbar=0,location=0,resizable=1");if(!_1f2){SmzLib.errorDialog("Please disable your popup blocker and try again");}else{_1f2.focus();}};SmzLib.setCookie=function(name,_1f4,_1f5,path,_1f7,_1f8){document.cookie=name+"="+escape(_1f4)+((_1f5)?"; expires="+_1f5.toGMTString():"")+((path)?"; path="+path:"")+((_1f7)?"; domain="+_1f7:"")+((_1f8)?"; secure":"");};SmzLib.getCookie=function(name){var _1fa=name+"=";var _1fb=document.cookie.indexOf(_1fa);if(_1fb==-1){return null;}var end=document.cookie.indexOf(";",_1fb+_1fa.length);if(end==-1){end=document.cookie.length;}var _1fd=document.cookie.substring(_1fb+_1fa.length,end);return unescape(_1fd);};SmzLib.dispSrchTxt=function(elm){var txt="Search";if(!SmzLib.hasText(elm.value)){elm.value=txt;elm.className="srchTxtEmpty";}else{if(elm.className=="srchTxtEmpty"){elm.value="";elm.className="srchTxt";}}};SmzLib.srchSubmit=function(frm){var elm=frm.keywords;if(elm.className=="srchTxtEmpty"||!SmzLib.hasText(elm.value)){return false;}SmzLib.sMessage("Loading");return true;};SmzLib.menu=function(){var _202=document.getElementById("mainMenuNav");var _203=_202.getElementsByTagName("a");var pth=window.location.href;var fn=pth.substring(pth.lastIndexOf("/")+1,pth.length);if(mTab[fn]!=null){fn=mTab[fn];}for(var i=0;i<_203.length;i++){var url=_203[i].href;if(url.indexOf(fn)>=0){_203[i].parentNode.className="sel";}else{_203[i].parentNode.className="";}}};SmzLib.menuOnclick=function(_208){SmzLib.sMessage("Loading");return true;};SmzLib.loadLibrary=function(_209){var req=null;try{req=new XMLHttpRequest();}catch(e){}if(!req){req=new ActiveXObject("Microsoft.XMLHTTP");if(!req){req=new ActiveXObject("Msxml2.XMLHTTP");}if(!req){req=new ActiveXObject("Msxml2.XMLHTTP.4.0");}}if(!req){window.location="./libLoadFailure.html";return;}try{req.open("GET",_209,false);req.send(null);var stat=req.status;if((!stat)||((200<=stat)&&(300>stat))||(stat==304)){var head=document.getElementsByTagName("head").item(0);scriptTag=document.createElement("script");scriptTag.type="text/javascript";scriptTag.text=req.responseText;head.appendChild(scriptTag);}else{window.location="./libLoadFailure.html";}}catch(e){window.location="./libLoadFailure.html";}};djConfig={baseScriptUri:"scripts/",parseWidgets:false,searchIds:[""]};SmzLib.loadLibrary("scripts/dojo.js");SmzLib.needScriptInit1=null;SmzLib.needScriptInit2=null;SmzLib.appendAndInitScripts=function(_20d,_20e,_20f){if(SmzLib.needScriptInit1==null){SmzLib.needScriptInit1=true;var _210=document.createElement("span");_210.style.display="none";_210.innerHTML="<script>SmzLib.needScriptInit1=false;</script>";_20d.appendChild(_210);_20d.removeChild(_210);}if(_20f){_20e.innerHTML=_20f;}_20d.appendChild(_20e);if(SmzLib.needScriptInit1){SmzLib.initScripts(_20e);}};SmzLib.setHTMLAndInitScripts=function(elm,_212){if(SmzLib.needScriptInit2==null){SmzLib.needScriptInit2=true;var _213=document.createElement("span");_213.style.display="none";elm.appendChild(_213);_213.innerHTML="<script>SmzLib.needScriptInit2=false;</script>";elm.removeChild(_213);}elm.innerHTML=_212;if(SmzLib.needScriptInit2){SmzLib.initScripts(elm);}};SmzLib.initScripts=function(elm){if(elm){var st=elm.getElementsByTagName("script");var _216="";for(var i=0;i<st.length;i++){if(st[i].text){_216=_216+st[i].text;}else{if(st[i].innerHTML){_216=_216+st[i].innerHTML;}}}if(_216!=""){var _218=document.createElement("script");try{_218.appendChild(document.createTextNode(_216));}catch(e){_218.text=_216;}elm.appendChild(_218);}}};SmzLib.numReq=0;SmzLib.req=function(_219){SmzLib.loadModule("dojo.io.BrowserIO");var _21a=null;var _21b=null;if(_219.load){_21a=_219.load;_219.load=function(type,data,e){_21a(type,data,e);SmzLib.numReq--;if(SmzLib.numReq<=0){SmzLib.cMessage();}};}else{_21a=_219.handle;_219.handle=function(type,data,e){_21a(type,data,e);SmzLib.numReq--;if(SmzLib.numReq<=0){SmzLib.cMessage();}};}if(_219.error){_21b=_219.error;_219.error=function(type,_223){if(_223.message&&_223.message.indexOf("302 Moved")>0){_223.message="  Please sign-in";}_21b(type,_223);SmzLib.numReq--;};}SmzLib.sMessage("Loading");SmzLib.numReq++;dojo.io.bind(_219);};SmzLib.reqAndInitScript=function(_224,elm){if("text/html"==_224.mimetype){SmzLib.req(_224);SmzLib.initScripts(elm);}else{SmzLib.errorDialog("SmzLib.reqInitScript() works only for mimetype text/html");}};SmzLib.loadModule=function(_226){dojo.require(_226);};SmzLib.addOnLoad=function(func){dojo.addOnLoad(func);};SmzLib.getNewArrayList=function(){SmzLib.loadModule("dojo.collections.ArrayList");return new dojo.collections.ArrayList();};SmzLib.hasText=function(_228){SmzLib.loadModule("dojo.string.extras");return !dojo.string.isBlank(_228);};SmzLib.escapeJS=function(str){if(str){SmzLib.loadModule("dojo.string.extras");return dojo.string.escape("javascript",str);}return str;};SmzLib.trim=function(s){if(s){return s.replace(/^\s+|\s+$/,"");}return s;};SmzLib.isValidDate=function(_22b,_22c){SmzLib.loadModule("dojo.validate.datetime");return dojo.validate.isValidDate(_22b,_22c);};SmzLib.isRealNumber=function(_22d){SmzLib.loadModule("dojo.validate");return dojo.validate.isRealNumber(_22d);};SmzLib.isValidUrl=function(_22e){SmzLib.loadModule("dojo.validate.web");return dojo.validate.isUrl(_22e);};SmzLib.isValidEmail=function(_22f){SmzLib.loadModule("dojo.validate.web");return dojo.validate.isEmailAddress(_22f);};SmzLib.widget.SelectBox=function(_230,_231,_232,_233){SmzLib.loadModule("dojo.widget.Select");var w=dojo.widget.createWidget("Select",_230,_231);if(_232){w.textInputNode.value=_232;}w.setValue(_233);return w;};SmzLib.widget.ComboBox=function(_235,_236,_237,_238){SmzLib.loadModule("dojo.widget.ComboBox");var w=dojo.widget.createWidget("ComboBox",_235,_236);if(_237){w.textInputNode.value=_237;}w.setValue(_238);return w;};SmzLib.widget.getTextNodeForComboBox=function(_23a){return dojo.widget.byId(_23a).textInputNode;};SmzLib.widget.getValueNodeForComboBox=function(_23b){return dojo.widget.byId(_23b).comboBoxValue;};SmzLib.widget.getSelectedValueNodeForComboBox=function(_23c){return dojo.widget.byId(_23c).comboBoxSelectionValue;};SmzLib.widget.DropdownDatePicker=function(_23d,_23e){SmzLib.loadModule("dojo.widget.DropdownDatePicker");var w=dojo.widget.createWidget("DropdownDatePicker",_23d,_23e);w._updateText=function(){this.inputNode.value=this.datePicker.value?dojo.date.format(this.datePicker.value,{formatLength:this.formatLength,datePattern:this.displayFormat,selector:"dateOnly",locale:this.lang}):"";if(this.value!=""&&(this.value<this.datePicker.startDate||this.value>this.datePicker.endDate)){this.inputNode.value="";this.value="";}this._syncValueNode();this.onValueChanged(this.getDate());this.hideContainer();};return w;};SmzLib.widget.getTextNodeForDatePicker=function(_240){return dojo.widget.byId(_240).inputNode;};SmzLib.widget.parseAndInit=function(_241){var _242=new dojo.xml.Parse();dojo.widget.getParser().createComponents(_242.parseElement(_241,null,true));};SmzLib.widget.TitlePane=function(_243,_244){SmzLib.loadModule("dojo.widget.TitlePane");return dojo.widget.createWidget("TitlePane",_243,_244);};SmzLib.widget.TabContainer=function(_245,_246,_247){SmzLib.loadModule("dojo.widget.TabContainer");var w=dojo.widget.createWidget("TabContainer",_245,_246);if(_247&&_247.length>0){for(var i=0;i<_247.length;i++){w.addChild(_247[i]);}}return w;};SmzLib.widget.ContentPane=function(_24a,_24b){SmzLib.loadModule("dojo.widget.ContentPane");return dojo.widget.createWidget("ContentPane",_24a,_24b);};var SmzForm={};SmzForm.getFormDetails=function(form,_24d,_24e){if(!_24d){_24d=SmzForm.elementValue;}var map={};var els=form.elements;if(!els){return map;}for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n){continue;}var v=_24d(el,_24e);if(v!=null&&typeof v!="undefined"){if(map[n]!=null){if(map[n].constructor!=Array){map[n]=[map[n]];}map[n].push(v);}else{map[n]=v;}}}return map;};SmzForm.elementValue=function(el,_256){if(!el){return null;}var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(!n||(!_256&&el.disabled)||t=="button"||t=="reset"||(t=="checkbox"||t=="radio")&&!el.checked||(t=="submit"||t=="image")||tag=="select"&&el.selectedIndex==-1){return null;}if(tag=="select"){var _258=el.selectedIndex;if(_258<0){return null;}var a=[],ops=el.options;var one=(t=="select-one");var max=(one?_258+1:ops.length);for(var i=(one?_258:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.getAttribute("value")!=null?op.value:op.innerHTML;a.push(v);if(one){return a;}}}return a;}return el.value;};SmzForm.elementData=function(el,_260){if(!el){return null;}var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(!n||(!_260&&el.disabled)){return null;}if(tag=="select"){return SmzForm.getSelectOptions(el);}else{if(t=="checkbox"||t=="radio"){return el.value;}}return true;};SmzForm.getSelectOptions=function(el){if(!el){return null;}if(el.options){var a=[];var ops=el.options;for(var i=0,max=ops.length;i<max;i++){var op=ops[i];a.push({n:op.innerHTML,v:op.getAttribute("value")!=null?op.value:op.innerHTML});}return a;}return null;};SmzForm.populateElementValue=function(el,_268){var t=el.type;switch(t){case "radio":case "checkbox":if(_268==null){_268=[];}else{if(_268.constructor!=Array){_268=[_268];}}el.checked=false;for(var i=0;i<_268.length;i++){if(el.value==_268[i]){el.checked=true;break;}}break;case "select-multiple":case "select-one":if(_268==null){_268=[];}else{if(_268.constructor!=Array){_268=[_268];}}var ops=el.options;var _26c={};var i=0;for(i=0;i<_268.length;i++){_26c["_"+_268[i]]=true;}for(i=0;i<ops.length;i++){var val=ops[i].getAttribute("value")!=null?ops[i].value:ops[i].innerHTML;ops[i].selected=false;if(_26c["_"+val]){ops[i].selected=true;}}break;default:el.value=(_268!=null?_268:"");}};SmzForm.reloadElement=function(el,_26f){if(_26f==null||typeof _26f=="undefined"){el.disabled=true;el.style.display="none";return;}var t=el.type;switch(t){case "radio":case "checkbox":if(_26f.constructor!=Array){_26f=[_26f];}for(var i=0;i<_26f.length;i++){if(el.value==_26f[i]){el.style.display="";el.disabled=false;return;}}el.disabled=true;el.style.display="none";break;case "select-multiple":case "select-one":if(_26f.constructor!=Array){_26f=[_26f];}el.style.display="";el.disabled=false;var i=0;var ops=el.options;for(i=0;i<ops.length;){ops[i]=null;}for(i=0;i<_26f.length;i++){var data=_26f[i];if(data.n){var _274=document.createElement("option");_274.innerHTML=data.n;_274.value=data.v;el.appendChild(_274);}}break;default:el.style.display="";el.disabled=false;}};SmzForm.reloadForm=function(form,_276){if(!_276){_276={};}var els=form.elements;if(!els){return;}for(var i=0,max=els.length;i<max;i++){var el=els[i];if(el.name!=null&&el.name!=""){SmzForm.reloadElement(el,_276[el.name]);}}};SmzForm.populateFormElements=function(form,_27b,_27c){if(!_27b){_27b={};}var els=form.elements;if(!els){return;}for(var i=0,max=els.length;i<max;i++){var el=els[i];if(el.name!=null&&el.name!=""){SmzForm.populateElementValue(el,_27b[el.name]);}}if(_27c){}};SmzForm.isValueChanged=function(el,_281){if(_281==null&&el==null){return false;}if(_281==null){return true;}var _282=_281[el.name];if(_282==null&&el.disabled){return false;}switch(el.type){case "radio":case "checkbox":if(_282==null){return el.checked;}if(_282.constructor!=Array){_282=[_282];}for(var i=0;i<_282.length;i++){if(el.value==_282[i]){return !el.checked;}}return el.checked;case "select-multiple":case "select-one":if(_282==null||_282==[]){return (el.selectedIndex!=-1);}if(_282.constructor!=Array){_282=[_282];}var ops=el.options;if(ops.length<=0&&_282.length>0){return true;}var _285={};for(var i=0;i<_282.length;i++){_285["_"+_282[i]]=true;}for(var i=0;i<ops.length;i++){if(ops[i].selected){if(_285["_"+ops[i].value]==null){return true;}}else{if(_285["_"+ops[i].value]!=null){return true;}}}return false;case "button":case "reset":case "submit":case "image":if(_282!=null){return _282!=el.value;}return false;default:return _282!=el.value;}};SmzForm.copyElementValue=function(_286,_287){if(_286==null||_287==null){return;}var _288=SmzForm.elementValue(_287,true);switch(_286.type){case "radio":case "checkbox":var _289=_286.form.elements;for(var i=0;i<_289.length;i++){var _28b=_289[i];if(_28b.type==_286.type&&_28b[i].name==_286.name){_28b.checked=false;if(_28b.value==_288){_28b.checked=true;}}}break;default:SmzForm.populateElementValue(_286,_288);}};SmzForm.frmSubmit=function(_28c,_28d,_28e){if(_28e&&_28e.length>0){var _28f=true;for(var i=0;i<_28e.length;i++){var val=SmzForm.elementValue(_28c[_28e[i]],true);if(val instanceof Array){var f=true;for(var v in val){if(!SmzLib.hasText(val[v])){f=false;}}if(f){SmzLib.removeError(_28c[_28e[i]]);}else{SmzLib.registerError(_28c[_28e[i]],"* Required Field");_28f=false;}}else{if(SmzLib.hasText(val)){SmzLib.removeError(_28c[_28e[i]]);}else{SmzLib.registerError(_28c[_28e[i]],"* Required Field");_28f=false;}}}if(!_28f){return false;}}var _294=_28c.action;var _295="ifrm"+(new Date()).getTime();if(!_28c.id||_28c.id==""){_28c.id=_295+"frFRm";}var _296=document.createElement("span");_296.style.width="0px";_296.style.height="0px";_296.id="dv"+_295;_296.innerHTML="<iframe name=\""+_295+"\" id=\""+_295+"\" style=\"width:0px !important;height:0px !important;border:none;background-color:inherit;\" src=\""+_294+"\" onload=\"SmzForm.aftLoad('"+_295+"', '"+_28c.id+"');\" ></iframe>";document.body.appendChild(_296);if(_28d){var _297=document.getElementById(_296.id).firstChild;_297.afSub_1=_28d;}SmzLib.sMessage("Submitting...");return false;};SmzForm.aftLoad=function(_298,_299){var doc=null;var frms=null;try{doc=window.frames[_298].document;frms=doc.getElementsByTagName("form");}catch(e){doc=null;}if(doc){if(frms&&frms.length&&frms.length>0){var _29c=frms[0];SmzForm.populateFormElements(_29c,SmzForm.getFormDetails(document.getElementById(_299),SmzForm.elementValue));_29c.submit();}}else{SmzLib.cMessage();var _29d=document.getElementById("dv"+_298).firstChild;if(_29d.afSub_1){_29d.afSub_1();}setTimeout("SmzForm.rmvAftLoad('"+_298+"');",10);}};SmzForm.rmvAftLoad=function(_29e){var e=document.getElementById("dv"+_29e);if(e){document.body.removeChild(e);}};SmzLib.shortcut={"all_shortcuts":{},"add":function(_2a0,_2a1,opt){var _2a3={"type":"keydown","propagate":false,"disable_in_input":false,"target":document,"keycode":false};if(!opt){opt=_2a3;}else{for(var dfo in _2a3){if(typeof opt[dfo]=="undefined"){opt[dfo]=_2a3[dfo];}}}var ele=opt.target;if(typeof opt.target=="string"){ele=document.getElementById(opt.target);}var ths=this;_2a0=_2a0.toLowerCase();var func=function(e){e=e||window.event;if(opt["disable_in_input"]){var _2a9;if(e.target){_2a9=e.target;}else{if(e.srcElement){_2a9=e.srcElement;}}if(_2a9.nodeType==3){_2a9=_2a9.parentNode;}if(_2a9.tagName=="INPUT"||_2a9.tagName=="TEXTAREA"){return;}}if(e.keyCode){code=e.keyCode;}else{if(e.which){code=e.which;}}var _2aa=String.fromCharCode(code).toLowerCase();if(code==188){_2aa=",";}if(code==190){_2aa=".";}var keys=_2a0.split("+");var kp=0;var _2ad={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",".":">","/":"?","\\":"|"};var _2ae={"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 _2af={shift:{wanted:false,pressed:false},ctrl:{wanted:false,pressed:false},alt:{wanted:false,pressed:false},meta:{wanted:false,pressed:false}};if(e.ctrlKey){_2af.ctrl.pressed=true;}if(e.shiftKey){_2af.shift.pressed=true;}if(e.altKey){_2af.alt.pressed=true;}if(e.metaKey){_2af.meta.pressed=true;}for(var i=0;k=keys[i],i<keys.length;i++){if(k=="ctrl"||k=="control"){kp++;_2af.ctrl.wanted=true;}else{if(k=="shift"){kp++;_2af.shift.wanted=true;}else{if(k=="alt"){kp++;_2af.alt.wanted=true;}else{if(k=="meta"){kp++;_2af.meta.wanted=true;}else{if(k.length>1){if(_2ae[k]==code){kp++;}}else{if(opt["keycode"]){if(opt["keycode"]==code){kp++;}}else{if(_2aa==k){kp++;}else{if(_2ad[_2aa]&&e.shiftKey){_2aa=_2ad[_2aa];if(_2aa==k){kp++;}}}}}}}}}}if(kp==keys.length&&_2af.ctrl.pressed==_2af.ctrl.wanted&&_2af.shift.pressed==_2af.shift.wanted&&_2af.alt.pressed==_2af.alt.wanted&&_2af.meta.pressed==_2af.meta.wanted){_2a1(e);if(!opt["propagate"]){e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault();}return false;}}};this.all_shortcuts[_2a0]={"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(_2b1){_2b1=_2b1.toLowerCase();var _2b2=this.all_shortcuts[_2b1];delete (this.all_shortcuts[_2b1]);if(!_2b2){return;}var type=_2b2["event"];var ele=_2b2["target"];var _2b5=_2b2["callback"];if(ele.detachEvent){ele.detachEvent("on"+type,_2b5);}else{if(ele.removeEventListener){ele.removeEventListener(type,_2b5,false);}else{ele["on"+type]=false;}}}};var JSON=function(){var m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r","\"":"\\\"","\\":"\\\\"},s={"boolean":function(x){return String(x);},number:function(x){return isFinite(x)?String(x):"null";},string:function(x){if(/["\\\x00-\x1f]/.test(x)){x=x.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c;}c=b.charCodeAt();return "\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16);});}return "\""+x+"\"";},object:function(x){if(x){var a=[],b,f,i,l,v;if(x instanceof Array){a[0]="[";l=x.length;for(i=0;i<l;i+=1){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=",";}a[a.length]=v;b=true;}}}a[a.length]="]";}else{if(x instanceof Object){a[0]="{";for(i in x){v=x[i];f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){if(b){a[a.length]=",";}a.push(s.string(i),":",v);b=true;}}}a[a.length]="}";}else{return;}}return a.join("");}return "null";}};return {copyright:"(c)2005 JSON.org",license:"http://www.crockford.com/JSON/license.html",stringify:function(v){var f=s[typeof v];if(f){v=f(v);if(typeof v=="string"){return v;}}return null;},parse:function(text){try{return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(text.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+text+")");}catch(e){return false;}}};}();