function resize_contenedor(){
	h=(document.body.scrollHeight)
//	if (h > top.document.body.offsetHeight-150) h = top.document.body.offsetHeight-150
	a=parent.document.getElementById("interior")
	if (h < 100) h = 200;
	a.height=h+"px"
}
// para las peliculas
function startTimer() {
        running = true
        now = new Date()
        now = now.getTime()
// cada 2 minutos
        endTime = now + (1000 * 60 * 2)
        showCountDown()
}

function showCountDown() {
        var now = new Date()
        now = now.getTime()
        if (endTime - now <= 0) {
                stopTimer()
                var result = unescape(window.location.href)
// cogo hasta ts=
				if (result.indexOf("ts=") != -1) {
					result = result.substring(0, result.indexOf("ts=")+3);
					d = new Date();
					result = result + d.getTime();
//					alert(result);
				}
                        window.location=result
        } else {
                if (running) {
                        timerID = setTimeout("showCountDown()",1000)
                }
        }
}

function stopTimer() {

        clearTimeout(timerID)
        running = false
}

// para los perfiles
function startTimerPerfil() {
        running = true
        now = new Date()
        now = now.getTime()
// cada 5 minutos
        endTime = now + (1000 * 60 * 5)
        showCountDown()
}

function cambiar(valor){
alert(valor.value + ".asp");
	document.location = valor.value + ".asp";
}

function desplazar(){
//	tope=(imagen_ancho*km_actual/km_totales)+inicio_capa
//	capa = document.getElementById("tapaDiv").style;
//	capa.xpos=inicio_capa;
//	mover_derecha()*/

	hasta = ((imagen_ancho)*km_actual/km_totales)+inicio_capa
	$("#tapaDiv").animate({width:inicio_capa},10)
	$("#tapaDiv").animate({width:hasta},6000)

}

function mover_derecha(){
	if (capa.xpos < tope)
	{
		capa.xpos += 2
		capa.left = capa.xpos + "px";
			setTimeout("mover_derecha()")
	}
}