    // Impede Seleção
    document.onselectstart = function() { return false; }
     var oldcolor;
    
    function divover(id)
    {
   
    oldcolor=id.style.backgroundColor;
     id.style.backgroundColor='#ddb47b';
    }
    function divout(id)
    {
    id.style.backgroundColor=oldcolor;
    }
   function divsel(id)
   {
   id1=document.getElementById(id)
   id1.style.backgroundColor='#ddb47b';
   }
    
    // Menu Lateral
    
    if (document.getElementById){
    document.write('<style type="text/css">\n')
    document.write('.options{display: none;}\n')
    document.write('</style>\n')
    }
    
   function SwitchSubMenu(obj,id){ 
       	if(document.getElementById){
    	var el = document.getElementById(obj);
    	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
    		if(el.style.display != "block"){
    			for (var i=0; i<ar.length; i++){
    				if (ar[i].className=="options1")
    				ar[i].style.display = "none";
    			}
    			el.style.display = "block";
    			id.src='images/linkimg2.gif'
    		}else{
    			el.style.display = "none";
    			id.src='images/linkimg.gif'
    		}
    	}
    }
    
    function SwitchMenu(obj,id)
    { 

       if(document.getElementById)
       {
    	var el = document.getElementById(obj);
    	var ar = document.getElementById("masterdiv").getElementsByTagName("span");
    	var ardiv=document.getElementById("masterdiv").getElementsByTagName("div");
    	
    	   for(var i=0;i<ardiv.length;i++)
    	   {
    		   if (ardiv[i].className="menu1")
    	   		{
    	   	        if ( ardiv[i].getElementsByTagName("img")[0].id !='')	
    	   			ardiv[i].getElementsByTagName("img")[0].src='images/linkimg.gif'
    	   		   
	    	   }
    	   }
    	 
    	     if	(document.getElementById(obj).getElementsByTagName("span").length >0)
    	   		     document.getElementById(obj).getElementsByTagName("span")[0].style.display="none"
    	   
    		if(el.style.display != "block")
    		{
    			for (var i=0; i<ar.length; i++)
    			{
    				if (ar[i].className=="options")
    				 ar[i].style.display = "none";
    				
    			}
    			el.style.display = "block";
    			id.src='images/linkimg2.gif'
    		}
    		else
    		{
    			el.style.display = "none";
    			id.src='images/linkimg.gif'
    		}
    	}
    		
    }
    
   
   
  
  var newwindow = ''
function popitup(url) {
if (newwindow.location && !newwindow.closed) {
    newwindow.location.href = url; 
    newwindow.focus(); } 
else { 
    newwindow=window.open(url,'htmlname','width=404,height=316,resizable=1');} 
}


function tidy() {
if (newwindow.location && !newwindow.closed) { 
   newwindow.close(); } 
}

    
    
