function do_post_contact(frm){delete xmlHttp;createXMLHttpRequest();var url=document.getElementById(frm).action;var args='';fname=document.getElementById(arguments[0]);if(trimstring(document.contactform.comments.value)===''){alert('You need to enter some comments before submitting the form.');return false;}for(var elems=0;elems<fname.length;elems++){if(fname.elements[elems].name!==''){if(args>''){args+='&';}args+=fname.elements[elems].name+"="+fname.elements[elems].value;}}var query=args+'&ajx=1'+'&ts='+new Date().getTime();if(!xmlHttp){window.document.contactform.submit();}else{xmlHttp.open("POST",url,true);xmlHttp.onreadystatechange=handleStateChange_Comments;xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlHttp.send(query);}}function handleStateChange_Comments(){if(xmlHttp.readyState==4){if(xmlHttp.status==200){comment_updates();}else{alert("Ooops! An error seems to have occured:: Error Code:"+xmlHttp.status);}}}function comment_updates(){var xmlDoc=xmlHttp.responseXML,msgs=xmlDoc.getElementsByTagName("message");update_comments_page(msgs);}function update_comments_page(msgs){var msg='',currentMsg=null;currentMsg=msgs[0];if((currentMsg!==null)&&(currentMsg.childNodes[0]!==null)){msg=currentMsg.childNodes[0].nodeValue;msg=unescape(msg);}if(msg>''){document.getElementById('contact').innerHTML=msg;self.scrollTo(0,0);}}