function qshowElement(id) {
document.getElementById(id).style.visibility = 'visible';
};

function qhideElement(id) {
document.getElementById(id).style.visibility = 'hidden';
};

function liveElement(id) {
document.getElementById(id).style.display = 'block';
};

function killElement(id) {
document.getElementById(id).style.display = 'none';
};

function showElement(id) {

if (!document.getElementById(id).filters) { 

document.getElementById(id).style.visibility = 'visible'; } else {

document.getElementById(id).filters.blendTrans.apply();
document.getElementById(id).style.visibility = 'visible';
document.getElementById(id).filters.blendTrans.play();

};
};

function hideElement(id) {

if (!document.getElementById(id).filters) { 

document.getElementById(id).style.visibility = 'hidden'; } else {

document.getElementById(id).filters.blendTrans.apply();
document.getElementById(id).style.visibility = 'hidden';
document.getElementById(id).filters.blendTrans.play();

};
};

function adjustMenu() {

var winWidth = document.body.clientWidth; 
var winAdj = (winWidth - 847) / 2; if (winAdj < 0) { winAdj = 0 };
a1.src = a1off.src; a2.src = a2off.src; a3.src = a3off.src; a4.src = a4off.src;
hideElement("menu1"); hideElement("menu2"); hideElement("menu3"); hideElement("menu4");
document.getElementById("menu1").style.left = winAdj + 248;
document.getElementById("menu2").style.left = winAdj + 343;
document.getElementById("menu3").style.left = winAdj + 457;
document.getElementById("menu4").style.left = winAdj + 620;

};

function containsDOM (container, containee) {
var isParent = false;
do {
if ((isParent = container == containee))
break;
containee = containee.parentNode;
}
while (containee != null);
return isParent;
};

function checkMouseEnter (element, evt) {
if (element.contains && evt.fromElement) {
return !element.contains(evt.fromElement);
}
else if (evt.relatedTarget) {
return !containsDOM(element, evt.relatedTarget);
}};

function checkMouseLeave (element, evt) {
if (element.contains && evt.toElement) {
return !element.contains(evt.toElement);
}
else if (evt.relatedTarget) {
return !containsDOM(element, evt.relatedTarget);
}};

a0on = new Image();
a0on.src = "/themes/lifestylehomesde.com/images/option_home_on.gif";
a1on = new Image();
a1on.src = "/themes/lifestylehomesde.com/images/option_about_on.gif";
a2on = new Image();
a2on.src = "/themes/lifestylehomesde.com/images/option_communities_on.gif";
a3on = new Image();
a3on.src = "/themes/lifestylehomesde.com/images/option_homes_on.gif";
a4on = new Image();
a4on.src = "/themes/lifestylehomesde.com/images/option_homeowners_on.gif";
a5on = new Image();
a5on.src = "/themes/lifestylehomesde.com/images/option_contact_on.gif";

a0off = new Image();
a0off.src = "/themes/lifestylehomesde.com/images/option_home_off.gif";
a1off = new Image();
a1off.src = "/themes/lifestylehomesde.com/images/option_about_off.gif";
a2off = new Image();
a2off.src = "/themes/lifestylehomesde.com/images/option_communities_off.gif";
a3off = new Image();
a3off.src = "/themes/lifestylehomesde.com/images/option_homes_off.gif";
a4off = new Image();
a4off.src = "/themes/lifestylehomesde.com/images/option_homeowners_off.gif";
a5off = new Image();
a5off.src = "/themes/lifestylehomesde.com/images/option_contact_off.gif";
