function mouseLeaves (element, evt) {
if (typeof evt.toElement != 'undefined' && evt.toElement && typeof element.contains != 'undefined') {
return !element.contains(evt.toElement);
}
else if (typeof evt.relatedTarget != 'undefined' && evt.relatedTarget) {
return !contains(element, evt.relatedTarget);
}
}

function contains (container, containee) {
while (containee) {
if (container == containee) {
return true;
}
containee = containee.parentNode;
}
return false;
}

function hideElement (element) {
if (element.style) {
//$(element).fadeOut("500");
$(element).css("display", "none");
}
}

function showElement (element) {
if (element.style)
{
if (element.style.display == "block")
{
//$(element).fadeOut("500");
$(element).css("display", "none");
}
else
{
//$(".topDDMenus").css("display", "none");
//$(".topNavDD").fadeOut("500");
$(".topNavDD").css("display", "none");
//$(element).fadeIn("500");
$(element).css("display", "block");
}
}
}

function hideAllDD()
{
//$(".topNavDD").fadeOut("500");
$(".topNavDD").css("display", "none");
}


function eyacc(n){
var mc="SubSubSection-"+n;

if (document.getElementById(mc).style.display == "block") {
document.getElementById('SubSubSection-'+n).style.display='none';
document.getElementById('Arrow-'+n).src='http://lib.store.yahoo.net/lib/yhst-63756553767267/ey-plus2011.jpg';
} 
else {
document.getElementById('SubSubSection-'+n).style.display='block';
document.getElementById('Arrow-'+n).src='http://lib.store.yahoo.net/lib/yhst-63756553767267/ey-minus2011.jpg';
}
}


$(document).ready(function(){
//var myChat = $("#Header2011 .liveChat2011").html();
$("#Header2011 .liveChat2011").remove();
$("#Header2011").append("<div class=\"liveChat2011\"></div>");
$(".liveChat2011").append("<!--Start AliveChat Button Code--><img src='http://www.websitealive7.com/2345/Visitor/vButton_v3.asp?groupid=2345&departmentid=0&w=400&h=400&icon_online=https%3A%2F%2Fimages%2Ewebsitealive%2Ecom%2Fimages%2Fhosted%2Fupload%2F34285%2Egif&icon_offline=https%3A%2F%2Fimages%2Ewebsitealive%2Ecom%2Fimages%2Fhosted%2Fupload%2F34286%2Egif' border='0' onClick=\"window.open('http://www.websitealive7.com/2345/rRouter.asp?groupid=2345&websiteid=0&departmentid=0&dl='+escape(document.location.href),'','width=400,height=400');\" style='cursor:pointer;'><!--End AliveChat Button Code-->");
});
