// Funciones del sistema
// Creadas para www.cursosdehebreo.com por David Laor
// 19 Septiembre, 2008 
//****************************************************************************************************************

// General open window function 
function abrirventana(Url, titulo, Width, Height, Left, Top, Scroll)
{
     var win_opt = "toolbar=no, location=no, directories=no, status=no, titlebar=no, fullscreen=no, menubar=no, resizable=no, copyhistory=no";
     // var win_opt = "channelmode,scroll bars,";
     win_opt += ",width=" + Width + ",height=" + Height;
     win_opt += ",left=" + Left + ",top=" + Top + ",scrollbars=yes" ;
     window.open(Url,titulo,win_opt);
}

//****************************************************************************************************************
function CreaArray(n) 
{		
	this.length = n;		
	for (var i=1; i<=n; i++) 
		this[i] = 0;				
	return this;
}

//****************************************************************************************************************
function url() {
hidden = open('http://www.cursosdehebreo.com','NewWindow','top=0,left=0,width=1020,height=710,status=no,resizable=yes,scrollbars=yes');
}

//****************************************************************************************************************
// Flash status bar

var message="Aprenda hebreo ! - Curso basico de hebreo !";
var speed=400;
var visible=0;
function Flash() {
if (visible == 0) {
window.status=message;
visible=1;
} else {
window.status="";
visible=0;
}
setTimeout('Flash()', speed);
}

//****************************************************************************************************************
// Tool tips for images
var theObj="";

function toolTip(text,me) {
  theObj=me;
  theObj.onmousemove=updatePos;
  document.getElementById('toolTipBox').innerHTML=text;
  document.getElementById('toolTipBox').style.display="block";
  window.onscroll=updatePos;
}

function updatePos() {
  var ev=arguments[0]?arguments[0]:event;
  var x=ev.clientX;
  var y=ev.clientY;
  diffX=24;
  diffY=0;
  document.getElementById('toolTipBox').style.top  = y-2+diffY+document.body.scrollTop+ "px";
  document.getElementById('toolTipBox').style.left = 200+document.body.scrollLeft+"px";
  theObj.onmouseout=hideMe;
}
function hideMe() {
  document.getElementById('toolTipBox').style.display="none";
}

