
////////////////////Please leave this notice////////////////////
//
//	DropDown Menu 1.0
//	By Evgeny Novikov (java@aladin.ru)
//	http://java.skyteam.ru
//	It works only with IE5.0(++) and Netscape6.0(++)
//	Free to use!
//
////////////////////Last modified 2002-03-05////////////////////

//	Modify following four lines to customize your menu
var tdColor="#FFFFFF";		// menu item text color
var tdBgColor="#000080";	// menu item background color
var hlColor="#FFFFFF";		// highlight text color
var hlBgColor="#FF0000";	// highlight background color
//	After change, modify same values in your *.css file

var md=250;
var ti=-1;
var oTd=new Object;
oTd=null;

function doMenu(td){
	clearTimeout(ti);
	td.style.backgroundColor=hlBgColor;
	td.style.color=hlColor;
	var i;
	var sT="";
	var tda=new Array();
	tda=td.id.split("_");
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		for(i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			if(tdo[i]!=tda[i]){
				document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
				document.getElementById("td"+sT).style.color=tdColor;
				if(document.getElementById("tbl"+sT)!=null)
					document.getElementById("tbl"+sT).style.visibility="hidden";
			}
		}			
	}
	oTd=td;
	sT="tbl";
	for(i=1;i<tda.length;i++)
		sT+="_"+tda[i];
	if(document.getElementById(sT)!=null)
		document.getElementById(sT).style.visibility="visible";

}

function clearMenu(){
	if(oTd!=null){
		var tdo=new Array();
		tdo=oTd.id.split("_");
		var sT="";
		for(var i=1;i<tdo.length;i++){
			sT+="_"+tdo[i];
			document.getElementById("td"+sT).style.backgroundColor=tdBgColor;
			document.getElementById("td"+sT).style.color=tdColor;
			if(document.getElementById("tbl"+sT)!=null)
				document.getElementById("tbl"+sT).style.visibility="hidden";
		}
		oTd=null;			
	}
}

function runMenu(strURL){
	location.href=strURL;
}

var tt="";
var sT="";
var pT=new Array();
var tA=new Array();

function getCoord(st){
	tA=st.split("_");
	if(tA.length>2){
		tA=tA.slice(0,-1);
		tt=tA.join("_");
		return (document.getElementById("tbl"+tt).offsetTop+document.getElementById("td"+st).offsetTop+4)+"px;left:"+
			(document.getElementById("tbl"+tt).offsetLeft+document.getElementById("td"+st).offsetWidth-2)+"px\">";
	}
	return (document.getElementById("mainmenu").offsetTop+document.getElementById("td"+st).offsetHeight-2)+"px;left:"+
		  (document.getElementById("mainmenu").offsetLeft+document.getElementById("td"+st).offsetLeft+5)+"px\">";
}

var sH="<table class=\"menu\" id=\"mainmenu\" cellspacing=\"0\"><tr>";
var p=0;
var j=0;
while(eval("typeof(td_"+ ++j +")!=\"undefined\"")){
	sH+="<td id=\"td_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
	sH+=(eval("typeof(url_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url_"+j)+"')\">":">";
	sH+=eval("td_"+j)+"</td>";
	if (eval("typeof(td_"+j+"_1)!=\"undefined\""))
		pT[p++]="_"+j;
}
sH+="</tr></table>";
document.write(sH);
for(var q=0;typeof(pT[q])!="undefined";q++){
	sT=pT[q];
	sH="";
	j=0;
	sH+="<table class=\"menu\" id=\"tbl"+sT+"\" cellspacing=\"0\" style=\"top:"+getCoord(sT);
	while (eval("typeof(td"+sT+"_"+ ++j +")!=\"undefined\"")){
		sH+="<tr><td id=\"td"+sT+"_"+j+"\" onmouseover=\"doMenu(this)\" onmouseout=\"ti=setTimeout('clearMenu()',md)\"";
		sH+=(eval("typeof(url"+sT+"_"+j+")!=\"undefined\""))?" onclick=\"runMenu('"+eval("url"+sT+"_"+j)+"')\">":">";
		sH+=eval("td"+sT+"_"+j)+"</td></tr>";
		if (eval("typeof(td"+sT+"_"+j+"_1)!=\"undefined\""))
			pT[p++]=sT+"_"+j;
	}
	sH+="</table>";
	document.write(sH);
}
document.getElementById("mainmenu").style.visibility="visible";

<!-- Begin
function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}
//  End -->

// Conta caracteres
function ContaCaracteres(){
   intCaracteres = 400 - document.mural.comentario.value.length;
   if (intCaracteres > 0){
      document.mural.caracteres.value = intCaracteres;
      return true;
   }
   else {
      document.mural.caracteres.value = 0;
      document.mural.comentario.value = document.mural.comentario.value.substr(0,400)
      return false;
   }
}

// Imprime os emoticons na tela
function emoticon(text) {
	var txtarea = document.mural.comentario;
	text = ' ' + text + ' ';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		txtarea.focus();
	}
	else {
		txtarea.value  += text;
		txtarea.focus();
	}
}

// Continuação
function over(src,clrover) {
    if (!src.contains(event.fromElement)) {	src.style.cursor = 'default'; src.bgColor = clrover; }
}
function out(src,clrIn) {
	if (!src.contains(event.toElement)) { src.style.cursor = 'default';	src.bgColor = clrIn; }
}

