function popup(url,name,width,height,resize,scroll) {
	var dialogWin = new Object();
	dialogWin.width = width;
	dialogWin.height = height;
	now = new Date();
	var millis=now.getTime();
	var mstr=""+millis;
	if (navigator.appName == "Netscape") {
		dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
		dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
		var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	} else if (document.all) {
		dialogWin.left = (screen.width - dialogWin.width) / 2;
		dialogWin.top = (screen.height - dialogWin.height) / 2;
		var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
	}
	window.open(url,name,attr);
}

function checkSecreto(){
	if (document.secretoform.genero.value == 0){
		alert("Por favor indica tu sexo");
		document.secretoform.genero.focus();
		return false;
	}
	if (document.secretoform.edad.value == 0){
		alert("Por favor indica tu edad");
		document.secretoform.edad.focus();
		return false;
	}
	if (document.secretoform.texto.value == ''){
		alert("A bue! escribi algo che!");
		document.secretoform.texto.focus();
		return false;
	}
	document.secretoform.action = 'tusecreto_post.php';
	document.secretoform.submit();	
	return true;
}

function checkConsulta(){
	if (document.drloveform.nombre.value == ''){
		alert("Por favor escribí tu nombre");
		document.drloveform.nombre.focus();
		return false;
	}
	if (document.drloveform.genero.value == 0){
		alert("Por favor indica tu sexo");
		document.drloveform.genero.focus();
		return false;
	}
	if (document.drloveform.edad.value == 0){
		alert("Por favor indica tu edad");
		document.drloveform.edad.focus();
		return false;
	}
	if (document.drloveform.texto.value == ''){
		alert("A bue! escribi algo che!");
		document.drloveform.texto.focus();
		return false;
	}
	document.drloveform.action = 'drlove_post.php';
	document.drloveform.submit();	
	return true;
}

function checkLen(formulario, lenght) {
	strLen = formulario.texto.value.length;
	maxLeght = lenght;
	if (strLen > maxLeght ) {
		formulario.texto.value = formulario.texto.value.substring(0,( maxLeght-1 ));
		charsLeft = 0;
	}
	else {
		charsLeft = maxLeght - strLen;
	}
	formulario.charsLeft.value = charsLeft;
}