<!--

banners_sup = true;

if (screen.width>800) hires = true;

function menu() {

	var urlplus="/";
	var url = document.location.href;
	
	pathname = document.location.pathname.substr(1);
	var plata = pathname.substring(0, pathname.indexOf("/"));


	if 	(url.indexOf("/pc")>=0			&& url.indexOf("/pc")<30)		{ tipoclase = "menucpc"; }
	else if (url.indexOf("/xbox")>=0 		&& url.indexOf("/xbox")<30)		{ tipoclase = "menucxb"; }
	else if (url.indexOf("/gamecube")>=0 		&& url.indexOf("/gamecube")<30) 	{ tipoclase = "menucgc"; }
	else if (url.indexOf("/playstation2")>=0 	&& url.indexOf("/playstation2")<30) 	{ tipoclase = "menucps"; }
	else if (url.indexOf("/gameboy")>=0 		&& url.indexOf("/gameboy")<30) 		{ tipoclase = "menucgb"; }
	else if (url.indexOf("/ngage")>=0 		&& url.indexOf("/ngage")<30) 		{ tipoclase = "menucng"; }
	else if (url.indexOf("/noticias")>=0) 		{ tipoclase = "menuc"; }
	else if (url.indexOf("/arcades")>=0) 		{ tipoclase = "menuc"; }
	else 						{ tipoclase = "menuc"; }
	

	if (tipoclase!="menu") {
		tmpu = document.location.pathname;
		
		tmpu2 = document.location.pathname.substring(1);
		tmp = document.location.pathname.length - 1;

		if ( (document.location.pathname.indexOf("/")!=document.location.pathname.lastIndexOf("/")) && plata!="" ) {
			var urlplus= "/" + plata + "/";
		} else  if (document.location.pathname.charAt(tmp) != "/") {
			var urlplus=document.location.pathname+"/";
		} else if (!document.location.pathname) {
			var urlplus="";	
		}
		
	}
	
	if (urlplus.indexOf("/cg")>=0) urlplus="/";
	if (urlplus.indexOf("/noticias")>=0) urlplus="/";
	if (urlplus.indexOf("/buscador")>=0) urlplus="/";
	if (urlplus.indexOf("/usuarios")>=0) urlplus="/";
	
	if (urlplus.indexOf("index.php")>=0) urlplus="/";
	if (urlplus.indexOf("home.php")>=0) urlplus="/";
	if (urlplus.indexOf("/arcades")>=0) urlplus="/";
	if (urlplus.indexOf("/aventuras")>=0) urlplus="/";
	if (urlplus.indexOf("/deportes")>=0) urlplus="/";
	if (urlplus.indexOf("/accion")>=0) urlplus="/";
	if (urlplus.indexOf("/estrategia")>=0) urlplus="/";
	if (urlplus.indexOf("/inteligencia")>=0) urlplus="/";
	if (urlplus.indexOf("/lucha")>=0) urlplus="/";
	if (urlplus.indexOf("/rol")>=0) urlplus="/";
	if (urlplus.indexOf("/simulacion")>=0) urlplus="/";
	if (urlplus.indexOf("/conduccion")>=0) urlplus="/";
	
//alert (document.cookie);
	if (document.cookie.indexOf("canalgame_usuario")==-1) {
		auth ="Registrate";
	} else {
		auth ="Zona privada";
	}


	var cf;
	if (url.indexOf("/pc")>=0) 		cf="#edd8a1";
	if (url.indexOf("/xbox")>=0)		cf="#c5ecca";
	if (url.indexOf("/playstation2")>=0) 	cf="#c5d0eb";
	if (url.indexOf("/gamecube")>=0) 	cf="#edbcec";
	if (url.indexOf("/gameboy")>=0) 	cf="#c6d8d7";
	if (url.indexOf("/ngage")>=0) 		cf="#c4c4c4";
	if (!cf) cf = "#e2b9b9";

	menu = Array (
	'1', cf, '', 'Zona de Usuario',
	'0', cf, '/usuarios', '<img border=0 src="/img/mfl.gif">&nbsp;&nbsp;<b>'+auth+'</b>',
	'0', cf, '/foros', 'Foros de debate',
	'0', cf, '/correo', 'CanalG@me mail',
	'0', cf, '/chat', 'CanalGame Chat',
	'0', cf, '/usuarios/envia.php', 'Enviar <b>esta</b> página',
	'0', cf, 'javascript:GFavoritos();', 'Guardar en favoritos',
	'0', cf, '/cg/ayuda.php', 'Ayuda general',
	'0', cf, 'http://www.canalgame.com/flash.php', 'Flash intro',
	'1', cf, '', 'BUSCAR UN JUEGO',
	'0', cf, '/buscador', 'Buscador',
	'0', cf, '/buscador/avanzado', 'Buscador avanzado',
	'0', cf, '/buscador/los_mas_populares', 'Los más populares',
	'0', cf, '/buscador/los_mas_valorados', 'Los más valorados',
	'0', cf, '/buscador/top100', 'Top 100 búsquedas',
	'0', cf, '/buscador/proximamente', 'Próximamente',
	'0', cf, '/buscador/memorables', 'Memorables',
	'1', cf, '', 'NOVEDADES',
	'0', cf, urlplus + 'noticias', 'Noticias',
	'0', cf, '/noticias/titulares', 'Prensa',
	'0', cf, '/buscador/los_ultimos_juegos', 'Los últimos juegos',
	'0', cf, '/buscador/las_ultimas_reviews', 'Reviews',
	'0', cf, '/buscador/las_ultimas_guias_y_trucos', 'Guías / Trucos',
	'1', cf, '', 'BUSCA POR GENERO',
	'0', cf, urlplus + 'arcades',	'Arcades',
	'0', cf, urlplus + 'aventuras', 	'Aventuras',
	'0', cf, urlplus + 'deportes', 	'Deportes',
	'0', cf, urlplus + 'accion',	 'Acción',
	'0', cf, urlplus + 'estrategia', 	'Estrategia',
	'0', cf, urlplus + 'inteligencia', 	'Inteligencia',
	'0', cf, urlplus + 'lucha', 	'Lucha',
	'0', cf, urlplus + 'rol', 		'Rol',
	'0', cf, urlplus + 'simulacion', 	'Simulación',
	'0', cf, urlplus + 'plataformas', 	'Plataformas',
	'0', cf, urlplus + 'conduccion', 	'Conducción',	
	'1', cf, '', 'POR PLATAFORMA',
	'0', '#edd8a1', '/pc', 		'<span class="tpc">PC</span>',
	'0', '#c5d0eb', '/playstation2', 	'<span class="tplaystation2">PlayStation 2</span>',
	'0', '#c5ecca', '/xbox', 		'<span class="txbox">Xbox</span>',
	'0', '#edbcec', '/gamecube', 	'<span class="tgamecube">GameCube</span>',
	'0', '#c6d8d7', '/gameboy', 	'<span class="tgameboy">Gameboy Advance</span>',
	'0', '#c4c4c4', '/ngage', 		'<span class="tngage">N-Gage</span>'
	);


	for (i=0; i<menu.length; i+=4) {
		if (menu[i]=='0') {
       			document.write ('<tr><td bgcolor="#DCDCDC" onClick="document.location.href=\''+menu[i+2]+'\'" class="menu" onMouseOver="mh(this,');
       			document.write ("'" + menu[i+1] + "'");
       			document.write (')" onMouseOut="mh(this,');
       			document.write ("'" + menu[i+1] + "'");
       			document.write (')"><a href="'+menu[i+2]+'"><span class="menua">'+menu[i+3]+'</span></a></td></tr>');
		} else {
			document.write ('<tr><td class='+tipoclase+'>'+menu[i+3]+'</td></tr>');
		}
	}
	
	document.write ('<tr><td bgcolor=#EAEAEA><a href="javascript:oncem();"><img src="/img/etano.gif" border="0" align=right hspace=10 vspace=10></a></td></tr>');

}

