function toggleGallDrop(state) {
	if (document.getElementById) {
		var dropLink = document.getElementById("dropGallLink");
		dropLink.setAttribute("href", "#");
		var menu = document.getElementById("dropGallBox").firstChild;
		while (menu.nodeType != 1) { 
			menu = menu.nextSibling; 
		}
		setElementClass(dropLink, state);
		setElementClass(menu, state);
		if (document.getElementById("searchType")) {
			if (state == "active") { 
				document.getElementById("searchType").style.visibility = "hidden";
			} else {
				document.getElementById("searchType").style.visibility = "visible";
			}
		}
	}
}



function getElementClass(element) {
	if (element.getAttribute("class")) {
		return element.getAttribute("class");
	} else if (element.getAttribute("className")) {
		return element.getAttribute("className");
	}
}

function setElementClass(element, classValue) {
	if (element.setAttribute("class", classValue)) {
		element.setAttribute("class", classValue);
	} else if (element.setAttribute("className", classValue)) {
		element.setAttribute("className", classValue);
	}
}

function ieXLiquidWidth() {
	if (document.body.clientWidth < 774) {
		return "768px";
	} else if (document.body.clientWidth > 974) {
		return "970px";
	} else {
		return "auto";
	}
}

