/**
 * SWFObject v1.5.1: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */

if(typeof deconcept == "undefined") var deconcept = {};
if(typeof deconcept.util == "undefined") deconcept.util = {};
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = {};
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
	if (!document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = {};
	this.variables = {};
	this.attributes = [];
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
	if (!window.opera && document.all && this.installedVer.major > 7) {
		// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
		// fixes bug in some fp9 versions see http://blog.deconcept.com/2006/07/28/swfobject-143-released/
		if (!deconcept.unloadSet) {
			deconcept.SWFObjectUtil.prepUnload = function() {
				__flash_unloadHandler = function(){};
				__flash_savedUnloadHandler = function(){};
				window.attachEvent("onunload", deconcept.SWFObjectUtil.cleanupSWFs);
			}
			window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
			deconcept.unloadSet = true;
		}
	}
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', false);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	useExpressInstall: function(path) {
		this.xiSWFPath = !path ? "expressinstall.swf" : path;
		this.setAttribute('useExpressInstall', true);
	},
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name] || "";
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name] || "";
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = [];
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs[variablePairs.length] = key +"="+ variables[key];
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "PlugIn");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ (this.getAttribute('style') || "") +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) {
				this.addVariable("MMplayerType", "ActiveX");
				this.setAttribute('swf', this.xiSWFPath);
			}
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" style="'+ (this.getAttribute('style') || "") +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else if (navigator.userAgent && navigator.userAgent.indexOf("Windows CE") >= 0){ // if Windows CE
		var axo = 1;
		var counter = 3;
		while(axo) {
			try {
				counter++;
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+ counter);
//				document.write("player v: "+ counter);
				PlayerVersion = new deconcept.PlayerVersion([counter,0,0]);
			} catch (e) {
				axo = null;
			}
		}
	} else { // Win IE (non mobile)
		// do minor version lookup in IE, but avoid fp6 crashing issues
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
		}catch(e){
			try {
				var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				PlayerVersion = new deconcept.PlayerVersion([6,0,21]);
				axo.AllowScriptAccess = "always"; // error if player version < 6.0.47 (thanks to Michael Williams @ Adobe for this code)
			} catch(e) {
				if (PlayerVersion.major == 6) {
					return PlayerVersion;
				}
			}
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			} catch(e) {}
		}
		if (axo != null) {
			PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = arrVersion[0] != null ? parseInt(arrVersion[0]) : 0;
	this.minor = arrVersion[1] != null ? parseInt(arrVersion[1]) : 0;
	this.rev = arrVersion[2] != null ? parseInt(arrVersion[2]) : 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param) {
		var q = document.location.search || document.location.hash;
		if (param == null) { return q; }
		if(q) {
			var pairs = q.substring(1).split("&");
			for (var i=0; i < pairs.length; i++) {
				if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
					return pairs[i].substring((pairs[i].indexOf("=")+1));
				}
			}
		}
		return "";
	}
}
/* fix for video streaming bug */
deconcept.SWFObjectUtil.cleanupSWFs = function() {
	var objects = document.getElementsByTagName("OBJECT");
	for (var i = objects.length - 1; i >= 0; i--) {
		objects[i].style.display = 'none';
		for (var x in objects[i]) {
			if (typeof objects[i][x] == 'function') {
				objects[i][x] = function(){};
			}
		}
	}
}
/* add document.getElementById if needed (mobile IE < 5) */
if (!document.getElementById && document.all) { document.getElementById = function(id) { return document.all[id]; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;
var ie = /msie/i.test(navigator.userAgent);

function addEvent(object, evType, func, useCapture){
    if(object.addEventListener){
        object.addEventListener(evType, func, useCapture);
    } else
    if(object.attachEvent){
        object.attachEvent("on" + evType, func);
    }
}

/**
* @author Guilherme nascimento (Silverfox)
* @copyright www.lightwebdesigners.com.br
* @category imagens
* @version 1.0.0.0
* Testado nos navegadores IE5.5, IE6, IE7, FF2, FF3, Safari3(Windows), Opera9.02 e Opera10 com sucesso.
* No IE5.01 ou inferior, não tem suporte para os efeitos opacos do CSS, porem fora isso funciona normalmente.
* Navegadores Internet Explorer "inferiores" ao IE5.01 não suportam o Mbox.
*/
function Mbox(){
	var imgclose = "imagens/close.gif";
	var imgload = "imagens/load.gif";
	var imgerro = "imagens/erro.gif";
	var FundoOpaco = 0.7;
	var imgopac = 0;

	var Fechando = false;
	var pv = this;
	var Travar = false;
	var Cache = false;
	var Erro = false;
	var navg = navigator.userAgent;
	var Allie = ((navg.indexOf("MSIE") == -1))? false:true;
	var ie7orup = (Allie)? ((((navg.split("MSIE ")[1]).substr(0,1))>6)? true:false):false;
	var ie6 = (Allie && (navg.indexOf("MSIE 6") != -1 || navg.indexOf("MSIE 5") != -1 ) && !ie7orup)? true:false;
	var Html = document.getElementsByTagName("html")[0];
	var corpo = document.getElementsByTagName("body")[0];
	var largura = corpo.scrollWidth;
	var altura = corpo.scrollHeight;

	var tagBox = null;
	var tagBotao = null;
	var tagFundoOpaco = null;
	var tagIMG = null;

	var intervaloINI = "";
	var intervalo = "";
	var Left = "";
	var Url = "";
	var Links = "";
	var time = "";
	var OpenSelect = Array();

	var fOpen = function(){};
	var fClose = function(){};
	var fErro = function(){};
	var fLoaded = function(){};
	var fTecla = function(){};

	this.setIMGs = function( _tipo,_url){
		if(eval("typeof(img"+_tipo+")")!='undefined' && _tipo && _url){ eval("img"+_tipo+"= '"+_url+"';"); }
	};

	var addEvento = function(object, evType, func, useCapture){
	    if(object.addEventListener){
	        object.addEventListener(evType, func, useCapture);
	    } else if(object.attachEvent){
	        object.attachEvent("on" + evType, func);
	    }
	};

	var Resize = function(){
		if(tagBox && tagIMG){
			tagBox.style.width = ((tagIMG.clientWidth<201)? "200":tagIMG.clientWidth)+"px";

			if(Erro==false){
				tagBox.style.height = "auto";
				tagBox.style.minHeight = "1px";
				if(tagIMG.clientWidth>860){ tagBox.style.width = "860px"; tagBox.style.overflowX = "auto"; }
				if(tagIMG.clientHeight>500){ tagBox.style.height = "500px"; tagBox.style.overflowY = "auto"; }
				if(tagIMG.clientWidth<200){ tagBox.style.width = "200px"; }
				
				Left = (largura/2)-(tagBox.clientWidth/2);
				Left = Left.toString().split(".");
				Left = Left[0];
				tagBox.style.left = Left+"px";

			} else if(Erro==true){
				if(tagIMG.clientWidth<10){ tagBox.style.width = "200px"; tagBox.style.height = "200px"; }
				tagBox.style.left = Left+"px";
				tagIMG.style.visibility = "hidden";
				if(!Fechando){ exec(fErro); }
			}
		}
	};

	var SetaOpac = function(){
		if(tagFundoOpaco && tagIMG && tagBotao){
			tagFundoOpaco.style.width = ((corpo.clientWidth>Html.clientWidth)? corpo.clientWidth:Html.clientWidth)+"px";
			tagFundoOpaco.style.height = ((corpo.clientHeight>Html.clientHeight)? ((corpo.clientHeight>corpo.scrollHeight)? corpo.clientHeight:corpo.scrollHeight):Html.clientHeight)+"px";
			tagFundoOpaco.style.filter="alpha(opacity="+ FundoOpaco * 100 +")";
			tagFundoOpaco.style.MozOpacity = FundoOpaco;
			tagFundoOpaco.style.khtmlOpacity = FundoOpaco;
			tagFundoOpaco.style.opacity = FundoOpaco;
			tagIMG.style.filter="alpha(opacity=0)";
			tagIMG.style.MozOpacity = "0";
			tagIMG.style.khtmlOpacity = "0";
			tagIMG.style.opacity = "0";
			tagBotao.style.display = "none";
		}
	};

	var OpacIMG = function(){
	  if(Erro==false){
		if(tagBox){
			Travar = false;
			tagBox.style.backgroundImage="none";
			intervalo = setInterval(function(){
				if(tagIMG){
				  imgopac = (imgopac+0.2);
				  tagIMG.style.filter="alpha(opacity="+imgopac*100+")";
				  tagIMG.style.MozOpacity = imgopac;
				  tagIMG.style.khtmlOpacity = imgopac;
				  tagIMG.style.opacity = imgopac;
				  if(imgopac>0.9 || !tagIMG){ if(!Travar){ exec(fLoaded); } imgopac = 1; Travar=true; clearInterval(intervalo); }
				}
			},100);
		}
	  } else {
		if(tagIMG){ tagIMG.style.display = "none"; }
		if(tagBox){
			tagBox.style.backgroundImage = "url("+imgerro+")";
			tagBox.style.width = "200px";
			tagBox.style.height = "200px";
		}
	  }
	};

	var CloseImg = function(){
		if(tagBox && tagFundoOpaco){
			Fechando = true;
			tagIMG.src = "about:blank";/*Ajuda a limpar o IE*/
			clearInterval(intervalo);
			clearInterval(intervaloINI);
			intervalo = 0;
			intervaloINI = 0;
			if(ie6){ window.onscroll=function(){}; }
			imgopac = 0;
			Erro = false;
			Cache = false;
			tagFundoOpaco.style.left = (largura-10)+"px";/*BUG opera*/
			tagIMG.style.display = "inline";
			SetaOpac();
			abreSelectsObjects();
			tagBox.removeChild(tagBotao);
			tagBox.removeChild(tagIMG);
			corpo.removeChild(tagBox);
			corpo.removeChild(tagFundoOpaco);
			tagBotao = null;
			tagIMG = null;
			tagBox = null;
			tagFundoOpaco = null;
			Fechando = false;
			exec(fClose);
		}
	};

	var LoopResize = function(){
		intervaloINI = setInterval(function(){
			if(tagIMG && !Erro){
				if(tagIMG.clientWidth<29 || tagIMG.clientHeight<31 || (!Allie && (tagIMG.clientWidth<1 || tagIMG.clientHeight<1))){
					tagBox.style.width = "200px";
					tagBox.style.height = "200px";
				} else {
					Resize();
				}

				if(tagIMG.clientHeight>31 || Cache == true){
					clearInterval(intervaloINI); OpacIMG();
				}
			}
		},100);	
	};

	var fechaSelectsObjects = function(){
		selects = document.getElementsByTagName("select");
		for(var i=0;i<selects.length;i++){
			if(selects[i].style.display != "none"){
				selects[i].style.display = "none";
				OpenSelect[i] = selects[i];
			}
		}
	};

	var abreSelectsObjects = function(){
		for(var i=0;i<OpenSelect.length;i++){
			if(OpenSelect[i].style.display == "none"){
				OpenSelect[i].style.display = "inline";
			}
		}

		OpenSelect = Array();
	}

	var AbreBox = function(url){
		if(tagBox || tagFundoOpaco){
			return false;
		}

		tagFundoOpaco = document.createElement("div");
		tagBox = document.createElement("div");
		tagBotao = document.createElement("img");
		tagIMG = document.createElement("img");

		tagFundoOpaco.setAttribute("id","janelaFundo");
		tagBotao.setAttribute("id","closeB");

		addEvento(tagFundoOpaco,"click", function (){ CloseImg();  }, false);
		addEvento(tagBotao,"click", function (){ CloseImg();  }, false);
		addEvento(tagBox,"mouseout", function (){ tagBotao.style.display = "none"; }, false);
		addEvento(tagBox,"mouseover", function (){ tagBotao.style.display = "inline"; }, false);

		tagBox.setAttribute("id","janelaBox");

		tagIMG.setAttribute("src",url);
		tagIMG.src=url;

		tagBotao.setAttribute("src",imgclose);
		tagBotao.setAttribute("alt","Fechar X");

		corpo.appendChild(tagFundoOpaco);
		corpo.appendChild(tagBox);
		tagBox.appendChild(tagBotao);
		tagBox.appendChild(tagIMG);

		if(ie6){ if(tagBox){ tagBox.style.top = ((Html.scrollTop!=0)? Html.scrollTop:corpo.scrollTop)+"px"; } }

		Left = (largura/2)-(tagBox.clientWidth/2);
		Left = Left.toString().split(".");
		Left = Left[0];
		tagIMG.style.visibility = "visible";
		tagBox.style.left = Left+"px";
		tagBox.style.backgroundImage = "url("+imgload+")";
		tagFundoOpaco.style.left = "0px";/*BUG opera*/

		fechaSelectsObjects();
		SetaOpac();
		corpo.focus();

		if(ie6){
		window.onscroll = function (){ if(tagBox){ tagBox.style.top = ((Html.scrollTop!=0)? Html.scrollTop:corpo.scrollTop)+"px"; } };
		}

		tagIMG.onreadystatechange = function () {
			if(this.readyState=="complete" || this.readyState=="loaded"){
				Cache = true;
				Erro = false;
				OpacIMG();
				Resize();
			}

			if(this.readyState=="loading"){
				Cache = true;
			}

			if(this.readyState == "uninitialized"){
				Erro = true;
				Resize();
			}
		};

		LoopResize();
		addEvento(tagIMG,"load", function (){ Erro = false; OpacIMG(); Resize(); }, false);
		addEvento(tagIMG,"error", function (){ Erro = true; OpacIMG(); Resize(); }, false);
		exec(fOpen);
		return false;
	};

	this.addFunc = function(_tipo,_func){
		if(eval("f"+_tipo) && _tipo && typeof(_func)=='function'){ eval("f"+_tipo+"= "+_func); }
	};

	var exec = function(_tipo){
		try{
			if(typeof _tipo == 'function'){ _tipo(); }
		}catch(ee){
			alert('Ocorreu um erro nas funções personalidas:'+'\n'+ee);
		}
	};

	this.SetaTecla = function(numero){
		var TeclaC = function (evt){
	        	var oEvent = (window.event) ? window.event : evt;
			var nKeyCode =  oEvent.keyCode ? oEvent.keyCode : oEvent.which ? oEvent.which : void 0;
			if(nKeyCode==numero){ if(tagIMG && tagFundoOpaco){ exec(fTecla); } CloseImg(); }
		};

		if(Allie){ document.onkeydown = TeclaC; } else { document.onkeypress = TeclaC; }
	};

	var SetClickBugIE = function(s,Url){
		/*BUG IE6*/
		addEvento(s,"click", function(){ AbreBox(Url); return false; }, false);
		s.setAttribute("onclick","return false;");
		/*s.setAttribute("href","#");*/
	};

	var SetaLinks = function(){
		Links = corpo.getElementsByTagName("a");
		for(var i=0;i<Links.length;i++){
			if(Links[i].className=="imgs"){
				Url = Links[i].href;
				SetClickBugIE(Links[i],Url);
			}
		}
	};

	SetaLinks()/*__contruct*/
}

function BackLink(){
var tipo = "";
var Links = document.body.getElementsByTagName("a");
var NavBar = document.getElementById("navbar").getElementsByTagName("a");
var Url = "";
	for(var i=0;i<Links.length;i++){
		if(Links[i].className=="target"){
			Links[i].target="_blank";
			Links[i].setAttribute("target","_blank");
		}
	}

	var _Mbox = new Mbox();
	_Mbox.SetaTecla(27);
}

function openAjax() { 
var Ajax; 
try {Ajax = new XMLHttpRequest();
}catch(ee) { 
try {Ajax = new ActiveXObject(" Msxml2.XMLHTTP");
}catch(e) { 
try {Ajax = new ActiveXObject("Microsoft.XMLHTTP");
}catch(e) {Ajax = false; 
} 
} 
} 
return Ajax; 
} 

function extraiScript(texto){
var ini = 0;
	while (ini!=-1){
        	ini = texto.indexOf('<script', ini);
        	if (ini >=0){
			ini = texto.indexOf('>', ini) + 1;
			var fim = texto.indexOf('</scr'+'ipt>', ini);
			codigo = texto.substring(ini,fim);
			eval(codigo);
		}
	}
return true;
}

function CarregaPAG(arquivo) {
if(arquivo.indexOf("?pag=")>-1){
var PathURL = arquivo.split("?pag=");
var titulo = PathURL[1].split("&");
titulo = titulo[0];
PathURL = PathURL[1].replace(/amp;/g,"");
}else{
var PathURL = "home";
titulo = "home";
}

if(document.getElementById) {
var exibeResultado = document.getElementById("conteiner");
var Ajax = openAjax();
Ajax.open("GET", "openfile.php?url="+PathURL+"", true);
Ajax.onreadystatechange = function(){
if(Ajax.readyState == 1) {
exibeResultado.innerHTML = "<p><img class=\"load\" src=\"imagens/load.gif\" alt=\"loading\" /></p>";
}
if(Ajax.readyState == 4) {
if(Ajax.status == 200) {
var resultado = Ajax.responseText;
resultado = resultado.replace(/<a h/g,"<a onclick=\"return CarregaPAG(this.href);\" h");
exibeResultado.innerHTML = resultado;
document.title = (document.title.split(" - ")[0])+" - "+titulo;
extraiScript(resultado);
BackLink();
} else {
exibeResultado.innerHTML = "Erro: .";
}
}
}
Ajax.send(null);
}

return false;
}

function AjaxForm(form) {
var URL = form.action;
var Inputs = form.getElementsByTagName("*");
var var_POST= "&";

for(var i=0;i<Inputs.length;i++){
	if(Inputs[i].type!="submit" && Inputs[i].type!="reset" && Inputs[i].type!="button"){
		if(Inputs[i].name!=undefined){
			if(Inputs[i].value=="" && !(Inputs[i].name=="telefone")){
			  alert("Prencha corretamente o campo '"+Inputs[i].name+"'");
			  Inputs[i].focus();
			  return false;
			} else if(Inputs[i].name=="email"){
			    var re = new RegExp;
			    var re = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			    var arr = re.exec(Inputs[i].value);

			    if (arr == null) {
				alert("Prencha corretamente o campo '"+Inputs[i].name+"'");
				Inputs[i].focus();
				return false;
			    }
			}
			var_POST = var_POST+Inputs[i].name +"="+Inputs[i].value + "&";
		}
	}
}
var_POST = var_POST+"_=true";

if(document.getElementById) {
var Ajax = openAjax();
var Mail = document.getElementById("msgMail");
Ajax.open("POST", "openfile.php?url=contato", true);
Ajax.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
Ajax.setRequestHeader('enctype', 'multipart/form-data');
Ajax.setRequestHeader("Cache-Control", "no-store, no-cache, must-revalidate");
Ajax.setRequestHeader("Cache-Control", "post-check=0, pre-check=0");
Ajax.setRequestHeader("Pragma", "no-cache");

Ajax.onreadystatechange = function(){
if(Ajax.readyState == 1) {
Mail.innerHTML = "<img class=\"load\" src=\"imagens/load.gif\" alt=\"loading\" /><br />Enviando email...";
	for(var i=0;i<Inputs.length;i++){
	if(Inputs[i].type!="submit" && Inputs[i].type!="reset" && Inputs[i].type!="button"){
		if(Inputs[i].name!=undefined){
			Inputs[i].Disabled = true;
			Inputs[i].disabled = "disabled";
		}
	}
	}
}
if(Ajax.readyState == 4) {
if(Ajax.status == 200) {
var resultado = Ajax.responseText;
Mail.innerHTML = resultado;
for(var i=0;i<Inputs.length;i++){
	if(Inputs[i].type!="submit" && Inputs[i].type!="reset" && Inputs[i].type!="button"){
		if(Inputs[i].name!=undefined){
			if(resultado=="Mensagem enviada com sucesso."){
			Inputs[i].value = "";
			}
			Inputs[i].Disabled = false;
			Inputs[i].disabled = false;
		}
	}
}
} else {
alert("Erro");
}
}
}
Ajax.send(var_POST);
}
return false;
}