function hide(el) {
	el = document.getElementById(el);
	if (!el.hasAttribute('displayOld')) {
		el.setAttribute("displayOld", el.style.display)
	}

	el.style.display = "none"
}

function show(el) {
	el = document.getElementById(el);
	var old = el.getAttribute("displayOld");
	el.style.display = old || "";
}

function toggle(el) {
  document.getElementById(el).style.display = (document.getElementById(el).style.display == 'none') ? 'block' : 'none'
}


function getXmlHttp(){
  var xmlhttp;
  try {
    xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  } catch (e) {
    try {
      xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    } catch (E) {
      xmlhttp = false;
    }
  }
  if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
    xmlhttp = new XMLHttpRequest();
  }
  return xmlhttp;
}


function post(url, send, where) { 
	
	var xmlhttp = getXmlHttp();
	var params;
	
	if(send.length == 0){ params = null; }else{ params = send; }	
	
	xmlhttp.open('POST', url, true);
	xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	xmlhttp.onreadystatechange = function() {
		if (xmlhttp.readyState == 4) {
			if(xmlhttp.status == 200) {
				document.getElementById(where).innerHTML = xmlhttp.responseText;
			}
		}
	};
xmlhttp.send(params);
}
