<!-- // Hide from old browsers 

function validarNombre() {
	if(ContactForm.realname.value=="") {
		alert("You must type your Name")
		ContactForm.realname.focus()
		return false
	}
}
function validarTelefono() {
	re=/^\(?(\d{3})\)?[\.\-\/ ]?(\d{3})[\.\-\/ ]?(\d{4})$/
	if(ContactForm.telefono.value=="") {
		alert("You must type your Phone Number")
		ContactForm.telefono.focus()
		return false
	}
	validPhone=re.exec(ContactForm.telefono.value)
	if(validPhone) {
		ContactForm.telefono.value="("+ validPhone[1] + ") " + validPhone[2] + "-" + validPhone[3]
	}
	else {
		alert(ContactForm.telefono.value + " is not a valid phone number")
		ContactForm.telefono.focus()
		ContactForm.telefono.select()
		return false
	}
}

function validarEmail() {
	ex=/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/
	if(ContactForm.email.value=="") {
		alert("You must type your email")
		ContactForm.email.focus()
		return false
	}

	if(ContactForm.email.value!="") {
		
		if(ex.test(ContactForm.email.value)) {
			return true
		}
		alert("Invalid Email Address")
		ContactForm.email.focus()
		ContactForm.email.select()
		return false
	}

}
function validarComentarios() {
	if(ContactForm.comentarios.value=="") {
		alert("You must type your Comments")
		ContactForm.comentarios.focus()
		return false
	}
}
function validar() {
	if(validarNombre()==false) { return false }
	if(validarEmail()==false) { return false }
	if(validarTelefono()==false) { return false }
	if(validarComentarios()==false) { return false }
	return true
}
function send() {
	if (validar()== true) {
		ContactForm.action = "/cgi-sys/formmail.pl"
		ContactForm.submit()
	}
}

function OpenMap(){

	width = 0
	height = 0

	if (screen) {
		width = (screen.width-411)/2
		height = (screen.height-184)/2
	}

	imgWindow = window.open("map.htm", "imgWin", "width=411, height=184, scrollbars=no, left=" + width + ", top=" + height)
}


function DOMGetElement(xx) 
{
  // This function returns document's elemtnt acording it's name
  // Using Document Object Model
 if (document.getElementById) return document.getElementById(xx); 
 return nul;
}

function showmenu(name) 
{
// This is the main function that hide all the layers but the only one, 
// which name was delivered to the function as a parametr

var ii;  // cicle variable
var m=4; // variable that shows maximum nomber in layers' names 
var qq;  // here we store the name of a layer that we must show
var nen; // here we store the names of all layers (in a cicle)

NeMenu =  new Array(m+1); // an array to store the objects -  all the layers that should be hidden
nename = new Array(m+1);  // an array to store the names of all the layers  that should be hidden

// cicle to store the names of all the layers that should be hidden an array
for (ii=0; ii<=m; ii++) {
  nen="menu" + ii;
  nename[ii]=nen;
   if (name) { // this
    if (nen==name) qq=ii; // flag on - if it's a name of a layer hat should be shown
   }
}

// than we should show one layer and hide all the others (in a cicle)
// we do it for all the main types of brousers 

  if (document.getElementById) { 
  // Type 1: IE5,6; NN6; Mozilla
  // if our brouser supports DOM and we can get an object according to it's name
    if (name) { // if there was a parametr
     var Menu = DOMGetElement(name); // get an object 
     Menu.style.visibility='visible'; // and show it, changing the style
    }
    for (ii=0; ii<=m; ii++) { // for all the layers
     if (ii!=qq) { // but one that should be shown
      NeMenu[ii] = DOMGetElement(nename[ii]); // get an object that we do NOT show
      NeMenu[ii].style.visibility='hidden';  // and hide it, changing the style
     }
    }
    return true; // exit function
  } // that's all for the first type of brousers

 if(document.all) { 
  // Type 2: For document.all stands IE4-6 and Opera5, but IE5,6 were gone as the 1-st type 
   if (name) document.all[name].style.visibility= 'visible'; //if there was a parametr, show that layer using style
  for (ii=0; ii<=m; ii++) { 
   // hide all the layers but one that should be shown  - using style
   if (ii!=qq) document.all[nename[ii]].style.visibility= 'hidden'; 
  }
    return true; // exit function
 } // that's all for the second type of brousers

 if (document.layers) { 
   //Type 2: NN4
   if (name) document.layers[name].visibility='show'; // if there was a parametr, show that layer using layer
    for (ii=0; ii<=m; ii++) {
    // hide all the layers but one that should be shown  - using layer
     if (ii!=qq) document.layers[nename[ii]].visibility='hide';
    }
    return true; // exit function
  } // that's all for the second type of brousers (NN4)
} 

