function acende(objeto)
{
   objeto.style.backgroundColor = '#CFCFCC';
}

function apaga(objeto)
{
	objeto.style.backgroundColor = '#E2E2E2';
}

function abre_janela(URL,largura,altura,parametro,p)
{ 
  var win1, wint, winprops;
  winl = ((screen.width - largura)/2);
  var wint = (screen.height - altura)/2;
  winprops = 'height='+altura+',width='+largura+',top='+wint+',left='+winl;
  winprops2 = '&height='+altura+'&width='+largura+'&top='+wint+'&left='+winl;
  if (parametro == '*')
  {
     win = window.open(URL+winprops2, '', winprops+','+p)
  }
  else
  {
    win =  window.open(URL, '', winprops)
  }
  if (parseInt(navigator.appVersion) >= 4)
  { 
     win.window.focus(); 
  }
}

function seleciona_checkbox(formulario,procurar,valor)
{
    j = 0;
	tmp = '';
	tmp2 = '';
    for (i=0; i < formulario.elements.length; i++)
    {
		if (formulario.elements[i].type == 'checkbox')
        {
		   tmp = formulario.elements[i].name;
		   if (tmp.substring(0,procurar.length) == procurar)
           {
			    if (valor)
				{
				    formulario.elements[i].checked = true;
				}
				else
				{
				    formulario.elements[i].checked = false;
				}
			 }
        }
     }
}

function procura_checkbox(formulario,procurar,zera)
{
    j = 0;
	tmp = '';
	tmp2 = '';
    for (i=0; i < formulario.elements.length; i++)
    {
		if (formulario.elements[i].type == 'checkbox')
        {
           if (zera == '*')
		   {
		      formulario.elements[i].checked = false;
		   }
		   else
		   {
              tmp = formulario.elements[i].value;
		      if (tmp == procurar)
              {
			      formulario.elements[i].checked = true;
			  	  i = formulario.elements.lenght;
		      }
		   }
        }
     }
}



function retorna_valores_checkbox(formulario,procurar)
{
    j = 0;
	tmp = '';
    k = '';
    for (i=0; i < formulario.elements.length; i++)
    {
		if (formulario.elements[i].type == 'checkbox')
        {
		   tmp = formulario.elements[i].name;
		   if ((tmp.substring(0,procurar.length) == procurar) && (formulario.elements[i].checked))
           {
              k = k + form1.elements[i].value+'|';
		   }
        }
     }
     return k;
}

/*
function informacoes_rotativas()
{
//slider's width
var swidth=350

//slider's height
var sheight=200

//slider's speed
var sspeed=2

//messages: change to your own; use as many as you'd like; set up Hyperlinks to URLs as you normally do: <a target=... href="... URL ...">..message..</a>
var singletext=new Array()
singletext[0]='<div align="center"><font face=Arial size=3 color="white"><b>Multiple Scroller</b><br>Size, Speed, Style <b>adjustable.</b><br>This message may use <b><u>Hyperlinks</u></b></div></FONT>'
singletext[1]='<div align="center"><font face=Arial size=3 color="white">Use this for announcements<br>or even <font color="#FFFF00"><b><i>images</i></b><p><img src="/img/1.gif" width="100" height="39" border="0"></font></div>'
singletext[2]='<div align="center"><font face=Arial size=3 color="white">This is great!<br>You can use <i>all</i> the <b>basic</b><br><b>HTML codes</b></font></div>'
singletext[3]='<div align="center"><font face=Arial size=3 color="white"><b>JavaScript Source</b><br>A "cut & paste" JavaScript library<br>with <font color="red"><b>tons</b></font> of free JavaScripts!<p><img src="/img/1.gif" width="100" height="39" border="0"></font></div>'
if (singletext.length>1)
i=1
else
i=0
function start(){
if (document.all){
ieslider1.style.top=sheight
iemarquee(ieslider1)
}
else if (document.layers){
document.ns4slider.document.ns4slider1.top=sheight
document.ns4slider.document.ns4slider1.visibility='show'
ns4marquee(document.ns4slider.document.ns4slider1)
}
else if (document.getElementById&&!document.all){
document.getElementById('ns6slider1').style.top=sheight
ns6marquee(document.getElementById('ns6slider1'))
}
}
function iemarquee(whichdiv){
iediv=eval(whichdiv)
if (iediv.style.pixelTop>0&&iediv.style.pixelTop<=sspeed){
iediv.style.pixelTop=0
setTimeout("iemarquee(iediv)",100)
}
if (iediv.style.pixelTop>=sheight*-1){
iediv.style.pixelTop-=sspeed
setTimeout("iemarquee(iediv)",100)
}
else{
iediv.style.pixelTop=sheight
iediv.innerHTML=singletext[i]
if (i==singletext.length-1)
i=0
else
i++
}
}
function ns4marquee(whichlayer){
ns4layer=eval(whichlayer)
if (ns4layer.top>0&&ns4layer.top<=sspeed){
ns4layer.top=0
setTimeout("ns4marquee(ns4layer)",100)
}
if (ns4layer.top>=sheight*-1){
ns4layer.top-=sspeed
setTimeout("ns4marquee(ns4layer)",100)
}
else{
ns4layer.top=sheight
ns4layer.document.write(singletext[i])
ns4layer.document.close()
if (i==singletext.length-1)
i=0
else
i++
}
}
function ns6marquee(whichdiv){
ns6div=eval(whichdiv)
if (parseInt(ns6div.style.top)>0&&parseInt(ns6div.style.top)<=sspeed){
ns6div.style.top=0
setTimeout("ns6marquee(ns6div)",100)
}
if (parseInt(ns6div.style.top)>=sheight*-1){
ns6div.style.top=parseInt(ns6div.style.top)-sspeed
setTimeout("ns6marquee(ns6div)",100)
}
else{
ns6div.style.top=sheight
ns6div.innerHTML=singletext[i]
if (i==singletext.length-1)
i=0
else
i++
}
}
//  End -->
</script>

</HEAD>

<!-- STEP TWO: Insert the onLoad event handler into your BODY tag  -->

<BODY onLoad="start()">

<!-- STEP THREE: Copy this code into the BODY of your HTML document  -->

<div align="center">
<span style="borderWidth:1; borderColor:red; width:350; height:72; background:navy">
<ilayer id="ns4slider" width="&{swidth};" height="&{sheight};">
<layer id="ns4slider1" height="&{sheight};" onmouseover="sspeed=0;" onmouseout="sspeed=2">
<script language="JavaScript">
if (document.layers)
document.write(singletext[0])
</script>
</layer></ilayer>
<script language="JavaScript">
if (document.all){
document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1 solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')
document.writeln('<div id="ieslider1" style="position:relative;width:'+swidth+';">')
document.write(singletext[0])
document.writeln('</div></div>')
}
if(document.getElementById&&!document.all){
document.writeln('<div style="position:relative;overflow:hidden;width:'+swidth+';height:'+sheight+';clip:rect(0 '+swidth+' '+sheight+' 0);border:1px solid red;" onmouseover="sspeed=0;" onmouseout="sspeed=2">')
document.writeln('<div id="ns6slider1" style="position:relative;width:'+swidth+';">')
document.write(singletext[0])
document.writeln('</div></div>')
}
</script>
}
*/


