/*************************************************************************
  *********                  Menu  JsObject                    *********
*************************************************************************/
	function loadMenu(ex, clases, dx, subelem, linksm)
	{
	 var g = this;
	 var indexActive = 0; 
		function over() {
		  var ww =  this.indice;	 
		  this.src = "images/menu"+ww+"_1.png";
		 }
		function out() {
		  var ww =  this.indice;	 
		  this.src = "images/menu"+ww+"_0.png";	   
		   }	
		function click()
		 {

		  var ww =  this.indice;
	      var obj = xGetElementById(ex);
		  var bots = xGetElementsByClassName(clases,obj,subelem);
		  if (!bots || bots.length == 0) { return null; }
	 	  var i;
		   for (i = 0; i < bots.length; ++i) {	
		    bots[i].src = "images/menu"+(i+1)+"_0.png";	;
			bots[i].onclick = "muestra('"+ linksm [i]+"')";
		   }		  
		  g.write();
		  document.location.href = linksm[ww-1];
		 }	
		 function goOption(n)
		 {
		   if(n!=0){
		    g.puntero = n;
		    g.write();
		   }
		 }
		 function create(){
	      var obj = xGetElementById(ex);
		  var bots = xGetElementsByClassName(clases,obj,subelem);
		  if (!bots || bots.length == 0) { return null; }
	 	  var i;
		   for (i = 0; i < bots.length; ++i) {	
		    if(i==(g.puntero-1)){
			 bots[i].onmouseover = "";
			 bots[i].onmouseout  = "";
			 bots[i].onclick = "";		
			 bots[i].style.cursor = "default"; 
           //  bots[i].className = "menua";
			 bots[i].src = "images/menu"+g.puntero+"_2.png";	   		   
			}else{
			 bots[i].onmouseover = over;
			 bots[i].onmouseout  = out;
			 bots[i].onclick = click;			
			 bots[i].style.cursor = "pointer"; 			 
             //bots[i].className = "menup";
			}
			 bots[i].indice = i + 1;
			}
		 }
 	g.datax=dx;	
 	g.puntero=0;	
	g.write = create;
    g.check = goOption; 
	// this.
	}     

	
function validamail(){
var ok = true;
var pt = document.sendmail;
 if (pt.nombre.value == "" ){
   alert("Please type your Name!");
   pt.nombre.focus();
   ok = false; 
 }
 if(ok){
	 if (pt.mail.value == "" ){
	   alert("Please type your Email!");
	   pt.mail.focus();
	   ok = false; 
	 } 
 }
 if(ok){
	 if (pt.asunto.value == "" ){
	   alert("Please type your Subject!");
	   pt.asunto.focus();
	   ok = false; 
	 } 
 } 
  if(ok){
    pt.enviarmail.value = 1;
  } 
 return ok;
}