


if (document.images)
{
  pic1= new Image(602,204); 
  pic1.src="/Portals/_default/Skins/LEGIX8/images/destaque_Legix8.jpg"; 

  pic2= new Image(602,204); 
  pic2.src="/Portals/_default/Skins/LEGIX8/images/destaque_LegixIntranet.jpg"; 

  //pic3= new Image(602,204); 
  //pic3.src="/Portals/_default/Skins/LEGIX8/images/destaque_Legix_pt.jpg";
  
  pic3= new Image(602,204); 
  pic3.src="/Portals/_default/Skins/LEGIX8/images/destaque_Jurisprudencia.jpg";
  
  pic3= new Image(602,204); 
  pic3.src="/Portals/_default/Skins/LEGIX8/images/destaque_CodInfo.jpg";
}


//Imagens
var imagemDestaque1 = "/Portals/_default/Skins/LEGIX8/images/destaque_Legix8.jpg";
var imagemDestaque2 = "/Portals/_default/Skins/LEGIX8/images/destaque_LegixIntranet.jpg";
//var imagemDestaque3 = "/Portals/_default/Skins/LEGIX8/images/destaque_Legix_pt.jpg";
var imagemDestaque4 = "/Portals/_default/Skins/LEGIX8/images/destaque_Jurisprudencia.jpg";
var imagemDestaque5 = "/Portals/_default/Skins/LEGIX8/images/destaque_CodInfo.jpg";
var imagemDestaque6 = "/Portals/_default/Skins/LEGIX8/images/destaque_Codigos.jpg";

//Links
var linkDestaque1 = "/Produtos/LegiX8/Descrição/tabid/390/Default.aspx";
var linkDestaque2 = "/Produtos/LegiXIntranet/Descrição/tabid/400/Default.aspx";
//var linkDestaque3 = "/LegiXpt/tabid/440/Default.aspx";
var linkDestaque4 = "/Produtos/ColectâneadeJurisprudência/Descrição/tabid/417/Default.aspx";
var linkDestaque5 = "/Produtos/LegiXCodInfo/Descrição/tabid/427/Default.aspx";
var linkDestaque6 = "/Produtos/LegiXCódigos/Descrição/tabid/470/Default.aspx";

//Faz o link para a página do produto correspondente
function gotoProduct(numProd) {
    switch (numProd) {
    case 1:
        window.open(linkDestaque1,'_self');
        break;
    case 2:
        window.open(linkDestaque2,'_self');
        break;
    case 3:
        window.open(linkDestaque3,'_self');
        break;
    case 4:
        window.open(linkDestaque4,'_self');
        break;
    case 5:
        window.open(linkDestaque5,'_self');
        break;
	case 6:
        window.open(linkDestaque6,'_self');
        break;
    }
}

function changeColor(numProd) {
	//Inicializa os TDs de todos os produtos
	document.getElementById("prod1").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod2").style.backgroundColor = "#BDC8CA";
	//document.getElementById("prod3").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod4").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod5").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod6").style.backgroundColor = "#BDC8CA";
	
	//Define o botao seleccionado
	var myTD = document.getElementById("prod" + numProd);
	myTD.style.backgroundColor = "#DCE4E7";
	myTD.style.cursor = "hand";
}

function changeProduct(numProd) {
	//Inicializa os TDs de todos os produtos
	document.getElementById("prod1").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod2").style.backgroundColor = "#BDC8CA";
	//document.getElementById("prod3").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod4").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod5").style.backgroundColor = "#BDC8CA";
	document.getElementById("prod6").style.backgroundColor = "#BDC8CA";
	
	//Define o botao seleccionado
	var myTD = document.getElementById("prod" + numProd);
	myTD.style.backgroundColor = "#DCE4E7";
	myTD.style.cursor = "hand";
	
	var myImage = document.getElementById("currentImage");
	var myLink = document.getElementById("currentLink");
	
	switch (numProd) {
		case 2:
			myImage.src = imagemDestaque2;
			myLink.href = linkDestaque2;		
			break;
		case 3:
			myImage.src = imagemDestaque3;
			myLink.href = linkDestaque3;
			break;
		case 4:
			myImage.src = imagemDestaque4;
			myLink.href = linkDestaque4;
			break;
		case 5:
			myImage.src = imagemDestaque5;
			myLink.href = linkDestaque5;
			break;
		case 6:
			myImage.src = imagemDestaque6;
			myLink.href = linkDestaque6;
			break;
		default:
			myImage.src = imagemDestaque1;
			myLink.href = linkDestaque1;
			break;
	}

}
