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

Fichero:		/lib/js/functions.js
Fecha:			19-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 el fotomatón en vista ampliada
 * @function viewExtendedRegistry
 * @param [ nRegistryID ] ( int )
 */

function viewExtendedRegistry()
{ window.open( "modules/album/index.php", "ppViewExtendedRegistry", "width=620px, height=500px" ); }

/**
 * 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=600px, height=450px, scrollbars=yes" ); }

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

function viewExtendedEvent( nEventID )
{ window.open( "modules/agenda/ver.php?idEvento=" + nEventID, "ppViewExtendedEvents", "width=600px, 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" ); }