/******************************************

Fichero:		/lib/js/functions.js
Fecha:			03-10-2005
Autor:			Korvus

Copyright (c) Vivace Multimedia
http://www.vivacemultimedia.com

******************************************/

function showDayInfo( nDay )
{
 if( !document.body.onmousemove )
  return( false );
	
 var oLayer = document.getElementById( "dayInfo" + nDay );
 
 oLayer.style.display = "block";
 oLayer.style.left = document.mouse()[ "pageX" ] + "px";
 oLayer.style.top = document.mouse()[ "pageY" ] + "px";

 if( parseInt( oLayer.style.left ) + parseInt( oLayer.style.width ) > document.body.offsetWidth )
  oLayer.style.left = parseInt( oLayer.style.left ) - parseInt( oLayer.style.width ) + "px";
}

function hideDayInfo( nDay )
{ document.getElementById( "dayInfo" + nDay ).style.display = "none"; }

/**
 * Muestra un evento en vista ampliada
 * @function viewExtendedEvent
 * @param nEventId ( int )
 */

function viewExtendedEvent( nEventId )
{ window.open( "modules/agenda/ver.php?idEvento=" + nEventId, "ppViewExtendedEvents", "width=650px, height=500px, scrollbars=yes" ); }
/**
 * Muestra un empleado en vista ampliada
 * @function viewExtendedEmployee
 * @param nEmployeeId ( int )
 */

function viewExtendedEmployee( nEmployeeId )
{ window.open( "modules/personal/ver.php?idPersona=" + nEmployeeId, "ppViewExtendedEmployees", "width=600px, height=350px, scrollbars=yes" ); }

/**
 * Muestra una notícia en vista ampliada
 * @function viewExtendedNew
 * @param nNewId ( int )
 */

function viewExtendedNew( nNewId )
{ window.open( "modules/noticias/ver.php?idNoticia=" + nNewId, "ppViewExtendedNews", "width=940px, height=450px,  scrollbars=yes" ); }