// Begin Ajax functions here
var xmlHttp

function showPHP(phpfile,id,method,postform)
{

if (phpfile.length==0){
  document.getElementById(id).innerHTML="";
  return;
 }

xmlHttp=GetXmlHttpObject();

if (xmlHttp==null){
  alert ("Your browser does not support AJAX!");
  return;
}

var url=phpfile;

if(method == 'post'){
	var str = getFormValues(postform);
	//var str = "this=2&that=3";


	xmlHttp.open("POST",url,true);
	xmlHttp.onreadystatechange= function() { stateChanged(id); };
	//Send the proper header information along with the request
	xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=UTF-8");

	//document.writeln(str);

	xmlHttp.send(str);
}else{

	url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange= function() { stateChanged(id); };
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
}

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

function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

var DHTML = (document.getElementById || document.all || document.layers);

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

var delayMenu = 500;	// how long a menu should hang when mouse has moved on
var over = 'no';
var lastOne = ' ';

function onMenu(obj)
{
	if (!DHTML) return;
	over ='yes'
	var x = new getObj(obj);
	
	if (lastOne != ' ')  {
		lastOne.style.visibility = 'hidden';
	}
		x.style.visibility = 'visible';

}

function offMenu()
{
	if (!DHTML) return;
	if(over == 'no'){
		lastOne.style.visibility = 'hidden';
	}
}

function navOver(){
	over = 'yes';
}

function navOut(pic){
	lastOne = new getObj(pic);
	over = 'no';
	setTimeout("offMenu()", delayMenu);
}

var texttop = 400;

function move(amount)
{
	if (!DHTML) return;
	var x = new getObj('text');
	texttop += amount;
	x.style.top = texttop;
}