	function WindowOpen(parm1,parm2,parm3)
	{
		var pag;
		pag = window.open(parm1,parm2,parm3);
		pag.focus();
	}

	function vistaimpresion(parm1)
	{
		WindowOpen(parm1,'vistaimpresion','width=710,height=600,scrollbars=yes,resize=yes,menubar=yes')
	}
	
	function recomendar(parm1,parm2,parm3)
	{
		WindowOpen(parm1,'recomendar','width=400,height=480,scrollbars=no,resizable=yes')
	}
	
	function mostrar_propiedades(obj)
	{	
		var aux = null;
		for (prop in obj)
		{
		  aux += prop + ": " + obj[prop] + "\n<br>";
		}
		document.writeln(aux);
	}
	
	function trim(s)
	{
		return s.replace(/^\s*(\S*(\s+\S+)*)\s*$/,'$1');
	};	
	function WindowLocation(parm1)
	{
		window.location = parm1;
	}
	function Contacto(parm1)
	{
		WindowLocation(parm1);		
	
	}
	function Mapa()
	{
		WindowLocation('/mapa/');
	}
	function GoToHome(parm1)
	{
		WindowLocation(parm1);		
	}
	function mostraralbum(purl)
	{
		WindowOpen('/imagenes/fotogaleria/album/'+purl,'album','width=550,height=455,scrollbars=no');
	}
	
	function mostraralbum_eventos(eve)
	{
		mostraralbum(eve)
	}
	
	function GoTofotogaleria()
	{
		window.opener.location = "/eventos/fotogaleria/";
		window.close();
	}
	
	function ValTextoEsp(pform,pfield) 
	{
		var pinput = eval("document." + pform);
		/*if (pinput.value.length < 2) 
		{
			alert("Escriba por lo menos 2 caracteres");
			pinput.focus();
			return (false);
		}*/
		var checkOK = "ABCDEFGHIJKLMNÑOPQRSTUVWXYZÁÉÍÓÚ" + "abcdefghijklmnñopqrstuvwxyzáéíóú ";
		var checkStr = pinput.value;
		var allValid = true;
		for (i = 0; i < checkStr.length; i++) 
		{
				ch = checkStr.charAt(i);
				for (j = 0; j < checkOK.length; j++)
				if (ch == checkOK.charAt(j))
				break;
			if (j == checkOK.length) 
			{
				allValid = false;
				break;
			}
		}
		
		if (!allValid) 
		{
			alert("Escriba sólo letras");
			pinput.focus();
			return (false);
		}
	}
	
	function prompt (s) 
	{
		window.disable_window_status_change = true;
		window.status = s;
	} 
	
	function SendToContacto(pForm)
	{
		//alert(pForm.ContactoEmail.value);
		var msg = "";
	//	var emailCheckMsgError = "a";
		
		if (pForm.ContactoArea.value == 0)
		{
			msg += '- Area faltante. Elija un área de la lista a tomar contacto \n';
		}
		if (isEmpty(trim(pForm.ContactoNombre.value)))
		{
			msg += '- Nombre faltante \n';
		}
		if (emailCheck(pForm.ContactoEmail.value) == 0)
		{
			msg += "- E-Mail incorrecto o faltante ("+emailCheckMsgError+")\n";
		}
		if (isEmpty(trim(pForm.ContactoObservaciones.value)))
		{
			msg += "- Observaciones ";
		}
		
		if (msg != "")
		{
			msg = "Errores encontrados: \n" + msg;
			alert(msg);
			return (false);
		}
		return (true);
	}
	function UsuariosLogin(pForm)
	{
		sIdentif  = pForm.usuario.value ;
		sClave	  = pForm.clave.value ;
		if (sIdentif == "") 
			{
			alert("\nNo ingresó su nombre.\n")
			pForm.usuario.focus();
		        return false;
			}
		if (sClave == "")
			{
			alert("\nNo ingresó la clave.\n")
			pForm.clave.focus();
		        return false;
			}
		return true;
	}


	prompt("SIU");
	
	<!-- Dynamic Version by: Nannette Thacker -->
	<!-- http://www.shiningstar.net -->
	<!-- Original by :  Ronnie T. Moore -->
	<!-- Web Site:  The JavaScript Source -->
	<!-- Use one function for multiple text areas on a page -->
	<!-- Limit the number of characters per textarea -->
	<!-- Begin
	
	function textCounter(field,cntfield,maxlimit)
	{
		if (field.value.length > maxlimit) // if too long...trim it!
		field.value = field.value.substring(0, maxlimit);
		// otherwise, update 'characters left' counter
		else
		cntfield.value = maxlimit - field.value.length;
	}
	//  End -->
	
	function LimitContactoObs(pForm)
	{
		var sArea = document.ContactoForm.ContactoObservaciones;
		var iRem  = document.ContactoForm.remLen2;
		textCounter(sArea,iRem,350);
	}
	
	function LimitRecomendarObs(pForm,pField)
	{
		var sArea = pField;
		var iRem  = pForm.remLen2;
		textCounter(sArea,iRem,350);
	}
	function ValRecomendar(sform)
	{
		pdenom	= sform.denom;
		pdemail = sform.demail;  
		ppanom  = sform.panom ; 
		ppamail = sform.pamail ; 
		ppamsg  = sform.pamsg  ;
		
		var msg = "";
		
		if (!emailCheck(ppamail.value)){
			msg += "- Destinatario: Correo incorrecto o faltante ("+emailCheckMsgError+")\n";
			ppamail.focus();
		}
		if (ppanom.value.length < 1){
			msg += "- Nombre del destinatario\n";
			ppanom.focus();
		}
		if (!emailCheck(pdemail.value)){
			msg += "- Remitente: Correo incorrecto o faltante ("+emailCheckMsgError+")\n";
			pdemail.focus();
		}
		if (pdenom.value.length < 1){
			msg += "- Nombre remitente\n";
			pdenom.focus();
		}
			
		if (msg != ""){
			alert("Se encontraron los siguientes errores:\n" + msg)	
			return (false);
		}
		
		return (true);
	}

