function showNext(ele,num){
			var nextBtn = getElementsByClassName("rightArrow","input",ele);
			var nextValue = parseInt(nextBtn[0].value);
			var storydivArr = getElementsByClassName("storydiv", "div", ele);


if(nextValue==storydivArr.length)
			{	
							
 if(num==1)
 
 {
	 document.getElementById('rightArrow').src='img/arrow_right_inactive.gif';
 }
 
 if(num==2)
 {
	 document.getElementById('rightArrow1').src='img/arrow_right_inactive.gif';
 }	
 
 if(num==3)
 {
	 document.getElementById('rightArrow2').src='img/arrow_right_inactive.gif';
 }		

 if(num==4)
 {
	 document.getElementById('rightArrow3').src='img/arrow_right_inactive.gif';
 }
 if(num==5)
 {
	 document.getElementById('rightArrow4').src='img/arrow_right_inactive.gif';
 }
 //add another if loop with incrementing the number with each new case study
 if(num==6)
 {
	 document.getElementById('rightArrow5').src='img/arrow_right_inactive.gif';
 }
	
 if(num==7)
 {
	 document.getElementById('rightArrow6').src='img/arrow_right_inactive.gif';
 }
 
 if(num==8)
 {
	 document.getElementById('rightArrow7').src='img/arrow_right_inactive.gif';
 }
 
 if(num==9)
 {
	 document.getElementById('rightArrow8').src='img/arrow_right_inactive.gif';
 }
		
	}  
			

if(nextValue <= storydivArr.length)
			{
				var prevBtn = getElementsByClassName("leftArrow","input",ele);
				var prevValue = parseInt(prevBtn[0].value);
				storydivArr[prevValue].style.display = 'none';
				storydivArr[nextValue - 1].style.display = 'block';
				prevBtn[0].value = prevValue + 1;
				nextBtn[0].value = nextValue + 1;
				document.getElementById('leftArrow').src='img/arrow_left.gif';
				document.getElementById('leftArrow1').src='img/arrow_left.gif';
				document.getElementById('leftArrow2').src='img/arrow_left.gif';		
				document.getElementById('leftArrow3').src='img/arrow_left.gif';	
				//increment leftArrow by 1
				document.getElementById('leftArrow4').src='img/arrow_left.gif';	
				document.getElementById('leftArrow5').src='img/arrow_left.gif';	
				document.getElementById('leftArrow6').src='img/arrow_left.gif';	
				document.getElementById('leftArrow7').src='img/arrow_left.gif';
				document.getElementById('leftArrow8').src='img/arrow_left.gif';
			}	
		
}
		
