
	function mouseDown(e) {
		if (parseInt(navigator.appVersion)>3) {
			var clickType=1;
			if (navigator.appName=="Netscape") clickType=e.which;
		else clickType=event.button;
			if (clickType!=1) {
				//alert ('Copyright Aspiunza.com')
				//return false;
			}
		}
	 return true;
	}
	if (parseInt(navigator.appVersion)>3) {
		document.onmousedown = mouseDown;
		if (navigator.appName=="Netscape") 
			document.captureEvents(Event.MOUSEDOWN);
	}

	//function LeftClick() {
	//   if(((navigator.appName=="Microsoft Internet Explorer")&&(event.button > 0)) || ((navigator.appName=="Netscape")&&(b.which > 0))){
	//   ocultaRamas();
	//   return true;
	//   }
	//}
	//document.onmousedown = LeftClick;

	function muestraRama(id, f)
	{
		ocultaRamas();
		
		document.getElementById('ramaBase').style.display = "none";
		
		document.getElementById(id).style.display = "";
		document.getElementById(f).className = "fTroncoIn";
	}
	
	function ocultaRamas()
	{
		document.getElementById('ramaGaleria').style.display = "none";
		document.getElementById('ramaMagazine').style.display = "none";
		document.getElementById('ramaComprar').style.display = "none";
		document.getElementById('ramaExtras').style.display = "none";
		document.getElementById('ramaYo').style.display = "none";
		
		document.getElementById('ramaBase').style.display = "";
		
		document.getElementById('fGaleria').className = "fTroncoOut";
		document.getElementById('fMagazine').className = "fTroncoOut";
		document.getElementById('fComprar').className = "fTroncoOut";
		document.getElementById('fExtras').className = "fTroncoOut";
		document.getElementById('fYo').className = "fTroncoOut";
	}


	
	
	//*****************************************************************************************************
	//PARA PARSEAR EL EMAIL EN LOS FORMULARIOS DE MAILING LIST Y DEJA TU OPINIÓN
	//*****************************************************************************************************

	function findEmailAddresses(StrObj)
	{ 
		var separateEmailsBy = ", "; 
		var email = "<none>"; // if no match, use this 
		var emailsArray = StrObj.match(/([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+)/gi);
		if (emailsArray) { 
			email = ""; 
			for (var i = 0; i < emailsArray.length; i++) { 
				if (i != 0) email += separateEmailsBy; 
				email += emailsArray[i];
			} 
		}
		return email; 
	}
	
	function mail()
	{
		var e = findEmailAddresses(document.getElementById('Email').value);
		if (e == "<none>")
		{
			alert("El email introducido no es válido.");
			return false;
		}
		var n = document.getElementById('Nombre').value;
		var a = document.getElementById('Apellidos').value;
		//var t = document.getElementById('recipient').value;
		var t = "info@aspiunza.com";
		//var s = document.getElementById('subject').value;
		var s = "Alta en Novedades Aspiunza.com";
		
		var body = "Email: " + e + "%0A%0A" + "Nombre: " + n + "%0A%0A" + "Apellidos: " + a
		
		//document.getElementById('fMail').action = "mailto:" + t + ?subject=" + s + "&body=" + body;
		document.getElementById('fMail').action = "mailto:" + t + "?subject=" + s;
		document.getElementById('fMail').submit();
		//alert(document.getElementById('fMail').action);
	}
	
	function mail2()
	{
		var e = findEmailAddresses(document.getElementById('Email2').value);
		if (e == "<none>")
		{
			alert("El email introducido no es válido.");
			return false;
		}
		var t = "info@aspiunza.com";
		var s = "Dar de baja de novedades en Aspiunza.com";
		
		//var body = "Email: " + e + "%0A%0A" + "Nombre: " + n + "%0A%0A" + "Apellidos: " + a
		
		//document.getElementById('fMail').action = "mailto:" + t + ?subject=" + s + "&body=" + body;
		document.getElementById('fMail2').action = "mailto:" + t + "?subject=" + s;
		document.getElementById('fMail2').submit();
		//alert(document.getElementById('fMail').action);
	}

	function mail3()
	{
		var e = findEmailAddresses(document.getElementById('Email').value);
		if (e == "<none>")
		{
			alert("El email introducido no es válido.");
			return false;
		}
		var n = document.getElementById('Nombre').value;
		var t = "info@aspiunza.com";
		var s = "Opinión para Aspiunza.com";
		
		document.getElementById('fMail').action = "mailto:" + t + "?subject=" + s;
		document.getElementById('fMail').submit();
		//alert(document.getElementById('fMail').action);
	}

	//**********************************************************************************************************



//*************************************
//*************WEBSTATS****************
//*************************************

function plugNS()
{
	var b=1;
	var o=0;
	var p=new Array("Shockwave Flash","Shockwave for Director","RealPlayer","QuickTime","VivoActive","LiveAudio","VRML","Dynamic HTML Binding","Windows Media Services");
	var np=navigator.plugins;
	for(var x=0;x<p.length;x++)
	{
		for(var i=0;i<np.length;i++)
			if (np[i].name.indexOf(p[x])>=0) o|=b;b*=2;
	}
	return o;
}

function plugIE()
{
	if(!document.body)
		document.write('<body>');
	var db=document.body;
	var o=0;var b=1;
	var p=new Array("D27CDB6E-AE6D-11CF-96B8-444553540000","2A202491-F00D-11CF-87CC-0020AFEECF20","23064720-C4F8-11D1-994D-00C04F98BBC9","","","","90A7533D-88FE-11D0-9DBE-0000C0411FC3","9381D8F2-0288-11D0-9501-00AA00B911A5","22D6F312-B0F6-11D0-94AB-0080C74C7E95"
);
	db.addBehavior("#default#clientcaps");
	for(var i=0;i<p.length;i++)
	{
		if(p[i])
			if(db.isComponentInstalled("{"+p[i]+"}","componentid"))o|=b;b*=2;
	}
	return o;
}

function webstats4u(id,options)
{
	var n=navigator;
	var ver=n.appVersion;
	var d=document;
	var verIE=parseInt(ver.substring(ver.indexOf("MSIE")+5,ver.indexOf("MSIE")+6));
	if(verIE>0)
		ver=verIE;
	else 
		ver=parseInt(ver);
	var u="http://m1.webstats4u.com/n?id="+id;
	var r;
	if(options&1)
		r=d.referrer;
	else
		r=top.document.referrer;
	if(!(options&2))
	{
		var rc=r;
		var i=rc.indexOf('?');
		if(i>=0)
			rc=rc.substring(0,i);
		i=rc.lastIndexOf('/');
		if(i>=0)
			rc=rc.substring(0,i+1);
		var l=''+d.location;
		if(l.indexOf(rc)==0)r='';
	}
	if(r&&(r!=d.location))
		u+="&r="+escape(r);
	if((n.appName=="Netscape"&&ver>=3))
		u+="&p="+plugNS();
	if(verIE>=5&&n.appVersion.indexOf('Win')>=0&&n.userAgent.indexOf('Opera')<0)
		u+="&p="+plugIE();
	if(ver>=4)
	{
		var s=screen;
		var w=s.width;
		var h=s.height;
		var c=s.colorDepth;
		if(w)
			u+="&w="+w;
		if(h)
			u+="&h="+h;
		if(c)
			u+="&c="+c;
	}
	u+="&v=2";
	d.write('<a target=_blank href="http://www.webstats4u.com/stats?'+id+'"><img src="'+u+'" border="0" width="15" height="15" alt="Estadísticas WEB" /></a>');
	d.write("<script language='JavaScript' type='text/javascript' src='http://m1.webstats4u.com/md.js?country=es&id="+id+"&_t="+(new Date()).getTime()+"'></scr"+"ipt>");
}

function nedstatbasic(id,options)
{
	webstats4u(id,options);
}