//<!-- Copyright (C) 2000 Dive Tech -->//<!-- JavaScripts -->//-----------------------------////  Funcoes sobre imagem//-----------------------------//pics = new Array();objCount = 0;n_img = 14;param = new Array (n_img);// function preload(nome=string)// ex: nome("imagem");function preload(nome, lugar, caminho) {  	if (is.js11) {		pics[objCount] = new Array(n_img + 1);		if ((lugar == 0) || (lugar == null)) lugar = "";		if ((caminho == 0) || (caminho == null)) caminho = "";		pics[objCount][0] = new Array(nome, lugar, 1, 1);		for (i = 0; (i < n_img) && (i < param.length); i++) {			pics[objCount][i + 1] = new Image();			pics[objCount][i + 1].src = caminho + param[i];		}		objCount++;	}}// function change(nome=[string], n=[integer])// ex: change("imagem", 1);function change(nome, n, alt) {	if (is.js11) {		if (0 < n < (n_img + 1)) {			for (i = 0; i < objCount; i++) {				change_image = document.images[pics[i][0][0]];				if ((pics[i][0][1] != "") && is.ns) change_image = eval("document." + pics[i][0][1] + ".document." + pics[i][0][0]);				if (((alt == null) || (alt == "")) && (alt != false)) {alt = true;}				if (change_image != null) {					if (nome == pics[i][0][0]) {						if (n < 0) {							if (n < -9) {								k = ((parseInt(n % 10) < 0)?(parseInt(n % 10)*-1):(parseInt(n % 10))) + 2;								if (k <= pics[i][0].length) n = pics[i][0][k]; else n = pics[i][0][pics[i][0].length];							} else {								for (n = 1; n < pics[i].length; n++) {									if (pics[i][n].src == document.images[pics[i][0][0]].src) break;								}							}						}						for (k = 3; k < pics[0][0].length; k++) pics[i][0][k] = pics[i][0][k-1];						pics[i][0][2] = n;						change_image.src = pics[i][n].src;						if (alt) {window.status = (n>1)?(change_image.alt):("");}					}				}			}		}	}}// function change_all(n=[integer])// ex: change_all(1);function change_all(n) {	if (is.js11) {		for (j = 0; j < pics.length; j++) {			nome = pics[j][0][0];			change(nome, n);		}	}}//Colocar no HTML/*<SCRIPT LANGUAGE="JavaScript"><!--	//      Normal, Mouse over, Click; Name	param = Array("seta1.gif", "seta2.gif", "seta1.gif"); preload("seta");//--></SCRIPT><A HREF="#" onMouseOver="change('seta2', 2)" onMouseOut="change('seta2', 1); change('seta2', 3)" onMouseDown="change('seta2', 3)" onMouseUp="change('seta2', -11)"><IMG NAME="seta2" SRC="seta1.gif"  BORDER="0" ALT="Java 2"></A>*///-----------------------------//// function iniciar_imagens()// ex: iniciar_imagens();function iniciar_imagens() {	nome = "imagemanimada";	pi = 2;	imagens = new Array(imagens_src.length);	for (n = 0; n < imagens_src.length; n++) {		imagens[n] = new Array(imagens_src[n].length - pi);		imagens_src[n][pi - 1] = base_src + imagens_src[n][pi - 1];		for (i = 0; i < (imagens_src[n].length - pi); i++) {			imagens_src[n][i + pi] = base_src + imagens_src[n][i + pi];			imagens[n][i] = new Image();			imagens[n][i].src = imagens_src[n][i + pi];		}	}	n_at = -1;}// function mudar_img(numero=[integer], opcao=[integer])// ex: mudar_img(0, 0);function mudar_img(n, op) {	obj = eval('document.' + nome + n);	obj.src = imagens[n][op].src;	window.status = (op!=2)?imagens_src[n][0]:"";}function escrever_imagem(n, w, h) {	document.writeln('<A HREF="' + imagens_src[n][1] + '" onMouseOver="mudar_img(' + n + ', 1)" onMouseOut="mudar_img(' + n + ', 2)" onMouseDown="mudar_img(' + n + ', 3)" onMouseUp="mudar_img(' + n + ', 4)"><IMG NAME="' + nome + n + '" SRC="' + imagens[n][0].src + '"' + ((isNaN(w))?(''):(' WIDTH="' + w + '"')) + ((isNaN(h))?(''):(' HEIGHT="' + h + '"')) + ' BORDER="0" ALT="' + imagens_src[n][0] + '"></A>');}//Colocar no HTML/*<SCRIPT LANGUAGE="JavaScript1.1"><!--	base_src = ""; //"file:////C|";	imagens_src = new Array(	//	new Arary(Alt, HREF, Normal, OnMouseOver, OnMouseOut, OnMouseDown, OnMouseUp)		new Array("Java 1", "#", "seta1.gif", "seta2.gif", "seta1.gif", "seta2.gif", "seta2.gif")	);	iniciar_imagens();//--></SCRIPT><SCRIPT LANGUAGE="JavaScript">if (n_at + 1 < imagens_src.length) {n_at++; escrever_imagem(n_at);}</SCRIPT>*///-----------------------------////  Funcoes sobre calculos//-----------------------------//// function toHex(numero=[integer])// ex: toHex(65);  *Returns '41'function toHex(num) {	a = parseInt(num / 16).toString();	c = num % 16;	if (c > 9) {		if (c == 10) {b = "A";}		if (c == 11) {b = "B";}		if (c == 12) {b = "C";}		if (c == 13) {b = "D";}		if (c == 14) {b = "E";}		if (c == 15) {b = "F";}	} else {b = (num % 16).toString();}	return a + b}function seu_micro() {	document.write("JavaScript is enabled and working.");	if (navigator.plugins) {		numPlugins = navigator.plugins.length;	if (numPlugins > 0) document.write("<P><B>The following plug-ins are installed on your system:</B></P>");		for (i = 0; i < numPlugins; i++) {			plugin = navigator.plugins[i];			document.writeln('<B>' + plugin.name + ' - </B>' + plugin.description + " - ");			document.writeln(plugin.filename.substring(plugin.filename.lastIndexOf("\\")+1,plugin.filename.length)+ '<BR>');		}	}	if (top.screen) {		document.writeln("<P><B>JavaScript monitor information:</B></P>");		if (screen.width != null) document.writeln("Screen resolution is " + screen.width + 'x' + screen.height + "<BR>");		if (screen.availHeight != null) document.writeln("Screen available height is " + screen.availHeight + "<BR>");		if (screen.availWidth != null) document.writeln("Screen available width is " + screen.availWidth + "<BR>");		if (screen.pixelDepth != null) document.writeln("Screen pixel depth is " + screen.pixelDepth + "<BR>");		if (screen.colorDepth != null) document.writeln("Screen color depth is " + screen.colorDepth + "<BR>");	}	if (history.length != null) document.writeln("<P>You have vistited this many web pages this session in this window: " + history.length + "<BR>");	today = new Date();	if (today != null) document.writeln("The date/time on your computer and time zone is: " + today + "<BR>");	if (today.toLocaleString() != null) document.writeln("Time/date in your locale format: " + today.toLocaleString() + "<BR></P>");}//-----------------------------////  Variaveis pre-definidas//-----------------------------//function Is() {    var agent  = navigator.userAgent.toLowerCase();    this.major = parseInt(navigator.appVersion);    this.minor = parseFloat(navigator.appVersion);    this.ns    = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));    this.ns2   = (this.ns && (this.major == 2));    this.ns3   = (this.ns && (this.major == 3));    this.ns4b  = (this.ns && (this.minor < 4.04));    this.ns4   = (this.ns && (this.major >= 4));    this.ie    = (agent.indexOf("msie") != -1);    this.ie3   = (this.ie && (this.major == 2));    this.ie4   = (this.ie && (this.major >= 4));    this.op3   = (agent.indexOf("opera") != -1);    this.win   = (agent.indexOf("win")!=-1);    this.mac   = (agent.indexOf("mac")!=-1);    this.unix  = (agent.indexOf("x11")!=-1);	this.java  = (navigator.javaEnabled());	this.js11  = (navigator.javaEnabled() != null && navigator.javaEnabled());}var is = new Is();var def_window_avail_width = 700;var def_window_avail_height = 400;var def_window_width = 800 - 10;var def_window_height = 600 - 20;var def_screen_avail_width = 800 - 10;var def_screen_avail_height = 600 - 10;var def_screen_width = 800;var def_screen_height = 600;function _size(op) {	if (op == 'window') {		this.avail_width = def_window_avail_width;		this.avail_height = def_window_avail_height;		this.width = def_window_width;		this.height = def_window_height;		if (is.ns) {			this.avail_width = window.innerWidth;			this.avail_height = window.innerHeight;			this.width = window.width;			this.height = window.height;		} else if (is.ie) {			this.avail_width = (document.body)?(document.body.clientWidth):(screen.availWidth);			this.avail_height = (document.body)?(document.body.clientHeight):(screen.availHeight);			this.width = screen.width;			this.height = screen.height;		} else {			if (screen) {				if (screen.availWidth) {					this.avail_width = screen.availWidth;					this.avail_height = screen.availHeight;				}				if (screen.width) {					this.width = screen.width;					this.height = screen.height;				}			}		}	}	if (op == 'screen') {		this.avail_width = def_screen_avail_width;		this.avail_height = def_screen_avail_height;		this.width = def_screen_width;		this.height = def_screen_height;		if ((is.ns) || (is.ie)) {			this.avail_width = screen.availWidth;			this.avail_height = screen.availHeight;			this.width = screen.width;			this.height = screen.height;			this.pixelDepth = screen.pixelDepth;			this.colorDepth = screen.colorDepth;		} else {			if (screen) {				if (screen.availWidth) {					this.avail_width = screen.availWidth;					this.avail_height = screen.availHeight;				}				if (screen.width) {					this.width = window.width;					this.height = window.height;				}			}		}	}}var _window = new _size('window');var _screen = new _size('screen');