var cdInCat = new Array();
cdInCat[1] = 0;
cdInCat[2] = 0;
var cdInSec = new Array();
cdInSec[1] = 0;
cdInSec[2] = 0;
function mouseCoords(ev){
if (!ev) var ev = window.event;
if (ev) {
if(typeof(ev.pageX)!=="undefined") {
return {x:ev.pageX, y:ev.pageY};
}else{
return {
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,
y:ev.clientY + document.body.scrollTop - document.body.clientTop
};
}
}
}
function onShow(leg_id) {
document.getElementById(leg_id).style.visibility='visible';
}
function onHide(leg_id) {
document.getElementById(leg_id).style.visibility='hidden';
}
function onFeitoAMao() {
document.location.href='prodList.php?sId=1';
}
function onBrechot() {
document.location.href='prodList.php?sId=2';
}
function onCategoria(idSecao,idCategoria) {
document.location.href='prodList.php?sId='+idSecao+'&cId='+idCategoria;
}
function onDetalhe(idProd,idImg) {
zoomContent = '
';
document.getElementById('zoom_content').innerHTML=zoomContent;
document.getElementById('image_zoom').style.visibility='visible';
}
function onFecharDetalhe() {
document.getElementById('zoom_content').innerHTML='';
document.getElementById('image_zoom').style.visibility='hidden';
}
function onMenu(idTipo,idDir, icIn, idElem, elem, event) {
pos = mouseCoords(event);
if (icIn) {
if (idDir == 'R') {
if (idTipo == 'D') {
document.getElementById(idElem).src='http://www.ninui.com/ninui_layout/images/point_right_sel.gif';
} else if (idTipo == 'C') {
document.getElementById('cat_'+elem).style.backgroundColor='#fbc8a3';
}
} else {
if (idTipo == 'D') {
document.getElementById(idElem).src='http://www.ninui.com/ninui_layout/images/point_left_sel.gif';
} else if (idTipo == 'C') {
document.getElementById('cat_'+elem).style.backgroundColor='#d2ece5';
}
}
if (idTipo == 'D') {
if (toolTip) {
toolTip.style.visibility="visible";
toolTip.style.left=(pos.x+20)+"px";
toolTip.style.top=pos.y+"px";
toolTip.innerHTML="Clique aqui e veja os destaques desta categoria.";
}
}
} else {
if (idDir == 'R') { if (cdInCat[2] != elem) document.getElementById(idElem).src='http://www.ninui.com/ninui_layout/images/point_right.gif'; }
else { if (cdInCat[1] != elem) document.getElementById(idElem).src='http://www.ninui.com/ninui_layout/images/point_left.gif'; }
document.getElementById('cat_'+elem).style.backgroundColor='';
if (idTipo == 'D') {
if (toolTip) {
toolTip.style.visibility="hidden";
toolTip.style.left="0px";
toolTip.style.top="0px";
toolTip.innerHTML="";
}
}
}
}
function renderDestaques (nmNodo, idPos, cdProd, cdImg, vlProd) {
var dsHtml = '';
dsHtml = '
';
dsHtml += '