<!--

var boxs = new Array();
boxs[0] = 'box1';
boxs[1] = 'box2';
boxs[2] = 'box3';
boxs[3] = 'box4';
boxs[4] = 'box8';
boxs[5] = 'box_menu_2_sub';
boxs[6] = 'box_menu_3_sub';
boxs[7] = 'box_menu_4_sub';
boxs[8] = 'box_menu_5_sub';
boxs[9] = 'box_menu_6_sub';
boxs[10] = 'box_menu_7_sub';
boxs[11] = 'box_menu_8_sub';
boxs[12] = 'box_menu_9_sub';
boxs[13] = 'box_menu_10_sub';
boxs[14] = 'box_menu_11_sub';
boxs[15] = 'box_menu_12_sub';
boxs[16] = 'box_menu_14_sub';
boxs[17] = 'box_menu_15_sub';
boxs[18] = 'box_menu_16_sub';
boxs[19] = 'box_menu_17_sub';
boxs[20] = 'box_menu_18_sub';
boxs[21] = 'box_menu_19_sub';
boxs[22] = 'box_menu_20_sub';
boxs[23] = 'box_menu_21_sub';
//boxs[3] = 'box_super_saver';
//boxs[4] = 'box_locacao';

function hideAllBox() {
	for (i = 0; i < boxs.length; i++) 
		document.getElementById(boxs[i]).style.display = 'none';
}

function showBox(id_box,left,top) {
	var box = document.getElementById(id_box);
	
	box.style.left =  left + 'px';
	box.style.top = top + 'px';
	
	box.style.display = '';
}

function hideBox(id_box) {
	var box = document.getElementById(id_box);
	box.style.display = 'none';
}

function changeClass(obj) {
	if (obj == null) return;
	if (obj.className == 'a_menu') obj.className = 'b_menu';
	else if (obj.className == 'b_menu') obj.className = 'a_menu';
	
	if (obj.className == 'c_menu') obj.className = 'd_menu';
	else if (obj.className == 'd_menu') obj.className = 'c_menu';
}

function changeClass2(id) {
	var obj = document.getElementById(id);
	changeClass(obj);
}

function over(id,src,canto_esq,canto_dir) {
	clearTime();
	hideAllBox();
	clearTimeImg();
	var img = document.getElementById(id);
	var div_canto_dir;
	var div_canto_esq;
	
	if (canto_dir != '') {
		div_canto_dir = document.getElementById(canto_dir + '_canto');
		div_canto_dir.src = images[2].src;
	}
	if (canto_esq != '') {
		div_canto_esq = document.getElementById(canto_esq + '_canto');
		div_canto_esq.src = images[1].src;
	}
	
	for (i = 3; i < images.length; i++) {
		if (images[i].id == src) 
			img.src = images[i].src;
	}
}

function out(id,src,canto_esq,canto_dir) {
	var img = document.getElementById(id);
	var div_canto_dir;
	var div_canto_esq;

	if (canto_dir != '') {
		div_canto_dir = document.getElementById(canto_dir + '_canto');
		div_canto_dir.src = images[0].src;
	}
	if (canto_esq != '') {
		div_canto_esq = document.getElementById(canto_esq + '_canto');
		div_canto_esq.src = images[0].src;
	}
	
	for (i = 3; i < images.length; i++) {
		if (images[i].id == src) 
			img.src = images[i].src;
	}
}

var timer = null;

function timeOut() {
	timer = setTimeout("hideAllBox();",600);
}

function clearTime() {
	if (timer != null)
		clearTimeout(timer);
}

var imgTimer = null;
var textTime = null;

function timeOutImg(id,src,canto_esq,canto_dir) {
	textTime = 'out("' + id + '","' + src  + '","' + canto_esq + '","' + canto_dir + '")';
	imgTimer = setTimeout('out("' + id + '","' + src  + '","' + canto_esq + '","' + canto_dir + '");',600);
}

function clearTimeImg() {
	if (imgTimer != null) {
		textTime = null;
		clearTimeout(imgTimer);
	}
}

function executeTimeOut() {
	if (textTime != null) {
		eval(textTime);
		clearTimeImg();
		textTime = null;
	}	
}

var images = new Array();

function preLoadImages() {

var img = new Image();
	img.src = 'images/transp.gif';
	img.id = 'transp';
	images[0] = img;
	
	img = new Image();
	img.src = 'images/m_01.gif';
	img.id = 'menu_01';
	images[1] = img;
	
	img = new Image();
	img.src = 'images/m_01.gif';
	img.id = 'menu_01_a';
	images[2] = img;

	img = new Image();
	img.src = 'images/m_02.gif';
	img.id = 'menu_02';
	images[3] = img;
	
	img = new Image();
	img.src = 'images/m_02.gif';
	img.id = 'menu_02_a';
	images[4] = img;
	
	img = new Image();
	img.src = 'images/m_03.gif';
	img.id = 'menu_03';
	images[5] = img;
	
	img = new Image();
	img.src = 'images/m_03.gif';
	img.id = 'menu_03_a';
	images[6] = img;

	img = new Image();
	img.src = 'images/m_04.gif';
	img.id = 'menu_04_a';
	images[4] = img;

}

preLoadImages();

//-->