
	var i_tmp = 0;
	var tmp = new Array();

	function getCookie(NameOfCookie)
	{ 
	if (document.cookie.length > 0) 
	{ begin = document.cookie.indexOf(NameOfCookie+"="); 
	if (begin != -1) 
	{ begin += NameOfCookie.length+1; 
	end = document.cookie.indexOf(";", begin);
	if (end == -1) end = document.cookie.length;
	return unescape(document.cookie.substring(begin, end)); } 
	}
	return null; 
	}

	function setCookie(NameOfCookie, value, expiredays) 
	{ var ExpireDate = new Date ();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) + 
	((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString()) + "; path: /paginas; domain: qualimedic"
	}

	function delCookie (NameOfCookie) 
	{ if (getCookie(NameOfCookie)) {
	document.cookie = NameOfCookie + "=" +
	"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}

	}

	// ------------------------------------------------------------------------------------------------
	

	function abrir_ventana(pagina, width_, height_)
	{
		var pageWidth = screen.availWidth;
		var pageHeight = screen.availHeight;
		var top_;
		var left_;

		top_ = ( pageHeight - height_ ) / 2;
		left_ = ( pageWidth - width_ ) / 2;

		ventana_qualimedic  = window.open(pagina,'qualimedic','fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,top=' + top_ + ',left=' + left_ + ',width=' + width_ + ',height=' + height_ + ',titlebar=0,alwaysRaised=0,dependent=0,hotkeys=0',true);
		ventana_qualimedic.focus();
	}

	function cerrar_ventana()
	{
		self.close();
	}

	function abrir_qualimedic()
	{
		//Se despliega el menú a su posición inicial
		if (parent.frames.menu.elemento_abierto == -1)
		{
			parent.frames.menu.principal(parent.frames.menu.elemento_pulsado);
		}
	}
