//window.Opera = window.navigator.userAgent.indexOf("Opera") >= 0;
//window.IE = window.navigator.userAgent.indexOf("IE") >= 0 && !window.Opera;
// XMLHttpRequest:
if (window.ActiveXObject && !window.XMLHttpRequest) {
	window.XMLHttpRequest = function() {
		var msxmls = new Array(
			'Msxml2.XMLHTTP.5.0',
			'Msxml2.XMLHTTP.4.0',
			'Msxml2.XMLHTTP.3.0',
			'Msxml2.XMLHTTP',
			'Microsoft.XMLHTTP');
		for (var i = 0; i < msxmls.length; i++) {
			try {
				return new ActiveXObject(msxmls[i]);
			} catch (e) { }
		}
		return null;
	};
}

function pmtLoad(o,i,u){
	o.innerHTML = "-";
	o.onclick = new Function("pmtCollapse(this,'" + i + "')");
	var d = document.getElementById(i);
	d.style.display = "";
	loadXml(i,u);
}
function pmtCollapse(o,i){
	o.innerHTML = "+";
	o.onclick = new Function("pmtExpand(this,'" + i + "')");
	document.getElementById(i).style.display = "none";
}
function pmtExpand(o,i){
	o.innerHTML = "-";
	o.onclick = new Function("pmtCollapse(this,'" + i + "')");
	document.getElementById(i).style.display = "";
}

function loadXml(pid, url, code){
	var req = new XMLHttpRequest();
	if (req) {
		req.onreadystatechange = function() {
			if (req.readyState == 4 && req.status == 200) {
				var c = document.getElementById(pid);
				c.innerHTML = req.responseText;
				if(code != null) eval(code);
			}
		};
		req.open('GET', url);
		req.send(null);
	}
}

