<!--
var sUrlServidor = "/";
var bGlide = true;
function verCapaFrases(sCapa, sBoton){
	if(document.getElementById(sCapa).style.display=='none'){
		document.getElementById(sCapa).style.display='block';
	}
	else{
		document.getElementById(sCapa).style.display='none';
	}
}

function getTrim(cadena){
	for(i=0; i<cadena.length; )	{
		if(cadena.charAt(i)==" ")
			cadena=cadena.substring(i+1, cadena.length);
		else
			break;
	}

	for(i=cadena.length-1; i>=0; i=cadena.length-1)	{
		if(cadena.charAt(i)==" ")
			cadena=cadena.substring(0,i);
		else
			break;
	}

	return cadena;
}

function abreteSesamo(miPagina, miNombre, w, h, misParams){
	var scroll='no', pos='center', win=null;
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',directories=no,status=no,menubar=no,toolbar=no, scrollbars=yes, ' + misParams;
	win=window.open(miPagina,miNombre,settings);
	if(win.focus){win.focus();}
}

function swapClass(el, class1, class2) { 
	if (el.className) 
	el.className = (el.className == class1) ? class2 : class1; 
} 

function aCesta(sProducto,sCantidad){
	var sUrl = "cesta.asp?sProducto=" + sProducto + "&sCantidad=" + sCantidad;
	abreteSesamo(sUrl,'CESTA',500,550,'status=no');
}

function compruebaCesta(){
	if(document.location!='eShop.asp'){
		document.location='eShop.asp';
	}
	
	aCesta(0,0);
}

function abreDetalle(idPrd){
	var sUrl = "prod_amp.asp?id=" + idPrd;
	abreteSesamo(sUrl,"PROD2",500,550,"scrollbars=yes");
}

function confirmaCesta(){
	var sUrl = "cesta.asp?sAccion=DATOS"
	this.window.document.location=sUrl;
}

function confirmaDatosCliente(){
	var sUrl = "cesta.asp?sAccion=CONFIRMAR"
	this.window.document.location=sUrl;
}

function descargaFichero(sPedidoId, boton){
	var sUrl = "descargaFichero.asp?sPedidoId=" + sPedidoId;
	this.window.document.location=sUrl;
}

function navegaNoticias(iNoticia){
	document.location = "news.asp?iNoticia=" + iNoticia;
}

function visualizaFlyer(sImg, sTipo){
	if(sImg!=""){
		var sUrl = "/nocToc/zoom.asp?imgId=" + sImg + "&sTipo=" + sTipo;
		abreteSesamo(sUrl, 'FLYER', 620, 450, ' scrollbars=yes, resizable=yes');
	}
}
function escondeLista(){
	document.all['divLista'].style.visibility='hidden';
	document.all['divLista'].style.display='none';
}
function zoom(sImg){
	if(sImg!=""){
		var sUrl = "/nocToc/zoom.asp?imgId=" + sImg;
		abreteSesamo(sUrl, 'IMAGEN', 800, 640, ' scrollbars=yes, resizable=yes, location=no, toolbars=no');
	}
}

function ordena(iCampo, iOrden){
	var sUrl = "inmuebles.asp?sOrden=" + iCampo + "&sDireccionOrden=" + iOrden;
	this.window.document.location.href=sUrl;
}

function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}

function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

function getColor(bEstado, obj){
	if(bEstado)
		obj.style.background='#cccccc';
	else
		obj.style.background='';
}

function getLink(inmId){
	var sUrl = "inmueblesDetalle.asp?inmId=" + inmId;
	document.location=sUrl;
}

function setFullScreen(){
	if (document.all) {
		var iWidth = window.screen.availWidth;
		var iHeight = window.screen.availHeight;
	}
	window.moveTo(0, 0);
	window.resizeTo(iWidth, iHeight);
}	

function isEmail(valor, bValida){
	if(bValida){
		if (valor==""){
			alert("Debe introducir una dirección de email.");
			return (false);
		} 
	}
	
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
		return (true)
	} 
	else {
		alert("La dirección de email es incorrecta.");
		return (false);
	}
}

function isEmailValor(valor){
	if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(valor)){
		return (1)
	} 
	else {
		return (0);
	}
}

