function selectCase(x) {
    if (x != "blank") {
        window.location.href="http://aitcs.nus.edu.sg/xwiki/bin/download/"+x;
    }

}

function selectDocument(x) {
    if (x != "blank") {
        window.location.href="http://aitcs.nus.edu.sg/"+x;
    }

}
function displayCase(x) {
	
	var caseList = new Array(	"ebiz001-A-ebiz-B-rea-C-au",
								"ebiz002-A-ebiz-B-tec-C-sg",
								"ebiz003-A-ebiz-B-hea-C-uk", 
								"egov001-A-egov-B-pub-C-sg", 
								"egov002-A-egov-B-pub-B-fin-C-sg", 
								"egov003-A-egov-B-pub-C-cn", 
								"egov004-A-egov-B-pub-B-tra-C-sg",
								"egov005-A-egov-B-pub-C-kr", 
								"es001-A-es-B-edu-C-sg",
								"es002-A-es-B-hea-C-sg",
								"es003-A-es-B-tec-C-sg",
								"es004-A-es-B-tec-C-sg",
								"es005-A-es-B-fin-C-sg",
								"es006-A-es-B-ele-C-kr",
								"iot001-A-iot-B-edu-C-sg",
								"iot002-A-iot-B-tel-C-tw",
								"icm001-A-icm-B-pub-C-sg",
								"icm002-A-icm-B-ngo-C-tw",
								"icm003-A-icm-B-pub-C-sg",
								"iti001-A-iti-A-km-B-tec-C-in",
								"iti002-A-iti-A-km-B-tec-C-in",
								"iti003-A-iti-A-km-B-tec-C-in",
								"km001-A-km-B-edu-C-sg",
								"km002-A-km-B-fin-C-ph",
								"km003-A-km-B-log-C-sg",
								"km004-A-km-B-fin-C-sg",
								"pm001-A-ipm-A-egov-B-pub-C-uk",
								"pm002-A-ipm-A-egov-B-pub-C-uk",
								"sit002-A-sit-A-egov-B-pub-C-sg"	
							);


	for(i=0; i<caseList.length; i++){

		if (x == 0) {	//if x is 0, make all divs visible
		
			document.getElementById(caseList[i]).style.display="block";
		
		} else {		//otherwise, match x with case ids and make those visible, all others hidden
		
			if (caseList[i].match(x)) {		//if there's a match
				document.getElementById(caseList[i]).style.display="block";
			} else {						//if there's no match
				document.getElementById(caseList[i]).style.display="none";
			} //end if/else
		} //end if/else
	}//end for

} //end function
