function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print()
}




function escreverdata()
{
  var data = new Date();
  var dianumsem = data.getDay() + 1;
  if (dianumsem == 1) diasem = "Domingo";
  if (dianumsem == 2) diasem = "Segunda-feira";
  if (dianumsem == 3) diasem = "Terça-feira";
  if (dianumsem == 4) diasem = "Quarta-feira";
  if (dianumsem == 5) diasem = "Quinta-feira";
  if (dianumsem == 6) diasem = "Sexta-feira";
  if (dianumsem == 7) diasem = "Sábado";
  var mesnum = data.getMonth() + 1;
  if (mesnum == 1) mes = "Janeiro";
  if (mesnum == 2) mes = "Fevereiro";
  if (mesnum == 3) mes = "Março";
  if (mesnum == 4) mes = "Abril";
  if (mesnum == 5) mes = "Maio";
  if (mesnum == 6) mes = "Junho";
  if (mesnum == 7) mes = "Julho";
  if (mesnum == 8) mes = "Agosto";
  if (mesnum == 9) mes = "Setembro";
  if (mesnum == 10) mes = "Outubro";
  if (mesnum == 11) mes = "Novembro";
  if (mesnum == 12) mes = "Dezembro";
  var diames = data.getDate();
  var ano = data.getYear();
  var hoje = (diasem + ", " + diames + " de " + mes + " de " + ano);

  document.write(hoje);
}


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}


function mostraNews(id) {
	window.open('enviadas.php?id='+id, 'News_Enviadas', 'width=610,height=500,scrollbars=yes,status=no,top=0,left=0');
	return true;
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function mOvr(src) {
 if (!src.contains(event.fromElement)) {
	 src.style.cursor = 'hand';
	 src.bgColor = "#22211f";
	}
 }
 function mOut(src) {
	if (!src.contains(event.toElement)) {
	 src.style.cursor = 'Default';
	 src.bgColor = "#c40000";
	}
 }
 
 function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function AbrePagina(Foto, tamx, tamy)
{
window.open(Foto,"","resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=yes,width=" + tamx + ",height=" + tamy)
}

function NewWindow(mypage, myname, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function set_preferences(){
//  ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''		
//   you can change the propertes given below
      var sl_news_dir          = "up" ;
      var sl_news_width        = "210px" ;
      var sl_news_height    	 = "150px" ;
      var sl_news_brd_color    = "#FFFFFF" ;
      var sl_news_brd_style    = "solid" ;
      var sl_news_scrll_amount = 1 ; //Specifies the number of pixels the text scrolls between each subsequent drawing of the sliding news
      var sl_news_scrll_delay  = 60 ;//Specifies the speed of the sliding news scroll, in milliseconds 	
      var sl_news_scrll_beh    = "slide" ;											
      var ptImage              = "" ; //path of image directory if needed
      var sl_news_up_down      = "url(" + ptImage + "up.gif)" ;
      var sl_news_on_off       = "url(" + ptImage + "online.gif)" ;			

//Do not exceed the following line
//  ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''		
      var  objMar = document.all("marx") ;
      objMar.direction      = sl_news_dir ;
      objMar.style.width    = sl_news_width  ;
      objMar.style.height   = sl_news_height ;
      objMar.style.BEHAVIOR = sl_news_scrll_beh ;
      objMar.scrollDelay    = sl_news_scrll_delay ;	
      objMar.scrollAmount   = sl_news_scrll_amount ;								
			objMar.style.borderColor = sl_news_brd_color ;
      objMar.style.borderStyle = sl_news_brd_style ;
      document.all('up_down').style.backgroundImage = sl_news_up_down;
      document.all('btnstat').style.backgroundImage =	sl_news_on_off;
		}
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//  '' Name        : up_down(objMar)  
//	'' Inputs      : objMar; marquee object
//  '' Description : change the sliding news direction (up or down)
//	'' Owner       : SEYKAY(seyit_rock@hotmail.com)
//	'' DATE        : 10.10.2001 
//	'' Modified By : 
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
		 
	 function up_down(objMar){
  	 if ((document.all('up_down').style.backgroundImage) == "url(up.gif)") {
	      document.all('up_down').style.backgroundImage = "url(down.gif)"
	 			objMar.direction = "down";
     }else{
        document.all('up_down').style.backgroundImage = "url(up.gif)"
	 			objMar.direction = "up";
     } 
   }
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//  '' Name        : chgstat
//	'' Inputs      : N/A
//  '' Description : changes the status of the sliding news (on or off)
//	'' Owner       : SEYKAY (seyit_rock@hotmail.com)
//	'' DATE        : 10.10.2001 
//	'' Modified By : 
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
//  '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
   function chgStat(){
     if ((document.all('btnstat').style.backgroundImage)== "url(offline.gif)") {
	      document.all('btnstat').style.backgroundImage = "url(online.gif)"
	      document.all('marx').start()
     }else{
        document.all('btnstat').style.backgroundImage = "url(offline.gif)"
	      document.all('marx').stop()
	   } 
  }

//-->