var req;

function loadXMLDoc(url) {
	req = false;
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
    	try {
			req = new XMLHttpRequest();
        }
        catch(e) {
			req = false;
        }
    }
    // branch for IE/Windows ActiveX version
    else if (window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	}
      	catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	}
        	catch(e) {
          		req = false;
        	}
		}
    }
	if (req) {
		req.onreadystatechange = processReqChange;
		req.open("GET", url, true);
		req.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
		req.send("");
	}
}

function loadXMLDocPost(url, queryString) {
	req = false;
    // branch for native XMLHttpRequest object
    if (window.XMLHttpRequest) {
    	try {
			req = new XMLHttpRequest();
        }
        catch(e) {
			req = false;
        }
    }
    // branch for IE/Windows ActiveX version
    else if (window.ActiveXObject) {
       	try {
        	req = new ActiveXObject("Msxml2.XMLHTTP");
      	}
      	catch(e) {
        	try {
          		req = new ActiveXObject("Microsoft.XMLHTTP");
        	}
        	catch(e) {
          		req = false;
        	}
		}
    }
	if (req) {
		req.open("POST", url, true);
		req.onreadystatechange = processReqChange;
		req.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
        //req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		req.send(queryString);
	}
}

var debug_mode = false;

function processReqChange() {
    // only if req shows "loaded"
    if (req.readyState == 4) {
        // only if "OK"
        if (debug_mode)
        {
           document.write(req.responseText);
        }

        eval (req.responseText);

    }
}
function swf(src, width, height)
{
	var str = '<EMBED src="' + src + '" quality=high wmode=transparent WIDTH=' + width + ' HEIGHT=' + height + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" allowScriptAccess="always"></EMBED>';
	document.write(str);
return;
    var str;
    str = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,12,36" WIDTH=' + width + ' HEIGHT=' + height + '>';
    str += '<PARAM NAME=movie VALUE="' + src + '">';
    str += '<PARAM NAME=quality VALUE=high>';
    str += '<PARAM NAME=menu value=false>';
    str += '<PARAM NAME=allowScriptAccess value=always>';
    str += '<param name="wmode" value="transparent">';
    str += '<EMBED src="' + src + '" quality=high wmode=transparent WIDTH=' + width + ' HEIGHT=' + height + ' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" allowScriptAccess="always"></EMBED>';
    str += '</OBJECT>';

    document.write(str);
}

function ViewMap(name)
{
	window.open('/09_global/viewmap.php?id=' + name, '', 'width=580, height=780, scrollbars=no');
}

function toggle(id)
{
	var obj = document.getElementById(id);
	obj.style.display = (obj.style.display == 'none') ? 'block' : 'none';
}

