/**
 * @author Leo
 */

function clearObj(obj) {
	if(obj)
	while(obj.firstChild) obj.removeChild(obj.firstChild);
}

function muestra(fil,col){
	
	document.getElementById("33").style.background="";
	document.getElementById(fil+col).style.background="url(img/inicio/opciones.png)";		
	document.getElementById(fil+col).style.backgroundPosition=(col-1)*(-299)+"px "+(fil-1)*(-171)+"px";
	
	var i,j;
	
	
	fil=parseInt(fil);
	col=parseInt(col);
		
	for(i=fil-1;i<fil+2;i++)
	{	
		for(j=col-1;j<col+2;j++)
		{						
			if (i > 0 && j > 0 && i<4 && j<4) {				
				if(!(i!=fil&&j!=col)){
					if(!(i==fil&&j==col)){
						
						if (navigator.appName == "Microsoft Internet Explorer") {
							document.getElementById(i + "" + j + "").style.filter = "alpha(opacity=60)";
						}
						else {
							document.getElementById(i + "" + j + "").style.opacity = 0.6;						
						}
					}										
										
					document.getElementById(i+"" + j+"").style.background = "url(img/inicio/opciones.png)";
					document.getElementById(i+"" + j+"").style.backgroundPosition = (j - 1) * (-299) + "px " + (i - 1) * (-171) + "px";
				}
			}
		}				
	}
	
}


function muestraEslogan(fil,col){
	
	document.getElementById(fil+col).style.background="";
	document.getElementById("33").style.background="url(img/inicio/eslogan.png)";
	
	var i,j;
	
	fil=parseInt(fil);
	col=parseInt(col);
		
	for(i=fil-1;i<fil+2;i++)
	{	
		for(j=col-1;j<col+2;j++)
		{						
			if (i > 0 && j > 0 && i<4 && j<4) {				
				if(!(i!=fil&&j!=col)){
					if(!(i==fil&&j==col)){
						document.getElementById(i+"" + j+"").style.opacity=1;
						if (navigator.appName == "Microsoft Internet Explorer") {
							document.getElementById(i+"" + j+"").style.filter="alpha(opacity=100)";
						}
					}	
					if(i+"" + j+"" != "33")
						document.getElementById(i+"" + j+"").style.background = "";
					else				
						document.getElementById(i+"" + j+"").style.background = "url(img/inicio/eslogan.png)";
				}
			}
		}				
	}
}


function posicionar(){
	var cabecera=document.getElementById("contenedorPrincipal");
	if(document.body.clientWidth<990)
		cabecera.style.backgroundPosition=document.body.clientWidth+"px 0px";
	else
		cabecera.style.backgroundPosition=((document.body.clientWidth+990)/2)+"px 0px";	
}

		