function mh(f,cc) {
	if (f.style.backgroundColor!=cc && f.style.backgroundColor.indexOf('rgb(')<0) {
		f.style.backgroundColor=cc;
	} else {
		
		f.style.backgroundColor='#dcdcdc';
	}
}

function tableOver(o,c) {
	o.style.backgroundColor=c;
	o.style.cursor='hand';
}

function tableOut(o,c) {
	o.style.backgroundColor=c;
	o.style.cursor='hand';
}

function MM_swapImgRestore() { //v3.0
  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() { //v3.0
  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_findObj(n, d) { //v4.0
  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 && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  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 GFavoritos (este) {

	if (window.external) {
		external.AddFavorite(location.href, document.title)
	} else {
		alert("Tu navegador no es compatible para guardar automáticamente un enlace.\n\nPero puedes hacerlo manualmente.");
	}
}

function OpenSS(srcHref,title) {
	popupss=window.open(srcHref,title,'toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,height=400,width=400,resizable=no');
	popupss.focus();
}

function winBRopen(theURL, Name, popW, popH, scroll) {
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+',resizable'
	Win = window.open(theURL, Name, winProp)
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
	}

function oncem () {
	winBRopen('http://sync.es/11m.html','11m','600','500','no');
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+', resizable'
win = window.open(mypage, myname, winprops)
}

function NewWindow2(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status=yes,scrollbars='+scroll+', resizable=no'
//winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',status=yes,scrollbars='+scroll+', resizable=yes'
win = window.open(mypage, myname, winprops)
}

function MM_showHideLayers() { //v6.0
  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; }
}


//-->