
var mainSwitch = 0;
var lastBotao = 1;
var lastDiv = 'c1';
var large;
var imgPath = "bot/";
var largeWin

botao1onn = new Image();
botao1onn.src = imgPath + "c1_h.gif";
botao2onn = new Image();
botao2onn.src = imgPath + "c2_h.gif";
botao3onn = new Image();
botao3onn.src = imgPath + "c3_h.gif";
botao4onn = new Image();
botao4onn.src = imgPath + "c4_h.gif";
botao5onn = new Image();
botao5onn.src = imgPath + "c5_h.gif";
botao6onn = new Image();
botao6onn.src = imgPath + "c6_h.gif";
botao7onn = new Image();
botao7onn.src = imgPath + "c7_h.gif";
botao8onn = new Image();
botao8onn.src = imgPath + "c8_h.gif";
botao9onn = new Image();
botao9onn.src = imgPath + "c9_h.gif";
botao10onn = new Image();
botao10onn.src = imgPath + "c10_h.gif";
botao11onn = new Image();
botao11onn.src = imgPath + "c11_h.gif";
botao12onn = new Image();
botao12onn.src = imgPath + "c12_h.gif";
botao13onn = new Image();
botao13onn.src = imgPath + "c13_h.gif";
botao14onn = new Image();
botao14onn.src = imgPath + "c14_h.gif";

botao1offn = new Image();
botao1offn.src = imgPath + "c1.gif";
botao2offn = new Image();
botao2offn.src = imgPath + "c2.gif";
botao3offn = new Image();
botao3offn.src = imgPath + "c3.gif";
botao4offn = new Image();
botao4offn.src = imgPath + "c4.gif";
botao5offn = new Image();
botao5offn.src = imgPath + "c5.gif";
botao6offn = new Image();
botao6offn.src = imgPath + "c6.gif";
botao7offn = new Image();
botao7offn.src = imgPath + "c7.gif";
botao8offn = new Image();
botao8offn.src = imgPath + "c8.gif";
botao9offn = new Image();
botao9offn.src = imgPath + "c9.gif";
botao10offn = new Image();
botao10offn.src = imgPath + "c10.gif";
botao11offn = new Image();
botao11offn.src = imgPath + "c11.gif";
botao12offn = new Image();
botao12offn.src = imgPath + "c12.gif";
botao13offn = new Image();
botao13offn.src = imgPath + "c13.gif";
botao14offn = new Image();
botao14offn.src = imgPath + "c14.gif";


//get browser type
var bName = navigator.appName;
var browser;

if(bName == "Netscape") {
	browser = "nn";
}

if (document.getElementById) {
   browser = "ns6";
} 

//image rollover for sub navs.
function tabOnn(tab){
     	document.images[tab].src = eval(tab + "onn.src");
}

function tabOffn(tab){
          document.images[tab].src = eval(tab + "offn.src");
}

function imgOnn(theLayer, img, num) {
	if (img != "botao" + lastBotao) { 
		window.document.images[img].src = eval(img + "onn.src");
		window.document.images["photoo"].src = imgPath + "photoo_" + num + ".jpg";
		layerWrite('text',num);
	}
}

function imgOffn(theLayer, img, num) {
	if (img != "botao" + lastBotao) { 
		window.document.images[img].src = eval(img + "offn.src");
		window.document.images["photoo"].src = imgPath + "photoo_" + lastBotao + ".jpg";
		layerWrite('text',lastBotao);
	}
}


//when thumbnail button is clicked, swap photoo
function swapPhotoo(theLayer, num) {
		window.document.images["photoo"].src = imgPath + "photoo_" + num + ".jpg";
		window.document.images["botao" + lastBotao].src = eval("botao" + lastBotao + "offn.src");
		window.document.images["botao" + num].src = eval("botao" + num + "onn.src");
		lastBotao = num;
		large = num;
		layerWrite('text',num);
}
// fim da photo




// Layer text
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
var texttowrite
function layerWrite(id,num) {
	if (num == '1') {
	texttowrite = "<span class='body01'>Descrição do primeiro modelo</span>"
	}
	else if (num == '2') {
	texttowrite = "<span class='body01'>Descrição do segundo modelo</span>"
	}
	else if (num == '3') {
	texttowrite = "<span class='body01'>Descrição do terceiro modelo</span>"
	}
	else if (num == '4') {
	texttowrite = "<span class='body01'>Descrição do quarto modelo</span>"
	}
	else if (num == '5') {
	texttowrite = "<span class='body01'>Descrição do quinto modelo</span>"
	}
	else if (num == '6') {
	texttowrite = "<span class='body01'>Descrição do sexto modelo [<a href=\".html\" class='body02B'>3</a>]</span><span class='body01' com link</span>"
	}
	else if (num == '7') {
	texttowrite = "<span class='body01'>Descrição do sétimo modelo</span>"
	}		
	else if (num == '8') {
	texttowrite = "<span class='body01'>Descrição do oitavo modelo</span>"
	}
}