
function lin2Menu(dir,num) {
	var url = "";
		
	//main
	if (dir=='-1')
	{
		url = nc_l2web + "http://l2.comunidadzero.com/index.php";
	}

	// news
	else if (dir=='00') 
	{
		if(num=='00')  url = nc_l2bbs + "http://l2.comunidadzero.com/index.php";
		else if(num=='01') url = nc_l2bbs + "/l2bbs/news/list/list.asp?bbs=news&kind=gameupdate";
		else if(num=='02') url = nc_l2bbs + "/l2bbs/event/list/list.asp?bbs=event&kind=event";
		else if(num=='03') url = nc_l2bbs + "/l2bbs/news/list/list.asp?bbs=news&kind=press";
	}	

	//noticias
	else if (dir=='1')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = nc_l2web + "noticias.php?sec=img_noticias/u_news.php";
		else if(num=='10') url = nc_l2web + "noticias.php?sec=img_noticias/u_news.php";
		else if(num=='20') url = nc_l2web + "noticias.php?sec=img_noticias/desarrollo.php";
		else if(num=='30') url = nc_l2web + "noticias.php?sec=img_noticias/eventos.php";
		else if(num=='40') url = nc_l2web + "noticias.php?sec=img_noticias/sieges.php";
		else if(num=='50') url = nc_l2web + "/";	
	}

	// info
	else if (dir=='2')
	{	
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = nc_l2web + "info.php?sec=img_info/req.php";
		else if(num=='10') url = nc_l2web + "info.php?sec=img_info/req.php";
		else if(num=='20') url = nc_l2web + "info.php?sec=img_info/com.php";
		else if(num=='30') url = nc_l2web + "info.php?sec=img_info/play.php";
		else if(num=='40') url = nc_l2web + "info.php?sec=img_info/comandos.php";
		else if(num=='50') url = nc_l2web + "info.php?sec=img_info/ayuda.php";		
	}
	
	//descargas
	else if (dir=='3')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = nc_l2web + "descargas.php?sec=img_descargas/cliente.php";
		else if(num=='20') url = nc_l2web + "descargas.php?sec=img_descargas/cliente.php";
		else if(num=='30') url = nc_l2web + "descargas.php?sec=img_descargas/parches.php";
		else if(num=='40') url = "";
		else if(num=='50') url = nc_l2web + "descargas.php?sec=img_descargas/wall.php";
		else if(num=='60') url = nc_l2web + "descargas.php?sec=img_descargas/screen.php";	
		else if(num=='70') url = nc_l2web + "descargas.php?sec=img_descargas/videos.php";	
			
	}

	// biblioteca
	else if (dir=='4')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = nc_l2web + "biblioteca.php?sec=img_biblioteca/razas.php";
		else if(num=='10') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/razas.php";
		else if(num=='20') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/items.php";
		else if(num=='30') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/clanalia.php";
		else if(num=='40') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/pets.php";
		else if(num=='50') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/drops/drops.php";
		else if(num=='60') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/sieges.php";
		else if(num=='70') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/seven1.php";
		else if(num=='80') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/quest.php";
		else if(num=='90') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/heroes.php";
		else if(num=='100') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/nobleza.php";
		else if(num=='110') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/pesca.php";
		else if(num=='120') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/tatoos1.php";
		else if(num=='130') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/manor1.php";
		else if(num=='140') url = nc_l2web + "biblioteca.php?sec=img_biblioteca/cp.php";
								
		//else if(num=='05') url = nc_l2bbs + "/ncpoll/ncpoll.asp";
	}


	// comunidad
	else if (dir=='5')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = "";
		else if(num=='10') url = "http://foros.comunidadzero.com/forumdisplay.php?f=6";
		else if(num=='20') url = nc_l2web + "comunidad.php?sec=img_comunidad/fansite.php";
		else if(num=='30') url = nc_l2web + "comunidad.php?sec=img_comunidad/gzshield.php";
		else if(num=='40') url = nc_l2web + "comunidad.php?sec=img_comunidad/pjmes.php";
		else if(num=='50') url = nc_l2web + "comunidad.php?sec=img_comunidad/historias.php";
		else if(num=='60') url = nc_l2web + "comunidad.php?sec=img_comunidad/shop.php";
		else if(num=='70') url = nc_l2web + "comunidad.php?sec=img_comunidad/publicidad.php";
	}


	// soporte
	else if (dir=='6')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = "";		
		else if(num=='10') url = nc_l2web + "soporte.php?sec=img_soporte/faq.php";
		else if(num=='20') url = nc_l2web + "soporte.php?sec=img_soporte/contacto.php";
		else if(num=='30') url = nc_l2web + "soporte.php?sec=img_soporte/gmbios.php";
		else if(num=='40') url = nc_l2web + "soporte.php?sec=img_soporte/reglas.php";
		else if(num=='50') url = nc_l2web + "soporte.php?sec=img_soporte/sfaq.php";	
	}

	//mi cuenta
	else if (dir=='7')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1')  url = "";
		else if(num=='60') url = nc_l2web + "micuenta.php?sec=img_micuenta/registro.php";
		else if(num=='70') url = nc_l2web + "img_micuenta/misdatos/login.php";
	}

	//foro
	else if (dir=='8')
	{
		nc_l2web = "http://l2.comunidadzero.com/";
		if(num=='1') 	url = "http://foros.comunidadzero.com/forumdisplay.php?f=6";
			
	}

	//mapa de sitio
	else if (dir=='9')
	{
		if(num=='1') 	url = "http://l2.comunidadzero.com/soporte.php?sec=img_soporte/sitemap.php";	

	}

	//agragar a favoritos
	else if (dir=='10')
	{
		if(num=='1') 	url = "";	
		
	}

	//payment
	else if (dir=='11')
	{
		if(num=='1') 	url = "http://l2.comunidadzero.com/index.php";
	}

  	if(url)	location.href = url;
  }
  
  

