// JavaScript Document
//funcao para mostrar ou esconder um componente
/*$(document).ready(function(){
    
    $(this).filter("efeito")
      $("div:hidden:first").fadeIn("slow");

  });
FADE */
function togglebox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}

function sublinha(obj){
	obj.style.textDecoration = 'underline';	
	obj.style.cursor = "pointer";
	}
	
function dessublinha(obj){
	obj.style.textDecoration = "";	
	obj.style.cursor = "";
	}
	

function entrabtsecundario(obj){
	obj.style.cursor = "pointer";
	obj.style.fontWeight = "bold";	
	}
	
function saibtsecundario(obj){
	obj.style.cursor = "";
	obj.style.fontWeight = "normal";
	}	


function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}	


function disableselect(e)
{
   return false
}
function reEnable()
{
   return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar)
{
   document.onmousedown=disableselect
   document.onclick=reEnable
}

function desabilitar(){
	return false
}

document.oncontextmenu=desabilitar

function validateKey (evt)   
{   
    if (evt.keyCode == '17')   
    {   
        return false   
    }   
    return true   
} 

function getCookie(c_name)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start!=-1)
    	{ 
		    c_start=c_start + c_name.length+1; 
		    c_end=document.cookie.indexOf(";",c_start);
		    if (c_end==-1) c_end=document.cookie.length;
	    		return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}

function setCookie(c_name,value,expiredays)
{
	var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);
	document.cookie=c_name+ "=" +escape(value)+ ((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
}

