function writeLayer(layerID,txt){
	if(document.getElementById){
		layer=document.getElementById(layerID);
		layer.innerHTML=txt;
	}else if(document.all){
		document.all[layerID].innerHTML=txt;
	}else if(document.layers){
		with(document.layers[layerID].document){
			open();
			write(txt);
			close();
		}
	}
}

function toggleLayer(whichLayer) {
	if (document.getElementById) {
	// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		if (style2.display!="block") style2.display = "block";
		else style2.display = "none";
	}
	else if (document.all) {
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		if (style2.display!="block") style2.display = "block";
		else style2.display = "none";
	}
	else if (document.layers) {
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		if (style2.display!="block") style2.display = "block";
		else style2.display = "none";
	}
}

function xmlhttpPost(ajaxURL, queryString, resultFunc, resultParams) {
	var xmlHttpReq = false;

	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		xmlHttpReq = new XMLHttpRequest();
	//	xmlHttpReq.overrideMimeType('text/xml');
	}
	// IE
	else if (window.ActiveXObject) {
		xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlHttpReq.open('POST', ajaxURL, true);
	xmlHttpReq.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	xmlHttpReq.onreadystatechange = function() {
		if (xmlHttpReq.readyState == 4) {
			eval(resultFunc + '(xmlHttpReq.responseText, resultParams );');
		}
	}
	xmlHttpReq.send(queryString);
}

function changeImage(img_name, img_src) {
	document[img_name].src=img_src;
}