function MM_preloadImages() { //v3.0
			  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
			    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
			    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
			}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function validaForm(miFrm){
	if(miFrm.txtUser.value==""){
		alert("introduzca usuario");
		miFrm.txtUser.select();
		return false;
	}
	if(miFrm.txtPass.value==""){
		alert("introduzca contraseña");
		miFrm.txtPass.select();
		return false;
	}
	else{
		return true;
	}
}

function setCities(chooser) {
    var cityChooser = chooser.form.elements["city"];
    // empty previous settings
    cityChooser.options.length = 0;
    // get chosen value to act as index to regiondb hash table
    var choice = chooser.options[chooser.selectedIndex].value;
    var db = regiondb[choice];
    // insert default first item
    cityChooser.options[0] = new Option("Choose a City:", "", true, false);
    if (choice != "") {
        // loop through array of the hash table entry, and populate options
        for (var i = 0; i < db.length; i++) {
            cityChooser.options[i + 1] = new Option(db[i].text, db[i].value);
        }
    }
}

function setNuevaOpcion(var1Tipo, var1RelacionValor, var1RelacionTipo,f){
	var sUrl = "/nocToc/setVariable.asp?var1Tipo=" + var1Tipo;
		sUrl += "&var1RelacionValor=" + var1RelacionValor;
		sUrl += "&var1RelacionTipo=" + var1RelacionTipo;
		sUrl += "&sForm=" + f;
	if(var1Tipo==2 && var1RelacionValor==''){
		alert('Debe seleccionar un pais antes de introducir una nueva ciudad');
		return false;
	}
	abreteSesamo(sUrl,'setOpcion',400,220,'status=yes');
}

function miEstiloControl(evento, control, color){
	if(evento=='ON'){
		control.bgColor='#CCCCCC';
	}
	else{
		control.bgColor=color;
	}
}
//AC_FL_RunContent = 0;
function getFlashXP(){
	if (AC_FL_RunContent == 0) {
		alert("Esta página requiere el archivo AC_RunActiveContent.js. En Flash, seleccione \"Aplicar actualización de contenido activo\" en el menú Comandos para copiar el archivo AC_RunActiveContent.js en la carpeta de salida HTML.");
	} else {
		AC_FL_RunContent(
			'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0',
			'width', '330',
			'height', '170',
			'src', 'banner01',
			'quality', 'high',
			'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
			'align', 'middle',
			'play', 'true',
			'loop', 'true',
			'scale', 'showall',
			'wmode', 'window',
			'devicefont', 'false',
			'id', 'banner01',
			'bgcolor', '#ffffff',
			'name', 'banner01',
			'menu', 'true',
			'allowScriptAccess','sameDomain',
			'movie', 'banner01',
			'salign', ''
			); //end AC code
	}
}

function getFlv(i){
	var sUrl = sUrlServidor + "flvPlayer.asp?i=" + i;
	abreteSesamo(sUrl, "FLVPlayer", 400, 400, '');
}


function getFullFlvPlayer(med1Fichero){
	var sUrl = "getVideo.asp?s=" + med1Fichero
	abreteSesamo(sUrl, 'FLV', 655, 492, 'scrollbars=no;status=no;');
}

function getFlvPlayer(med1Fichero){
	var s1 = new SWFObject("../flvplayer.swf","single","192","156","7");
//	var sFichero = "../videos/151Frases01/" + med1Fichero;
	var sFichero = "http://inglesgratis.morethanenglish.com/videos/151Frases01/" + med1Fichero;
	s1.addVariable("file",sFichero);
	s1.addVariable("image","../images/misc/piVideo.jpg");
	s1.addVariable('showdownload','true'); 
	s1.addVariable('autostart','true'); 
	s1.addParam("allowfullscreen","true");
	s1.write("player1");
}

function getAudio(tema){
	//cargamos audio
	var s3 = new SWFObject("../mp3player.swf", "mpl", "240", "20", "7");
	s3.addVariable("file","../audios/151Frases01/" + tema);
	s3.addVariable("file","http://64.16.193.40/audios/151Frases01/" + tema);
	s3.addVariable("repeat","false");
	s3.addVariable("showdigits","true");
	s3.addVariable("autostart","true");
//			document.getElementById('player3').innerHTML = s3.write("player3");
	s3.write("player3");
}

