var imgRootJS = "http://i.esmas.com/img/";
var colorBarraDer = "#CC6600";
var Bnr1URL = "http://www.submarino.com.mx/pesquisa/categorias.asp?id_tipo=F&id_categoria=244";
var Bnr1Titulo = "Compras";
var Bnr1Desc = "Adquiere aqu&iacute; art&iacute;culos del Am&eacute;rica";
var BarraDer1Desc = "América, Chivas, Cruz Azul, Necaxa, Pumas, ¿Cu&aacute;l es mejor?";
var BarraDer1Svr = "1";
var BarraDer1Room = "Soccer";
var BarraDer2Desc = "";
var BarraDer2URL = "";

function writeContextBnr1(){
	output = "";
	output +='<table border="0" cellpadding="0" cellspacing="0" width="120" bgcolor="' + colorBarraDer + '">';
	output +='	<tr>';
	output +='		<td><img src="' + imgRootJS + 'esq_1_transBlanca.gif" height="10" width="10"></td>';
	output +='		<td><IMG height=10 src="' + imgRootJS + 'spacer10.gif" width=100></td>';
	output +='		<td align="right"><img src="' + imgRootJS + 'esq_2_transBlanca.gif" height="10" width="10"></td>';
	output +='	</tr>';
	output +='	<tr>';
	output +='		<td><IMG height=40 src="' + imgRootJS + 'spacer10.gif" width=10></td>';
	output +='		<td valign="TOP" class="menusbcanal"><div align="center">' + Bnr1Titulo + '<a href="' + Bnr1URL + '" target="_blank" class="txtvideo"><br>' + Bnr1Desc + '</a></div></td>';
	output +='		<td><IMG height=40 src="' + imgRootJS + 'spacer10.gif" width=10></td>';
	output +='	</tr>';
	output +='	<tr>';
	output +='		<td><img src="' + imgRootJS + 'esq_4_transBlanca.gif" height="10" width="10"></td>';
	output +='		<td><IMG height=10 src="' + imgRootJS + 'spacer10.gif" width=100></td>';
	output +='		<td align="right"><img src="' + imgRootJS + 'esq_3_transBlanca.gif" height="10" width="10"></td>';
	output +='	</tr>';
	output +='</table>';
	document.write(output);
}
function writeContextBarraDer1(){
	output = "";
	output +=' 	<table cellpadding="0" cellspacing="0" border="0" width="122">';
    output +=' 	<TR>';
    output +='     	<TD bgColor=#ffffff colSpan=3><IMG height=1 src="' + imgRootJS + 'spacer10.gif" width=10></TD></TR>';
    output +='  <TR>';
    output +='     	<TD width=10 height=18></TD>';
    output +='     	<TD colSpan=2 height=18><SPAN class=titbarrader>ÚNETE AL CHAT</SPAN></TD></TR>';
    output +='  <FORM name=chat onsubmit="return checanick();" action=http://chats.esmas.com/sitio/chatMasSpaceJS.jsp method=post>';
    output +='  <TR>';
    output +='     	<TD width=10></TD>';
    output +='     	<TD width=102><SPAN class=txtvideo>';
    output +='     	' + BarraDer1Desc + '<BR></SPAN>';
	output +='		<IMG height=5 src="' + imgRootJS + 'spacer10.gif" width=60><BR>';
	output +='		<SPAN class=menusbcanal>nick</SPAN>';
	output +='		<INPUT class=search size=8 name=nick><INPUT type=hidden value=' + BarraDer1Room + ' name=room> ';
	output +='		<INPUT type=hidden value=' + BarraDer1Svr + ' name=svr><IMG height=5 src="' + imgRootJS + 'spacer10.gif" width=60><BR>';
    output +='      <DIV align=right><INPUT type=image height=11 width=46 src="' + imgRootJS + 'entraya.gif" align=absBottom border=0 name=image3>';
    output +='      </DIV></TD>';
    output +='     	<TD width=10></TD></TR></FORM>';
    output +='  <TR>';
    output +='     	<TD height=8 colspan="3"></TD>';
	output +='	</TR>';
	output +=' 	</table>';
	document.write(output);
}

function writeContextBarraDer2(){
	output = "";
}

function gotolinkforo()
{
	if (document.all)
		var xMax = screen.width, yMax = screen.height;
	else
		if (document.layers)
			var xMax = window.outerWidth, yMax = window.outerHeight;
		else
			var xMax = 640, yMax=480;
	var xOffset = (xMax - 200)/2, yOffset = (yMax - 200)/2;
	wpopup=window.open('http://foros.esmas.com/loginForoEspecial.jsp?cvepadre=' + BarraDer2URL,'_blank','resizable=no,menubar=no,location=no,toolbar=no,status=no,scrollbars=no,width=163,height=110,screenX='+xOffset+',screenY='+yOffset+',top='+yOffset+',left='+xOffset+'');
}

function writeContextBarraDer3(){
	output = "";
}

function checanick() {	
	if (document.chat.nick.value == '') {
    		alert ('Por favor teclea un nickname para entrar al chat');
		return false;
  	}
	else {
		return true;
	}
}  

function clearform2(which){ 
	if (which.value=="nick") 
		which.value='' 
}
