

// toggle the div on & off
function toggleDiv(DivID) {

	if (isVisible(DivID)) {
		turnOff(DivID);
	} else {
		turnOn(DivID);
	}

}

// show the div
function showDiv(DivID) {

	turnOn(DivID);

}

// show the 'data' div
function showDataDiv(DivID) {

	turnOff('introduction');
	turnOff('personal');
	turnOff('construction');
	turnOff('specifications');
	turnOff('serviceplusmessage');
	turnOff('sendpart');
//	turnOff('club');
//	turnOff('other_type');
	turnOn(DivID);

}

// turn off function
function turnOff(DivID) {
	if (document.getElementById) { //gecko(NN6) & IE 5+
		document.getElementById(DivID).style.visibility = "hidden";
		document.getElementById(DivID).style.display = "none";
	} else if (document.all) { // IE 4+
		document.all[DivID].style.visibility = "hidden";
		document.all[DivID].style.display = "none";
	} else if (document.layers) { // NS4+
		document.layers[DivID].visibility = "hide";
		document.layers[DivID].display = "none";
	} else {
		// nothing
	}
}

// turn on function
function turnOn(DivID) {
	if (document.getElementById) { //gecko(NN6) & IE 5+
		document.getElementById(DivID).style.visibility = "visible";
		document.getElementById(DivID).style.display = "block";
	} else if (document.all) { // IE 4+
		document.all[DivID].style.visibility = "visible";
		document.all[DivID].style.display = "block";
	} else if (document.layers) { // NS4+
		document.layers[DivID].visibility = "show";
		document.layers[DivID].display = "block";
	} else {
		// nothing
	}
}

// boolean check for whether the dic is visible or not
function isVisible(DivID) {
	if (document.getElementById) { //gecko(NN6) & IE 5+
		if (document.getElementById(DivID).style.visibility == "visible") {
			return true;
		} else {
			return false;
		}
	} else if (document.all) { // IE 4+
		if (document.all[DivID].style.visibility = "visible") {
			return true;
		} else {
			return false;
		}
	} else if (document.layers) { // NS4+
		if (document.layers[DivID].visibility = "show") {
			return true;
		} else {
			return false;
		}
	} else {
		// nothing
	}
}
