I have 6 divs that show and hide on rollover.(service0 - 6)
I want service 6 to show up any time that service 0-5 aren't rolled over. Please help.
/*<![CDATA[*/
var showInterval = [false, false, false, false, false, false, false];
var hideInterval = [false, false, false, false, false, false, false];
var opacityValue = [0, 0, 0, 0, 0, 0, 0];
function showDiv(objNum) {
//check to see if we're currently hiding this div, if so we stop execution on that interval
if (hideInterval[objNum]) {
clearInterval(hideInterval[objNum]);
hideInterval[objNum] = false;
}
//store a reference to this interval so we can stop it later
showInterval[objNum] = setInterval("showDivFunction(" + objNum + ")", 50);
}
function showDivFunction(objNum) {
var obj = document.getElementById("service" + objNum);
//if the div is not fully shown, we increase the opacity in 10% increments
if (opacityValue[objNum] < 100) {
opacityValue[objNum] += 25;
obj.style.opacity = (opacityValue[objNum] / 100);
obj.style.MozOpacity = (opacityValue[objNum] / 100);
obj.style.KhtmlOpacity = (opacityValue[objNum] / 100);
obj.style.filter = "alpha(opacity=" + opacityValue[objNum] + ")";
}
//if the div is fully shown we clear the interval and set the reference to false
else {
clearInterval(showInterval[objNum]);
showInterval[objNum] = false;
}
}
function hideDiv(objNum) {
//check to see if we're currently showing this div, if so we stop execution on that interval
if (showInterval[objNum]) {
clearInterval(showInterval[objNum]);
showInterval[objNum] = false;
}
hideInterval[objNum] = setInterval("hideDivFunction(" + objNum + ")", 50);
}
function hideDivFunction(objNum) {
var obj = document.getElementById("service" + objNum);
//if the div is not fully hidden, we decrease the opacity in 10% increments
if (opacityValue[objNum] > 0) {
opacityValue[objNum] -= 25;
obj.style.opacity = (opacityValue[objNum] / 100);
obj.style.MozOpacity = (opacityValue[objNum] / 100);
obj.style.KhtmlOpacity = (opacityValue[objNum] / 100);
obj.style.filter = "alpha(opacity=" + opacityValue[objNum] + ")";
}
//if the div is fully hidden we clear the interval and set the reference to false
else {
clearInterval(hideInterval[objNum]);
hideInterval[objNum] = false;
}
}
/*]]>*/
I want service 6 to show up any time that service 0-5 aren't rolled over. Please help.
/*<![CDATA[*/
var showInterval = [false, false, false, false, false, false, false];
var hideInterval = [false, false, false, false, false, false, false];
var opacityValue = [0, 0, 0, 0, 0, 0, 0];
function showDiv(objNum) {
//check to see if we're currently hiding this div, if so we stop execution on that interval
if (hideInterval[objNum]) {
clearInterval(hideInterval[objNum]);
hideInterval[objNum] = false;
}
//store a reference to this interval so we can stop it later
showInterval[objNum] = setInterval("showDivFunction(" + objNum + ")", 50);
}
function showDivFunction(objNum) {
var obj = document.getElementById("service" + objNum);
//if the div is not fully shown, we increase the opacity in 10% increments
if (opacityValue[objNum] < 100) {
opacityValue[objNum] += 25;
obj.style.opacity = (opacityValue[objNum] / 100);
obj.style.MozOpacity = (opacityValue[objNum] / 100);
obj.style.KhtmlOpacity = (opacityValue[objNum] / 100);
obj.style.filter = "alpha(opacity=" + opacityValue[objNum] + ")";
}
//if the div is fully shown we clear the interval and set the reference to false
else {
clearInterval(showInterval[objNum]);
showInterval[objNum] = false;
}
}
function hideDiv(objNum) {
//check to see if we're currently showing this div, if so we stop execution on that interval
if (showInterval[objNum]) {
clearInterval(showInterval[objNum]);
showInterval[objNum] = false;
}
hideInterval[objNum] = setInterval("hideDivFunction(" + objNum + ")", 50);
}
function hideDivFunction(objNum) {
var obj = document.getElementById("service" + objNum);
//if the div is not fully hidden, we decrease the opacity in 10% increments
if (opacityValue[objNum] > 0) {
opacityValue[objNum] -= 25;
obj.style.opacity = (opacityValue[objNum] / 100);
obj.style.MozOpacity = (opacityValue[objNum] / 100);
obj.style.KhtmlOpacity = (opacityValue[objNum] / 100);
obj.style.filter = "alpha(opacity=" + opacityValue[objNum] + ")";
}
//if the div is fully hidden we clear the interval and set the reference to false
else {
clearInterval(hideInterval[objNum]);
hideInterval[objNum] = false;
}
}
/*]]>*/