var encchanges= new Array();
	
var EventPaisId;
var EventoId;
var DateEvent;
var SportId;
var CodigoPais;
var MatchupId;
var page;
var Status='';
var ChangeStat=false;
var lastPop=0;
var lastComp='0';
var delay = 0;
var timer = 0;
var timer_updateRow = 0;
var imageURL = "/modules/livescores/images/add.gif";
var pruebass="";
var ReloadCmp=false;
//Variables del TextScroll
var scrollInterval = null;
var viewLatest = true;
var contador=0;
var clock_array = [];

//Variables de paginacion
var total_enc = 0;
var start = 0;


//**********************

function refrescar(){
	
	var str = '';		
	chgs=document.getElementById('enc_changes').elements;
	for(var i = 0; i < chgs.length; i++)
	{
		encid= chgs[i].id;
		encchanges[encid]=chgs[i].value;	
	} 
	stateq=0;
		
	if(!ChangeStat)	
		stateq=1;	
	//alert('Prueba');
	if(page=='score'){
		//alphaOff("MatchupResult");
		//alert(document.getElementById('enc_Count'));
		/*
		if (Status != 'inprogress')
			document.getElementById("MatchupResult").innerHTML = '<div style="width: 100%;height: 100px;text-align: center;"><img src="/modules/livescores/images/loading.gif" /></div>';
		*/
		
		
		
		xajax_RefrescarLiveScore(SportId,EventPaisId,EventoId,CodigoPais,DateEvent,Status,stateq,lastComp,ReloadCmp, start, total_enc);
		//alert("\nSP: "+SportId+"\nEvp: "+EventPaisId+"\n Evento: "+EventoId+"\nPais"+CodigoPais+"\nFecha"+DateEvent+"\nStatus: "+Status+"\n-"+stateq);
		
	}
	else if(page=='log'){
		alphaOff("MainLog");			
		xajax_RefrescarLiveScoreLog(MatchupId);
		
	} else if(page=='cart')	{
		//alphaOff("live2");
		xajax_RefrescarLiveCart(Status, stateq);		
	}	

	if (Status == 'inprogress'){
		var cotizacion = document.getElementById('cotizacion');
		if(cotizacion)
			cotizacion.style.display = 'none';
	} else if(Status != '') {
		var cotizacion = document.getElementById('cotizacion');
		if(cotizacion)
			cotizacion.style.display = 'block';
	}
	ChangeStat=false;
	
	
	//La uso para llamar la funcion Init de thickbox(lightWindow). 
	//thickInit();
	
}
function setChangeStat(value){
	ChangeStat=value;
}
function setReloadCmp(value){
	ReloadCmp=value;
}
function LiveScoreStatus(VarStatus){
	//alert(LastStat);
	setTotalEnc(0);
	setStart(0);
	
	SubMenuStatus(VarStatus);
	if(VarStatus!=LastStat)	
		ChangeStat=true;		
	SetStatus(VarStatus);	
	refrescar();
	ChangeStat=false;
	lastPop=0;
	lastComp='0';
	
	//t = setTimeout('thickInit()',2000);
	//thickInit();
	//clearTimeout(t);
	
}

function LiveScoreCountry(VarCode){
	SetCodeCountry(VarCode);
	ChangeStat=true;
	refrescar();
}

function getEvento(VarDepid, VarPais, VarLiga){
	SetSportId(VarDepid);
	SetCodeCountry(VarPais);
	SetEventId(VarLiga);
	ChangeStat=true;
	refrescar();
}


function LiveScoreHoy(VarStatus,VarDateEvent){
	if(VarDateEvent!='')
		DateEvent=VarDateEvent;
	SubMenuStatus(VarStatus);
	if(VarStatus!=LastStat)	
		ChangeStat=true;		
	SetStatus(VarStatus);	
	//alert(Status);
	var str = '';		
	chgs=document.getElementById('enc_changes').elements;
	for(var i = 0; i < chgs.length; i++)
	{
		encid= chgs[i].id;
		encchanges[encid]=chgs[i].value;					
	} 
	stateq=0;
	
	if(!ChangeStat)	
		stateq=1;	
	
	if(page=='score'){
		//alphaOff("MatchupResult");
		//alert(document.getElementById('enc_Count'));
		xajax_RefrescarLiveScore('','','','',DateEvent,Status,stateq,lastComp,ReloadCmp);
		//alert("\nSP: "+SportId+"\nEvp: "+EventPaisId+"\n Evento: "+EventoId+"\nPais"+CodigoPais+"\nFecha"+DateEvent+"\nStatus: "+Status+"\n-"+stateq);
	}
	else if(page=='log'){
		alphaOff("MainLog");			
		xajax_RefrescarLiveScoreLog(MatchupId);
		
	} else if(page=='cart')	{
		//alphaOff("live2");
		xajax_RefrescarLiveCart(Status);
		
	}	
	ChangeStat=false;
	ChangeStat=false;
	lastPop=0;
	lastComp='0';

}


