
var menu_activo="";
var menu_activo_conf="";
function precarga(lang)
{
	
	if (document.getElementById)
		var x = document.getElementById('menu').getElementsByTagName('IMG');
	else if (document.all)
		var x = document.all['menu'].all.tags('IMG');
	else return;
	var preloads = new Object();
	var str="";
	for (var i=0;i<x.length;i++)
	{
		preloads['n'+x[i].id] = new Image;
		if(menu_activo==x[i].id ) { 
		 preloads['n'+x[i].id].src = 'images/'+lang+'/b1_'+ x[i].alt + '.png'; 
		}
		else { 
		  preloads['n'+x[i].id].src =  'images/'+lang+'/b0_'+ x[i].alt + '.png'; 
		 }
		
		preloads['o'+x[i].id] = new Image;
		preloads['o'+x[i].id].src = 'images/'+lang+'/b1_'+ x[i].alt + '.png';
		x[i].onmouseover = function () { this.src=preloads['o'+this.id].src;}
		x[i].onmouseout = function () { this.src=preloads['n'+this.id].src;}
		x[i].onclick= function () { 
		  
		  window.location='index.php?opt=' + this.id.replace(/i/, '');
		  }
	}
	document.getElementById("col_izq").style.height=document.getElementById("center_cont").clientHeight+"px";
	document.getElementById("col_der").style.height=document.getElementById("center_cont").clientHeight+"px";

if(document.getElementById("menu_conf")) {
	if (document.getElementById)
		var x = document.getElementById('menu_conf').getElementsByTagName('IMG');
	else if (document.all)
		var x = document.all['menu_conf'].all.tags('IMG');
	else return;
	var preloads1 = new Object();
	var str="";
	for (var i=0;i<x.length;i++)
	{
		preloads1['n'+x[i].id] = new Image;
		if(menu_activo_conf==x[i].id ) { 
		 preloads1['n'+x[i].id].src = 'images/'+lang+'/b1_'+ x[i].alt + '.png'; 
		}
		else { 
		  preloads1['n'+x[i].id].src =  'images/'+lang+'/b0_'+ x[i].alt + '.png'; 
		 }
		
		preloads1['o'+x[i].id] = new Image;
		preloads1['o'+x[i].id].src = 'images/'+lang+'/b1_'+ x[i].alt + '.png';
		x[i].onmouseover = function () { this.src=preloads1['o'+this.id].src; }
		x[i].onmouseout = function () { this.src=preloads1['n'+this.id].src;}
	}
}
	
}

function validar_contacto() {
var f=document.contacto;
var cad="";


if(f.interest.value=="") { 
 alert('please specify your interest.');
 f.interest.focus();
 return false;
}

if(f.first.value=="") { 
 alert('please write your first name.');
 f.first.focus();
 return false;
}
if(f.last.value=="") { 
 alert('please write your last name.');
 f.last.focus();
 return false;
}
if(f.job.value=="") { 
 alert('please select your job title.');
 f.job.focus();
 return false;
}
if(f.company.value=="") { 
 alert('please write your company name.');
 f.company.focus();
 return false;
}
if(f.email.value=="") { 
 alert('please write your email address');
 f.email.focus();
  return false;
}
else{
	if(!isEmail( f.email.value)	){
	alert('please write a valid email');
	 f.email.focus();
	  return false;
	}
}
if(f.phone.value=="") { 
 alert('please write your phone number.');
 f.phone.focus();
 return false;
}

if(!f.iaccept.checked) { 
 alert('please acept the Terms and Conditions.');
 f.iaccept.focus();
 return false;
}

return true;	
}

