var xmlhttp = false;

function showBox(boxName,startV,endV) {
	
	document.getElementById(boxName).style.display="block";
	//opacityTween = new OpacityTween(document.getElementById(boxName),Tween.regularEaseIn, startV, endV, 1);
	//opacityTween.start();
	t1 = new Tween(document.getElementById(boxName).style,'top',Tween.elasticEaseOut,startV,endV,2,'px');
	t1.start();


}


function hideBox(boxName,startV,endV) {
	
	
	//opacityTween = new OpacityTween(document.getElementById(boxName),Tween.regularEaseIn, startV, endV, 1);
	//opacityTween.start();
	t1 = new Tween(document.getElementById(boxName).style,'top',Tween.elasticEaseOut,startV,endV,2,'px');
	t1.start();
	t1.onMotionFinished = function()
	{
	document.getElementById(boxName).style.display="none";
	}

}

function login() {
document.getElementById("loginform").submit();
}

function getxmlhttp (){
	
	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 processajax (serverPage, fun, str){
	xmlhttp = getxmlhttp ();
	xmlhttp.open("GET", serverPage+"?"+str);
	//obj = document.getElementById(fun);
	/*xmlhttp.onreadystatechange = function() {
			if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			obj.innerHTML = xmlhttp.responseText;
			alert(xmlhttp.responseText);
			}
		}*/
	xmlhttp.onreadystatechange = fun;
		xmlhttp.send(null);
}

function getcenter(menu)
{
var f = function () {
		if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
			document.getElementById('centercontent').innerHTML = xmlhttp.responseText;
		}
	}
	processajax("getlcenter.php",f,"m="+menu);
}
