window.onerror = errores;
function errores()
{
	return true
}

function enlaces(opcion,dir)
{
	
	switch(opcion)
	{
		case 1:
			window.open("libro","libro","scrollbars,width=660,height=600,left=10,top=10");
			break;
		case 2:
			window.open("foro/","foro");
			break;
		case 3:
			window.open("../libro/index.php","libro","scrollbars,width=660,height=600,left=0,top=0");
			break;
		case 4:
			window.open("../foro/","foro");
			break;
		case 5:
			window.open("../album/","album");
			break;
		case 6:
			window.open("../mp3.html","Player","width=360,height=270,left=10,top=10");
			break;
		case 7:
			window.open(dir,"Letras","width=470,height=600,left=400,top=10,scrollbars");
			break;
		case 8:
			window.open("http://www.myspace.com/crownlessband","MySpace");
			break;
		case 9:
			window.open("normas.html","normas","width=480,height=510,left=10,top=10");
			break;
		case 10:
			window.open("normas.html","normas","width=480,height=520,left=10,top=10");
			break;
		case 11:
			total=parseInt(document.getElementById('totalp').innerHTML);
			//alert(total+gastos);
			window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=nanecrownless%40gmail%2ecom&item_name=Crownless tienda&no_shipping=0&no_note=1&tax=0&amount="+(total+gastos)+"&currency_code=EUR&lc=ES&bn=PP%2dDonationsBF&charset=UTF%2d8","paypal","scrollbars,toolbar,location,directories,status,menubar,resizable,width=660,height=600,left=0,top=0");
			break;
		case 12:
			window.open("lista.html","lista","width=270,height=200,left=10,top=10");
			break;
		case 13:
			window.open("https://www.facebook.com/crownless.metal","Facebook");
			break;
		case 14:
			window.open("http://www.youtube.com/user/CrownLessOfficial","Youtube");
			break;
		case 15:
			window.open("https://twitter.com/CrownLess_Metal","Twitter");
			break;
		case 16:
			window.open("http://crownlessblog.wordpress.com/","Blog");
			break;
		case 17:
			window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=nanecrownless%40gmail%2ecom&item_name=Crownless tienda&no_shipping=0&no_note=1&tax=0&currency_code=EUR&lc=ES&bn=PP%2dDonationsBF&charset=UTF%2d8","paypal","scrollbars,toolbar,location,directories,status,menubar,resizable,width=660,height=600,left=0,top=0");
			break;
		case 18:
			window.open("https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=nanecrownless%40gmail%2ecom&item_name=Crownless tienda&no_shipping=0&no_note=1&tax=0&amount="+(10+gastos)+"&currency_code=EUR&lc=ES&bn=PP%2dDonationsBF&charset=UTF%2d8","paypal","scrollbars,toolbar,location,directories,status,menubar,resizable,width=660,height=600,left=0,top=0");
			break;
	}
}

function reviews(dir)
{
	window.open(dir,"review","width=600,height=600,left=10,top=10,scrollbars");
}


//Funcion perder enfoque menu
function fuera(n)
{
		//window.document.menu.jsdesvanecer;
		document.getElementById("menu").jsdesvanecer();
		//window.document.menu.desvanecer();
		//alert("o_O");
		
}


function ocultarc()
{
	document.getElementById('concurso').style.visibility="hidden";
	document.getElementById('conc').style.visibility="hidden";
}

function mostrarc()
{
	document.getElementById('concurso').style.visibility="visible";
	document.getElementById('conc').style.visibility="visible";
}

function ocultarreserva()
{
	document.getElementById('reserva').style.visibility="hidden";
}

function mostrarreserva()
{
	document.getElementById('reserva').style.visibility="visible";
}

function mostrartxtdark()
{
	document.getElementById('txtdark').style.opacity=1;
}

function mostrartxtdemo()
{
	document.getElementById('txtdemo').style.opacity=1;
}

function mostrartxtficha()
{
	document.getElementById('txtficha').style.opacity=1;
}

function tseccion()
{
	
	parent.document.getElementById('contenidot').innerHTML = document.getElementById('contenidot').innerHTML
	//parent.document.getElementById('pie').innerHTML = document.getElementById('pie').innerHTML
	parent.document.getElementById('icocarga').style.opacity=0;


	if (navigator.appName =="Microsoft Internet Explorer")
	{
		parent.document.getElementById('icocarga').style.visibility="hidden";
	}
}

function ticocarga()
{
	document.getElementById('icocarga').style.opacity=0.8;

	if (navigator.appName =="Microsoft Internet Explorer")
	{
		document.getElementById('icocarga').style.visibility="visible";
	}
}

var gastos=3;
function fgastos(pais)
{
	gastos=3;
	//alert(totprice);
	switch(pais)
	{
		case "España":
			gastos=3;
			document.getElementById('ePais1').style.display='none';
			document.getElementById('ePais2').style.display='none';
			break;
		case "Europa":
			gastos=6;
			document.getElementById('ePais1').style.display='block';
			document.getElementById('ePais2').style.display='block';
			break;
		case "America":
			gastos=10;
			document.getElementById('ePais1').style.display='block';
			document.getElementById('ePais2').style.display='block';
			break;	
		case "Japon":
			gastos=10;
			document.getElementById('ePais1').style.display='none';
			document.getElementById('ePais2').style.display='none';
			break;
		case "Otro":
			gastos='consultar';
			document.getElementById('ePais1').style.display='block';
			document.getElementById('ePais2').style.display='block';
			break;
	}

	document.getElementById('gastos').innerHTML = gastos + ' €';
}
