var newwin;

function openPopUp(URLtoOpen,windowName,windowFeatures) {
	newwin = window.open(URLtoOpen,windowName,windowFeatures);
	setTimeout('newwin.focus();',250);
}

function hideMock(m,r) {
	document.getElementById(m).style.display = 'none';
	document.getElementById(r).style.display = 'inline';
	document.getElementById(r).focus();
}

function showMock(m,r) {
	if(document.getElementById(r).value=='') {
		document.getElementById(m).style.display = 'inline';
		document.getElementById(r).style.display = 'none';
	}
}

var divname;
var xmlhttp;

function act(d,m,v) {
	if(window.XMLHttpRequest) xmlhttp = new XMLHttpRequest();
	else if(window.ActiveXObject) xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
	else return "unknown error"; xmlhttp.onreadystatechange = stateChanged; divname = d;
	document.getElementById(d).innerHTML = "Loading...<table><tr><td height='7'></td></tr></table>";
	xmlhttp.open("GET","../modules/act.php?mod="+m+"&vars="+v,true); xmlhttp.send(null);
}

function stateChanged() {
	if (xmlhttp.readyState==4) document.getElementById(divname).innerHTML = xmlhttp.responseText;
}

