


	var gu_preloaded = null;



	function doOpenPrivacy(vu_link)
	{
		var lu_window = window.open(vu_link.href, 'privacy', 'width=450,height=490,left=' + ((screen.availWidth - 450) / 2) + ',top=' + ((screen.availHeight - 490) / 2)+ ',scrollbars=yes');
		lu_window.focus();
	}



	function doOpenLegal(vu_link)
	{
		var lu_window = window.open(vu_link.href, 'legal', 'width=400,height=380,left=' + ((screen.availWidth - 400) / 2) + ',top=' + ((screen.availHeight - 380) / 2) + ',scrollbars=yes');
		lu_window.focus();
	}



	function doOpenPasswordSend(vu_link)
	{
		//var lu_window = window.open(vu_link.href, 'legal', 'width=400,height=380,left=' + ((screen.availWidth - 400) / 2) + ',top=' + ((screen.availHeight - 380) / 2) + ',scrollbars=yes');
		//lu_window.focus();
	}



	function doOpenCapture(vs_url, vs_title, vs_image)
	{
		var lu_window = window.open(vs_url + '?titulo=' + escape(vs_title) + '&url=' + escape(vs_image), 'capture', 'width=650,height=550,left=' + ((screen.availWidth - 650) / 2) + ',top=' + ((screen.availHeight - 550) / 2));
		lu_window.focus();
	}



	function checkFocusForm(vs_layer, vs_form, vs_element)
	{
		var lu_list = document.getElementById(vs_layer);
		if (lu_list)
		{
			if (lu_list.style.display == 'block')
			{
				var lu_form = document.forms[vs_form];
				if (lu_form)
				{
					var lu_name = lu_form.elements[vs_element];
					if (lu_name) lu_name.focus();
				}
			}
		}
	}



	function doSendPage(vu_form, vs_title)
	{
		var lu_name = vu_form.elements['tx_name'];
		var lu_email = vu_form.elements['tx_email'];

		lu_name.value = lu_name.value.trim();
		lu_email.value = lu_email.value.trim();

		if (lu_name.value == '')
		{
			alert('Es necesario introducir el nombre');
			lu_name.focus();
		}
		else if (lu_email.value == '')
		{
			alert('Es necesario introducir la direccion de correo electrónico');
			lu_email.focus();
		}
		else if (!Form.isMail(lu_email.value))
		{
			alert('La dirección de e-mail introducida es incorrecta');
			lu_email.focus();
		}
		else if (!vu_form.elements['ck_agree'].checked)
		{
			alert('Para el envío de la página por e-mail es necesaria la aceptación de las condiciones de privacidad');
			vu_form.elements['ck_agree'].focus();
		}
		else
		{
			switchBox('mailImage', 'mailList', 1);

			var ls_url = vu_form.action;
			ls_url += '?title=' + vs_title;
			ls_url += '&url=' + escape(window.location.href);
			ls_url += '&name=' + escape(lu_name.value);
			ls_url += '&email=' + escape(lu_email.value);

			var lu_window = window.open(ls_url, 'mail', 'width=400,height=250,left=' + ((screen.availWidth - 400) / 2) + ',top=' + ((screen.availHeight - 250) / 2) + ',scrollbars=no');
			lu_window.focus();
		}
	}



	function preloadImages(vs_path)
	{
		gu_preloaded = [];

		gu_preloaded[0] = [];
		gu_preloaded[0].collapsed = new Image();
		gu_preloaded[0].collapsed.src = vs_path + 'http://www.univo.edu.mx/web/menu_lateral/box_expand.gif';
		gu_preloaded[0].expanded = new Image();
		gu_preloaded[0].expanded.src = vs_path + 'http://www.univo.edu.mx/web/menu_lateral/box_collapse.gif';

		gu_preloaded[1] = [];
		gu_preloaded[1].collapsed = new Image();
		gu_preloaded[1].collapsed.src = vs_path + 'http://www.univo.edu.mx/web/menu_lateral/ico_mail_close.gif';
		gu_preloaded[1].expanded = new Image();
		gu_preloaded[1].expanded.src = vs_path + 'http://www.univo.edu.mx/web/menu_lateral/box_collapse.gif';
	}



	function switchBox(vs_image, vs_list, vi_type)
	{
		var lu_image = document.getElementById(vs_image);
		var lu_list = document.getElementById(vs_list);
		if (lu_list && lu_image && gu_preloaded)
		{
			if (lu_list.style.display != 'none')
			{
				lu_list.style.display = 'none';
				lu_image.src = gu_preloaded[vi_type].collapsed.src;
			}
			else
			{
				lu_list.style.display = 'block';
				lu_image.src = gu_preloaded[vi_type].expanded.src;
			}
		}
	}



	function switchSection(vs_layerShow, vs_layerHide)
	{
		var lu_layerShow = document.getElementById(vs_layerShow);
		var lu_layerHide = document.getElementById(vs_layerHide);
		if (lu_layerShow && lu_layerHide)
		{
			lu_layerHide.style.display = 'none';
			lu_layerShow.style.display = 'block';
		}
	}

