// JavaScript Document
function curr(url){
	url="curriculos/"+url+".html";
	window.open(url,'curr','width=530px,height=400px,scrollbars=yes,menubar=no,resizable=no,titlebar=no');
}
function sendlink(Caminho){
  window.open('form_envia.asp'+'?Caminho='+Caminho,'sendLink','width=250px,height=150px,scrollbars=no,menubar=no,resizable=no,titlebar=no');
}
function abrir(url){
	window.open(url);
}
function setCookie(name, value, expires, path, domain, secure) {
	  var curCookie = name + "=" + escape(value) +
		  ((expires) ? "; expires=" + expires.toGMTString() : "") +
		  ((path) ? "; path=" + path : "") +
		  ((domain) ? "; domain=" + domain : "") +
		  ((secure) ? "; secure" : "");
	  document.cookie = curCookie;
	}

function getCookie(name) {
	  var dc = document.cookie;
	  var prefix = name + "=";
	  var begin = dc.indexOf("; " + prefix);
	  if (begin == -1) {
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	  } else
		begin += 2;
	  var end = document.cookie.indexOf(";", begin);
	  if (end == -1)
		end = dc.length;
	  return unescape(dc.substring(begin + prefix.length, end));
	}

function deleteCookie(name, path, domain) {
	  if (getCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	  }
	}

function fixDate(date) {
	  var base = new Date(0);
	  var skew = base.getTime();
	  if (skew > 0)
		date.setTime(date.getTime() - skew);
	}

var now = new Date();
fixDate(now);

now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
var visits = getCookie("counter");
	if (!visits) {
	  visits = 1; 
	} else {
	   visits = parseInt(visits) + 1;
	   visits = visits * 3;
	}
setCookie("counter", visits, now);

/*function post()
    	{
    		if (document.form.namefrom.value == "")
    		{
	    		alert("Preencha o campo 'De'.")
	    		document.form.namefrom.focus();
	    		return false
	    	}
	    	
	    	if (document.form.nameto.value == "")
    		{
	    		alert("Preencha o campo 'Para'.")
	    		document.form.nameto.focus();
	    		return false
	    	}

				if (document.form.emailfrom.value == "")
    		{
	    		alert("Preencha o campo 'Seu E-mail'.")
	    		document.form.emailfrom.focus();
	    		return false
	    	}
	    	
	    	if (document.form.emailfrom.value!=""){
		        if (document.form.emailfrom.value.indexOf("@")==-1 || document.form.emailfrom.value.indexOf(".")==-1 || document.form.emailfrom.value.indexOf(" ")!=-1 || document.form.emailfrom.value.length<6) {
		                alert("Seu E-mail está incorreto! Por favor, verifique se digitou o seu email corretamente.");
		                document.form.emailfrom.focus();
										return false;
		        }
		 		 }

	    	if (document.form.email.value == "")
    		{
	    		alert("Preencha o campo 'E-mail de Destino'.")
	    		document.form.email.focus();
	    		return false
	    	}
	    	
	    	if (document.form.email.value!=""){
		        if (document.form.email.value.indexOf("@")==-1 || document.form.email.value.indexOf(".")==-1 || document.form.email.value.indexOf("? ")!=-1 || document.form.email.value.length<6) {
		                alert("E-mail de Destino está incorreto! Por favor, verifique se digitou o seu email corretamente.");
		                document.form.email.focus();
										return false;
		        }
		 		 }

*/