var flag=-1;
function open_win() 
{
	window.open('http://competiciones.feb.es/autonomicas/?a=14', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550');
}
function abrirVentanaCobser() 
{
	window.open('http://www.cobser.es');
}

function animarImportant (){
	interv=setInterval('animar()',1000);
}
function animar(){
	capa=document.getElementById("important");
	if (flag == -1){
		capa.style.visibility= 'hidden';
	}else{
		capa.style.visibility= 'visible';
	}
	flag = flag * (-1);
}
function pintarTablaPrincipal(){
	td = document.createElement("td");
	td.setAttribute("class", "tdIzda");
	a = document.createElement("a");
	a.setAttribute("href", "index.html");
	img = document.createElement("img");
	img.setAttribute('border', '0');
	img.setAttribute('alt', 'Logotipo del club de madrid villa de vallecas');
	img.setAttribute('src', 'images/escudo.jpg');
	img.setAttribute('height','100');
	img.setAttribute('width','200');
	a.appendChild(img);
	td.appendChild(a);
	document.getElementById("trprincipal").appendChild(td);

	td = document.createElement("td");
	td.setAttribute("class", "tdCentro");
	td.setAttribute("id","tdCabecera");
	img = document.createElement("img");
	img.setAttribute('src', 'images/cabecera.png');
	img.setAttribute('height', '100');

	td.appendChild(img);
	document.getElementById("trprincipal").appendChild(td);

	td = document.createElement("td");
	td.setAttribute("class", "tdDcha");
	td.setAttribute("id","tdCabeceraDcha");
	td.setAttribute("align","center");
	img = document.createElement("img");
	/*img.setAttribute('alt', 'Pedrin, el Koala de la Zona');
	img.setAttribute('src', 'images/Pedrin.jpg');
	img.setAttribute('height','98');
	img.setAttribute('width','140');
	td.appendChild(img);*/
	document.getElementById("trprincipal").appendChild(td);
	/*
		document.getElementById("trprincipal").innerHTML ="<td class=\"tdIzda\">\n<a href=\"index.html\"><img border=\"0\" height='100px' alt=\"Logotipo del club de madrid villa de vallecas\" src=\"images/escudo.jpg\"/></a>" +
		                       "</td>\n<td class=\"tdCentro\" id=\"tdCabecera\">\n"+
			                   "<img src=\"images/cabecera.png\" height=\"100\">\n"+
		                       "</td>\n"+
		                       "<td class=\"tdDcha\" id=\"tdCabeceraDcha\">"+
		                       "</td>\n";*/

}
function pintarTablaIzquierda(){

	/*	<ul>
            <li><a href="index.html">Inicio</a></li>
            <li><a href="proyecto.html">Proyecto del Club</a></li>
			<li><a href="localizacion.html">¿Dónde Estamos?</a></li>
            <li><a href="construccion.html">Equipos</a></li>
            <li><a href="" onclick="javascript: window.open('http://competiciones.feb.es/autonomicas/?a=14', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550'); return false">Pr&oacute;ximos Partidos</a></li>
            <li><a href="noticias.html">Noticias</a></li>
			<li><a href="construccion.html">Socios</a></li>
			<li><a href="construccion.html">Torneos y Campeonatos</a></li>
            <li><a href="seguro.html">Seguro Deportivo</a></li>
			<li><a href="construccion.html">Patrocinadores</a></li>
            <li><a href="construccion.html">Enlaces de Interés</a></li>
            <li><a href="contacto.html">Contacto</a></li>
            <li><a href="torneo3x3.html">3x3 2008</a></li>
            <li><a href="open.html">Open 2008</a></li>
        </ul>*/
	ul = document.createElement("ul");
	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'index.html');
	texto = document.createTextNode("Inicio");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);

	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'proyecto.html');
	texto = document.createTextNode("Proyecto del Club");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);

	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'localizacion.html');
	texto = document.createTextNode("¿Dónde Estamos?");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);


	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'equipos.html');
	texto = document.createTextNode("Equipos");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);

	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'proximospartidos.html');
	texto = document.createTextNode("Proximos Partidos");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);

	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'noticias.html');
	texto = document.createTextNode("Noticias");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);

	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'construccion.html');
	texto = document.createTextNode("Socios");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);



	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'foros.html');
	texto = document.createTextNode("Foros");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);



	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'seguro.html');
	texto = document.createTextNode("Seguro Deportivo");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);

	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'patrocinadores.html');
	texto = document.createTextNode("Patrocinadores");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);


	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'construccion.html');
	texto = document.createTextNode("Enlaces de Interés");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);


	li = document.createElement("li");
	a = document.createElement("a");
	a.setAttribute('href', 'contacto.html');
	texto = document.createTextNode("Contacto");
	a.appendChild(texto);
	li.appendChild(a);
	ul.appendChild(li);
	document.getElementById("izquierda").appendChild(ul);

}

