function addEvent(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true;}else{if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r;}else{return false;}}}function removeEvent(obj,evType,fn,useCapture){if(obj.removeEventListener){obj.removeEventListener(evType,fn,useCapture);return true;}else{if(obj.detachEvent){var r=obj.detachEvent("on"+evType,fn);return r;}else{alert("Handler could not be removed");}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight;}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight;}if(document.body){return document.body.clientHeight;}return window.undefined;}function getViewportWidth(){var offset=17;var width=null;if(window.innerWidth!=window.undefined){return window.innerWidth;}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth;}if(document.body){return document.body.clientWidth;}}function getScrollTop(){if(self.pageYOffset){return self.pageYOffset;}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop;}else{if(document.body){return document.body.scrollTop;}}}}function getScrollLeft(){if(self.pageXOffset){return self.pageXOffset;}else{if(document.documentElement&&document.documentElement.scrollLeft){return document.documentElement.scrollLeft;}else{if(document.body){return document.body.scrollLeft;}}}}function cursorWait(){var fe;for(var f=0;f<=(document.forms.length-1);f++){for(var e=0;e<=(document.forms[f].elements.length-1);e++){fe=document.forms[f].elements[e];fe.style.cursor="wait";if(fe.type){if(fe.type.indexOf("select-one")==0||fe.type.indexOf("select")==0){fe.style.cursor="wait";}}}}}function resetCursor(objForm){for(i=0;i<objForm.elements.length;i++){objForm.elements[i].style.cursor="auto";}}function trim(strText){while(strText.substring(0,1)==" "){strText=strText.substring(1,strText.length);}while(strText.substring(strText.length-1,strText.length)==" "){strText=strText.substring(0,strText.length-1);}return strText;}function showHide(div,nest){obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;if(obj.visibility=="visible"||obj.visibility=="show"){obj.visibility="hidden";obj.display="none";}else{obj.visibility="visible";obj.display="block";}}function show(div,nest){obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;obj.visibility="visible";obj.display="block";}function hide(div,nest){obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0;obj.visibility="hidden";obj.display="none";}function swap(showObj,hideObj){show(showObj);hide(hideObj);}function autoTab(element,nextElement){if(element.value.length==element.maxLength&&nextElement!=null){element.form.elements[nextElement].focus();}}function ValidateNumeric(){var keyCode=window.event.keyCode;if(keyCode>57||keyCode<48){window.event.returnValue=false;}}function getPrint(print_area,strPageTitle){var pp=window.open();pp.document.writeln("<html><head><title>"+strPageTitle+"</title>");pp.document.writeln('<link href="/home.css" type="text/css" rel="stylesheet">');pp.document.writeln('<script language="JavaScript" type="text/javascript"> function kill(){} <\/script>');pp.document.writeln('<base target="_self"></head>');pp.document.writeln("<body>");pp.document.writeln('<form method="post">');pp.document.writeln('<table width="100%" cellpadding="4" cellspacing="0" style="margin:0px"><tr><td></td></tr><tr><td align="right">');pp.document.writeln('<input id="print" type="button" value="Print" ');pp.document.writeln('onclick="javascript:location.reload(true);window.print();">');pp.document.writeln('<input id="close" type="button" value="Close" onclick="javascript:window.close();">');pp.document.writeln("</td></tr><tr><td>&nbsp;</td></tr></table>");pp.document.writeln(document.getElementById(print_area).innerHTML);pp.document.writeln("</form></body></html>");}var win=null;var winl;var wint;function openPopupWindow(mypage,myname,w,h,strother){if(h=="full"){h=window.screen.availHeight-130;wint=0;}else{wint=20;}if(w=="full"){w=window.screen.availWidth-10;strother+=" fullscreen=yes";winl=0;}else{winl=(screen.width-w)/2;}if(isNaN(h)||(h=="")){h=420;}if(isNaN(w)||(w=="")){w=620;}winprops="width="+w+",height="+h+",top="+wint+",left="+winl+","+strother+"";win=window.open(mypage,myname,winprops);if(!win||win.closed){win=window.open(mypage,myname,winprops);}else{win.focus();}}var xmlhttp=false;function openXMLHttpObj(){if(window.XMLHttpRequest){try{xmlhttp=new XMLHttpRequest();}catch(e){xmlhttp=false;}}else{if(window.ActiveXObject){try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){xmlhttp=false;}}}}return xmlhttp;}var xmlDoc;function loadXML(xmlFile){xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.async="false";xmlDoc.onreadystatechange=verify;xmlDoc.load(xmlFile);}function verify(){if(xmlDoc.readyState!=4){return false;}}function traverse(tree){if(tree.hasChildNodes()){document.write("<ul><li>");document.write("<b>"+tree.tagName+" : </b>");var nodes=tree.childNodes.length;for(var i=0;i<tree.childNodes.length;i++){traverse(tree.childNodes(i));}document.write("</li></ul>");}else{document.write(tree.text);}}function initTraverse(file){loadXML(file);var doc=xmlDoc.documentElement;traverse(doc);}