//if(top!=self){top.location.href=self.location.href;} //frame killer

function abre(url)
{
window.open(url,"darnapopup","resizable=yes,menubar=no,location=no, titlebar=no,toolbar=no,status=no,scrollbars=yes,directories=no,width=800,height=500,left=0,top=0");
}

function menu()
{
a='<table cellspacing=0 width=10 align=left style="margin-right:19px;margin-bottom:19px">';
a+='<tr><td colspan=3><img src="menu/b1.jpg" id=arriba width=138 height=76></td></tr>';
a+='<tr><td><img src="menu/b2.jpg" width=19 height=220></td>';
a+='<td><table cellspacing=0>';
w(a);

//ojo, que aquí van los nombres de los enlaces de los botones
botonin("noti","noticias.htm");
botonin("biog","biografia.htm");
botonin("disc","discografia.htm");
botonin("conc","conciertos.htm");
botonin("entr","entrevistas.htm");
botonin("cont","contacto.htm");
botonin("tien","tienda.htm");
botonin("enla","enlaces.htm");
botonin("foto","fotos.htm");
botonin("mult","multimedia.htm");
botonin("firm","firmas.htm");
//hala, ya está

a='</table></td>';
a+='<td><img src="menu/b3.jpg" width=39 height=220></td></tr>';
a+='<tr><td colspan=3><img src="menu/b4.jpg" width=138 height=24></td></tr></table>';
w(a);
}


function w(ar){document.write(ar)}

//coloca el frontal con menú de navegación
function frontal(arg)
{

a='<table cellspacing=0 width=100%><tr>';
if(arg) a+='<td width=50% rowspan=2 style="background-repeat:no-repeat;background-position:top 100%" background="menu/sombraizqmenu.jpg"></td><td>';
else
	      a+='<td width=50% rowspan=2 style="background-repeat:no-repeat;background-position:top 100%" background="menu/sombraizq.jpg"></td><td>'
w(a);
frontalmenu(arg);
a='</td><td width=50%  rowspan=2 style="background-repeat:no-repeat;background-position:left,top" background="menu/sombrader.jpg"></td></tr>';
if(arg) a+='<tr><td style="background-repeat:no-repeat;background-position:top 100%" background="menu/sombracenmenu.jpg">';
	else a+='<tr><td style="background-repeat:no-repeat;background-position:top" background="menu/sombracen.jpg">';
w(a);
if(arg) menu();
}


function parriba()
{document.getElementById("arriba").scrollIntoView(true);}

function cierra()
{
a='</td></tr></table>';
a+='<center><table cellspacing=0><tr><td><img src="menu/c1.jpg"></td><td><a href="javascript:history.go(-1)"><img class=bbb src="menu/c2.jpg" onmouseover=this.src="menu/c2_f2.jpg" onmouseout=this.src="menu/c2.jpg"></a></td><td><img src="menu/c3.jpg"></td>';
a+='<td><img src="menu/c4.jpg"><br>';
a+='<table cellspacing=0><tr><td><img src="menu/l1.gif" width=44 height=19></td><td><a href="http://www.darnametal.com"><img class=bbb src="menu/l2.gif" onmouseover=this.src="menu/l2_f2.gif" onmouseout=this.src="menu/l2.gif"></a></td><td><img src="menu/l3.gif"></td><td><a href="m'+'a'+'i'+'lt'+'o:v'+'o'+'e'+'t@c'+'ra'+'n'+'f.'+'n'+'et"><img class=bbb src="menu/l'+'4.gif" onmouseover=this.src="menu/l'+'4_f'+'2.gif" onmouseout=this.src="menu/l'+'4.gif"></a></td></tr></table>';
a+='</td><td><img src="menu/c5.jpg"></td><td><a href="javascript:parriba()"><img class=bbb src="menu/c6.jpg" onmouseover=this.src="menu/c6_f2.jpg" onmouseout=this.src="menu/c6.jpg"></a></td><td><img src="menu/c7.jpg"></td></tr></table></center><br>';
w(a);
}