function getPdf(){
	var sUrl = sUrlServidor + "getPdf.asp";
	abreteSesamo(sUrl, "pdf", 750, 500, '');
}

function setPdf(objF){
	if(window.opener.document.all['wrapper']){
		objF.hidPdf.value = window.opener.document.all['wrapper'].innerHTML;
	}

	objF.subPdf.value='Generando PDF..';
	objF.subPdf.style.disabled;
	
	if(objF.hidPdf.value!=""){
		return true;
	}
	else{
		alert("No es posible generar un documento pdf en este momento");
		return false;
	}
}

function alertaSistema(sCmd){
	if(sCmd=="OPEN"){
		if(document.getElementById("divMsg")){
			document.getElementById("divMsg").style.visibility="visible";
			document.getElementById("divMsg").style.display="block";
		}

		if(document.getElementById("divCuerpo")){
			document.getElementById("divCuerpo").style.visibility="visible";
			document.getElementById("divCuerpo").style.display="block";
		}
		
		if(document.getElementById("divCerrar1")){
			document.getElementById("divCerrar1").focus();
		}
		
	}
	else if(sCmd=="CLOSE"){
		if(document.getElementById("divMsg")){
			document.getElementById("divMsg").style.visibility="hidden";
			document.getElementById("divMsg").style.display="none";
		}
			
		if(document.getElementById("divCuerpo")){
			document.getElementById("divCuerpo").style.visibility="hidden";
			document.getElementById("divCuerpo").style.display="none";
		}
	}

}

function getFrases(iFrase, sAccion){
	var bResultado, oResultado;
	var oRespuesta = eval("document.getElementById('pRespuesta" + iFrase + "')");
	var oFraseOriginal = eval("document.getElementById('hidOrig" + iFrase + "')");
	var oFrase = eval("document.getElementById('txt" + iFrase + "')");
	var oFraseComparar = eval("document.getElementById('hid" + iFrase + "')");
	var oCapa = eval("document.getElementById('divResultado" +  iFrase + "')");
	var oResultado = eval("document.getElementById('hidRespuestaValor" + iFrase + "')");

	var s1, s2, s3;

	//5/oct/2007 18:55 Le quitamos SIEMPRE el ultimo punto para hacer la comparacion. Solo modificamos el valor de la variable, no la del objeto original
	s1 = getQuitaUltimoPunto(oFrase.value.toUpperCase());
	s2 = getQuitaUltimoPunto(oFraseComparar.value.toUpperCase());
	s3 = getQuitaUltimoPunto(oFraseOriginal.value.toUpperCase());

	if(sAccion=="COMPROBAR"){

		//5/oct/2007 18:29 Validacion: si la ha dado por mala, no volver a poner a nula cuando pulse en el boton de ver resultados	
		if(oCapa.innerHTML == "X"){
				bResultado = 0;
		}
		else{
			//Si no la ha dado por mala, comprueba el estado
			if((s1 == "")&&((s2 != "") && (s3 != ""))){
				oCapa.innerHTML = "*";
				oCapa.style.color = "#FF0000";
				bResultado = -1;
			}
			else if((s1 == s2)||(s1 == s3)){
				oCapa.innerHTML = "+";
				oCapa.style.color = "#66CC00";
				bResultado = 1;
			}
			else if((s1 != s2)&&(s1 != s3)){
				oCapa.innerHTML = "X";
				oCapa.style.color = "#FF0000";
				bResultado = 0;
			}
		}
		oResultado.value = bResultado;
	}
	else if(sAccion == "CORREGIR"){
		oRespuesta.innerHTML =  iFrase +". " + oFraseOriginal.value;
		oRespuesta.style.color = "#FF0000";
		oRespuesta.style.fontSize = 11;
	}
	else if(sAccion == "ACEPTAR"){
		oFraseComparar.value = oFrase.value;
		if(oCapa.innerHTML == "+"){
			bResultado = 0;
			oFraseComparar.value = oFraseOriginal.value;
			oCapa.innerHTML = "X";
			oCapa.style.color = "#FF0000";
		}
		else{
			bResultado = 1;
			oCapa.innerHTML = "+";
			oCapa.style.color = "#66CC00";
		}
		oResultado.value = bResultado;
	}
	return bResultado;
}


