

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-17247964-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

function menuLogic(section, action, lang) {
var ele = document.getElementById("toggleT");
    if (action == "over") {
        $('#ttt').attr('src', '/siteimages/' + section + 'Image.jpg');
        $('#ttt').addClass("lineDecoration" + section);
        $('#menuText').empty();
        $('#menuText').append($("#" + section + "Text").html());
		ele.style.display = "none";	
    } else{
        $('#ttt').removeClass();
        $('#ttt').attr('src', '/siteimages/carcel2.jpg');
        $('#menuText').empty();
        $('#menuText').append($("<u><br/><br/><br/><strong><span class='style1'>Tomar decisiones en TIC es cada dia mas difícil.</span></strong></u>").html());
        $('#menuText').append($("<u></br><strong><span class='style1'>Penteo te ayuda a aprender de la experiencia.</span></strong></u>  ").html());
        $('#menuText').append($("<u><br/><strong><span class='style1'>Para que nunca estes solo en tus decisiones.</span></strong></p></span></u>").html());
		ele.style.display = "block";
	}


}
function equipoLogic(persona, action, lang) {

    if (action == "over") {
        document.getElementById('fotocolaborador').setAttribute('src', '/siteimages/' + persona + '.jpg');
        document.getElementById(persona).setAttribute('visible', '');

    } else {
        document.getElementById('fotocolaborador').setAttribute('src', '/siteimages/transparent.gif');
        document.getElementById(persona).setAttribute('visible', 'hidden');
    }
}

function rlink(dr) {
    pageReload(dr)
}
function subMenuLogic(section, action, currentSection) {
	if(action == "over"){
		$('#'+section+'_menu').addClass(section);
	}else{
		if(currentSection != section){
			$('#'+section+'_menu').removeClass();
		}
	}
}

function pageReload(page) {
    location.href = page;
    setTimeout("", 1000);
}

function FrontPage_Form1_Validator(theForm){
 if (theForm.nombre.value == "")
 {
 alert($("#contactErrorName").val());
 theForm.nombre.focus();
 return (false);
 }
 if (theForm.nombre.value.length < 1 || theForm.nombre.value.length > 300)
 {
     alert($("#contactErrorNameWrong").val());
 theForm.nombre.focus();
 return (false);
 }

 if (theForm.apellidos.value == "")
 {
     alert($("#contactErrorSurname").val());
 theForm.apellidos.focus();
 return (false);
 }
 if (theForm.apellidos.value.length < 1 || theForm.apellidos.value.length > 300)
 {
     alert($("#contactErrorSurnameWrong").val());
 theForm.apellidos.focus();
 return (false);
 }
 if (theForm.empresa.value == "")
{
    alert($("#contactErrorCompany").val());
 theForm.empresa.focus();
 return (false);
 }
if (theForm.empresa.value.length < 1 || theForm.empresa.value.length > 300)
 {
     alert($("#contactErrorCompanyWrong").val());
theForm.empresa.focus();
 return (false);
}

 if (theForm.cargo.value == "")
 {
     alert($("#contactErrorPosition").val());
 theForm.cargo.focus();
 return (false);
 }

 if (theForm.cargo.value.length < 1 || theForm.cargo.value.length > 300)
 {
     alert($("#contactErrorPositionWrong").val());
 theForm.cargo.focus();
 return (false);
 }

 if (theForm.email.value == "")
 {
     alert($("#contactErrorEmail").val());
 theForm.email.focus();
 return (false);
 }

 if (theForm.email.value != "")
{
 if (theForm.email.value.indexOf("@") == -1 || theForm.email.value.indexOf(".") == -1 || theForm.email.value.indexOf(" ") != -1 || theForm.email.value.length < 6 || theForm.email.value.length > 300)
 {
     alert($("#contactErrorEmailWrong").val());
 return false;
 }
 }


 if (theForm.idproducto.value == "-1")
{
    alert($("#contactErrorProduct").val());
theForm.idproducto.focus();
 return (false);
 }

 if (theForm.sector.value.length > 300)
 {
     alert($("#contactErrorSectorWrong").val());
theForm.sector.focus();
 return (false);
 }
if (theForm.ciudad.value.length > 300)
 {
     alert($("#contactErrorCityWrong").val());
 theForm.ciudad.focus();
 return (false);
}
 if (theForm.telefono.value.length > 300)
 {
     alert($("#contactErrorPhone").val());
theForm.telefono.focus();
return (false);
}
 return (true);
} 