function showPrev(ele){
			var prevBtn = getElementsByClassName("leftArrow","input",ele);
			var prevValue = parseInt(prevBtn[0].value);
			var storydivArr = getElementsByClassName("storydiv", "div", ele);
			
			if( prevValue == 1)
			{	
				document.getElementById('leftArrow').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow1').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow2').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow3').src='img/arrow_left_inactive.gif';
				//increment leftArrow by 1
				document.getElementById('leftArrow4').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow5').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow6').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow7').src='img/arrow_left_inactive.gif';
				document.getElementById('leftArrow8').src='img/arrow_left_inactive.gif';
			}
			
			
			if(prevValue > 0)
			{	
				var nextBtn = getElementsByClassName("rightArrow","input",ele);
				var nextValue = parseInt(nextBtn[0].value);
				storydivArr[prevValue].style.display = 'none';
				storydivArr[prevValue - 1].style.display = 'block';
				nextBtn[0].value = nextValue - 1;
				prevBtn[0].value = prevValue - 1;
				document.getElementById('rightArrow').src='img/arrow_right.gif';
				document.getElementById('rightArrow1').src='img/arrow_right.gif';
				document.getElementById('rightArrow2').src='img/arrow_right.gif';
				document.getElementById('rightArrow3').src='img/arrow_right.gif';
				//increment by 1
				document.getElementById('rightArrow4').src='img/arrow_right.gif';
				document.getElementById('rightArrow5').src='img/arrow_right.gif';
				document.getElementById('rightArrow6').src='img/arrow_right.gif';
				document.getElementById('rightArrow7').src='img/arrow_right.gif';
				document.getElementById('rightArrow8').src='img/arrow_right.gif';
				
			}
		}
		
		function setProject(){
			var projectName = document.getElementById("dropDownList").value;
			var ele = document.getElementById(projectName);
			var prevBtn = getElementsByClassName("leftArrow","input",ele);
			var nextBtn = getElementsByClassName("rightArrow","input",ele);
			prevBtn[0].value = 0;
			nextBtn[0].value = 2;
			if(projectName=='project1')
			{
				
			document.getElementById('rightArrow').src='img/arrow_right.gif';
			document.getElementById('leftArrow').src='img/arrow_left_inactive.gif';
				
				}
				
			if(projectName=='project2')
			{
				
			document.getElementById('rightArrow1').src='img/arrow_right.gif';
			document.getElementById('leftArrow1').src='img/arrow_left_inactive.gif';
				
			}
				
			if(projectName=='project3')
			{
				
			document.getElementById('rightArrow2').src='img/arrow_right.gif';
			document.getElementById('leftArrow2').src='img/arrow_left_inactive.gif';
				
			}
			
			if(projectName=='project4')
			{
				
			document.getElementById('rightArrow3').src='img/arrow_right.gif';
			document.getElementById('leftArrow3').src='img/arrow_left_inactive.gif';
				
			}
			
			//add another loop and increment
			if(projectName=='project5')
			{
				
			document.getElementById('rightArrow4').src='img/arrow_right.gif';
			document.getElementById('leftArrow4').src='img/arrow_left_inactive.gif';
				
			}
			
			if(projectName=='project6')
			{
				
			document.getElementById('rightArrow5').src='img/arrow_right.gif';
			document.getElementById('leftArrow5').src='img/arrow_left_inactive.gif';
				
			}
			
			if(projectName=='project7')
			{
				
			document.getElementById('rightArrow6').src='img/arrow_right.gif';
			document.getElementById('leftArrow6').src='img/arrow_left_inactive.gif';
				
			}
			
			if(projectName=='project8')
			{
				
			document.getElementById('rightArrow7').src='img/arrow_right.gif';
			document.getElementById('leftArrow7').src='img/arrow_left_inactive.gif';
				
			}
			
			if(projectName=='project9')
			{
				
			document.getElementById('rightArrow8').src='img/arrow_right.gif';
			document.getElementById('leftArrow8').src='img/arrow_left_inactive.gif';
				
			}
			
			var storydivArr = getElementsByClassName("storydiv", "div", ele);
			//increment by 1 with each new case study
			for(var i=1; i<=9; i++){
				document.getElementById('project'+i).style.display = 'none';
			}
			document.getElementById(projectName).style.display = 'block';
			for(var i = 0; i < storydivArr.length; i++){
				if(i == 0)
					storydivArr[i].style.display = 'block';
				else
					storydivArr[i].style.display = 'none';
			}
		}
		
		function getElementsByClassName(strClass, strTag, objContElm) {
		strTag = strTag || "*";
		objContElm = objContElm || document;
		var objColl = objContElm.getElementsByTagName(strTag);
		if (!objColl.length &&  strTag == "*" &&  objContElm.all) objColl = objContElm.all;
		var arr = new Array();
		var delim = strClass.indexOf('|') != -1  ? '|' : ' ';
		var arrClass = strClass.split(delim);
		for (var i = 0, j = objColl.length; i < j; i++) {
			var arrObjClass = objColl[i].className.split(' ');
		    if (delim == ' ' && arrClass.length > arrObjClass.length) continue;
		    var c = 0;
		    comparisonLoop:
		    for (var k = 0, l = arrObjClass.length; k < l; k++) {
		      for (var m = 0, n = arrClass.length; m < n; m++) {
		        if (arrClass[m] == arrObjClass[k]) c++;
		        if (( delim == '|' && c == 1) || (delim == ' ' && c == arrClass.length)) {
		          arr.push(objColl[i]);
		          break comparisonLoop;
		        }
		      }
		    }
		}
		return arr;
	}

	