// Corrector de Bug PNG para Explorer. Opera y Mozilla funcionan correctamente sin este JS
var estadoMenu1 = false;
var estadoMenu2 = false;
var estadoMenu3 = false;

function correctPNG() 
   {
   for(var i=0; i<document.images.length; i++)
      {
	  var img = document.images[i]
	  var imgName = img.src.toUpperCase()
	  if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
	     {
		 var imgID = (img.id) ? "id='" + img.id + "' " : ""
		 var imgClass = (img.className) ? "class='" + img.className + "' " : ""
		 var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
		 var imgStyle = "display:inline-block;" + img.style.cssText 
		 if (img.align == "left") imgStyle = "float:left;" + imgStyle
		 if (img.align == "right") imgStyle = "float:right;" + imgStyle
		 if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
		 var strNewHTML = "<span " + imgID + imgClass + imgTitle
		 + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	     + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
		 + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
		 img.outerHTML = strNewHTML
		 i = i-1
	     }
      }

   }
var ua = navigator.userAgent.toLowerCase();
function detect(text) {
   stringposition = ua.indexOf(text) + 1;
   data = text;
   return stringposition;
}
if (detect('opera')) {
	 
 } else if (detect('firefox')){
	 
 } else if (detect('msie')){
	 window.attachEvent("onload", correctPNG);	
}	


function Mostrar(Id1,Id2) {
		document.getElementById('SuPiel').style.display='none';
		document.getElementById('Opc1').style.backgroundColor='#F7F7F7';
		document.getElementById('Opc1').style.color='#423930';
		document.getElementById('LosActivos').style.display='none';
		document.getElementById('Opc2').style.backgroundColor='#F7F7F7';
		document.getElementById('Opc2').style.color='#423930';		
		document.getElementById('Productos').style.display='none';
		document.getElementById('Opc3').style.backgroundColor='#F7F7F7';
		document.getElementById('Opc3').style.color='#423930';				
		if (Id2=='Opc1' && !estadoMenu1) {
			document.getElementById('SuPiel').style.display='block';
			document.getElementById('Opc1').style.backgroundColor='#E7E7E7';
			document.getElementById('Opc1').style.color='#202020';	
			estadoMenu1 = true;
			estadoMenu2 = false;
			estadoMenu3 = false;
		} else if (Id2=='Opc2' && !estadoMenu2) {
			document.getElementById('LosActivos').style.display='block';
			document.getElementById('Opc2').style.backgroundColor='#E7E7E7';
			document.getElementById('Opc2').style.color='#202020';	
			estadoMenu1 = false;
			estadoMenu2 = true;;
			estadoMenu3 = false;
		} else if (Id2=='Opc3' && !estadoMenu3) {
			document.getElementById('Productos').style.display='block';
			document.getElementById('Opc3').style.backgroundColor='#E7E7E7';
			document.getElementById('Opc3').style.color='#202020';	
			estadoMenu1 = false;
			estadoMenu2 = false;
			estadoMenu3 = true;
		} else {
			estadoMenu1 = false;
			estadoMenu2 = false;
			estadoMenu3 = false;
		}
}
function Desactivar(Id1) {
		if (Id1=='Opc1' && !estadoMenu1) {
			document.getElementById(Id1).style.backgroundColor='#F7F7F7';
			document.getElementById(Id1).style.color='#423930';			
		} else if (Id1=='Opc2' && !estadoMenu2) {
			document.getElementById(Id1).style.backgroundColor='#F7F7F7';
			document.getElementById(Id1).style.color='#423930';		
		} else if (Id1=='Opc3' && !estadoMenu3) {
			document.getElementById(Id1).style.backgroundColor='#F7F7F7';
			document.getElementById(Id1).style.color='#423930';		
		}
}

function Activar(Id1) {

			document.getElementById(Id1).style.backgroundColor='#E7E7E7';
			document.getElementById(Id1).style.color='#202020';
}

function Ir(Id1) {
		if (Id1=='Activos') {
			parent.top.location = '../los_activos/garantia.asp';
		} else if (Id1=='Productos') {	
			parent.top.location = '../productos/singles.asp';
		} else if (Id1=='Piel') {
			parent.top.location = '../su_piel/0_30.asp';
		} else if (Id1=='Activos1') {
			parent.top.location = '../../los_activos/garantia.asp';
		} else if (Id1=='Productos1') {	
			parent.top.location = '../../productos/singles.asp';
		} else if (Id1=='Piel1') {
			parent.top.location = '../../su_piel/0_30.asp';
		} else if (Id1=='Piel0') {
			parent.top.location = 'su_piel/0_30.asp';
		} else if (Id1=='Activos0') {
			parent.top.location = 'los_activos/garantia.asp';
		} else if (Id1=='Productos0') {
			parent.top.location = 'productos/singles.asp';
		}
}




