function getformdata(formname)
{ var theform = document.getElementById(formname); var getstr = ""; for (i=0; i<theform.elements.length; i++) { if(theform.elements[i] != null) { if (theform.elements[i].tagName == "INPUT") { if (theform.elements[i].type == "checkbox") { if (theform.elements[i].checked) { getstr += theform.elements[i].id + "=" + encodeURIComponent(theform.elements[i].value) + "&"; } else { getstr += theform.elements[i].id + "=&"; } } else if (theform.elements[i].type == "radio") { if (theform.elements[i].checked)  { getstr += theform.elements[i].id + "=" + encodeURIComponent(theform.elements[i].value) + "&"; } } else { getstr += theform.elements[i].id + "=" + encodeURIComponent(theform.elements[i].value) + "&"; } } else if (theform.elements[i].tagName == "SELECT") { var sel = theform.elements[i]; getstr += sel.name + "=" + encodeURIComponent(sel.options[sel.selectedIndex].value) + "&"; } else { getstr += theform.elements[i].id + "=" + encodeURIComponent(theform.elements[i].value) + "&";	 } } } return getstr; } function findPos(obj)
{ var curleft = 0; var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curleft += obj.offsetLeft-obj.scrollLeft;
curtop += obj.offsetTop-obj.scrollTop; var position=''; if (obj.style&&obj.style.position) position=obj.style.position.toLowerCase(); if ((position=='absolute')||(position=='relative')) break; while (obj.parentNode!=obj.offsetParent) { obj=obj.parentNode;
curleft -= obj.scrollLeft; curtop -= obj.scrollTop; } obj = obj.offsetParent; } } else { if (obj.x) curleft += obj.x; if (obj.y)
curtop += obj.y; } return {left:curleft,top:curtop}; } function emptydivcontents(container) { while(container.firstChild) { container.removeChild(container.firstChild); } }
function initializeXMLHTTP() { if(typeof xmlhttp=="undefined")var xmlhttp=false; if(!xmlhttp)try{ xmlhttp=new XMLHttpRequest(); }catch(e){xmlhttp=false;} if(typeof ActiveXObject != "undefined"){ if(!xmlhttp)try{ xmlhttp=new ActiveXObject("MSXML2.XMLHTTP"); }catch(e){xmlhttp=false;} if(!xmlhttp)try{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){xmlhttp=false;} }
if(!xmlhttp)try{ xmlhttp=createRequest(); }catch(e){xmlhttp=false;} return xmlhttp; }