function preview(c){
	var url = "";
	var width = 0;
	var height=0;
	var scrollbars = 0;
	var resizable = 0;
	var left=0;
	var top=0;
	var winName = "";
	
	if (c=='c3'){
			url = nc_l2web + "/preview/ch3/view.asp";
			width = 1010;
			height = 710;			
			winName = "C3Preview";
	}
	else if (c=='c4')
	{
		url = nc_l2web + "/preview/ch4/intro.asp";
			width = 1010;
			height = 710;			
			winName = "C4Preview";			
	} 
	else if (c=='c5')
	{
		url = nc_l2web + "/preview/ch5/introPage.asp";
			width = 1010;
			height = 710;			
			winName = "C5Preview";			
	} 
	else if (c=='dressroom')
	{
		url = nc_l2bbs + "/dressroom/dress.asp";
			width = 1010;
			height = 710;			
			winName = "L2Dressroom";			
	}

	left = (screen.availWidth-10-width)/2;
	top = (screen.availHeight-30-height)/2;
	winFeatures = "left=" + left + ",top=" + top + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",width=" + width + ",height=" + height + ",toolbar=0,location=0,status=0,menubar=0"
	
	if(url)  	window.open(url, winName, winFeatures);

}

function updateinfo(c){
	var url = "";
	var width = 0;
	var height=0;
	var scrollbars = 0;
	var resizable = 0;
	var left=0;
	var top=0;
	var winName = "";
	
	if (c=='c3'){
			url = nc_l2web + "/updateinfo/ch3/chap1.asp";
			width = 1010;
			height = 710;			
			winName = "C3UpdateInfo";
	}
	else if (c=='c4')
	{
		url = nc_l2web + "/updateinfo/ch4/chap1.asp";
			width = 1010;
			height = 710;			
			winName = "C4UpdateInfo";			
	} 
	else if (c=='c5')
	{
		url = nc_l2web + "/updateinfo/ch5/chap1.asp";
			width = 1010;
			height = 710;			
			winName = "C5UpdateInfo";			
	} 

	left = (screen.availWidth-10-width)/2;
	top = (screen.availHeight-30-height)/2;
	winFeatures = "left=" + left + ",top=" + top + ",scrollbars=" + scrollbars + ",resizable=" + resizable + ",width=" + width + ",height=" + height + ",toolbar=0,location=0,status=0,menubar=0"
	
	if(url)  	window.open(url, winName, winFeatures);

}