/* PRELOADEAR IMAGENS */

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

/* FIM PRELOADEAR IMAGENS */

/* SUBMENUS */
}
function mostraServicos() {
						document.getElementById("subservicos").style.display = "block";
						document.getElementById("botaoservicos").style.backgroundColor = "#343434";
						document.getElementById("mudacorservicos").style.color ="#FFF";
                                }

function someServicos(){
                        document.getElementById("subservicos").style.display = "none";
						document.getElementById("mudacorservicos").style.color = "#666";
						document.getElementById("botaoservicos").style.background = "none";
                                }
function mostraContato() {
						document.getElementById("subcontato").style.display = "block";
						document.getElementById("ultimo").style.backgroundColor = "#343434";
						document.getElementById("mudacorcontato").style.color ="#FFF";
                                }

function someContato(){
                        document.getElementById("subcontato").style.display = "none";
						document.getElementById("mudacorcontato").style.color = "#666";
						document.getElementById("ultimo").style.background = "none";
                                }
/* FIM SUBMENUS */

/* FUNÇÃO DO SUBMENU CONTATO */

function showSubmenu () {
						document.getElementById("subcontato").style.display = "block";
						document.getElementById("corcontato").style.color = "#FFFF99";
}
function someSubmenu () {
						document.getElementById("subcontato").style.display = "none";
						document.getElementById("corcontato").style.color = "#FFFFFF";
}

/* FIM DO SUBMENU CONTATO */

/* POLÍICA DE PRIVACIDADE */

function mostraPolitica() {
						document.getElementById("privacidade").style.display = "block";
}

function somePolitica() {
						document.getElementById("privacidade").style.display = "none";
}

/* FIM POLÍICA DE PRIVACIDADE */

function enviacontato() {
	
		if(document.formcontato.nome.value=="" || document.formcontato.nome.value.length < 5)
	{
		alert( "Preencha campo NOME corretamente!" );
			document.formcontato.nome.focus();
				return false;
	}
		
	if( document.formcontato.email.value=="" || document.formcontato.email.value.indexOf('@')==-1 || document.formcontato.email.value.indexOf('.')==-1 )
	{
		alert( "Preencha campo E-MAIL corretamente!" );
			document.formcontato.email.focus();
				return false;
	}

	
return true;
}

function enviabusca() { if(document.formbusca.busca.value=="" || document.formbusca.busca.value.length < 3)
	{
		alert( "Escreva algo no campo busca!" );
			document.formbusca.busca.focus();
				return false;
	}
	
}

<!--VALIDAÇÃO DE N�MEROS DE TELEFONE-->

function Numero(e)
{
navegador = /msie/i.test(navigator.userAgent);
if (navegador)
var tecla = event.keyCode;
else
var tecla = e.which;

if(tecla > 47 && tecla < 58) // numeros de 0 a 9
return true;
else
{
if (tecla != 8) // backspace
return false;
else
return true;
}
}

/* FUNÇÃO DE CSS ALTERNATIVA PARA BROWSERS DIFERENTES */

function css_browser_selector (u) {var ua=u.toLowerCase(),is=function(t){return ua.indexOf(t)>-1},g='gecko',w='webkit',s='safari',o='opera',m='mobile',h=document.documentElement,b=[(!(/opera|webtv/i.test(ua))&&/msie\s(\d)/.test(ua))?('ie ie'+RegExp.$1):is('firefox/2')?g+' ff2':is('firefox/3.5')?g+' ff3 ff3_5':is('firefox/3.6')?g+' ff3 ff3_6':is('firefox/3')?g+' ff3':is('gecko/')?g:is('opera')?o+(/version\/(\d+)/.test(ua)?' '+o+RegExp.$1:(/opera(\s|\/)(\d+)/.test(ua)?' '+o+RegExp.$2:'')):is('konqueror')?'konqueror':is('blackberry')?m+' blackberry':is('android')?m+' android':is('chrome')?w+' chrome':is('iron')?w+' iron':is('applewebkit/')?w+' '+s+(/version\/(\d+)/.test(ua)?' '+s+RegExp.$1:''):is('mozilla/')?g:'',is('j2me')?m+' j2me':is('iphone')?m+' iphone':is('ipod')?m+' ipod':is('ipad')?m+' ipad':is('mac')?'mac':is('darwin')?'mac':is('webtv')?'webtv':is('win')?'win'+(is('windows nt 6.0')?' vista':''):is('freebsd')?'freebsd':(is('x11')||is('linux'))?'linux':'','js']; c = b.join(' '); h.className += ' '+c; return c;}; css_browser_selector(navigator.userAgent);