function SubMenuStatus(VarStatus){

	var TODO='';
	var LVTODO='';
	var PNTODO='';
	var FNTODO='';
	
	if(VarStatus==""){
		TODO='id="SelecSubMenu"';
	}else if(VarStatus=="inprogress"){
		LVTODO='id="SelecSubMenu"';
	}else if(VarStatus=="notstarted"){
		PNTODO='id="SelecSubMenu"';
	}else if(VarStatus=="finished"){
		FNTODO='id="SelecSubMenu"';
	}
	
	SubMenu='<ul class="ls_menu">';
	SubMenu+='<li '+TODO+'><a style="cursor:pointer" onclick="LiveScoreStatus(\'\');"><span>Todos<img alt="En Vivo" src="/images/img_todos.gif" /></span></a></li>';
	SubMenu+='<li '+LVTODO+'><a style="cursor:pointer" onclick="LiveScoreStatus(\'inprogress\');"><span>En Vivo<img alt="En Vivo" src="/images/img_envivo.gif" /></span></a></li>';
	SubMenu+='<li '+PNTODO+'><a style="cursor:pointer" onclick="LiveScoreStatus(\'notstarted\');"><span>Pendiente<img alt="En Vivo" src="/images/img_pendiente.gif" /></span></a></li>';
	SubMenu+='<li '+FNTODO+'><a style="cursor:pointer" onclick="LiveScoreStatus(\'finished\');"><span>Finalizados<img alt="En Vivo" src="/images/img_finalizado.gif" /></span></a></li>';
	SubMenu+='</ul>';
	//SubMenu+='<a style="cursor: pointer" onclick="refrescar();"><img src="/modules/odds/images/mejore1.gif" align="right"></a>'; 
	
	document.getElementById("ls_submenu").innerHTML=SubMenu;
	
}


function alphaOff(IdElement){
	
    document.getElementById(IdElement).style.opacity='.5';
	document.getElementById(IdElement).style.filter='alpha(opacity=50)';

}

function alphaOn(IdElement){
	
	document.getElementById(IdElement).style.opacity='1';
	document.getElementById(IdElement).style.filter='alpha(opacity=100)';
	
}

function SetEventPaisId(VarEventPaisId){
	EventPaisId=VarEventPaisId;
} 

function SetEventId(VarEventId){
	EventoId=VarEventId;
} 

function SetSportId(VarSportId){
	SportId=VarSportId;
} 
function SetDateEvent(VarDateEvent){
	DateEvent=VarDateEvent;
} 
function SetCodeCountry(VarCode){
	CodigoPais=VarCode;
} 

function SetMatchupId(VarMatchupId){
	MatchupId=VarMatchupId;
} 

 function SetPage(VarPage){
	page=VarPage;
}

 function SetStatus(VarStatus){	 	
	Status=VarStatus;
	LastStat = Status;
} 

function sendform(url){

	if(document.getElementById('d').options[document.getElementById('d').selectedIndex].value)
		var deporte = document.getElementById('d').options[document.getElementById('d').selectedIndex].value;
	
	if(document.getElementById('pais').options[document.getElementById('pais').selectedIndex].value)
		var paises = document.getElementById('pais').options[document.getElementById('pais').selectedIndex].value;
	
	if(document.getElementById('evento').options[document.getElementById('evento').selectedIndex].value && document.getElementById('evento').options[document.getElementById('evento').selectedIndex].value != "0"  && document.getElementById('evento').options[document.getElementById('evento').selectedIndex].value != "-1")
		var evt = document.getElementById('evento').options[document.getElementById('evento').selectedIndex].value;

	if (deporte && deporte != "" && deporte!=0) {
		url = url + 'd-' + deporte;
		
		if (paises && paises !="" && paises !=0) {
			url = url + '-pais-' + paises;
			
			if (evt && evt !="" && evt!=0) {
				url = url + '-liga-' + evt;
				//alert(url);
			}
		}
		url = url +'.html';
		window.location=url;
	}
}

