var m=100;
var t;
var url;
function hideLoading() {  

m=m-4;
document.getElementById('pageIsLoading').style.opacity = m/100;
document.getElementById('pageIsLoading').style.filter="alpha(opacity="+m+")";
t = setTimeout("hideLoading()",1);
if (m<=0) { 

clearTimeout(t);
document.getElementById('pageIsLoading').style.display = 'none'; 

}

 
}  

function unloaded(url){
//alert(m+' '+url+' '+link);

document.getElementById('pageIsLoading').style.display = 'block'; 
m=m+4;
document.getElementById('pageIsLoading').style.opacity = m/100;
document.getElementById('pageIsLoading').style.filter="alpha(opacity="+m+")";
t = setTimeout("unloaded('"+url+"')",1);
if (m>=100) { 
clearTimeout(t);
location.href = url;

}

}