
function ValidarTexto(txt,tipoTxt){

   /**************************************************************************************
   * Funcion Realizada por: Marco A Montilla Rodriguez y Jose Fernandez Mejuto           *
   *  Esta funcion valida 6 tipos de datos de entrada                                    *
   *  nu de tipo Numerico  0123456789													 *
   *  vcn de tipo Telefonico 0123456789-/												 *
   *  vc de tipo  Nombres caracteres en minuscula y Mayuscula, acentuados, espacio blanco*
   *  vcl de tipo Login y Clave caracteres en minuscula y Mayuscula, underscore 	     *
   *  vcp de tipo Pregunta caracteres con signos de interrogacion						 *
   *  vcd de tipo Respuesta y Direccion similar a pregunta sin signo ?¿ y punto          *
   *  Fecha de Realizacion 30/01/2001													 *	
   *  txt := Texto de Entrada  															 *	
   *  tipoTxt := Tipo de dato de Entrada 												 *	
   *  Modificado por:                  Fecha:											 *	
   **************************************************************************************/

   if (tipoTxt == "nu"){
   	    if (isNaN(txt)){
   	          return false;
   	          exit;
   	    }else{
              return true; 
              exit;
        }   
   }else if (tipoTxt == "vcn"){  
   			    if (isNaN(txt)){
   			    		 entrada = txt.toString();
   			    			for ( var i=0; i < entrada.length; i++){
   			    					caracter = entrada.charCodeAt(i);
									  if ( (caracter >= 48 && caracter <= 57) || (caracter == 45) || (caracter == 47)){
											valido = "si";
									  }else{
									    	return false;
											exit;
									  }
							}return true;
				}else{
					  return true;								
				}	     						
		  
 }else if (tipoTxt == "vcl"){entrada = txt.toString();
   			for ( var i=0; i < entrada.length ; i++){
   	   	         caracter =entrada.charCodeAt(i);
				  if ((caracter >= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || (caracter >= 48 && caracter <= 57) || (caracter == 95)){
				   	         valido = "si"
				   }else{
				  	         return false;
							 exit;	
				   }
			}  return true;	
   
}else if (tipoTxt == "vc"){entrada = txt.toString();
   			for ( var i=0; i < entrada.length ; i++){
   	   	         caracter =entrada.charCodeAt(i);
				 if ((caracter >= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || (caracter >= 160 && caracter <= 165) || (caracter == 130) || (caracter == 32) || (caracter == 250) || (caracter == 243)|| (caracter == 225) || (caracter == 237)|| (caracter == 241) || (caracter == 233) || (caracter == 209)){
				   	         valido = "si"
				   }else{
				  	         return false;
							 exit;	
				   }
			}  return true;	
   
}else if (tipoTxt == "vcp"){entrada = txt.toString();
   			for ( var i=0; i < entrada.length ; i++){
   	   	         caracter =entrada.charCodeAt(i);
				 if ((caracter >= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || (caracter >= 160 && caracter <= 165) || (caracter == 130) || (caracter == 32) || (caracter == 250) || (caracter == 243)|| (caracter == 225) || (caracter == 237)|| (caracter == 241) || (caracter == 233) || (caracter == 209) || (caracter >= 48 && caracter <= 57) || (caracter == 63) || (caracter == 169) || (caracter == 167)){
				   	         valido = "si"
				   }else{
				  	         return false;
							 exit;	
				   }
			}  return true;	
   
}else if (tipoTxt == "vcd"){entrada = txt.toString();
   			for ( var i=0; i < entrada.length ; i++){
   	   	         caracter =entrada.charCodeAt(i);
				 if ((caracter >= 65 && caracter <= 90) || (caracter >= 97 && caracter <= 122) || (caracter >= 160 && caracter <= 165) || (caracter == 130) || (caracter == 32) || (caracter == 250) || (caracter == 243)|| (caracter == 225) || (caracter == 237)|| (caracter == 241) || (caracter == 233) || (caracter == 209) || (caracter >= 48 && caracter <= 57) || (caracter == 169) || (caracter == 46)){
				   	         valido = "si"
				   }else{
				  	         return false;
							 exit;	
				   }
			}  return true;	
   
}
   
}  


   /**************************************************************************************
   * Funcion Realizada por: Jose Fernandez Mejuto                                        *
   *  Esta funcion genera la fecha en formato Espanol                                    *
   *  Modificado por:                  Fecha:											 *	
   **************************************************************************************/


function StringDeFecha()
{
var Meses = new   Array("Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre");
var Semanas= new  Array ("Lunes","Martes","Miercoles","Jueves","Viernes","Sabado", "Domingo");
var NumeroFecha = new Date();
var NumeroDia = NumeroFecha .getDate();
var NumeroMes = NumeroFecha .getMonth();
var NumeroAno = NumeroFecha .getYear();
   if (NumeroAno <100) NumeroAno ="19"+NumeroAno ;
   StringDeFecha=NumeroDia+" de "+ Meses[NumeroMes]+" de "+NumeroAno+ " " + NumeroFecha.getHours()+":"+NumeroFecha.getMinutes();
{
if (navigator.appName=="Netscape") NumeroAno =2001+Math.abs(NumeroAno -100);
}
StringDeFecha=NumeroDia+" de "+ Meses[NumeroMes]+" de "+NumeroAno+ " " + NumeroFecha.getHours()+":"+NumeroFecha.getMinutes();
return StringDeFecha;
 }




   /**************************************************************************************
   * Funcion Realizada por: Jose Fernandez Mejuto , Marcos Montilla, Jorge Escobar       *
   *  Esta funcion muestra una ventana formateada                                        *
   *  Modificado por:                  Fecha:											 *	
   **************************************************************************************/

function AbrirVentana(Path_Imagenes, Titulo, MensajeError)
{
posicion_vector="";
posicion_vector = MensajeError.split("*");
TipoNanegador=navigator.appName;
	if (TipoNanegador == "Netscape")
		{
		msgWindow=window.open("","displayWindow","xmax=550,ymax=620,scrollbars=no,status=yes,width=405,height=320");
		}
	else
		{
		msgWindow=window.open("","displayWindow","xmax=550,ymax=620,scrollbars=no,status=yes,width=405,height=320");
		}
msgWindow.document.writeln("<html>");
msgWindow.document.writeln("<head>");
msgWindow.document.writeln("<link rel=stylesheet href=/imagesLaCuisine/style.css type=text/css>");
msgWindow.document.writeln("<title>La Cuisine : Mensaje</title>");
msgWindow.document.writeln("</head>");
msgWindow.document.writeln("<body bgcolor=#e5e5e5 text=#000000>");
msgWindow.document.writeln("<table width=100% border=0 bgcolor=#e5e5e5 cellspacing=0 cellpadding=0>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/error_image01.gif width=367 height=52></td>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=8 height=200></td>");
msgWindow.document.writeln("<td class=texto_negro>"); 
for (contenido=0;contenido <= posicion_vector.length - 2;contenido++)
{ MensajeDeError = posicion_vector[contenido];
msgWindow.document.writeln ("<img src=/imagesLaCuisine/00_gris.gif width=10 height=10>   "+MensajeDeError+" <BR>");
}
msgWindow.document.writeln("</td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("<td bgcolor=#000000><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("<td>"); 
msgWindow.document.writeln("<div align=right><a href=javascript:self.close();><img src=/imagesLaCuisine/bot_regresar.gif width=80 height=17 border=0></a></div>");
msgWindow.document.writeln("</td>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("</table>");
msgWindow.document.writeln("</body");
msgWindow.document.writeln("</html>");
msgWindow.document.close();
}



   /**************************************************************************************
   * Funcion Realizada por: Jose Fernandez Mejuto , Marcos Montilla, Jorge Escobar       *
   *  Esta funcion muestra una ventana formateada                                        *
   *  Modificado por:                  Fecha:											 *	
   **************************************************************************************/

function AbrirVentanaArticulo(Path_Imagenes, Titulo, imagenArticulo )
{
posicion_vector="";
TipoNanegador=navigator.appName;
	if (TipoNanegador == "Netscape")
		{
		msgWindow=window.open("","displayWindow","xmax=550,ymax=620,scrollbars=no,status=yes,width=405,height=430");
		}
	else
		{
		msgWindow=window.open("","displayWindow","xmax=550,ymax=620,scrollbars=no,status=yes,width=300,height=360");
		}
msgWindow.document.writeln("<html>");
msgWindow.document.writeln("<head>");
msgWindow.document.writeln("<link rel=stylesheet href=/imagesLaCuisine/style.css type=text/css>");
msgWindow.document.writeln("<title>La Cuisine : Mensaje</title>");
msgWindow.document.writeln("</head>");
msgWindow.document.writeln("<body bgcolor=#e5e5e5 text=#000000>");
msgWindow.document.writeln("<table width=100% border=0 bgcolor=#e5e5e5 cellspacing=0 cellpadding=0>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=8 height=200></td>");
msgWindow.document.writeln("<td class=texto_negro>"); 
msgWindow.document.writeln ("<img src="+imagenArticulo+"> <BR>");
msgWindow.document.writeln("</td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("<td bgcolor=#000000><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("<td>"); 
msgWindow.document.writeln("<div align=right><a href=javascript:self.close();><img src=/imagesLaCuisine/bot_regresar.gif width=80 height=17 border=0></a></div>");
msgWindow.document.writeln("</td>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("</table>");
msgWindow.document.writeln("</body");
msgWindow.document.writeln("</html>");
msgWindow.document.close();
}


   /**************************************************************************************
   * Funcion Realizada por: Jose Fernandez Mejuto , Marcos Montilla, Jorge Escobar       *
   *  Esta funcion muestra una ventana formateada                                        *
   *  Modificado por:                  Fecha:											 *	
   **************************************************************************************/

function AbrirMensaje(Path_Imagenes, Titulo,mensaje)
{
posicion_vector="";
TipoNanegador=navigator.appName;
	if (TipoNanegador == "Netscape")
		{
		msgWindow=window.open("","displayWindow","xmax=550,ymax=620,scrollbars=no,status=yes,width=405,height=320");
		}
	else
		{
		msgWindow=window.open("","displayWindow","xmax=550,ymax=620,scrollbars=no,status=yes,width=405,height=320");
		}
msgWindow.document.writeln("<html>");
msgWindow.document.writeln("<head>");
msgWindow.document.writeln("<link rel=stylesheet href=/imagesLaCuisine/style.css type=text/css>");
msgWindow.document.writeln("<title>La Cuisine : Mensaje</title>");
msgWindow.document.writeln("</head>");
msgWindow.document.writeln("<body bgcolor=#e5e5e5 text=#000000>");
msgWindow.document.writeln("<table width=100% border=0 bgcolor=#e5e5e5 cellspacing=0 cellpadding=0>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("<td></td>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=8 height=200></td>");
msgWindow.document.writeln("<td class=texto_negro>"); 

msgWindow.document.writeln ("<img src=/imagesLaCuisine/00_gris.gif width=10 height=10>   "+mensaje+" <BR>");

msgWindow.document.writeln("</td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("<td bgcolor=#000000><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("<td><img src=/imagesLaCuisine/spacer.gif width=1 height=1></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("<td>"); 
msgWindow.document.writeln("<div align=right><a href=javascript:self.close();><img src=/imagesLaCuisine/bot_regresar.gif width=80 height=17 border=0></a></div>");
msgWindow.document.writeln("</td>");
msgWindow.document.writeln("<td>&nbsp;</td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("<tr>"); 
msgWindow.document.writeln("<td colspan=3><img src=/imagesLaCuisine/spacer.gif width=8 height=8></td>");
msgWindow.document.writeln("</tr>");
msgWindow.document.writeln("</table>");
msgWindow.document.writeln("</body");
msgWindow.document.writeln("</html>");
msgWindow.document.close();
}
