var baseopacity=0

function showbox(){
	caja=document.getElementById("box")
	browserdetect=caja.filters? "ie" : typeof caja.style.opacity=="string"? "mozilla" : ""
	instantset(baseopacity)
	highlighting=setInterval("gradualfade(caja)",50)
	izq = ((screen.width-930)/2)-10;
	caja.style.left = izq+"px";
	scroll(0,0);
	caja.style.display = "block";
	//alert("Ancho: "+screen.width);
}

function hidebox(){
	caja=document.getElementById("box")
	cleartimer()
	instantset()
	caja.style.display = "none";
}

function instantset(degree){
	if (browserdetect=="mozilla")
	caja.style.opacity=degree/100
	else /*if (browserdetect=="ie")*/
	caja.filters.alpha.opacity=degree
}

function cleartimer(){
	if (window.highlighting) clearInterval(highlighting)
}

function gradualfade(objeto){
	if (browserdetect=="mozilla" && objeto.style.opacity<1)
	objeto.style.opacity=Math.min(parseFloat(objeto.style.opacity)+0.1, 0.99)
	else if (browserdetect=="ie" && objeto.filters.alpha.opacity<100)
	objeto.filters.alpha.opacity+=10
	else if (window.highlighting)
	clearInterval(highlighting)
}