function enable_disable(){
	
	if (document.getElementById('d').options[document.getElementById('d').selectedIndex].value == "0") {
		document.getElementById("b_buscar").disabled = "false";
	}
	else {
		document.getElementById("b_buscar").disabled = "true";
	}

}


function HideScore(idenc)
{
	var slide_horiz = new Spry.Effect.Slide('encSc'+idenc, {horizontal: true, toggle: false,from:'100%',to:'0%'});
	slide_horiz.start();		
	lastPop=0;
	
	clock_stop(idenc, 'crono');
}


function slide_score(divid){

	if(lastPop!=0)
	{
		HideScore(lastPop);
	}
//	alert(divid);
	document.getElementById('encSc'+divid).style.position='absolute';
	//document.getElementById('encSc'+divid).style.margin='auto';
	document.getElementById('encSc'+divid).style.left='210px';
	//document.getElementById('encSc'+divid).style.top='290px';
	document.getElementById('encSc'+divid).style.width='550px';	
	document.getElementById('encSc'+divid).style.visibility ='hidden';	

	//document.getElementById('encSc'+divid).style.backgroundColor='#FFFFFF'

	var slide_horiz = new Spry.Effect.Slide('encSc'+divid, {horizontal: true, toggle: false, from:'0%',to:'100%'});
	
	slide_horiz.start();
	lastPop=divid;
}
function call_comparativa(idenc,tipo)
{
	document.getElementById('encComp'+idenc).style.display ='none';
	xajax_get_comparativa(idenc,tipo);
}
function reloadCompare()
{
	//alert(lastComp+lastComp.substring(6));	
	if(lastComp!='0'&&ReloadCmp)
	{
		xajax_get_comparativa(lastComp.substring(7),0);		
	}
	ReloadCmp=false;
}
function ShowCompare(divid){

	if(lastComp!='0' && divid!=lastComp)
	{
		HideCompare(lastComp);		
	}
	//alert(divid);
	document.getElementById(divid).style.position='absolute';	
	document.getElementById(divid).style.left='155px';
	//document.getElementById(divid).style.top='290px';
	document.getElementById(divid).style.width='550px';	
	//document.getElementById(divid).style.visibility ='hidden';	

	//document.getElementById('encSc'+divid).style.backgroundColor='#FFFFFF'

	var fadein_cmp = new Spry.Effect.Fade(divid, {toggle: false, from:0,to:100,
	finish:function (){document.getElementById(divid).style.display ='block';}
	});
	
	fadein_cmp.start();
	lastComp=divid;
}

function HideCompare(divid)
{
	var fadeout_cmp = new Spry.Effect.Fade(divid, { toggle: false,from:100,to:0,
	finish:function (){document.getElementById(divid).style.display ='none';}
	});
	fadeout_cmp.start();		
	lastComp='0';
		
}

/*function pru1(xxx){
	
	modulo = contador % 2;
	if(modulo==0){
		document.getElementById('enctr_' + xxx).style.borderStyle='none';
		
	} else{
		document.getElementById('enctr_' + xxx).style.borderStyle='solid';
		document.getElementById('enctr_' + xxx).style.borderColor='red';
	}
	
	if (contador == 15) {
		document.getElementById('enctr_' + xxx).style.borderStyle='none';
		clearInterval(intervalID);
		contador=0;
	}
	contador=contador+1;
}*/


function changeborder(idencs){
	var xenc=idencs;
	document.getElementById('enctr_' + xenc);
	//objeto.innerHTML = content;
	document.getElementById('enctr_' + xenc).style.borderStyle='solid';
	document.getElementById('enctr_' + xenc).style.borderWidth='1px';
	document.getElementById('enctr_' + xenc).style.borderColor='red';
	
	
	//intervalID = setInterval("pru1("+xenc+");", 400);
	
	setTimeout("document.getElementById('enctr_' + "+xenc+").style.borderStyle='none'", 7000);
	//clearTimeout(timer2);
}

