// // BASIC FUNCTIONS // String.prototype.capitalize = function() { return this.charAt(0).toUpperCase() + this.slice(1); } function xmlObject(){ try{ // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); }catch (e){ // Internet Explorer try{ xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); }catch (e){ try{ xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); }catch (e){ alert("Your browser does not support AJAX!"); return false; } } } return xmlHttp; } function doXmlRequest(xmlUrl, functionByValue) { xmlObj = new xmlObject(); xmlObj.onreadystatechange = function(){ if (xmlObj.readyState == 4) { globalXmlData = xmlObj.responseText; functionByValue(xmlObj.responseText); } } xmlObj.open('GET', xmlUrl , true); xmlObj.send(null); } function doXmlPOSTRequest(xmlUrl, params, functionByValue) { xmlObj = new xmlObject(); xmlObj.open("POST", xmlUrl, true); //Send the proper header information along with the request xmlObj.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlObj.setRequestHeader("Content-length", params.length); xmlObj.setRequestHeader("Connection", "close"); xmlObj.onreadystatechange = function() {//Call a function when the state changes. if (xmlObj.readyState == 4) { globalXmlData = xmlObj.responseText; functionByValue(xmlObj.responseText); } } xmlObj.send(params); } function showTR(trid){ if (document.all) document.all[trid].style.display = ''; else if (document.getElementById) document.getElementById(trid).style.display = ''; } function hideTR(trid){ if (document.all) document.all[trid].style.display = 'none'; else if (document.getElementById) document.getElementById(trid).style.display = 'none'; } function toggleTR(trid) { if (document.all) document.all[trid].style.display = (document.all[trid].style.display == 'none') ? 'block' : 'none'; else if (document.getElementById) document.getElementById(trid).style.display = (document.getElementById(trid).style.display == 'none') ? 'block' : 'none'; } // // END BASIC FUNCTIONS //