function xmlhttpPost(page) {
updatepage("<br><br><br>&nbsp;&nbsp;<span class='pageLoading'>&nbsp;" + 
           "<img border=0 src='./images/layout/spinner.gif'>&nbsp;" +
           "<big><i>Loading...</i></big>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>")
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
        //self.xmlHttpReq.overrideMimeType("text/xml");
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('POST', './pages/b_' + page + '.php', true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText, page);
        }
    }
    self.xmlHttpReq.send(getquerystring(page));
}

function xmlhttpPostWithParams(page, params) {
updatepage("<br><br><br>&nbsp;&nbsp;<span class='pageLoading'>&nbsp;" + 
           "<img border=0 src='./images/layout/spinner.gif'>&nbsp;" +
           "<big><i>Loading...</i></big>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>")
    var xmlHttpReq = false;
    var self = this;
    // Mozilla/Safari
    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
        //self.xmlHttpReq.overrideMimeType("text/xml");
    }
    // IE
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
    self.xmlHttpReq.open('GET', './pages/b_' + page + '.php?' + params, true);
    self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
    self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
            updatepage(self.xmlHttpReq.responseText, page);
        }
    }
    self.xmlHttpReq.send(getquerystring(page));
}

function getquerystring(page) {
    //var form     = document.forms['f1'];
    //var word = form.word.value;
    qstr = 'w=' + escape(page);  // NOTE: no '?' before querystring
    return qstr;
}

function updatepage(str, page){
    document.getElementById("mainBody").innerHTML = str;
	if (page == 'rinkinfo') {mapload()}
	
}

function pausecomp(millis) 
{
date = new Date();
var curDate = null;

do { var curDate = new Date(); } 
while(curDate-date < millis);
} 


function go(id) {

   theFrm = document.getElementById("frmPhotoD")


  theFrm.photoID.value = id

  theFrm.action = "./photoview.php"
  theFrm.target = "_blank"
  theFrm.submit()

}