function updateRow(idenc,code,content,stC, gamestarted, secondHalf, firstHalfEnded)
{		
	if ('enc_' + idenc in encchanges) {
		if (code != encchanges['enc_' + idenc]) {
			//alert(idenc+code+encchanges['enc_'+idenc]);
			//alert(idenc);
			//alert('prueba');
			/* *************Para reloj Encuentros*********** */
			var estado = encchanges['enc_'+idenc];
			var tmp = estado.split("-");
			if((tmp[2] == 'Medio Tiempo' || tmp[2] == 'Halftime') && stC == 'inprogress'){
				//Funcion ajax recalcular el tiempo.
				xajax_get_enc_mins(gamestarted, secondHalf, firstHalfEnded, idenc);
			}
			
			if((tmp[2] == 'Pendiente' || tmp[2] == 'Not started') && stC == 'inprogress'){
				//Funcion ajax calculo de tiempo.
				xajax_get_enc_mins(gamestarted, secondHalf, firstHalfEnded, idenc);
			}
				
			//var tmp = clock.split(":");
			/* ********************************************** */
			
			
			trow = document.getElementById('enctr_' + idenc);
			trow.innerHTML = content;
			if (stC == 'inprogress') 
				trow.style.backgroundColor = '#D6E3BC';
			else 
				if (stC == 'finished') 
					trow.style.backgroundColor = '#FEE7AF';
				else 
					if (stC == 'notstarted') 
						trow.style.backgroundColor = 'white';
			
			
			//trow.style.borderWidth='1px';
			/*trow.style.borderStyle='solid';
			trow.style.borderColor='red';
			
			timer_updateRow=setTimeout("changeborder(\'"+trow+"\')", 6000);*/
			
			changeborder(idenc);
			//trow.style.borderStyle='none';
			/*encAnim = new Spry.Effect.Pulsate('enctr_' + idenc, {
				duration: 4000
			});
			encAnim.start();*/
		}
	}
}


function updateScreen()
{		
		chgs = document.getElementById('enc_changes').elements;
		for(var i = 0; i < chgs.length; i++)
		{
			encid= chgs[i].id;
			if (encchanges[encid] != chgs[i].value) {
				//document.getElementById('enctr_'+encid.substring(4)).style.backgroundColor = 'black';
				encAnim = new Spry.Effect.Pulsate('enctr_'+encid.substring(4),
				{
					duration:4000
				}
				);
				encAnim.start();
				//alert(encid+','+encchanges[encid]+','+chgs[i].value);
				//return;
			}			
		} 
	
		//alert(str);	
} 

function settime(){
	//refreshRate(120000);
	timer=setTimeout('refreshRate(30000)', 30000);
	
}



function refreshRate(dela) {
		delay=dela;
		clearTimeout(timer);
		//alert(delay);
	
		//alert(str);
		clearTimeout(timer);
		/*if(delay==60000){
			clearTimeout(timer);
			document.getElementById('xsec').innerHTML='<a href="#" onclick="refreshRate(120000); return false;" > 120</a>';
			document.getElementById('ysec').innerHTML='60';
			document.getElementById('off').innerHTML='<a href="#" onclick="stop_refresh(); return false;" >OFF</a>';
		}else{
			clearTimeout(timer);
			document.getElementById('xsec').innerHTML=' 120';
			document.getElementById('ysec').innerHTML='<a href="#" onclick="refreshRate(60000); return false;" >60</a>';
			document.getElementById('off').innerHTML='<a href="#" onclick="stop_refresh(); return false;" >OFF</a>';
		}*/
		
		refrescar();
		
		timer=setTimeout('refreshRate(delay)', dela);			
}

function stop_refresh(){
	clearTimeout(timer);
	//document.getElementById('xsec').innerHTML='<a href="#" onclick="refreshRate(120000); return false;" > 120</a>';	
	//document.getElementById('ysec').innerHTML='<a href="#" onclick="refreshRate(60000); return false;" >60</a>';	
	//document.getElementById('off').innerHTML='OFF';
}