// isAlphabetic (STRING s [, BOOLEAN emptyOK]) 
// 
// Returns true if string s is English letters 
// (A .. Z, a..z) only. 
// 
// For explanation of optional argument emptyOK, 
// see comments of function isInteger. 
// 
// NOTE: Need i18n version to support European characters. 
// This could be tricky due to different character 
// sets and orderings for various languages and platforms. 

function isAlphabetic (s) 

{   var i; 

    if (isEmpty(s)) 
       if (isAlphabetic.arguments.length == 1) return defaultEmptyOK; 
       else return (isAlphabetic.arguments[1] == true); 

    // Search through string's characters one by one 
    // until we find a non-alphabetic character. 
    // When we do, return false; if we don't, return true. 

    for (i = 0; i < s.length; i++) 
    {    
        // Check that current character is letter. 
        var c = s.charAt(i); 

        if (!isLetter(c)) 
        return false; 
    } 

    // All characters are letters. 
    return true; 
} 

// isAlphanumeric (STRING s [, BOOLEAN emptyOK]) 
// 
// Returns true if string s is English letters 
// (A .. Z, a..z) and numbers only. 
// 
// For explanation of optional argument emptyOK, 
// see comments of function isInteger. 
// 
// NOTE: Need i18n version to support European characters. 
// This could be tricky due to different character 
// sets and orderings for various languages and platforms. 

function isAlphanumeric (s) 

{   var i; 

    if (isEmpty(s)) 
       if (isAlphanumeric.arguments.length == 1) return defaultEmptyOK; 
       else return (isAlphanumeric.arguments[1] == true); 

    // Search through string's characters one by one 
    // until we find a non-alphanumeric character. 
    // When we do, return false; if we don't, return true. 

    for (i = 0; i < s.length; i++) 
    {    
        // Check that current character is number or letter. 
        var c = s.charAt(i); 

        if (! (isLetter(c) || isDigit(c) ) ) 
        return false; 
    } 

    // All characters are numbers or letters. 
    return true; 
} 

function isEmpty(s) 
{   return ((s == null) || (s.length == 0)) 
} 

function isWhitespace (s) 

{   var i; 

    if (isEmpty(s)) return true; 
    for (i = 0; i < s.length; i++) 
    {    
        var c = s.charAt(i); 

        if (whitespace.indexOf(c) == -1) return false; 
    } 

    // All characters are whitespace. 
    return true; 
} 

function stripCharsInBag (s, bag) 

