function openWindow(H,C,E,A,D){var G=Math.floor((screen.width-E)/2);var F=Math.floor((screen.height-A)/2);var B="top="+F+",left="+G+",height="+A+",width="+E;if(D){B+=","+D}window.open(H,C,B)}function checkedBoxes(B,I,G,H,E){var A=G.length;var D=false;if(A>0){for(var F=0;F<A;F++){if(G[F].checked==true){D=true}}}else{if(G.checked==true){D=true}}if(D==false){alert(H);return }var C=true;if(E!=""){C=confirm(E)}if(C!=true){return }else{I.action=B;I.submit()}}function alternateRows(A,J,K){var D=false;var I=document.getElementById(A);if(!I){return }var L=I.getElementsByTagName("tbody");for(var G=0;G<L.length;G++){var H=L[G].getElementsByTagName("tr");for(var F=0;F<H.length;F++){var E=H[F].getElementsByTagName("td");for(var C=0;C<E.length;C++){var B=E[C];B.ClassName=(D?J:K)}D=!D}}}function IsNumeric(B){var D="0123456789.";var C=true;var A;for(i=0;i<B.length&&C==true;i++){A=B.charAt(i);if(D.indexOf(A)==-1){C=false}}return C}if(!document.layers&&!document.all&&!document.getElementById){event="test"}function showtip(B,A,C){if(document.all||document.getElementById){thetitle=C.split("<br>");if(thetitle.length>1){thetitles="";for(i=0;i<thetitle.length;i++){thetitles+=thetitle[i]}B.title=thetitles}else{B.title=C}}else{if(document.layers){document.tooltip.document.write('<layer bgColor="#FFFFE7" style="border:1px solid black;font-size:12px;">'+C+"</layer>");document.tooltip.document.close();document.tooltip.left=A.pageX+5;document.tooltip.top=A.pageY+5;document.tooltip.visibility="show"}}}function hidetip(){if(document.layers){document.tooltip.visibility="hidden"}}function setElementValue(A,B){var C=document.getElementById(A);if(C){C.value=B}}function checkForTimeFormat(B){var A=new RegExp("(([0-1][0-9])|([2][0-3])):([0-5][0-9]):([0-5][0-9])");if(B.match(A)){return true}else{alert("Please enter the correct time.");return false}}function emailvalidate(A){if(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(A)){return true}return false}function MM_findObj(E,D){var C,B,A;if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&D.getElementById){A=D.getElementById(E)}return A}function openPrintWindow(I,B,J,D){var A=window.location.href;var G="&PRINTER_FRIENDLY=true";var C;if(document.forms[1]&&document.forms[1].currentPage){C=document.forms[1]}else{if(document.forms[0]&&document.forms[0].currentPage){C=document.forms[0]}}if(C){for(var E=0;E<C.length;E++){var F=C.elements[E];G+="&"+F.name+"="+F.value}}if(window.localPrintExtraParam){G=G+"&"+localPrintExtraParam()}if(A.indexOf("?")!=-1){A=A+"&"}else{A=A+"?"}A=A+G;var H=getNewWindow(A,I,B,J,D);return H}function getNewWindow(A,G,B,H,D){var C=Math.floor((screen.width-B)/2);var F=Math.floor((screen.height-H)/2);var I="name=mprinter,top="+F+",left="+C+",height="+H+",width="+B;if(D){I+=","+D}try{newwindow=window.open(A,G,I);return newwindow}catch(E){newwindow=window.open(A,"ww",I);return newwindow}}function demoAlert(){alert("This feature is disabled in Online Demo.")}function popUp_3(URL,width,height){day=new Date();id=day.getTime();eval("page"+id+" = window.open(URL, '"+id+"', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+width+",height="+height+",left = 262,top = 80');")}function printer_friendly(B){var A=document.getElementById("printer_friendly");if(!A){return }if(B){A.style.display="block"}else{A.style.display="none"}}function loadImgSwf(E,D,C,A){var B=D;if(B!=null){if(B.toLowerCase().indexOf(".swf")!=-1){document.write('<span  id="'+E+'" ></span>');swfobject.embedSWF(B,E,C,A,"0.0.0",{},{},{})}else{document.write('<img  title="" alt="No Images" border="0" width="'+C+'" height="'+A+'" src="'+B+'" />')}}}function makeStdWordsForAddr(A,B){if(typeof B=="undefined"){B=true}makeStdWords(A,/['"><]/g,B)}function makeStdWordsWOSC(A){makeStdWords(A,/[^a-z0-9 ]/ig,true)}function makeStdWords(B,A,D){var C=B.value;C=C.replace(A,"");if(D){C=makeStdAlignedWord(C)}B.value=C}function makeStdAlignedWord(D){D=D.replace(/^\s+|\s+$/g,"");D=D.replace(/\s\s+/g," ");var C="";var B="";if(D!=""){str=D.split(/\s/g);for(k=0;k<str.length;k++){str[k]=str[k].toLowerCase();var A=str[k].charCodeAt(0);if(A>0){A=(A>=97&&A<=122?(A-32):A);B=String.fromCharCode(A);if(C==""){C=B+str[k].substring(1)}else{C+=" "+B+str[k].substring(1)}}else{if(k!=str.length){C+=" "}}}}return C}function at_show_aux(A,F){var D=document.getElementById(A);var E=document.getElementById(F);var C=(E.at_position=="y")?D.offsetHeight+2:0;var B=(E.at_position=="x")?D.offsetWidth-5:0;for(;D;D=D.offsetParent){C+=D.offsetTop;B+=D.offsetLeft}C=C-50;E.style.position="absolute";E.style.top=C+"px";E.style.left=B+"px";E.style.display=""}function at_show(){var A=document.getElementById(this["at_parent"]);var B=document.getElementById(this["at_child"]);at_show_aux(A.id,B.id);clearTimeout(B.at_timeout)}function at_hide(){var A=document.getElementById(this["at_parent"]);var B=document.getElementById(this["at_child"]);B.at_timeout=setTimeout("document.getElementById('"+B.id+"').style.display = 'none'",60)}function at_click(){var A=document.getElementById(this["at_parent"]);var B=document.getElementById(this["at_child"]);if(B.style.display!=""&&B.style.display!="block"){at_show_aux(A.id,B.id)}else{B.style.display=""}return false}function at_attach(C,G,B,A,E){var D=document.getElementById(C);var F=document.getElementById(G);D.at_parent=D.id;F.at_parent=D.id;D.at_child=F.id;F.at_child=F.id;D.at_position=A;F.at_position=A;F.style.position="absolute";F.style.display="none";if(E!="undefined"){D.style.cursor=E}switch(B){case"click":D.onclick=at_click;D.onmouseout=at_hide;F.onmouseover=at_show;F.onmouseout=at_hide;break;case"hover":D.onmouseover=at_show;D.onmouseout=at_hide;F.onmouseover=at_show;F.onmouseout=at_hide;break}}function isImageFile(A){var E=false;if(A!=null&&A.length>0){var B=new Array("jpg","jpeg","gif","png","swf","bmp");var D=A.substr(A.lastIndexOf(".")+1);D=D.toLowerCase();for(var C=0;C<B.length;C++){if(D==B[C]){E=true}}}return E};