function changeScoreCartImage(idenc){
		
		img = document.getElementById('scorecartimg'+idenc).src.substr(35);
		var img_split = img.split("/");
		//img_split[img_split.length - 1]
		
	   	if (img_split[img_split.length - 1] == "add.gif"){ 
			document.getElementById('scorecartimg'+idenc).src = "modules/livescores/images/drop.gif";
			document.getElementById('scorecartimg'+idenc).alt = 'Retirar partido de Mis Partidos';
			document.getElementById('scorecartimg'+idenc).title = 'Retirar partido de Mis Partidos';
			xajax_action_cart('add', idenc, 0);
		}
   		else {
			document.getElementById('scorecartimg'+idenc).src = imageURL;
			document.getElementById('scorecartimg'+idenc).alt = 'Agregar partido a Mis Partidos';
			document.getElementById('scorecartimg'+idenc).title = 'Agregar partido a Mis Partidos';
			
			xajax_action_cart('delete', idenc, 0); 
		}


/*****************************************************************/
		/*className='scorecartimg'+idenc;		
			
		if (img_split[img_split.length - 1] == "add.gif") {

			var imgs = document.getElementsByTagName('IMG');
			for (var i = 0; i < imgs.length; i++) {
				var name = ' ' + imgs[i].className;
				if (name.indexOf(' ' + className) != -1) {
					imgs[i].src = "/modules/livescores/images/drop.gif";
					imgs[i].alt = 'Retirar partido de Mis Partidos';
				    imgs[i].title = 'Retirar partido de Mis Partidos';
				}
			}

			xajax_action_cart('add', idenc, 0);
			
		} else {

			var imgs = document.getElementsByTagName('IMG');
			for (var i = 0; i < imgs.length; i++) {
				var name = ' ' + imgs[i].className;
				if (name.indexOf(' ' + className) != -1) {
					imgs[i].src = imageURL;
					imgs[i].alt = 'Agregar partido a Mis Partidos';
				    imgs[i].title = 'Agregar partido a Mis Partidos';
				}
			}
			
			xajax_action_cart('delete', idenc, 0); */
		}	
		
	function CartAddRemove(vector){
		xajax_cart_add_remove('add', vector, 0);
		/*for (var i = 0; i < vector.length; i++) {
			xajax_action_cart('add', vector[i], 0);
			alert(vector[i]);
		}*/
	}
		
		
	function changeEventoCartImage(idevento, url){
		var vec_enc = [];
		if(!url)
			url=0;
			
		img = document.getElementById('evento'+idevento).src.substr(35);
		var img_split = img.split("/");
		//img_split[img_split.length - 1]
		
		className = idevento ;
		//alert(className);
		if (img_split[img_split.length - 1] == "add.gif") {
			var imgs = document.getElementsByTagName('IMG');
			for (var i = 0; i < imgs.length; i++) {
				var name = ' ' + imgs[i].className;
				if (name.indexOf(' ' + className) != -1 && imgs[i].className==className) {
					imgs[i].src = "/modules/livescores/images/drop.gif";
					imgs[i].alt = 'Retirar partido de Mis Partidos';
				    imgs[i].title = 'Retirar partido de Mis Partidos';
					
					if (imgs[i].name != "" && imgs[i].className==className){
						
						vec_enc.push(imgs[i].name);
						//CartAddRemove('add', imgs[i].name, 0);
						//xajax_action_cart('add', imgs[i].name, 0);
						
					}
						
				}
			}
			//xajax_cart_add("add", vec_enc, 0);
			xajax_action_cart('add', vec_enc, url, idevento, 'add');
			//CartAddRemove(vec_enc);
			
		} else {

			var imgs = document.getElementsByTagName('IMG');
			for (var i = 0; i < imgs.length; i++) {
				var name = ' ' + imgs[i].className;
				if (name.indexOf(' ' + className) != -1 && imgs[i].className==className) {
					imgs[i].src = imageURL;
					imgs[i].alt = 'Agregar partido a Mis Partidos';
				    imgs[i].title = 'Agregar partido a Mis Partidos';

					if (imgs[i].name != "" && imgs[i].className == className) {
						vec_enc.push(imgs[i].name);
						//xajax_action_cart('delete', imgs[i].name, 0);
						//alert(imgs[i].name);
					}
				}
			
			
			}
			/*for (var i = 0; i < vec_enc.length; i++)
				xajax_action_cart('delete', vec_enc[i], 0);*/

			xajax_action_cart('delete', vec_enc, url, idevento, 'delete'); 
		}	

	/***********************************************************************/	
}  

/*****************************************************************/






/* *******************LogTextScroll - BEGIN************************ */

	function startScroll(direction, interval)
	{
		if (direction == "up")
		{
			y = -5 - interval
		}
		else
		{
			y = 5 + interval
		}

		document.getElementById("overviewCommentModule").scrollTop += y

		newInterval = interval + 1

		var functionCall = "startScroll(\"" + direction + "\", " + newInterval + ")"

		scrollInterval = setTimeout(functionCall, 50)

		return false

	}

	function endScroll()
	{
		if (scrollInterval != null)
		{
			clearInterval(scrollInterval)
		}

		return false
	}