function getResultados(sAccion){
	var resultado, iAcertados, iFallados, iNulos;

	iAcertados = 0;
	iFallados = 0;
	iNulos = 0;
	
	var oCapa;
	
	for(i=1;i<=document.getElementById("hidContador").value;i++){
		resultado = getFrases(i, sAccion);
		if(resultado == -1)
			iNulos ++;
		else if(resultado == 0)
			iFallados ++;
		else if(resultado == 1)
			iAcertados++;

	}
	if(sAccion=="COMPROBAR"){
		document.getElementById("divMensajeResultados").innerHTML = document.getElementById("hidMensajeResultados").value + iAcertados;
		document.getElementById("divMensajeResultados").innerHTML += ("<br />" + document.getElementById("hidMensajeFallados").value + iFallados);
		document.getElementById("divMensajeResultados").innerHTML += ("<br />" + document.getElementById("hidMensajeNulos").value + iNulos);
	}
	return true;
}

function getGrabar(){
	getResultados("COMPROBAR");
	getResultados('CORREGIR');
	document.frmResultados.submit();
}

function getRestaurar(){
	if(confirm("Reset?")){
		var oRespuesta;
		var oTexto;
		var oFrase;
		var oFraseComparar;
		var oCapa;
		var oResultado;
		for(i=1;i<=document.getElementById("hidContador").value;i++){
			oResultado = eval("document.getElementById('hidRespuestaValor" + i + "')");
			oRespuesta = eval("document.getElementById('pRespuesta" + i + "')");
			oTexto = eval("document.getElementById('txt" + i + "')");
			oFrase = eval("document.getElementById('hid" + i + "')");
			oFraseComparar = eval("document.getElementById('hidOrig" + i + "')");
			oCapa = eval("document.getElementById('divResultado" +  i + "')");
			oResultado.value = "";
			oFrase.value = oFraseComparar.value;
			oCapa.innerHTML="";
			oTexto.value="";
			oRespuesta.innerHTML="";
			document.getElementById("divMensajeResultados").innerHTML = ""
		}
	}
}

function getQuitaUltimoPunto(sCadena1){
	var sCadena2;
	var iTamano = String(sCadena1).length;
	if(Right(sCadena1, 1)=="."){
		sCadena2 = Left(sCadena1, (iTamano-1));
	}
	else{
		sCadena2 = sCadena1;
	}

	
	return sCadena2;
}

function getResultadosBuscador(iNivel,iLeccion, iIdioma){
	if(iNivel==''&& iLeccion==''){
		return false;
	}
	var sUrl = "/gramatica.asp?iIdioma=" + iIdioma + "&iNivel=" + iNivel + "&iLeccion=" + iLeccion;
	//alert("1 " + sUrl)
	document.location = sUrl;
}

function getLeccion(iNivel,iLeccion, iIdioma){
	var sUrl = "/ficha_gramatica.asp?iIdioma=" + iIdioma + "&iNivel=" + iNivel + "&iLeccion=" + iLeccion;
//alert("2 " + sUrl)
	document.location = sUrl;
}

function validaId(miFrm){
	if(miFrm.txtUser.value==""){
		alert("introduzca usuario");
		miFrm.txtUser.select();
		return false;
	}
	if(miFrm.txtPass.value==""){
		alert("introduzca contraseña");
		miFrm.txtPass.select();
		return false;
	}
	else{
		return true;
	}
}

function identifica(f){
	if(validaId(document.frmId))document.frmId.submit();
}