{   var i; 
    var returnString = ""; 

    for (i = 0; i < s.length; i++) 
    {    
      
        var c = s.charAt(i); 
        if (bag.indexOf(c) == -1) returnString += c; 
    } 

    return returnString; 
} 


function stripCharsNotInBag (s, bag) 

{   var i; 
    var returnString = ""; 


    for (i = 0; i < s.length; i++) 
    {    
        var c = s.charAt(i); 
        if (bag.indexOf(c) != -1) returnString += c; 
    } 

    return returnString; 
} 


function stripWhitespace (s) 

{   return stripCharsInBag (s, whitespace) 
} 



function charInString (c, s) 
{   for (i = 0; i < s.length; i++) 
    {   if (s.charAt(i) == c) return true; 
    } 
    return false 
} 


function stripInitialWhitespace (s) 

{   var i = 0; 

    while ((i < s.length) && charInString (s.charAt(i), whitespace)) 
       i++; 
    
    return s.substring (i, s.length); 
} 


function isLetter (c) 
{   return ( ((c >= "a") && (c <= "z")) || ((c >= "A") && (c <= "Z")) ) 
} 



function isDigit (c) 
{   return ((c >= "0") && (c <= "9")) 
} 

function isLetterOrDigit (c) 
{   return (isLetter(c) || isDigit(c)) 
} 

function isInteger (s) 

{   var i; 

    if (isEmpty(s)) 
       if (isInteger.arguments.length == 1) return defaultEmptyOK; 
       else return (isInteger.arguments[1] == true); 

    // Search through string's characters one by one 
    // until we find a non-numeric character. 
    // When we do, return false; if we don't, return true. 

    for (i = 0; i < s.length; i++) 
    {    
        // Check that current character is number. 
        var c = s.charAt(i); 

        if (!isDigit(c)) return false; 
    } 


    return true; 
} 

function isSignedInteger (s) 

{   if (isEmpty(s)) 
       if (isSignedInteger.arguments.length == 1) return defaultEmptyOK; 
       else return (isSignedInteger.arguments[1] == true); 

    else { 
        var startPos = 0; 
        var secondArg = defaultEmptyOK; 

        if (isSignedInteger.arguments.length > 1) 
            secondArg = isSignedInteger.arguments[1]; 

        // skip leading + or - 
        if ( (s.charAt(0) == "-") || (s.charAt(0) == "+") ) 
           startPos = 1;    
        return (isInteger(s.substring(startPos, s.length), secondArg)) 
    } 
} 


function isPositiveInteger (s) 
{   var secondArg = defaultEmptyOK; 

    if (isPositiveInteger.arguments.length > 1) 
        secondArg = isPositiveInteger.arguments[1]; 


    return (isSignedInteger(s, secondArg) 
         && ( (isEmpty(s) && secondArg)  || (parseInt (s) > 0) ) ); 
} 

function isNonnegativeInteger (s) 
{   var secondArg = defaultEmptyOK; 

    if (isNonnegativeInteger.arguments.length > 1) 
        secondArg = isNonnegativeInteger.arguments[1]; 

    return (isSignedInteger(s, secondArg) 
         && ( (isEmpty(s) && secondArg)  || (parseInt (s) >= 0) ) ); 
} 


function isNegativeInteger (s) 
{   var secondArg = defaultEmptyOK; 

    if (isNegativeInteger.arguments.length > 1) 
        secondArg = isNegativeInteger.arguments[1]; 

    return (isSignedInteger(s, secondArg) 
         && ( (isEmpty(s) && secondArg)  || (parseInt (s) < 0) ) ); 
} 


function isNonpositiveInteger (s) 
{   var secondArg = defaultEmptyOK; 

    if (isNonpositiveInteger.arguments.length > 1) 
        secondArg = isNonpositiveInteger.arguments[1]; 


    return (isSignedInteger(s, secondArg) 
         && ( (isEmpty(s) && secondArg)  || (parseInt (s) <= 0) ) ); 
} 

function isFloat (s) 

{   var i; 
    var seenDecimalPoint = false; 

    if (isEmpty(s)) 
       if (isFloat.arguments.length == 1) return defaultEmptyOK; 
       else return (isFloat.arguments[1] == true); 

    if (s == decimalPointDelimiter) return false; 


    for (i = 0; i < s.length; i++) 
    {    
        var c = s.charAt(i); 

        if ((c == decimalPointDelimiter) && !seenDecimalPoint) seenDecimalPoint = true; 
        else if (!isDigit(c)) return false; 
    } 

    return true; 
} 


