<!--

	        function ValidaDatos() {
	            if (document.getElementById('ctl00_cphHome_txtFactura').value == "" ){
                window.alert("Hace falta capturar la clave del Anuncio.");
                return false;
                }
                if (document.getElementById('ctl00_cphHome_txtTelefono').value == "" ){
                window.alert("Hace falta capturar el numero de telefono.");
                return false;
                }
        
	        }
         	function ValidaBorrarFotos()
			{
			
					return confirm("¿Esta seguro que desea eliminar este anuncio?");
			}
			function ValidaBorrarFavoritos()
			{
			
					return confirm("¿Esta seguro que desea remover este anuncio de sus favoritos?");
			}
 		function ValidaBorrarAnuncios()
			{
			
					return confirm("¿Esta seguro que desea eliminar este anuncio?");
			}
        function ShowAndHide(ItemShow,ItemHide) {
        
        if (document.getElementById('ctl00_cphHome_MenuRegistro_ddlClasificacionNivel1').value == 0 ){
           window.alert("Hace falta seleccionar una Clasificacion para su Anuncio.");
           return false;
        }
         if (document.getElementById('ctl00_cphHome_MenuRegistro_ddlClasificacionNivel2').value == 0 ){
           window.alert("Hace falta seleccionar una Clasificacion para su Anuncio.");
           return false;
        }
        
        try{ 
   
            if (document.getElementById('ctl00_cphHome_MenuRegistro_ddlClasificacionNivel3').value == 0 ){
           window.alert("Hace falta seleccionar una Clasificacion para su Anuncio.");
           return false;
        }
   
        }catch(e){}  

       

         if (document.getElementById('ctl00_cphHome_txtAnuncio').value == "" ){
           window.alert("Hace falta capturar el texto de su Anuncio.");
           return false;
        }
        else {
            textcount = document.getElementById('ctl00_cphHome_txtAnuncio').value;
            textcount = textcount.split(" ");
            numwords = textcount.length;
            
            if(numwords < 5){
            window.alert("El número de palabras de su Anuncio, no corresponde con las caracteristicas de un Anuncio.");
            return false;
            }
            
        }
        
        
        Item1 = document.getElementById(ItemShow);
        Item2 = document.getElementById(ItemHide);
        
        location.href="#top";
        Item2.style.display='none';
        Item1.style.display='block';
        
        }

 function ShowAndHideAutos(ItemShow,ItemHide) {
        
        if (document.getElementById('ctl00_cphHome_ddlClasificacionNivel1').value == 0 ){
           window.alert("Hace falta seleccionar una Clasificacion para su Anuncio.");
           return false;
        }
         if (document.getElementById('ctl00_cphHome_ddlClasificacionNivel2').value == 0 ){
           window.alert("Hace falta seleccionar una Clasificacion para su Anuncio.");
           return false;
        }
        
        try{ 
   
            if (document.getElementById('ctl00_cphHome_ddlMarcaAuto').value == 0 ){
           window.alert("Hace falta seleccionar la marca de su vehiculo.");
           return false;
        }
   
     	if (document.getElementById('ctl00_cphHome_ddlModeloAuto').value == 0 ){
           window.alert("Hace falta seleccionar el modelo de su vehiculo.");
           return false;
        }

        }catch(e){}  

       

	try{
        
        if (document.getElementById('ctl00_cphHome_txtAnuncio').value == "" ){
           window.alert("Hace falta capturar el texto de su Anuncio.");
           return false;
        }
        else {
            textcount = document.getElementById('ctl00_cphHome_txtAnuncio').value;
            textcount = textcount.split(" ");
            numwords = textcount.length;
            
            if(numwords < 5){
            window.alert("El número de palabras de su Anuncio, no corresponde con las caracteristicas de un Anuncio.");
            return false;
            }
            
        }
        
	}catch(e){

	if (document.getElementById('ctl00_cphHome_txtAdicionalAnuncio').value == "" ){
           window.alert("Hace falta capturar el texto de su Anuncio.");
           return false;
        }
        else {
            textcount = document.getElementById('ctl00_cphHome_txtAdicionalAnuncio').value;
            textcount = textcount.split(" ");
            numwords = textcount.length;
            
            if(numwords < 2){
            window.alert("El número de palabras de su Anuncio, no corresponde con las caracteristicas de un Anuncio.");
            return false;
            		}
            
             }

	}
	
        
        Item1 = document.getElementById(ItemShow);
        Item2 = document.getElementById(ItemHide);
        
        location.href="#top";
        Item2.style.display='none';
        Item1.style.display='block';
        
        }
  
   function ShowErrores() {
        ctl00_cphHome_Status.style.display='none';
        ctl00_cphHome_Acciones.style.display='none';
        location.href="#top";
        ctl00_cphHome_Anuncio.style.display='block';
        }
        
   function GetPrice(){

	var texto = new String;
	var i = new Number;
	var j = new Number;
	var Arreglo = new Array;
	var PrecioValor = new Number;
	
	//texto = document.aspnetForm.ctl00_cphHome_txtAnuncio.value;
	texto = document.getElementById('ctl00_cphHome_txtAnuncio').value;
	Arreglo = texto.split(" ");
	
	for (i=0;i<Arreglo.length;i++){
		for (j=0;j<Arreglo[i].length;j++){
			if (Arreglo[i].charCodeAt(j)==36){
				PrecioValor=Arreglo[i];
				
				PrecioValor=PrecioValor.replace("$","");
	            PrecioValor=PrecioValor.replace(",","");
	
			}			
		}
	}
	
	
	
	for (j=0;j<PrecioValor.length;j++){
	    if(PrecioValor.charCodeAt(j)<46 || PrecioValor.charCodeAt(j)>57)
	    {
	    PrecioValor=0;
	    }			
    }
    
	if(PrecioValor>0){
		document.getElementById('ctl00_cphHome_txtPrecio').value=PrecioValor;
	//    window.document.aspnetForm.ctl00_cphHome_txtPrecio.value=PrecioValor;
	    }
	    
	    
}

-->