
/*
------------------------------------------------------------------------------------------
Fecha
------------------------------------------------------------------------------------------
*/

function escribeFecha() {
	var meses = ['enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio', 'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'];
	var now = new Date();
	document.write(now.getDate() + ' de ' + meses[now.getMonth()] + " de " + now.getFullYear());
}

/*
------------------------------------------------------------------------------------------
JumpMenu de diarios OEM
------------------------------------------------------------------------------------------
*/

function Mi_jumpMenu(targ,selObj,restore){ //v3.0
	theURL = selObj.options[selObj.selectedIndex].value;
	window.open(theURL,'otros','');
	if (restore) selObj.selectedIndex=0;
}

/*
------------------------------------------------------------------------------------------
Banner de publicidad de header
------------------------------------------------------------------------------------------
*/

function getBannerHeader() {
	document.write('<img src="images/banner_esto.gif" width="468" height="60" alt="">');
}

/*
------------------------------------------------------------------------------------------
Banner de publicidad de galerías
------------------------------------------------------------------------------------------
*/

function getBannerGalerias() {
	document.write('<a href="http://www.oem.com.mx/especiales/publicidad/publicidad.asp" target="_blank"><img src="banners/anunciate.gif" width="234" height="60" border="0" alt="Publicidad"></a>');
}

/*
------------------------------------------------------------------------------------------
Header mundial
------------------------------------------------------------------------------------------
*/

function getHeaderMundial() {
	document.write('<table width="800" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td>');

	getHeader("http://www.oem.com.mx/esto/mundial/images/logoesto.jpg");

	document.write('</td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">');
	document.write('<tr>');
	document.write('<td align="left" valign="top"><table width="800" border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td width="320"><img src="images/logo_nuevo.jpg" width="320" height="70"></td>');
	document.write('<td width="480" align="right" valign="middle">');

	getBannerHeader();

	document.write('</td>');
	document.write('  </tr>');
	document.write('</table></td>');
	document.write('</tr>');
	document.write('</table>');
	document.write('<table width="800" border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">');
	document.write('<tr>');
	document.write('<td height="25" align="left" valign="middle" bgcolor="#252525"><span class="balazo"><span class="mundiales">     Historia de los Mundiales</span></span>');
	document.write('<span class="balazo"><span class="mundiales">');
	document.write('  <a href="1930.htm" class="mundiales">1930</a>');
	document.write('  <a href="1934.htm" class="mundiales">1934</a>');
	document.write('  <a href="1938.htm" class="mundiales">1938</a>');
	document.write('  <a href="1950.htm" class="mundiales">1950</a>');
	document.write('  <a href="1954.htm" class="mundiales">1954</a>');
	document.write('  <a href="1958.htm" class="mundiales">1958</a>');
	document.write('  <a href="1962.htm" class="mundiales">1962</a>');
	document.write('  <a href="1966.htm" class="mundiales">1966</a>');
	document.write('  <a href="1970.htm" class="mundiales">1970</a>');
	document.write('  <a href="1974.htm" class="mundiales">1974</a>');
	document.write('  <a href="1978.htm" class="mundiales">1978</a>');
	document.write('  <a href="1982.htm" class="mundiales">1982</a>');
	document.write('  <a href="1986.htm" class="mundiales">1986</a>');
	document.write('  <a href="1990.htm" class="mundiales">1990</a>');
	document.write('  <a href="1994.htm" class="mundiales">1994</a>');
	document.write('  <a href="1998.htm" class="mundiales">1998</a>');
	document.write('  <a href="2002.htm" class="mundiales">2002</a>');
	document.write('  <a href="2006.htm" class="mundiales">2006</a>');
	document.write('</span></span></td>');
	document.write('</tr>');
	document.write('<tr><td><img src="images/1_trans.gif" width="5" height="5" alt=""></td></tr>');
	document.write('<tr>');
	document.write('<td height="20" align="left" valign="middle" class="tickerbg"><div class="tickerbg"><div id=tickerAnchor class="ticker2"></div>');

	startTicker();

	document.write('</div>');
	document.write('</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="10"><img src="images/1_trans.gif" width="5" height="5" alt=""></td>');
	document.write('</tr>');
	document.write('</table>');
}

/*
------------------------------------------------------------------------------------------
Navegación
------------------------------------------------------------------------------------------
*/

