<!--
	function isMail(_email) {
		var emailReg = /^[a-z][a-z-_0-9\.]+@[a-z-_=>0-9\.]+\.[a-z]{2,3}$/i

		return emailReg.test(_email);
	}

	function putInputOk(inInput)
	{
		inInput.setAttribute('class', 'normal');
	}

	function openWin(inUrl, inX, inY)
	{
		window.open(inUrl ,'' , 'width=' + inX + ', height=' + inY + ', scrollbars=yes, resizable=yes, scrolling=0, status=yes');
	}

	function captureMouse(inMousePos, inEvent)
	{
		if (document.all)
		{
			inMousePos['x'] = event.x;
			inMousePos['y'] = event.y;
		}
		else
		{
			inMousePos['x'] = inEvent.pageX;
			inMousePos['y'] = inEvent.pageY;
		}
	}

	function showSelTooltip(inDiv, inUrl, inMousePos, inAutHid, inLeft)
	{
		var htmlCont = loadXMLDoc(inUrl, false).responseText;

		document.getElementById(inDiv).innerHTML = htmlCont;
		if ((mousePos['y'] + 60) > window.innerHeight)
			document.getElementById(inDiv).style.top = (mousePos['y'] - 60) + 'px';
		else
			document.getElementById(inDiv).style.top = mousePos['y'] + 'px';
		document.getElementById(inDiv).style.left = (mousePos['x'] - inLeft) + 'px';

		document.getElementById(inDiv).style.display = 'block';

		if (inAutHid)
		{
			toolTipTim = setTimeout('hiddenToolTip(\'' + inDiv + '\')', 1000);
			document.getElementById(inDiv).setAttribute('onmouseout', 'window.clearTimeout(toolTipTim); toolTipTim = setTimeout(\'hiddenToolTip(\\\'' + inDiv + '\\\')\', 1000);');
		}
		else
			document.getElementById(inDiv).setAttribute('onmouseout', '');
	}

	function hiddenToolTip(inDiv)
	{
		document.getElementById(inDiv).style.display = 'none';
	}

	function checkNewAlb(inMain, inName, inPass, inDesc, inProt, inProtPass, inCliName, inEdit, inEven, inDate)
	{
		var mess = '';
		if (inName.value == '')
			mess += '*Ha de especificar un nombre\n';
		if ((inEdit == 0) && (inEven == 1) && (inPass.value == ''))
			mess += '*Ha de especificar una contasena\n';

		if (mess == '')
		{
			if (inEven == 1)
				loadXMLDoc('index.php?module=newAlbForm&main=' + inMain + '&name=' + inName.value + '&pass=' + inPass.value + '&desc=' + inDesc.value + '&prot=' + inProt.value + '&passCli=' + inProtPass.value + '&cliName=' + inCliName.value + '&edit=' + inEdit + '&date=' + inDate.value, false);
			else
				loadXMLDoc('index.php?module=newAlbForm&main=' + inMain + '&name=' + inName.value + '&pass=&desc=' + inDesc.value + '&prot=&passCli=&cliName=&edit=' + inEdit + '&date=' + inDate.value, false);
			hiddenToolTip('selTooltip');
			document.getElementById('albumsTree').innerHTML = '';
			obTree = new Tree(loadXMLDoc("index.php?module=albumTreeXML", false), "albumsTree");
		}
		else
			alert(mess);
	}

	function setCookie(inNameOfCookie, inValue, inExpSec) 
	{
		var ExpireDate = new Date();
		ExpireDate.setTime(ExpireDate.getTime() + (inExpSec * 24 * 3600 * 1000));

  		document.cookie = inNameOfCookie + "=" + escape(inValue) + ((inExpSec == null) ? "" : "; expires=" + ExpireDate.toGMTString());
	}

	function getCookie(inNameOfCookie)
	{
		if (document.cookie.length > 0) 
		{
			begin = document.cookie.indexOf(inNameOfCookie+"="); 
		    	if (begin != -1)
				begin += inNameOfCookie.length+1; 
			end = document.cookie.indexOf(";", begin);
			if (end == -1)
				end = document.cookie.length;
			return unescape(document.cookie.substring(begin, end));       
		} 
		return null; 
	}

	function adjustTab() {
		if (parseInt(navigator.appVersion) > 3) {
			 if (navigator.appName == "Netscape") {
				if (document.getElementById('albBody') != undefined)
					document.getElementById('albBody').setAttribute('height', window.innerHeight - 120);
			}
			if (navigator.appName.indexOf("Microsoft") != -1) {
				if (document.getElementById('albBody') != undefined)
					document.getElementById('albBody').setAttribute('height', document.body.offsetHeight - 100);
			}
		}
	}

	function putInputBad(inInput)
	{
		inInput.setAttribute('class', 'red');
	}

	function putInputOk(inInput)
	{
		inInput.setAttribute('class', 'normal');
	}

-->

