
	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);
	}
	
	
	function incflash(arquivo, largura, altura) {

		document.writeln('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + largura + '" height="' + altura + '">');
		document.writeln('  <param name="movie" value="' + arquivo + '">');
		document.writeln('  <param name="quality" value="high">');
		document.writeln('  <param name="allowScriptAccess" value="sameDomain" />');
		document.writeln('  <param name="wmode" value="transparent" />');
		document.writeln('  <param name="menu" value="false" />');
		document.writeln('  <param name="bgcolor" value="#ffffff" />');
		document.writeln('  <embed src="' + arquivo + '" quality="high" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="' + largura + '" height="' + altura + '"></embed>');
		document.writeln('</object>');

	}
	
	