/**********************************************************************
 * Software:	JS Embedded Content
 * Versión:	1.1 Final (Oct 13, 2006)
 * Autor:	Raspu (donraspu arroba gmail punto com)
 * Copyleft 2006, Raspu - Algunos derechos reservados. 
 *
 * "JS Embedded Content" es software libre. Se otorga permiso para copiar,
 * distribuir y/o modificar este programa bajo los términos de la Licencia
 * Pública General de GNU, versión 2.0 o cualquier otra versión posterior
 * (a su elección) publicada por la Free Software Foundation.
 * 
 * Puedes consultar una copia de la licencia en http://www.gnu.org/copyleft/gpl.html
 *
 *
 * DESCRIPCIÓN:
 * ------------
 * "JS Embedded Content" es una pequeña aplicación desarrollada
 * mediante Javascript no intrusivo ni obstructivo, que permite la
 * activación automática de todos los elementos incrustados en un
 * documento HTML mediante las etiquetas OBJECT, EMBED y/o APPLET.
 *
 * NAVEGADORES COMPATIBLES:
 * ------------------------
 * - Ópera 9 final o superior (para versiones anteriores no es requerido)
 * - Internet Explorer 5 o superior (Windows, en MAC no he probado)
 * El resto de navegadores no es compatible debido al uso outerHTML,
 * pero como por el momento no lo requieren no es mayor problema.
 *
 * INSTRUCCIONES DE USO:
 * ---------------------
 * Sólo debes incluir el archivo "embeddedcontent.js" colocando el siguiente 
 * código entre las etiquetas <HEAD> y </HEAD> de tus documentos HTML:
 * 
 * <script type="text/javascript" src="embeddedcontent.js" defer="defer"></script>
 *
 * NOTA: el uso del atributo DEFER es imprescindible para poder emular en 
 * I. Explorer el evento DOMContentLoaded.
 **********************************************************************/
var embeddedContent = 
{

	isMSIE : (document.all && !window.opera) ? true : false,
	
	
	/**
	 * Reinserta en el documento HTML los elementos que han sido incrustados mediante
	 * las etiquetas OBJECT, EMBED y/o APPLET, redefiniendo su propiedad outerHTML
	 */
	reinsertContent : function()
	{	
	var totalNodes = new Array(3);
		totalNodes['OBJECT'] = document.getElementsByTagName('OBJECT').length;
		totalNodes['EMBED'] = document.getElementsByTagName('EMBED').length;
		totalNodes['APPLET'] = document.getElementsByTagName('APPLET').length;
		for(var tagName in totalNodes)
		{
			var counter = totalNodes[tagName] - 1;
			for(var node; node = document.getElementsByTagName(tagName)[counter]; counter--)
			{
				sourceCode = embeddedContent.getSourceCode(node);
				if(sourceCode)
				{
					node.outerHTML = sourceCode;
				}
			}
		}
		embeddedContent.isMSIE = null;
	},
	
	
	/**
	 * Obtiene el código HTML completo de un determinado nodo.
	 * @param	node (object) - El nodo analizado
	 * @return	sourceCode (string) - El código HTML obtenido
	 */
	getSourceCode : function(node)
	{
		var sourceCode = node.outerHTML;
		switch(node.nodeName)
		{
			case 'EMBED':
				return sourceCode;
			break;
			case 'OBJECT':
			case 'APPLET':
				var openTag = sourceCode.substr(0, sourceCode.indexOf('>') + 1).toLowerCase();
				var closeTag = sourceCode.substr(sourceCode.length - 9).toLowerCase();
				if(closeTag != '</object>' && closeTag != '</applet>')
				{
					/* Si el nodo está mal formado (etiquetas de apertura y cierre) se debe 
					anular el script ya que podría devolver un resultado incorrecto */
					return null;
				}
				if(embeddedContent.isMSIE)
				{
					/* Para I. Explorer se debe obtener aparte el código HTML de los nodos hijos,
					ya que la propiedad outerHTML en ocasiones devolverá un resultado incompleto */
					var innerCode = embeddedContent.getInnerCode(node);
					sourceCode = openTag + innerCode + closeTag;
				}
				return sourceCode;
			break;
		}
	},
	
	
	/**
	 * Obtiene el código HTML de los nodos hijos de un determinado nodo. No se debe utilizar directamente
	 * la propiedad innerHTML ya que en ciertos casos I. Explorer devolverá un resultado incompleto.
	 * @param	node (object) - El nodo padre que será analizado
	 * @return	innerCode (string) - El código HTML obtenido
	 */
	getInnerCode : function(node)
	{
		var innerCode = '';
		var totalChilds = node.childNodes.length - 1;
		for(var counter = totalChilds, child; child = node.childNodes[counter]; counter--)
		{
			innerCode += child.outerHTML;
		}
		return innerCode;
	}
	
}


