function desplegable(ulname, liname){
	var menu = document.getElementById(ulname);
	var enlace = document.getElementById(liname);
	if (menu.style != null){
		if (menu.style.display == 'block') {
			menu.style.display = 'none';
			enlace.style.height = '43px'
			menu.style.height = '1px';
			menu.style.overflow = 'hidden';
		}else{
			menu.style.display = 'block';
			menu.style.height = '100%'
			enlace.style.height = '139px';
			
		}
	}	
}


/*

function desplegable(ulname,liname, padding){			
	var menu = document.getElementById(ulname);			
	var enlace = document.getElementById(liname);
	var alto = padding;
	

	if( menu.style != null ){
		if( menu.style.display == 'block' ){
			enlace.style.height = '45px';	
			menu.style.display = 'none';
			menu.style.height = '1px';
			menu.style.overflow = 'hidden';
		}else{
			enlace.style.height = alto+'px';
			menu.style.display = 'block';
			menu.style.height = '100%';
			enlace.style.paddingBottom: '0px';
		}
	}			
}


*/


/*
	Reemplaza las vocales con acento a formato html
*/
function acentos(text){

	var val = text.value
	var cadena="";
	
	for (var j = 0; j < val.length; j++)
	{
		var Char=val.charCodeAt(j);
		switch(Char)
		{
		case 225:
			cadena+="&aacute;";
			break;
		case 233:
			cadena+="&eacute;";
			break;
		case 237:
			cadena+="&iacute;";
			break;
		case 243:
			cadena+="&oacute;";
			break;
		case 250:
			cadena+="&uacute;";
			break;
		case 193:
			cadena+="&Aacute;";
			break;
		case 201:
			cadena+="&Eacute;";
			break;
		case 205:
			cadena+="&Iacute;";
			break;
		case 211:
			cadena+="&Oacute;";
			break;
		case 218:
			cadena+="&Uacute;";
			break;
		default:
			cadena+=val.charAt(j);
			break;
		}
	}
	//alert("cadena: " + cadena);
	text.value = cadena;
}

function validation(thisform) {
	
	acentos(thisform.q);
	
	return true;
}

var urlhttps = 'https://' + window.location.hostname + "/private/";
var urlDocmaDemo = 'https://' + window.location.hostname + "/docma-demo/";
var urlDocma = 'https://' + window.location.hostname + "/docma/";
var urlDocmaMeg = 'https://' + window.location.hostname + "/docma-megara/";
var urlManateeDemo = 'https://' + window.location.hostname + "/manatee-demo/";
var urlManatee = 'https://' + window.location.hostname + "/manatee/";
var urlManateeMeg = 'https://' + window.location.hostname + "/manatee-megara/";
var urlLlamaDemo = 'https://' + window.location.hostname + "/llama-demo/";
var urlgallery = 'http://' + window.location.hostname + "/private/galeria.html";
var urlwiki = 'http://'+ window.location.hostname + '/cgi-bin/twiki/view/Main/WebHome';
var urlGeco = 'http://'+ window.location.hostname + '/Suite/GECO.html';
var urllogoff = 'https://'+ window.location.hostname + '/private/servlets/logoff';
var urlindexp = urlhttps + 'index.jsp';
var urltoolp = urlhttps + 'tools.html';
var urlftoolp = urlhttps + 'ftools.html';
var urllinksp = urlhttps + 'links.html';
var urlusers = urlhttps + '/servlets/Users';
var urlcoursesp = urlhttps + '/servlets/Courses';
var urlcoursesNewp = urlhttps + '/servlets/Courses?NEW';
var urlnewsp = urlhttps + 'news.html';
var urlnewsPp = urlhttps + '/servlets/NewsPub';
var urlnewsIp = urlhttps + '/servlets/NewsInt';
var urlcalidadp = urlhttps + 'calidad.html';
var urllaboralp = urlhttps + 'laboral.html';
var urlimagesList = urlhttps + '/servlets/Gallery?LIST';
var urlimagesNew = urlhttps + '/servlets/Gallery?NEW';
var urlimagesSearch = urlhttps + '/servlets/Gallery?SEARCH';
var urlvariosp = urlhttps + 'mix.html';
var urlregistrop = urlhttps + 'registration,jsp';
var urlcvp = urlhttps + 'uploadcv.html';
var urlcalendarp = urlhttps + 'calendar.html';