/* FIM FUNÇÃO PARA CSS ALTERNATIVA PARA BROWSERS DIFERENTES */

/* LINKS DO SLIDER */

function linkWeb () {
	document.location.href="web.php?categoria=Webdesign";	
}
function linkGrafico () {
	document.location.href="grafico.php?categoria=Grafico";	
}
function linkElearning () {
	document.location.href="elearning.php?categoria=E-learning";	
}
function linkEcommerce () {
	document.location.href="ecommerce.php?categoria=E-commerce";	
}
function linkHost () {
	document.location.href="host.php";	
}
function linkSalas () {
	document.location.href="salas.php";	
}

/* FIM DOS LINKS DO SLIDER */

/* FUNÇÃO HOST */

function mostraHost() {
						document.getElementById("hostprecos").style.display = "block";
						document.getElementById("vervalores").style.display = "none";
						document.getElementById("fecharvalores").style.display = "block";
}

function someHost() {
						document.getElementById("hostprecos").style.display = "none";
						document.getElementById("vervalores").style.display = "block";
						document.getElementById("fecharvalores").style.display = "none";

}

/* FIM HOST */

/* TROCA TAMANHO DO MENU DE ACORDO COM A FONTE */

function trocaFonte () { /*
	if (document.body.style.fontFamily = "Arial")
	{
		document.getElementById("navegacao").style.fontSize = "14px";
	} */
}

/* FIM TROCA TAMANHO DO MENU DE ACORDO COM A FONTE */

/* PAGINA PARCEIROS */

function magento () {
	document.getElementById("magento").style.color= "#FFFFFF";
	document.getElementById("p_magento").style.color= "#FFFFFF";
	
	document.getElementById("hostgator").style.color= "#999";
	document.getElementById("p_hostgator").style.color= "#999";
	document.getElementById("uolhost").style.color= "#999";
	document.getElementById("p_uolhost").style.color= "#999";
	document.getElementById("31d").style.color= "#999";
	document.getElementById("p_31d").style.color= "#999";
	document.getElementById("moodle").style.color= "#999";
	document.getElementById("p_moodle").style.color= "#999";
}

function hostgator () {
	document.getElementById("magento").style.color= "#999";
	document.getElementById("p_magento").style.color= "#999";
	
	document.getElementById("hostgator").style.color= "#FFF";
	document.getElementById("p_hostgator").style.color= "#FFF";
	
	document.getElementById("uolhost").style.color= "#999";
	document.getElementById("p_uolhost").style.color= "#999";
	document.getElementById("31d").style.color= "#999";
	document.getElementById("p_31d").style.color= "#999";
	document.getElementById("moodle").style.color= "#999";
	document.getElementById("p_moodle").style.color= "#999";
}

function uolhost () {
	document.getElementById("magento").style.color= "#999";
	document.getElementById("p_magento").style.color= "#999";
	document.getElementById("hostgator").style.color= "#999";
	document.getElementById("p_hostgator").style.color= "#999";
	
	document.getElementById("uolhost").style.color= "#FFF";
	document.getElementById("p_uolhost").style.color= "#FFF";
	
	document.getElementById("31d").style.color= "#999";
	document.getElementById("p_31d").style.color= "#999";
	document.getElementById("moodle").style.color= "#999";
	document.getElementById("p_moodle").style.color= "#999";
}
function abre31d () {
	document.getElementById("magento").style.color= "#999";
	document.getElementById("p_magento").style.color= "#999";
	document.getElementById("hostgator").style.color= "#999";
	document.getElementById("p_hostgator").style.color= "#999";
	document.getElementById("uolhost").style.color= "#999";
	document.getElementById("p_uolhost").style.color= "#999";
	
	document.getElementById("31d").style.color= "#FFF";
	document.getElementById("p_31d").style.color= "#FFF";
	
	document.getElementById("moodle").style.color= "#999";
	document.getElementById("p_moodle").style.color= "#999";
}	
function moodle() {
	document.getElementById("magento").style.color= "#999";
	document.getElementById("p_magento").style.color= "#999";
	document.getElementById("hostgator").style.color= "#999";
	document.getElementById("p_hostgator").style.color= "#999";
	document.getElementById("uolhost").style.color= "#999";
	document.getElementById("p_uolhost").style.color= "#999";
	document.getElementById("31d").style.color= "#999";
	document.getElementById("p_31d").style.color= "#999";
	
	document.getElementById("moodle").style.color= "#FFF";
	document.getElementById("p_moodle").style.color= "#FFF";
}
