//***************************************************************************
//(c)2008 VicToR Design & Solution | www.victords.com | info@victords.com 
//***************************************************************************
var pink_focus = '#E4ECC4';
//***************************************************************************
function disableFocus(form, id){
	
   if(form=='formBudget')
   {
	if(id=='all'){
		document.getElementById('name').style.background='white';
		document.getElementById('phone').style.background='white';
		document.getElementById('email').style.background='white';
		document.getElementById('comments').style.background='white';
	}else{
		document.getElementById(id).style.background='white';
	}
   }
   else if(form=='formContact')
   {
	if(id=='all'){
		document.getElementById('cnt_name').style.background='white';
		document.getElementById('cnt_tlf').style.background='white';
		document.getElementById('cnt_email').style.background='white';
		document.getElementById('cnt_comments').style.background='white';
	}else{
		document.getElementById(id).style.background='white';
	}   	
   }

}
//***************************************************************************
function setFocus(id, mode){
	if(mode=='on')
		document.getElementById(id).style.background=pink_focus;
	else
		document.getElementById(id).style.background='white';
}
//***************************************************************************
function doFocus(form, id){
	disableFocus(form, 'all');
	setFocus(id,'on');
}
//***************************************************************************
function sendContact(lan){
	//Verify typed info
	if (validateForm('formContact', lan)){
		//Send the form
		document.getElementById('formContact').submit();
	}else{
		alertLan("error_formulario", lan);
	}
}
//***************************************************************************
function sendBudget(lan){
	//Verify typed info
	if (validateForm('formBudget', lan)){
		//Send the form
		document.getElementById('formBudget').submit();
	}else{
		alertLan("error_formulario", lan);
	}
}
//***************************************************************************