/* *******************LogTextScroll - END************************ */
 

 
 
/* *****************************Reloj Futbol********************************* */ 

function clock_stop(id, div_tipo){
	id=parseInt(id);
	
	if ('undefined' == typeof div_tipo){
	 	div_tipos = 'reloj';
	}else{
	 	div_tipos = 'crono';
	}
	
	clearInterval(clock_array[id]);
	//alert(div_tipos);
	var div_clear = document.getElementById(div_tipos+id);
	if(div_clear)
	  div_clear.innerHTML='';
}


function set_time(id, tiempo, div_tipo){
	
	if ('undefined' == typeof div_tipo) {
		document.getElementById('reloj' + id).innerHTML = tiempo + '';
	} else {
		document.getElementById('crono' + id).innerHTML = tiempo + '';
	}
}


function clock_counter(id, div_tipo){
	 
	 if ('undefined' == typeof div_tipo){
	 	div_tipo2 = 'reloj';
		
	 }else if(div_tipo=='crono'){
	 	div_tipo2 = 'crono';
	 }
	 	
	 var clock = document.getElementById(div_tipo2+id);
	 if (clock) {
	 	clock = clock.innerHTML;
	 	var tmp = clock.split(":");
	 	
	 	var minutes = parseInt(tmp[0]);
	 	var seconds = parseInt(tmp[1]);
	 	
	 	if (seconds == 59) {
	 		minutes++;
	 		seconds = 0;
			
			if (div_tipo2=='crono') {
				porcentage = parseInt((minutes*100)/90);
				var x = document.getElementById('crono'+id);
				x.style.width = porcentage+'%';
			}
			
	 	}
	 	else {
	 		seconds++;
	 	}
	 	
	 	tiempo = minutes + ':' + seconds;
	 	
	 	set_time(id, tiempo, div_tipo);
	 	
		
		
	 	if (minutes > 90 || minutes<0 || isNaN(minutes)) 
	 		clock_stop(id, div_tipo);
	 	//Chequeo si ha pasado de los 90 minutos reglamentarios, y el encuentro esta en Progreso.
	 	if ((minutes == 45 || minutes == 50 || minutes == 55 || minutes == 90 || minutes == 95 || minutes == 100  || minutes == 105 || minutes == 110 || minutes == 115) && seconds == 1) {
	 		xajax_check_status(id, minutes);
	 	}
	 }
	
}

function clock_init(id, tiempo, div_tipo){
	set_time(id, tiempo, div_tipo);
	id=parseInt(id);
	
	 if ('undefined' == typeof div_tipo){
	 	clock_array[id]=setInterval('clock_counter('+id+','+div_tipo+')', 1000);
	 }else if(div_tipo=='crono'){
	 	clock_array[id]=setInterval('clock_counter('+id+', \'crono\')', 1000);
	 }
	
	//clock_array[id]=setInterval('clock_counter('+id+',\''+div_tipo+'\')', 1000);
	
}





/* ************************* PAGINACION DE RESULTADOS ************************ */

function TRAD_nav(starts){

	//xajax_get_casas("TRAD",sortby,start,'.$ctrad.');
	//limite=start+", "+12
	//alert(limite);
	stateq=0;
	
	//if(!ChangeStat)	
		//stateq=1;
	total = getTotalEnc();
	
	xajax_paginar_results(SportId,EventPaisId,EventoId,CodigoPais,DateEvent,Status,stateq,lastComp,ReloadCmp, starts, total);	

	setStart(starts);

}

function setTotalEnc(total){
	
	total_enc = total;
	
	//alert(total_enc);
	
}

function getTotalEnc(){
	
	return total_enc;
	
}


function setStart(inicio){
	
	start = inicio;
	
}

function getStart(){
	
	return start;
	
}



function page_reload(){
	
	var answer = confirm("Sesion expirada, debe recargar la pagina");
	confirm
	if (answer)
		window.location = "http://resultados.centroapuesta.com/";


}

/**********************************************************************/
//Utilizado para inicializar Thickbox(Un LightWindow) - pluggin JQuery
/**********************************************************************/
function thickInit()
{	
   	tb_init("a.thickbox, area.thickbox, input.thickbox");
	//imgLoader = new Image();
	//imgLoader.src = tb_pathToImage;
	
}
/**********************************************************************/