var mission = '<b>Mission</b><br /><br />Provide excellent Latin American foods to customers in the Mid-Atlantic and North-East coast of the United States.';
var profile = '<b>Profile</b><br /><br />Las Guanacas Products Incorporated was established in Wheaton, MD in 1998. It started as a very small business producing Salvadorean tortillas, which originally were distributed through Latin grocery stores in the Greater Washington Area. More products were added to its production line to satisfy the demand for quality foods of Latino population. Currently, Las Guanacas&#39; products are also distributed through well known supermarket chains in the area. Due to its quality, this brand name is now a well-known and respected name.';
var information = '<b>Information</b><br /><br />In 2002, we opened Sergio&#39;s Place Restaurant in downtown Wheaton to cater an increasing demand for good and authentic Salvadorean and Latino dishes.';
var products = '<b>Products/Services</b><br /><br />Salvadorean style tortillas<br />Pupusas (Cheese, beans and pork) & Pupusas de Olocuilta (rice-dough pupusas)<br />Pastelitos, Tamales, Enchiladas & Burritos<br />Mexican Tortas and Tacos<br />Cuban Sandwiches<br />Excellent seafood dishes (like Peruvian-style Ceviche)<br />Excellent Choice-cuts steaks<br />Delicious homemade soups<br />Chicken and other poultry delights.';
var news = '<b>News</b><br /><br />Coming Soon: Sergio&#39;s Place Restaurant will be opening a new bar and entertainment area to cater customers that enjoy live music, dancing and sports.';

function changeContent(id,shtml) {
   if (document.getElementById || document.all) {
      var el = document.getElementById? document.getElementById(id): document.all[id];
      if (el && typeof el.innerHTML != "undefined") el.innerHTML = shtml;
   }
}

//-->

/*
function OpenProduct(filename){

	width = 0
	height = 0
	img = new Image

	img.src = "images/" + filename + ".gif";

	if (screen) {
		width = (screen.width-img.width)/2
		height = (screen.height-img.height)/2
	}

	//alert(img.width + " x " + img.height)

	imgWindow = window.open("", "imgWin", "width="+img.width +", height="+ img.height +", scrollbars=no, left=" + width + ", top=" + height)
	imgWindow.document.writeln("<html>");
	imgWindow.document.writeln("<head>");
	imgWindow.document.writeln("<title>Las Guanacas </title>");
	imgWindow.document.writeln("</head>");
	imgWindow.document.writeln("<body leftmargin='0' topmargin='0' bgcolor='#EFD6A2'>");

	imgWindow.document.writeln("<img src='"+"images/" + filename + ".gif"+"'>");

	imgWindow.document.writeln("</body>");
	imgWindow.document.writeln("</html>");
	imgWindow.document.close();
	imgWindow=null
	img=null


}
*/

function OpenAward(){

	width0 = 530
	height0 = 675
	img = new Image

	img.src = "images/Award1.jpg"

	if (screen) {
		width = (screen.width-width0)/2
		height = (screen.height-height0)/2
	}

	//alert(width + " x " + height)

	//imgWindow = window.open("", "imgWin", "width="+img.width +", height="+ img.height +", scrollbars=no, left=" + width + ", top=" + height)
	imgWindow = window.open("", "imgWin", "width="+ width0 +", height="+ height0 +", scrollbars=no, left=" + width + ", top=" + height)
	imgWindow.document.writeln("<html>");
	imgWindow.document.writeln("<head>");
	imgWindow.document.writeln("<title>Las Guanacas </title>");
	imgWindow.document.writeln("</head>");
	imgWindow.document.writeln("<body leftmargin='0' topmargin='0' bgcolor='#EFD6A2'>");

	imgWindow.document.writeln("<img src='images/Award1.jpg'>");

	imgWindow.document.writeln("</body>");
	imgWindow.document.writeln("</html>");
	imgWindow.document.close();
	imgWindow=null
	img=null

}