function enlace(pagina){
	var d = new Date();
	document.location.href=pagina+"?ts="+d.getTime();
}

function cambiar(valor){
	var d = new Date();
	document.location = valor.value + ".html?ts="+ d.getTime();
}

//Para cuando los tiempos tiran de la BD en sql
function cambiarasp(valor){
	var d = new Date();
	document.location = "online.asp?c=" + valor.value + "&t=" + tramo;
}

function cambiarasp_tramo(valor){
	d = new Date();
	var tramo = parseInt(valor.value) + 1
	document.location = "online.asp?c=" + clas_actual + "&t=" + tramo;
}


function cambiar_tramo(valor){
	d = new Date();
	document.location = valor + ".html?ts="+ d.getTime();
}

// Para cuando termina el rally y se quedan las pag en html
//function cambiarasp(valor){
//document.location = valor.value + ".html";
//}

window.onload = function(){
	setTimeout("recargar()",60000);
}

function recargar(){
	var dir = unescape(document.location.href);
	var pag = ""
	if (dir.indexOf("?", 0) == -1) {
		pag = dir+"?nc="+Math.random();
	} else {
		if (dir.indexOf("?nc", 0) != -1) pag = dir.substr(0,dir.indexOf("?nc", 0))+"?nc="+Math.random();
		if (dir.indexOf("&nc", 0) != -1) pag = dir.substr(0,dir.indexOf("&nc", 0))+"&nc="+Math.random();
		if ((dir.indexOf("?nc", 0) == -1) && (dir.indexOf("&nc", 0) == -1)) pag = dir + "&nc="+Math.random();
//		var pag = (dir.indexOf("&nc", 0) == -1) ? dir+"&nc="+Math.random() : dir.substr(0,dir.indexOf("&nc", 0))+"&nc="+Math.random();
	}
	window.location.href=pag;
}