// Abre a Ajuda
function abrir(URL) {
    var altura   = 335;
    var largura  = 260;
    var esquerda = 50;
    var topo     = 100;
    window.open(URL,'abrir', 'width='+largura+', height='+altura+', top='+topo+', left='+esquerda+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=auto, resizable=no, fullscreen=no');
}

// Abre o Form
function abrir_form(URL) {
    var altura   = 390;
    var largura  = 516;
    var esquerda = 50;
    var topo     = 100;
    window.open(URL,'abrir_form', 'width='+largura+', height='+altura+', top='+topo+', left='+esquerda+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=auto, resizable=no, fullscreen=no');
}

// Função proteção contra flood
function flood() {
    alert ('Você já enviou uma mensagem, por favor tente mais tarde!!');
}

function ContaCaracteres(){
   intCaracteres = 400 - document.mural.comentario.value.length;
   if (intCaracteres > 0){
      document.mural.caracteres.value = intCaracteres;
      return true;
   }
   else {
      document.mural.caracteres.value = 0;
      document.mural.comentario.value = document.mural.comentario.value.substr(0,400)
      return false;
   }
}

<!-- Begin
function CaricaFoto(img){
  foto1= new Image();
  foto1.src=(img);
  Controlla(img);
}
function Controlla(img){
  if((foto1.width!=0)&&(foto1.height!=0)){
    viewFoto(img);
  }
  else{
    funzione="Controlla('"+img+"')";
    intervallo=setTimeout(funzione,20);
  }
}
function viewFoto(img){
  largh=foto1.width+20;
  altez=foto1.height+20;
  stringa="width="+largh+",height="+altez;
  finestra=window.open(img,"",stringa);
}
//  End -->


// var imagem="../voador.gif"
// if (document.layers)
// {document.write("<LAYER NAME='animacao' LEFT=10 TOP=10><img  src='"+imagem+"' ></LAYER>")}
// else if (document.all){document.write("<div id='animacao' style='position:absolute;top:10px;left:10px;width:17px;height:22px;z-index:50'><img  src='"+imagem+"'></div>")}

// conta=-1;
// move=1;

// function curva(){
// abc=new Array(0,1,1,1,2,3,4,0,6,-1,-1,-1,-2,-3,-4,0,-6)
// for (i=0; i < abc.length; i++)
// {var C=Math.round(Math.random()*[i])}
// iniciar=abc[C];
// setTimeout('curva()',1900);
// return iniciar;
// }
// ypos=10;
// xpos=10;
// movimento = 60;

// function moveR(){
// caminho=movimento+=iniciar;
// y = 4*Math.sin(caminho*Math.PI/180);
// x = 6*Math.cos(caminho*Math.PI/180);
// vif (document.layers){
//    ypos+=y;
//    xpos+=x;
//    document.animacao.top=ypos+window.pageYOffset;
//    document.animacao.left=xpos+window.pageXOffset;
// }
// else if (document.all){
//      ypos+=y;
//      xpos+=x;
//      document.all.animacao.style.top=ypos+document.body.scrollTop;
//      document.all.animacao.style.left=xpos+document.body.scrollLeft;
// }
// T=setTimeout('moveR()',50);
// }

// function edges(){
// if (document.layers){
// if (document.animacao.left >= window.innerWidth-40+window.pageXOffset)movimento=Math.round(Math.random()*45+157.5);
// if (document.animacao.top >= window.innerHeight-30+window.pageYOffset)movimento=Math.round(Math.random()*45-112.5);
// if (document.animacao.top <= 2+window.pageYOffset) movimento = Math.round(Math.random()*45+67.5);//OK!
// if (document.animacao.left <= 2+window.pageXOffset) movimento = Math.round(Math.random()*45-22.5);//OK!
// }
// else if (document.all)
// {
// if (document.all.animacao.style.pixelLeft >= document.body.offsetWidth-45+document.body.scrollLeft)movimento=Math.round(Math.random()*45+157.5);
// if (document.all.animacao.style.pixelTop >= document.body.offsetHeight-35+document.body.scrollTop)movimento=Math.round(Math.random()*45-112.5);
// if (document.all.animacao.style.pixelTop <= 2+document.body.scrollTop) movimento = Math.round(Math.random()*45+67.5);//OK!
// if (document.all.animacao.style.pixelLeft <= 2+document.body.scrollLeft) movimento = Math.round(Math.random()*45-22.5);//OK!
// }
// xis=setTimeout('edges()',100);
// }

// function efeito(){
// curva();
// moveR();// onUnload="opener.gO()"
// edges();
// }

// if (document.all||document.layers)
//
// efeito()

var brow  = navigator.userAgent.toLowerCase();
var mup  = parseInt(navigator.appVersion);
var mdow = parseFloat(navigator.appVersion);
var nav_ie = ((brow.indexOf("msie") != -1) && (brow.indexOf("opera") == -1));
var nav_ie4up = (nav_ie && (mup >= 4) && (mup <= 6));
var ns4  = (document.layers)? true:false;
var ie4  = (document.all)? true:false;
var url   = document.location.href;
var win_height = 180;
var olha  = "[Olhadinha]";
var fecha  = "[Fechar]";

function olhar(url){
var jal = document.all['if'+url.id];

if(url.innerText == olha){
if(jal){
with(jal.style){
height = win_height;
visibility = 'visible';
}
jal.src = url.href;
}
else{
url.insertAdjacentHTML('AfterEnd', '<IFRAME id=if'+url.id+' width=100% frameborder=0 border=0 height='+win_height+' SRC=\"'+url.href+'\" ></IFRAME>');
}
url.innerText = fecha;
}
else{
if(jal){
with(jal.style){
visibility = 'hidden';
height = 0;
}
jal.src = 'about:blank';
url.innerText = olha;
}
}
}


