<!--

	var tabTitles = new Array();
	var subNavTitles = new Array();
	var activeTab = 0;
	var activeSubArea = 0;
	var tabCount;

	// function to create catalogue tabbed area
	function buildCatTabs(tabCount) {
		if(tabCount > 0) {
			// hide all content except first, store all h3 titles for tabs
			for(i=0; i<tabCount; i++) {
				tabTitles[i] = document.getElementById("tab"+i).getElementsByTagName("H2")[0].innerHTML;
				document.getElementById("tab"+i).getElementsByTagName("H2")[0].style.display = "none";
				if(i>0) document.getElementById("tab"+i).style.display = "none";
			}
			// write tabs to page
			tabsCode = "<dl>";
			for(i=0; i<tabCount; i++) {
				if(i==0) {
					tabsCode += "<dd id='jsTab0' class='tabOn'><a href='javascript:doTab(0);'><span class='tabTitle'>" + tabTitles[0] + "<\/span><span class='tabLeftEdge'><\/span><span class='tabRightEdge'><\/span><\/a><\/dd>";
				} else {
					tabsCode += "<dd id='jsTab" + i + "' class='tabOff'><a href='javascript:doTab(" + i + ");'><span class='tabTitle'>" + tabTitles[i] + "<\/span><span class='tabLeftEdge'><\/span><span class='tabRightEdge'><\/span><\/a><\/dd>";
				}
			}
			tabsCode += "</dl>";
			document.getElementById("tabNav").innerHTML = tabsCode;
		}
	}

	function doTab(getTab) {
		// make sure tabArea is visible
		document.getElementById("tabContainer").style.display = "block";
		// check tab is different from current active tab
		if(getTab != activeTab) {
			// hide old content and change old tab class
			document.getElementById("tab"+activeTab).style.display = "none";
			document.getElementById("jsTab"+activeTab).className = "tabOff";
			// show new content and chnage new tab class
			document.getElementById("tab"+getTab).style.display = "block";
			document.getElementById("jsTab"+getTab).className = "tabOn";
			// store new tab
			activeTab = getTab;
		}
	}
	
	function showReviewForm() {
		// make form content visible
		document.getElementById("reviewFormContainer").style.display = "block";
	}
			
	var badChars = new Array("<",">","\/","=","%","@");
	
	function detectBadChars(srcText) {
		badFound = false;
		for(i=0;i<badChars.length;i++) {
			if(srcText.indexOf(badChars[i]) > -1) badFound = true;
		}
		return badFound;
	}
	
	function validateReviewForm() {
		alertMessage = "";
		if(isEmptyField(document.getElementById("review_author"))) alertMessage += "\nYou must enter YOUR NAME.";
		if(isEmptyField(document.getElementById("review_password"))) alertMessage += "\nYou must enter a PASSWORD.";
		if(isEmptyField(document.getElementById("review_title"))) alertMessage += "\nYou must enter a REVIEW TITLE.";
		if(isEmptyField(document.getElementById("review_content"))) alertMessage += "\nYou must enter some REVIEW CONTENT.";
		//invalid characters
		if(detectBadChars(document.getElementById("review_author").value)) alertMessage += "\nThe YOUR NAME entry contains characters that are not permitted.";
		if(detectBadChars(document.getElementById("review_title").value)) alertMessage += "\nThe REVIEW TITLE entry contains characters that are not permitted.";
		if(detectBadChars(document.getElementById("review_content").value)) alertMessage += "\nThe REVIEW CONTENT entry contains characters that are not permitted.";
		if(alertMessage!="") {
			alert("There are problems with this form:" + alertMessage);
			return false;
		} else return true;
	}


// -->