function isSignedFloat (s) 

{   if (isEmpty(s)) 
       if (isSignedFloat.arguments.length == 1) return defaultEmptyOK; 
       else return (isSignedFloat.arguments[1] == true); 

    else { 
        var startPos = 0; 
        var secondArg = defaultEmptyOK; 

        if (isSignedFloat.arguments.length > 1) 
            secondArg = isSignedFloat.arguments[1]; 

        // skip leading + or - 
        if ( (s.charAt(0) == "-") || (s.charAt(0) == "+") ) 
           startPos = 1;    
        return (isFloat(s.substring(startPos, s.length), secondArg)) 
    } 
} 

// Check that string theField.value is a valid Year. 
// 
// For explanation of optional argument emptyOK, 
// see comments of function isInteger. 

function checkYear (theField, emptyOK) 
{   if (checkYear.arguments.length == 1) emptyOK = defaultEmptyOK; 
    if ((emptyOK == true) && (isEmpty(theField.value))) return true; 
    if (!isYear(theField.value, false)) 
       return warnInvalid (theField, iYear); 
    else return true; 
} 


// Check that string theField.value is a valid Month. 
// 
// For explanation of optional argument emptyOK, 
// see comments of function isInteger. 

function checkMonth (theField, emptyOK) 
{   if (checkMonth.arguments.length == 1) emptyOK = defaultEmptyOK; 
    if ((emptyOK == true) && (isEmpty(theField.value))) return true; 
    if (!isMonth(theField.value, false)) 
       return warnInvalid (theField, iMonth); 
    else return true; 
} 


// Check that string theField.value is a valid Day. 
// 
// For explanation of optional argument emptyOK, 
// see comments of function isInteger. 

function checkDay (theField, emptyOK) 
{   if (checkDay.arguments.length == 1) emptyOK = defaultEmptyOK; 
    if ((emptyOK == true) && (isEmpty(theField.value))) return true; 
    if (!isDay(theField.value, false)) 
       return warnInvalid (theField, iDay); 
    else return true; 
} 
	// checkDate (yearField, monthField, dayField, STRING labelString [, OKtoOmitDay==false]) 
// 
// Check that yearField.value, monthField.value, and dayField.value 
// form a valid date. 
// 
// If they don't, labelString (the name of the date, like "Birth Date") 
// is displayed to tell the user which date field is invalid. 
// 
// If it is OK for the day field to be empty, set optional argument 
// OKtoOmitDay to true.  It defaults to false. 

function checkDate (yearField, monthField, dayField, labelString, OKtoOmitDay) 
{   // Next line is needed on NN3 to avoid "undefined is not a number" error 
    // in equality comparison below. 
    if (checkDate.arguments.length == 4) OKtoOmitDay = false; 
    if (!isYear(yearField.value)) return warnInvalid (yearField, iYear); 
    if (!isMonth(monthField.value)) return warnInvalid (monthField, iMonth); 
    if ( (OKtoOmitDay == true) && isEmpty(dayField.value) ) return true; 
    else if (!isDay(dayField.value)) 
       return warnInvalid (dayField, iDay); 
    if (isDate (yearField.value, monthField.value, dayField.value)) 
       return true; 
    alert (iDatePrefix + labelString + iDateSuffix) 
    return false 
} 



// Get checked value from radio button. 

function getRadioButtonValue (radio) 
{   for (var i = 0; i < radio.length; i++) 
    {   if (radio[i].checked) { break } 
    } 
    return radio[i].value 
} 

function VolverA()
{
	window.history.back();
}

function evmostrardocs(evento)
{
	//var enlace = "/eventos/repositorio/listar/"+evento;
	//window.location = enlace;
	//alert("Esta accion muestra la pagina "+enlace);
	evmostrarinfo(evento+"#adjuntos")
}
function evmostrardes(evento)
{
	var enlace = "/eventos/destacados/"+evento;
	//window.location = enlace;
	alert("Esta accion muestra la pagina "+enlace);
}

function evmostrarinfo(evento)
{
	var enlace = "/eventos/detalle/&e="+evento;
	window.location = enlace;
}