function MM_swapImgRestore(){
var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc
}
function MM_preloadImages(){
		var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i]}}
}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features)
}
function MM_findObj(n, d){
	var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p)}if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x && d.getElementById)x=d.getElementById(n);return x
}
function MM_swapImage(){
	var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2]}
}
function MM_showHideLayers(){
	var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v=='hide')?'hidden':v}obj.visibility=v}
}
function MM_jumpMenu(targ,selObj,restore){
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");selObj.selectedIndex=restore
}
function MM_reloadPage(init){if(init==true)with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage}}else if(innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH)location.reload()
}
function cancelaEvento(e){
if(!e)e=window.event;(e.preventDefault)?e.preventDefault():e.returnValue=false
}
function paraEvento(e){if(!e)e=window.event;(e.stopPropagation)?e.stopPropagation():e.cancelBubble=true
}
function imprime(donde){donde=(typeof(donde)!="undefined")?eval(donde):eval("self");if(window.print){return donde.print()}else {if(navigator.appVersion.indexOf("MSIE 4")!=-1){var objImpresion='<object id="impie" width="0" height="0" classid="clsid:8856f961-340a-11d0-a96b-00c04fd705a2"></object>';document.body.insertAdjacentHTML('beforeEnd', objImpresion);donde.focus();ImpIE.ExecWB(6, 2);ImpIE.outerHTML=""}else {alert("Pulse Ctrl+P para imprimir la página.");donde.focus();return false }}return true 
}
function impresion(_campos){
	var f=document.forms[0];if(confirm("¿Desea imprimir esta hoja?")){var vCampos=_campos.split(",");_campos="";var i=0;while(vCampos[i]){if(eval("f."+vCampos[i])){eval("f."+vCampos[i]+".style.display='none';");_campos+="f."+vCampos[i]+".style.display='block';"}i++}imprime();setTimeout('f=document.forms[0];eval("'+_campos+'");',6000)}
	}
function DM_abreCentrada(url,nom,param){
		a=(DM_abreCentrada.arguments[2])?param.split(','):alto=ancho=0;for(i=0;i<a.length;i++){if(a[i].indexOf('height')!=-1)alto=eval(a[i]);if(a[i].indexOf('width')!=-1)ancho=eval(a[i])}posX=(screen.availWidth-ancho)/2;posY=(screen.availHeight-alto)/2;param+=",screenX="+posX+",left="+posX+",screenY="+posY+",top="+posY;return window.open(url,nom,param)
}
function moverFlash(punto,nombre,marco){
	if(typeof("nombre")=="undefined" || !nombre)nombre="animFlash";if(typeof("marco")=="undefined" || !marco)marco="self";var _t=marco.document;var PeliFlash=(_t.embeds && _t.embeds[nombre])?_t.embeds[nombre]:_t.getElementById(nombre);if(PeliFlash){PeliFlash.SetVariable("_root.punto", punto);return PeliFlash.Play()}else return false 
}
function $(_id){
	return(document.getElementById)?document.getElementById(_id):((document.all)?document.all(_id):document._id )
}
function aE(_o,_e,_f,_u){if(_o){if(typeof("_u")=="undefined" || !_u)_u=false;if(_o.addEventListener)return _o.addEventListener(_e,_f,_u);else if(_o.attachEvent)return _o.attachEvent("on"+_e,_f);else if(_o["on"+_e]){_o["on"+_e]=_f;return true}}return false
}
function qE(_o,_e,_f,_u){if(_o){if(typeof("_u")=="undefined" || !_u)_u=false;if(_o.removeEventListener){_o.removeEventListener(_e,_f,_u);return true}else if(_o.detachEvent)return _o.detachEvent("on"+_e,_f);else if(_o["on"+_e]){_o["on"+_e]=null;return true}}return false
}
function dimVentana(){var d,s,t,u,v,x,y;d=document.documentElement;if(self.innerHeight){x=self.innerWidth;y=self.innerHeight}else {if(!d || !d.clientHeight)d=document.body;if(d){x=d.clientWidth;y=d.clientHeight}}u=d.scrollWidth;v=d.scrollHeight;s=d.offsetWidth;t=d.offsetHeight;return new Array(x,y,u,v,s,t)
}
function marca_pagina(_d,_t){if(typeof(_d)=="undefined" || _d=="")_d=location.href;if(typeof(_t)=="undefined" || _t=="")_t=window.document.title;if(_o=window.sidebar)_o.addPanel(_t,"http:/"+"/"+_d,"");else(_o=window.external)?_o.AddFavorite("http:/"+"/"+_d,_t):alert("Pulse Ctrl+D para añadir esta página a sus marcadores / favoritos.")}aE(window,"load",function(){var vElem=document.getElementsByTagName("a");var patron=new RegExp(/(^|\s)email(\s|$)/g);for(var j=0, numElem=vElem.length;j<numElem;j++){if(patron.test(vElem[j].className))vElem[j].href=vElem[j].href.replace(/(>|(%3E))/g,"").replace(/(<|(%3C))!-/g,"").replace(/-QUITAR--/g,"")}});

