function checkSearch() {
if (document.getElementById('search').value == "Search MD2") { document.getElementById('search').value = ""; };
};

function checkBlurSearch() {
if (document.getElementById('search').value == "") { document.getElementById('search').value = "Search MD2"; };
};


function launcher(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+','
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function showElement(id) {
document.getElementById(id).style.visibility = 'visible';
};

function hideElement(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 onoffElement(id) {

document.getElementById(id).style.visibility = (document.getElementById(id).style.visibility == 'hidden' || !document.getElementById(id).style.visibility) ? 'visible' : 'hidden';

};

function dispButtonOn(id) {
document.getElementById(id).style.backgroundColor='#b6bdd2'; 
document.getElementById(id).style.border='1px solid #0a246a'; 

};

function dispButtonTouch(id) {
document.getElementById(id).style.backgroundColor='#909ab8'; 
document.getElementById(id).style.border='1px solid #0a246a'; 

};

function dispButtonOff(id) {
document.getElementById(id).style.backgroundColor='#dbd1d1'; 
document.getElementById(id).style.border='1px solid #dbd1d1'; 

};

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);
}};