var xmlhttp;
var timerId = 0;
var op = 1;

function getPageFx(u)
{
var url = u;
if(url==null)
	url = "transpage2.html";
if (window.XMLHttpRequest)
{
	xmlhttp=new XMLHttpRequest();
	xmlhttp.onreadystatechange=xmlhttpChange;
	xmlhttp.open("GET",url,true);
	xmlhttp.send(null);
}
else
	getPageIE(u);
return false;
}

function xmlhttpChange()
{
// if xmlhttp shows "loaded"
if (xmlhttp.readyState==4)
{
// if "OK"
if (xmlhttp.status==200)
{
if(timerId!=0)
	window.clearTimeout(timerId);
	timerId = window.setTimeout("trans();",50);
}
else
{
	alert(xmlhttp.status);
}
}
}

function trans(){
op -= .1;
document.body.style.opacity = op;
if(op<.1){
		window.clearTimeout(timerId);
		timerId = 0;
		op = 99;
		document.body.style.opacity = op;
		document.open(); document.write(xmlhttp.responseText); document.close(); return;
	}
	timerId = window.setTimeout("trans();",50);
}

function getPageIE(url){
	window.location.href = url;
}