function OpenWin(url,name,attr) {
 var fw;
 if (attr) fw=window.open(url,name,attr);
 else if (name) fw=window.open(url,name);
 else if (url) fw=window.open(url);
 if (fw) {fw.focus();}

// _LvWinFocus(fw);
}

function CloseWin(name) {
	window.close();
}

function fEnviar(pUrl) {
	document.forms[0].action=pUrl;
	document.forms[0].submit();
}

function fEnviarMail() {
	if (String(document.getElementById("txtnombre").value).length==0) {
		alert("Introduzca el nombre");
		document.getElementById("txtnombre").focus();
		return false;
	}
	var mail=String(document.getElementById("txtemail").value);
	if (mail.length==0) {
		alert("Introduzca una dirección de correo válida");
		document.getElementById("txtemail").focus();
		return false;
	} else {
		if (mail.indexOf("@")<0) {
			alert("Introduzca una dirección de correo válida");
			document.getElementById("txtemail").focus();
			return false;
		}
	}
	if (String(document.getElementById("txtasunto").value).length==0) {
		alert("Debe indicar el asunto");
		document.getElementById("txtasunto").focus();
		return false;
	}
	if (String(document.getElementById("txtcomen").value).length==0) {
		alert("No ha introducido ningún comentario");
		document.getElementById("txtcomen").focus();
		return false;
	}
	document.getElementById("accion").value="E";
	document.forms[0].submit();
}
function fIrA(pUrl) {
	document.location.href=pUrl;
}

function AbrirDemos(w,h){
	lURL = "http://217.127.119.202:31899";
	lAtr="width="+w+",height="+h+",scrollbars=yes";
	window.open(lURL,"DEMOS",lAtr);
}