function frontalmenu(siono)
{
a='<table cellspacing=0 width=100><tr>';
if(siono)	 a+='<td><img src="menu/mizqmenu.jpg" width=19></td><td><img src="menu/m1u.jpg" width=119 height=141><br><img src="menu/m1d.jpg" width=119 height=64></td>';
if(!siono) a+='<td><img src="menu/mizq.jpg" width=19></td><td><img src="menu/m1.jpg" width=119 height=205></td>';
papa=""; if(siono) papa="menu";
a+='<td><img src="menu/spacer.gif" width=161 height=35><br><img src="menu/m2u.jpg" width=161 height=106><br><img src="menu/m2d'+papa+'.jpg" width=161 height=64></td>';
a+='<td><img src="menu/m3u.jpg" width=160 height=35><br><img src="menu/m3c.jpg" width=160 height=106><br><img src="menu/m3d.jpg" width=160 height=64></td>';
a+='<td><img src="menu/spacer.gif" width=161 height=35><br><img src="menu/m4u.jpg" width=161 height=106><br><img src="menu/m4d.jpg" width=161 height=64></td>';
a+='<td><img src="menu/m5.jpg" width=120 height=205></td>';
a+='<td><img src="menu/mder.jpg" width=19></td>';
a+='</tr></table>';
w(a);
}

function botonin(n, link)
{
w('<tr><td><a href="'+link+'"><img src="menu/'+n+'.gif" width=80 height=20 onmouseover=this.src="menu/'+n+'_f2.gif" onmouseout=this.src="menu/'+n+'.gif"></a></td></tr>')
}


hexa = "0123456789abcdef";
PI=3.1415927;

function hex2dec(hex)
{return hexa.indexOf(hex.charAt(0))*16+hexa.indexOf(hex.charAt(1));}

function dec2hex(i) 
{	if (i < 0) return "00";
	else if (i > 255) return "ff";
	else return "" + hexa.charAt(Math.floor(i/16)) + hexa.charAt(i%16);}

function VCLsetTrans(ele, arg)
{document.getElementById(ele).style.color=arg+"";}

function VCLbrillo(elemento)
{
cini="b98629";
sr=hex2dec(cini.substr(0,2));
sg=hex2dec(cini.substr(2,2));
sb=hex2dec(cini.substr(4,2));
p=PI/200;
for (var i=1;i<41;i++)
	{
	e=(40-i)*(40-i)*p;
	r=sr+Math.sin(e)*sr/2;
	g=sg+Math.sin(e)*sg/2;
	b=sb+Math.sin(e)*sb/2;
	arg="#"+dec2hex(r)+dec2hex(g)+dec2hex(b);
	setTimeout("VCLsetTrans('"+elemento+"','"+arg+"')",i*50);
	}
}

function VCLcambiatrans(ele2,i)
{
var num=Math.ceil(75+Math.cos(i*0.31415927)*25);
if (document.all)
	{document.getElementById(ele2).style.filter="alpha(opacity="+num+")"}
	else if (document.getElementById(ele2))
			{num--;document.getElementById(ele2).style.MozOpacity=num/100;}
}

function VCLdisparatrans(ele)
{
for (i=0;i<20 ;i++)
	setTimeout("VCLcambiatrans('"+ele+"',"+i+")",i*25);
}

function VCLparpadea() 
{
var elemento = event.srcElement;
	if (elemento.tagName == "A") 
		{VCLbrillo(elemento.uniqueID);return};
	
	if (elemento.tagName=="IMG")
		if (elemento.parentNode.tagName=="A") 
			 if(elemento.className!="bbb")
				VCLdisparatrans(elemento.uniqueID);
}


var VCLnetid=0;

function noVCLparpadea() 
{var elemento = event.srcElement;}

//inicializa ratón
if (document.all) {document.onmouseover=VCLparpadea;	document.onmouseout=noVCLparpadea;}
