 function poptoggle (postid) {
var whichpost = document.getElementById(postid);
if (whichpost.className=="expandblock") {
whichpost.className="collapseblock";
}
else {
whichpost.className="expandblock";
}
}

function poptoggle2 (postid,postid2) {
var whichpost = document.getElementById(postid);
if (whichpost.className=="expandblock") {
whichpost.className="collapseblock";
}
else {
whichpost.className="expandblock";
}
var whichpost2 = document.getElementById(postid2);
if (whichpost2.className=="collapseblock") {
whichpost2.className="expandblock";
}
else {
whichpost2.className="collapseblock";
}
}

function pop (postid) {
var whichpost = document.getElementById(postid);
if (whichpost.className=="collapseblock") {
whichpost.className="expandblock";
}
}

function jahpop(url,target,postid) {
var whichpost = document.getElementById(postid);
if (whichpost.className=="expandblock") {
whichpost.className="collapseblock";
}
else {
whichpost.className="expandblock";
    // native XMLHttpRequest object
    document.getElementById(target).innerHTML = '<div align=center><BR><BR><img src="/images/Ajax.gif" width=32 height=32><BR><BR><BR><BR></div>';
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(target);};
        req.open("GET", url, true);
        req.send(null);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = function() {jahDone(target);};
            req.open("GET", url, true);
            req.send();
        }
    }

}
}    


function jah(url,target,loading) {
    // native XMLHttpRequest object
    document.getElementById(target).innerHTML = loading;
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(target);};
        req.open("GET", url, true);
        req.send(null);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = function() {jahDone(target);};
            req.open("GET", url, true);
            req.send();
        }
    }
}  



function jahfav(url,target) {
    // native XMLHttpRequest object
    document.getElementById(target).innerHTML = '<img id="imagebackground3" border=0 align=right hspace=0 width=15 height=15 style="margin-left:10px; margin-bottom:5px; margin-right:3px;" src="/images/Favorite-InLine.gif">';
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(target);};
        req.open("GET", url, true);
        req.send(null);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = function() {jahDone(target);};
            req.open("GET", url, true);
            req.send();
        }
    }
}  

function jahDone(target) {
    // only if req is "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (req.status == 200) {
            results = req.responseText;
            document.getElementById(target).innerHTML = results;
        } else {
            document.getElementById(target).innerHTML="jah error:\n" +
                req.statusText;
        }
    }
}


function jahnl(url,target) {
    // native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(target);};
        req.open("GET", url, true);
        req.send(null);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = function() {jahDone(target);};
            req.open("GET", url, true);
            req.send();
        }
    }
}  

function jahnlpost(url,params,target) {
    // native XMLHttpRequest object
    if (window.XMLHttpRequest) {
        req = new XMLHttpRequest();
        req.onreadystatechange = function() {jahDone(target);};
        req.open("POST", url, true);
		//Send the proper header information along with the request
		req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		req.setRequestHeader("Content-length", params.length);
		req.setRequestHeader("Connection", "close");
        req.send(params);
    // IE/Windows ActiveX version
    } else if (window.ActiveXObject) {
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) {
            req.onreadystatechange = function() {jahDone(target);};
            req.open("GET", url, true);
            req.send();
        }
    }
} 



