function LoadDiv(DivID){ if (document.getElementById(DivID).innerHTML == ""){ document.getElementById(DivID).innerHTML = "Loading ... Please Wait"; sPath = window.location.pathname; sPage = sPath.substring(sPath.lastIndexOf('/') + 1); PName = sPage.substr(0,sPage.length-4) if (PName.length==0) PName = 'Default'; PageReq = 'http://psc.socitmconsulting.co.uk/Tabs/'+PName+'.asp?tab='+DivID var xmlhttp; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; }}} xmlhttp.open("POST",PageReq,true); //Send the proper header information along with the request xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); xmlhttp.setRequestHeader("Connection", "close"); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { if (xmlhttp.status==200) { changed = CheckChanged(); document.getElementById(DivID).innerHTML = xmlhttp.responseText; if (!changed) Sform = fields(); } else if (xmlhttp.status==12031 || xmlhttp.status==12029){ document.getElementById(DivID).innerHTML = ""; if (confirm("Temporary problem with internet connection.\n\Would you like to try again?")) LoadDiv(DivID); } else if (xmlhttp.status!=0){ document.getElementById(DivID).innerHTML = ""; alert(PageReq+"\n\Cannot retrieve data.\n\Problem with connection to server: "+xmlhttp.status+xmlhttp.responseText); } } } xmlhttp.send(); } } function showdiv(d,x) { ds = eval("/"+x + d + "/"); ss = eval("/"+x+"/"); var divs=document.getElementsByTagName('div'); for (i=0;i