var CANAL;
var w=138;
var au='/img/au.gif';
var img_au1='<img src="'+au+'" width=1 height=1>';
var img_au2='<img src="'+au+'" width=1 height=2>';
var tblIni='\'<table width='+w+' border=0 cellspacing=0 cellpadding=0><tr><td width=1 height=1  class=\''+'+tipo+'+'\'-supI>'+img_au1+'</td><td class=\''+'+tipo+'+'\'-b width='+(w-2)+'  height=1><img src="'+au+'" width='+(w-2)+' height=1></td><td width=1 class=\''+'+tipo+'+'\'-supD  height=1>'+img_au1+'</td></tr><tr><td width=1 class=\''+'+tipo+'+'\'-b>'+img_au1+'</td><td width='+(w-2)+' class=\''+'+tipo+'+'\'-f>\'';
var tblFin='\'</td><td class=\''+'+tipo+'+'\'-b width=1>'+img_au1+'</td></tr><tr><td width=1 height=1 class=\''+'+tipo+'+'\'-infI>'+img_au1+'</td><td height=1 class=\''+'+tipo+'+'\'-b width='+(w-2)+'>'+img_au1+'</td><td width=1 height=1 class=\''+'+tipo+'+'\'-infD>'+img_au1+'</td></tr></table>\'';
var tblIntIni='\'<table width='+(w-2)+' border=0 cellspacing=0 cellpadding=0><tr><td colspan=2 height=1 class=\''+'+tipo+'+'\'-l>'+img_au1+'</td></tr>\'';
var tblIntFin='</table>';
var tblhr='\'<tr><td colspan=2 class=\''+'+tipo+'+'\'-hr>'+img_au2+'</td></tr>\'';
var tblTRsimple='\'<tr><td width=10>&nbsp;</td><td width='+(w-12)+' height=19><a href="\''+'+CANAL[i].URL+'+'\'" class=\''+'+tipo+'+'\'-s\''+'+target+'+'\'>\''+'+CANAL[i].nombre+'+'\'</a></td></tr>\'';
var tblTRcon='\'<tr><td width=10>\'+sON+\'</td><td width='+(w-12)+' height=19><a href="\''+'+CANAL[i].URL+'+'\'" class=\''+'+tipo+'+'\'-s\''+'+target+'+'\'>\''+'+CANAL[i].nombre+'+'\'</a></td></tr>\'';
function creaMgenerico(id){
CANAL=id;
tipo='g';
tmp=eval(tblIni)+eval(tblIntIni);
for (i=0;i<CANAL.length;i++){
if (CANAL[i].target){target=' target="_blank"'}else{target=''}
if (CANAL[i].nombre==SECCION[0]){
if (SECCION[1]==''){tmp+='<tr><td width=10 class='+tipo+'-pON>'+mON+'</td><td width='+(w-12)+' height=19 class='+tipo+'-pON><a href=\"'+CANAL[i].URL+'\"  class=pON>'+CANAL[i].nombre+'</a></td></tr>'}else{tmp+=eval(tblTRcon)}}else{tmp+=eval(tblTRsimple)}
if (i!=CANAL.length-1) tmp+=eval(tblhr)
}
tmp+=(tblIntFin+eval(tblFin));
return(tmp)
}
function creaMcanal(id){
tipo='m';
tipolink='pON';
SECCION=id;
tmp=eval(tblIni)+eval(tblIntIni);
for (i=0;i<CANAL.length;i++){
	if (CANAL[i].target){
		target=' target="_blank"'
	}else{
		target=''
	}
	if (CANAL[i].nombre==SECCION[0]){
		if (SECCION[1]==''){
			tmp+='<tr><td width=10 class='+tipo+'-pON>'+mON+'</td><td width='+(w-12)+' height=19 class='+tipo+'-pON><a href=\"'+CANAL[i].URL+'\"  class=pON>'+CANAL[i].nombre+'</a></td></tr>'
			//alert(tmp);
		}else{
			tmp+=eval(tblTRcon);
		}
	}else{
		tmp+=eval(tblTRsimple);
	}
	//if (i!=CANAL.length-1) 
	tmp+=eval(tblhr);
}
if (SECCION[0]=="alquiler"){
	tmp+='<tr><td width=10 class=m-pON><img src=http://motor.terra.es/motor/img/bulletON.gif width=5 height=5></td><td width=126 height=19 class=m-pON><a href=http://ad.doubleclick.net/clk;38842880;6249081;s?http://motor.terra.es/motor/alquilerdecoches/ class=menubio2>Alquiler&nbsp;de&nbsp;coches</a></td></tr>';
}else{
	tmp+='<tr><td width=10>&nbsp;</td><td width=126 height=19><a href=http://ad.doubleclick.net/clk;38842880;6249081;s?http://motor.terra.es/motor/alquilerdecoches/ class=menubio>Alquiler&nbsp;de&nbsp;coches</a></td></tr>';
}
tmp+=(tblIntFin+eval(tblFin));
return(tmp+sepTb2)
}