function addOnload(cadena){
	if (typeof(cadenaOnload)=="undefined") cadenaOnload=cadena; else cadenaOnload+=cadena;
}
function ir_a(path)
{
window.location.href=path;
}
function ir_a_nuevo(path)
{
var ventana = open(path, "_blank", "");
}
function cambiarTarget()
{
	if(document.getElementById("PagesCambiarActionAtencionClienteForm").PagesOpciontecnicoSugerencia.checked == true)
	{
		document.getElementById("PagesCambiarActionAtencionClienteForm").target = "_blank";
	}else{
		document.getElementById("PagesCambiarActionAtencionClienteForm").target = "_self";
	}
		document.getElementById("PagesCambiarActionAtencionClienteForm").submit();
}
function cambiarTargetNutricion()
{
	if(document.getElementById("AsistenteCambiarActionNutricionForm").Mitos.checked == true)
	{
		document.getElementById("AsistenteCambiarActionNutricionForm").target = "_blank";
	}else{
		document.getElementById("AsistenteCambiarActionNutricionForm").target = "_self";
	}
}
function sigueEnlaceAnalytics(enlace)
{
	if (typeof(pageTracker)!='undefined')
	{
		pageTracker._trackPageview(enlace.href);
	}
}

/* novedades y promociones */

function mpr(o,p)
{
	o.className = (o.className=='botLineasGanadores')?('botLineasGanadoresON'):('botLineasGanadores');
	document.getElementById('cdbg'+p).style.display=(o.className=='botLineasGanadores')?('none'):('block');
}

function nuevoAjax()
{ 
	/* Crea el objeto AJAX. Esta funcion es generica para cualquier utilidad de este tipo, por
	lo que se puede copiar tal como esta aqui */
	var xmlhttp=false;
	try
	{
		// Creacion del objeto AJAX para navegadores no IE
		xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch(e)
	{
		try
		{
			// Creacion del objet AJAX para IE
			xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
		catch(E)
		{
			if (!xmlhttp && typeof XMLHttpRequest!='undefined') xmlhttp=new XMLHttpRequest();
		}
	}
	return xmlhttp; 
}

function mostrarIdeasCocina(capa)
{
	quitarUltimoIdeasRegalar(capa);
	document.getElementById("capaCocina"+capa).style.display = "block";
	document.getElementById("li"+capa).className="linkIdeaRegaloON";
	establecerUltimoIdeasRegalar(capa);
}
function establecerUltimoIdeasRegalar(valor)
{
	ultimoIdeasCocina = valor;
}
function quitarUltimoIdeasRegalar()
{
	document.getElementById("capaCocina"+ultimoIdeasCocina).style.display = "none";
	document.getElementById("li"+ultimoIdeasCocina).className="linkIdeaRegalo";
}



function mostrarIdeasCuidado(capa)
{
	quitarUltimoIdeasRegalarCuidado(capa);
	document.getElementById("capaCuidado"+capa).style.display = "block";
	document.getElementById("li"+capa).className="linkIdeaRegaloON";
	establecerUltimoIdeasRegalarCuidado(capa);
}
function establecerUltimoIdeasRegalarCuidado(valor)
{
	ultimoIdeasCuidado = valor;
}
function quitarUltimoIdeasRegalarCuidado()
{
	document.getElementById("capaCuidado"+ultimoIdeasCuidado).style.display = "none";
	document.getElementById("li"+ultimoIdeasCuidado).className="linkIdeaRegalo";
}