/**
 * Activación:
 * -----------
 * Detectamos el soporte de attachEvent() como filtro para I. Explorer y Ópera.
 * Para ejecutar el script sólo necesitamos que el DOM (Document Object Model); para
 * ello en Ópera recurrimos al evento DOMContentLoaded, mientras que en I. Explorer
 * emulamos dicho evento apoyándonos en el atributo DEFER de la etiqueta SCRIPT
 * con la que estamos cargando este archivo.
 */
if(document.attachEvent)
{
	if(window.opera)
	{
		document.attachEvent("DOMContentLoaded", embeddedContent.reinsertContent);
	}
	else
	{
		embeddedContent.reinsertContent();
	}
}

function validaRegistro(f){
	var sMsg = "";
	if(f.usu1Email.value==""){
		sMsg += "- EMAIL\n";
		f.usu1Email.select();
	}
	
	if(!isEmail(f.usu1Email.value, false)){
		return false;
	}
	
	if(f.usu1Password.value==""){
		sMsg += "- PASSWORD\n";
		f.usu1Email.select();
	}
	if(f.usu1Password.value!=f.usu1Password2.value){
		sMsg += "- PASSWORD deben ser los mismos\n";
		f.usu1Password2.select();
	}
	if(f.usu1Nombre.value==""){
		sMsg += "- NOMBRE\n";
		f.usu1Nombre.select();
	}
	if(f.usu1Tlf.value==""){
		sMsg += "- TLF\n";
		f.usu1Tlf.select();
	}
	if(f.usu1Pregunta.value==""){
		sMsg += "- Pregunta secreta\n";
		f.usu1Pregunta.select();
	}
	if(f.usu1Respuesta.value==""){
		sMsg += "- Respuesta\n";
		f.usu1Respuesta.select();
	}
	if(sMsg!=""){
		alert("ERROR:\n" + sMsg);
		return false;
	}
}
function validaRecuerda(f){
	var sMsg = "";
	if(f.usu1Email.value==""){
		sMsg += "- EMAIL\n";
		f.usu1Email.select();
	}
	if(f.usu1Respuesta){
		if(f.usu1Respuesta.value==""){
			sMsg += "- Respuesta\n";
			f.usu1Respuesta.select();
		}
	}
	if(sMsg!=""){
		alert("ERROR:\n" + sMsg);
		return false;
	}
}


function getMotoNueva(){
	if(document.getElementById("seMarcas1")){
		var se = document.getElementById("seMarcas1");
		var sUrl = "/motos/nuevas/"
		if(se.value){
			sUrl += "?mar1Id=" + se.value;
		}

		document.location = sUrl;
	}
}

function getMotoOcasion(){
	if(document.getElementById("seMarcas2")){
		var se = document.getElementById("seMarcas2");
		var sUrl = "/motos/ocasion/"
		if(se.value){
			sUrl += "?mar1Id=" + se.value;
		}

		document.location = sUrl;
	}
}

function getDetalleMotos(iMoto){
	var sUrl = "/motos/detalle/?mot1Id=" + iMoto;
	document.location = sUrl;
}


function validaInscripcion(f){
	var sMsg;
	sMsg = ""
	if(f.cur2Nombre.value==""){
		sMsg += "<li>El nombre es obligatorio</li>";
	}

	if(f.cur2Ape1.value==""){
		sMsg += "<li>El primer apellido es obligatorio</li>";
	}

	if(f.cur2Email.value==""){
		sMsg += "<li>El email es obligatorio</li>";
	}
	else{
		if(isEmailValor(f.cur2Email.value)==0){
			sMsg += "<li>El email debe tener un formato válido (usuario@dominio.com)</li>";
		}
	}
	if(sMsg!=""){
		document.getElementById("divCursilloInscripcionError").innerHTML = "<ul>" + sMsg + "</ul>"
		return false;
	}

}
-->
