function hideBox(boxId) {
	document.getElementById(boxId).style.display = "none";
}

function showBox(boxId) {
	document.getElementById(boxId).style.display = "block";
}

function showCvBox(boxId) {
	document.getElementById(boxId).style.visibility = "visible";
	document.getElementById(boxId).style.border = "1px solid #CCC";
	document.getElementById(boxId).style.padding = "10px";
	document.getElementById(boxId).style.margin = "12px 0 0 0";
	document.getElementById(boxId).style.height = "300px";
	document.getElementById(boxId).style.bgcolor = "#EEEEEE";
}

function hideCvBox(boxId) {
	document.getElementById(boxId).style.visibility = "hidden";
	document.getElementById(boxId).style.border = "0px";
	document.getElementById(boxId).style.padding = "0px";
	document.getElementById(boxId).style.margin = "0px";
	document.getElementById(boxId).style.height = "0px";
	document.getElementById(boxId).style.bgcolor = "#FFFFFF";
}

function getElementsByClassName(oElm, strTagName, strClassName, stat) {
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	strClassName = strClassName.replace(/\-/g, "\\-");
	var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)");
	var oElement;
	for(var i=0; i<arrElements.length; i++){
		oElement = arrElements[i];
		if(oRegExp.test(oElement.className)){
			oElement.style.display = stat;
			var imageElement = "image_"+oElement.id;
			document.getElementById(imageElement).src = "/_media/left.png";
		}
	}
}

function toggleBox(boxId) {
	if (document.getElementById(boxId).style.display == "none") {
		getElementsByClassName(document, "div", "cattegorriess", "none");
		document.getElementById(boxId).style.display = "block";
		document.getElementById('image_'+boxId).src = "/_media/down.png";
	} else {
		document.getElementById(boxId).style.display = "none";
		document.getElementById('image_'+boxId).src = "/_media/left.png";
	}
}
function GetXmlHttpObject() {
	var xmlHttp = null;
	try {
		xmlHttp = new XMLHttpRequest();
	}
	catch (e) {
		try {
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e){
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	return xmlHttp;
}