function getNavegacion() {
	document.write('<table width="125"  border="0" cellspacing="0" cellpadding="0">');
	document.write('<tr>');
	document.write('<td width="20" height="20" bgcolor="#383737" class="nav_lat"> <a href="index.htm" class="nav_lat">Principal</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#464646" class="nav_lat">&nbsp;Estad&iacute;sticas</td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="est_calendario.htm" class="txt_2">Calendario</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="est_grupos.htm" class="txt_2">Grupos</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="est_golesxequipo.htm" class="txt_2">Goleo por equipo</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="est_golesindividual.htm" class="txt_2">Goleo individual</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#464646" class="nav_lat"> La Sede </td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="sede_hoy.htm" class="txt_2">Alemania Hoy </a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="figuras.htm" class="txt_2">Figuras a seguir </a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="alemaina.htm" class="txt_2">Historia y Actualidad </a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="sedes_estadios.htm" class="txt_2">Sedes y Estadios </a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="sedes_mascota.htm" class="txt_2">Mascota </a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="sedes_copa.htm" class="txt_2">Copa Confederaciones</a> </td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#464646" class="nav_lat"> La Selección </td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="seleccion.htm" class="txt_2">Actualidad del Tri</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="porteros.htm" class="txt_2">Los Elegidos</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="seleccion_enmundiales.htm" class="txt_2">México en Mundiales</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="seleccion_balance.htm" class="txt_2">Balance Eliminatoria</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="seleccion_estadis.htm" class="txt_2">Los números del Tri</a> </td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="txt_2"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#666666" class="txt_2">  <a href="seleccion_alojamiento.htm" class="txt_2">Alojamiento</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td class="nav_lat"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="20" bgcolor="#464646" class="nav_lat">&nbsp;<a href="calificados.htm" class="nav_lat">Equipos</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="15" bgcolor="#464646" class="nav_lat">&nbsp;<a href="galerias.htm" class="nav_lat">Galerías</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="15" bgcolor="#464646" class="nav_lat">&nbsp;<a href="fans.htm" class="nav_lat">Para Fans</a> </td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/1_trans.gif" width="1" height="1" alt=""></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td height="15" bgcolor="#464646" class="nav_lat">&nbsp;<a href="mailto:opinion@esto.com.mx" class="nav_lat">Contáctanos</a></td>');
	document.write('</tr>');
	document.write('<tr>');
	document.write('<td bgcolor="#111111"><img src="images/bottom_nav.gif" width="125" height="6" alt=""></td>');
	document.write('</tr>');
	document.write('</table>');

	document.write('<p>&nbsp;</p>');
}

/*
------------------------------------------------------------------------------------------
Ticker
------------------------------------------------------------------------------------------
*/

	var theCharacterTimeout = 50;
	var theStoryTimeout     = 5000;
	var theWidgetOne        = "";
	var theWidgetTwo        = "";
	var theWidgetNone       = "";
	var theLeadString       = " ";

	// Ticker startup
	function startTicker() {
		// Define run time values
		theCurrentStory = -1;
		theCurrentLength = 0;
	
		// Locate base objects
		if (document.getElementById) {
			theAnchorObject = document.getElementById("tickerAnchor");
			runTheTicker();
		}
		else {
			document.write("<style>.ticki{display:none;}.ticko{border:0px; padding:0px;}</style>");
			return true;
		}
	}

	// Ticker main run loop
	function runTheTicker() {
		var myTimeout;
		// Go for the next story data block
		if(theCurrentLength == 0) {
			theCurrentStory++;
			theCurrentStory = theCurrentStory % theItemCount;
			thetituloss = titulos[theCurrentStory]	
			theStorySummary = textos[theCurrentStory].replace(/"/g,'"');		
			theTargetLink = links[theCurrentStory];
			theAnchorObject.href = theTargetLink;
			thePrefix1 = "<span class=\"ticker1\">" + theLeadString + "</span>";
			thePrefix2 = " <span class=\"ticker1\">" + thetituloss + ":  " + "</span>";
	
		}
		// Stuff the current ticker text into the anchor
		theAnchorObject.innerHTML = thePrefix2  + thePrefix1 + theStorySummary.substring(0,theCurrentLength) + whatWidget();
		// Modify the length for the substring and define the timer
		if(theCurrentLength != theStorySummary.length) {
			theCurrentLength++;
			myTimeout = theCharacterTimeout;
		}
		else {
			theCurrentLength = 0;
			myTimeout = theStoryTimeout;
		}
		// Call up the next cycle of the ticker
		setTimeout("runTheTicker()", myTimeout);
	}

	// Widget generator
	function whatWidget() {
		if(theCurrentLength == theStorySummary.length) {
			return theWidgetNone;
		}
	
		if( (theCurrentLength % 2) == 1 ) {
			return theWidgetOne;
		}
		else {
			return theWidgetTwo;
		}
	}

/*
------------------------------------------------------------------------------------------
Deshabilitar select
------------------------------------------------------------------------------------------
*/

function disableselect(e) {
	return false;
}

function reEnable(){
	return true;
}

//if IE4+
document.onselectstart = new Function ("return false");

//if NS6
if (window.sidebar) {
	document.onmousedown = disableselect;
	document.onclick = reEnable;
}

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message = "";

function clickIE() {
	if (document.all) {
		(message);
		return false;
	}
}

function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {
			(message);
			return false;
		}
	}
}

if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);
	document.onmousedown = clickNS;
}
else {
	document.onmouseup = clickNS;
	document.oncontextmenu = clickIE;
}

document.oncontextmenu = new Function("return false");

