ContentInfo = "";

fondo_titulo = "#9b5b5b"
fondo_texto = "#343b44"

var mouse_X;
var mouse_Y;

var tip_active = 0;

function update_tip_pos(){

		document.getElementById('ventana_java').style.left = mouse_X + 20;
		document.getElementById('ventana_java').style.top  = mouse_Y + 15;
}



var ie = document.all?true:false;
if (!ie) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (ie) { // grab the x-y pos.s if browser is IE
mouse_X = event.clientX + document.body.scrollLeft;
mouse_Y = event.clientY + document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
mouse_X = e.pageX;
mouse_Y = e.pageY;
}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}

if(tip_active){update_tip_pos();}
}


function EnterContent(TTitle, TContent,numVideo){

var ancho;

if (TContent.length > 50 || TTitle.length > 30) {
   ancho = 400;
} else {
   ancho = 150;
}
ancho = 600;
ContentInfo =

'<table border="0" width="'+ancho+'" cellspacing="0" cellpadding="0">'+
'<tr valign=top><td width="100%" bgcolor="#000000" valign=top>'+

'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
'<tr><td width="1%" bgcolor='+fondo_texto+' valign=top>'+

'<img src="http://www.hachete.com/empresas/restaurantelaalacena/imagenes/platos/' +numVideo + '" border="0" height="200" width="340" />'+
  

'</td><td><table border="0" width="100%" cellspacing="1" cellpadding="0" height="200px">'+
'<tr><td width="100%" bgcolor='+fondo_titulo+' valign=top>'+

'<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">'+
'<tr><td width="100%" valign="middle">'+

'<font class=titulos_java><i>Descripción:</i></font><p><span style="color:#FFFFFF;font-size:11px;font-family:Verdana;"> '+TTitle+'</style></p>'+

'</td></tr>'+

'</table>'+

'</td></tr>'+

'</table>'+

'</td>'+
'</tr>'+
'</table>'+

'</td></tr>'+
'</table>';

}








function popup_java(which, TTitle, TContent,numVideo){

	
	if(which){
	
		update_tip_pos();
	
		tip_active = 1;
		
		document.getElementById('ventana_java').style.visibility = "visible";
		
		EnterContent(TTitle, TContent,numVideo);
		
		document.getElementById('ventana_java').innerHTML = ContentInfo;
	
	}else{
	
		tip_active = 0;
	
		document.getElementById('ventana_java').style.visibility = "hidden";
	}

}