
var mainSwitch = 0;
var lastButton = 1;
var lastDiv = 'b1';
var large;
var imgPath = "bot/";
var largeWin

button1on = new Image();
button1on.src = imgPath + "b1_h.gif";
button2on = new Image();
button2on.src = imgPath + "b2_h.gif";
button3on = new Image();
button3on.src = imgPath + "b3_h.gif";
button4on = new Image();
button4on.src = imgPath + "b4_h.gif";
button5on = new Image();
button5on.src = imgPath + "b5_h.gif";
button6on = new Image();
button6on.src = imgPath + "b6_h.gif";
button7on = new Image();
button7on.src = imgPath + "b7_h.gif";
button8on = new Image();
button8on.src = imgPath + "b8_h.gif";
button9on = new Image();
button9on.src = imgPath + "b9_h.gif";
button10on = new Image();
button10on.src = imgPath + "b10_h.gif";
button11on = new Image();
button11on.src = imgPath + "b11_h.gif";
button12on = new Image();
button12on.src = imgPath + "b12_h.gif";
button13on = new Image();
button13on.src = imgPath + "b13_h.gif";
button14on = new Image();
button14on.src = imgPath + "b14_h.gif";

button1off = new Image();
button1off.src = imgPath + "b1.gif";
button2off = new Image();
button2off.src = imgPath + "b2.gif";
button3off = new Image();
button3off.src = imgPath + "b3.gif";
button4off = new Image();
button4off.src = imgPath + "b4.gif";
button5off = new Image();
button5off.src = imgPath + "b5.gif";
button6off = new Image();
button6off.src = imgPath + "b6.gif";
button7off = new Image();
button7off.src = imgPath + "b7.gif";
button8off = new Image();
button8off.src = imgPath + "b8.gif";
button9off = new Image();
button9off.src = imgPath + "b9.gif";
button10off = new Image();
button10off.src = imgPath + "b10.gif";
button11off = new Image();
button11off.src = imgPath + "b11.gif";
button12off = new Image();
button12off.src = imgPath + "b12.gif";
button13off = new Image();
button13off.src = imgPath + "b13.gif";
button14off = new Image();
button14off.src = imgPath + "b14.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 tabOn(tab){
     	document.images[tab].src = eval(tab + "on.src");
}

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

function imgOn(theLayer, img, num) {
	if (img != "button" + lastButton) { 
		window.document.images[img].src = eval(img + "on.src");
		window.document.images["photo"].src = imgPath + "photo_" + num + ".jpg";
		layerWrite('text',num);
	}
}

function imgOff(theLayer, img, num) {
	if (img != "button" + lastButton) { 
		window.document.images[img].src = eval(img + "off.src");
		window.document.images["photo"].src = imgPath + "photo_" + lastButton + ".jpg";
		layerWrite('text',lastButton);
	}
}


//when thumbnail button is clicked, swap photo
function swapPhoto(theLayer, num) {
		window.document.images["photo"].src = imgPath + "photo_" + num + ".jpg";
		window.document.images["button" + lastButton].src = eval("button" + lastButton + "off.src");
		window.document.images["button" + num].src = eval("button" + num + "on.src");
		lastButton = 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>"
	}
	
	if (ns4) {
		document.layers[id].document.open();
		document.layers[id].document.write(texttowrite);
		document.layers[id].document.close();
	}
	else { 
	document.getElementById(id).innerHTML = texttowrite;
	}
}