function pintarTablaDerecha(){
	/*
	 * <table width="100%" valign="top" height="500px" id="patrocinadores">
	 *     <tbody id="seccion1">
			<tr valign="top" align="center">
				<th>Patrocinadores</th>
			</tr>
			<tr valign="top" align="center">
				<td><a class="img_izq" href="http://www.interaudit-spain.com/"><img width="195px" border="0" class="naroal administradores" alt="Logotipo de Naroal Administradores" src="images/naoral.jpg"/></a></td>
			</tr>
			<tr><td><br/></td></tr>
			<tr valign="top" align="center">
				<td><a class="img_izq" href="" onclick= window.open("http://www.cobser.es/")><img width="176" height = "70" border="0" class="Cobser" alt="Logotivo de cobser" src="images/Logo1_Cobser.jpg"/></a></td>
			</tr>
			<tr><td><br/></td></tr>			
			<tr valign="top" align="center">
				<td><a class="img_izq" href="http://www.munimadrid.es"><img width="100px" border="0" class="naroal administradores" alt="Escudo Ayuntamiento de Madrid" src="images/LogoDirGenDep.gif"/></a></td>
			</tr>
			<tr><td><br/></td></tr>
			<tr valign="top" align="center">
				<td><a class="img_izq" href="http://www.madrid.org"><img width="100px" border="0" class="naroal administradores" alt="Comunidad de Madrid" src="images/Comunidad_de_Madrid.png"/></a></td>
			</tr>
			<tr height="100%"><td><br/></td></tr>*/
	
	tr = document.createElement("tr");
	tr.setAttribute('valign','top');
	tr.setAttribute('align','center');
	th = document.createElement("th");
	texto = document.createTextNode("Patrocinadores");
	th.appendChild(texto);
	tr.appendChild(th);
	document.getElementById("seccion1").appendChild(tr);
	
		tr = document.createElement("tr");
	tr.setAttribute('valign','top');
	tr.setAttribute('align','center');
	td = document.createElement("td");
	a = document.createElement("a");
	a.setAttribute('href','');
	a.setAttribute('class','img_izq');
	if (a.attachEvent) { // if IE
		a.attachEvent('onclick',abrirVentanaCobser);
			} else { // if mozilla
		a.setAttribute('onclick',"abrirVentanaCobser()");
	}
	img = document.createElement("img");
	img.setAttribute('alt','Logotipo de Cobser');
	img.setAttribute('src','images/Logo1_Cobser.jpg');
	img.setAttribute('border','0');
	img.setAttribute('height','70');
	img.setAttribute('width','176');
	
	a.appendChild(img);
	td.appendChild(a);
	tr.appendChild(td);
	document.getElementById("seccion1").appendChild(tr);
	
	tr = document.createElement("tr");
	tr.setAttribute('valign','top');
	tr.setAttribute('align','center');
	td = document.createElement("td");
	a = document.createElement("a");
	a.setAttribute('href','http://www.munimadrid.es');
	a.setAttribute('class','img_izq');
	img = document.createElement("img");
	
	img.setAttribute('alt','Ayuntamiento de Madrid');
	img.setAttribute('src','images/madrid2.jpg');
	img.setAttribute('border','0');
	img.setAttribute('width','100');
	img.setAttribute('height','100');
	a.appendChild(img);
	td.appendChild(a);
	tr.appendChild(td);
	document.getElementById("seccion1").appendChild(tr);
	
	tr = document.createElement("tr");
	tr.setAttribute('valign','top');
	tr.setAttribute('align','center');
	td = document.createElement("td");
	a = document.createElement("a");
	a.setAttribute('href','http://www.madrid.org');
	a.setAttribute('class','img_izq');
	img = document.createElement("img");
	
	img.setAttribute('alt','Comunidad de Madrid');
	img.setAttribute('src','images/Comunidad_de_Madrid.png');
	img.setAttribute('border','0');
	img.setAttribute('width','100');
	a.appendChild(img);
	td.appendChild(a);
	tr.appendChild(td);
	document.getElementById("seccion1").appendChild(tr);
	
	tr = document.createElement("tr");
	tr.setAttribute('valign','top');
	tr.setAttribute('align','center');
	td = document.createElement("td");
	a = document.createElement("a");
	/*a.setAttribute('href','TioPepe.html');*/
	a.setAttribute('class','img_izq');
	img = document.createElement("img");
	
	img.setAttribute('alt','Restaurante el Rincón del Tio Pepe');
	img.setAttribute('src','images/LogoPepe.jpg');
	img.setAttribute('border','0');
	img.setAttribute('width','100');
	a.appendChild(img);
	td.appendChild(a);
	tr.appendChild(td);
	document.getElementById("seccion1").appendChild(tr);
	
	
}
