﻿
function MM_showHideLayers() { //v9.0
    var i, p, v, obj, args = MM_showHideLayers.arguments;
    for (i = 0; i < (args.length - 2); i += 3)
        with (document) if (getElementById && ((obj = getElementById(args[i])) != null)) {
        v = args[i + 2];
        if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }

        obj.visibility = v;
    }
}



function changepicture(imgid, img) {
    var s, m;

    pageclick("/picture.aspx");
    
    if (document.getElementById(imgid)) {
        document.getElementById(imgid).src = img;
    }

    
}



function changeText(divid, text) {
    if (document.getElementById(divid)) {
        document.getElementById(divid).innerHTML = '' + text;
    }

}


function pageclick(pagename) {

    
    
    if (window.XMLHttpRequest) {
        xmlhttpreq = new XMLHttpRequest();
    }
    else {
        xmlhttpreq = new ActiveXObject("Microsoft.XMLHTTP");
    }

    if (xmlhttpreq) {


        var xmlhttpreqparms = "id=" + sessionid;

        xmlhttpreq.open("POST", pagename, true);
        xmlhttpreq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlhttpreq.setRequestHeader("Content-length", xmlhttpreqparms.length);
        xmlhttpreq.setRequestHeader("Connection", "close");


        xmlhttpreq.send(xmlhttpreqparms);
        xmlhttpreq.close;
        
        

    }

}


