<!--
// 
function tapMenu4videoNav(nVar) {
    for(var i=1;i<3;i++) {
        obj = document.getElementById('pm'+i);
        if (nVar==i) {
            obj.style.display = "block";
        } else {
            obj.style.display = "none";
        }
    }
}


// Navigation Tree style
window.onload=treeNav;
function treeNav(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=10; i++) {
		if (document.getElementById('submenu'+i)) {document.getElementById('submenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}
//-->

// tap display
function tapMenu(iName, nVar, dName){
	for(var i=1;i<3;i++){
		document.getElementById(dName+i).style.display="none";
		document.getElementById(iName+i).className="off";
	}
	document.getElementById(dName+nVar).style.display="block";
	document.getElementById(iName+nVar).className="on";
}
//-->

//Tap Menu
function tapMenu2(iName, nVar, dName){
	for(var i=1;i<3;i++){
		document.getElementById(dName+i).style.display="none";
		document.getElementById(iName+i).className="off";
	}
	document.getElementById(dName+nVar).style.display="block";
	document.getElementById(iName+nVar).className="on";
}

function tapMenu3(iName, nVar, dName){
	for(var i=1;i<4;i++){
		document.getElementById(dName+i).style.display="none";
		document.getElementById(iName+i).className="off";
	}
	document.getElementById(dName+nVar).style.display="block";
	document.getElementById(iName+nVar).className="on";
}


//function to display or hide a given element
function showHideItems(myItem, myButton, imgPath){
	//this is the ID of the hidden item
	var myItem = document.getElementById(myItem);
	//this is the ID of the plus/minus button image
	var myButton = document.getElementById(myButton);
		if (myItem.style.display != "none") {
			//items are currently displayed, so hide them
			myItem.style.display = "none";
			swapImage(myButton,"plus", imgPath);
		}
		else {
			//items are currently hidden, so display them
			myItem.style.display = "block";
			swapImage(myButton,"minus", imgPath);
		}
}

//function to swap an image based on its current state
function swapImage(myImage, state, imgPath) {
	if (state == "minus") {
		myImage.src = imgPath + "img/iCMS/hide.gif";
	}
	else {
		myImage.src = imgPath + "img/iCMS/show.gif";
	}
}


//function to display or hide a given element
function showHideMsg(myItem, myButton, imgPath){
	//this is the ID of the hidden item
	var myItem = document.getElementById(myItem);
	//this is the ID of the plus/minus button image
	var myButton = document.getElementById(myButton);
		if (myItem.style.display != "none") {
			//items are currently displayed, so hide them
			myItem.style.display = "none";
			swapImage2(myButton,"plus", imgPath);
		}
		else {
			//items are currently hidden, so display them
			myItem.style.display = "block";
			swapImage2(myButton,"minus", imgPath);
		}
}

//function to swap an image based on its current state
function swapImage2(myImage, state, imgPath) {
	if (state == "minus") {
		myImage.src = imgPath + "img/iCMS/hide_msg.gif";
	}
	else {
		myImage.src = imgPath + "img/iCMS/show_msg.gif";
	}
}


//function to display or hide a given element
function showHideComment(myItem, myButton){
	//this is the ID of the hidden item
	var myItem = document.getElementById(myItem);
	//this is the ID of the plus/minus button image
	var myButton = document.getElementById(myButton);
		if (myItem.style.display != "none") {
			//items are currently displayed, so hide them
			myItem.style.display = "none";
			myButton.innerHTML = "View";
			//swapImageForum(myButton,"plus", imgPath);
		}
		else {
			//items are currently hidden, so display them
			myItem.style.display = "block";
			myButton.innerHTML = "Hide";
		}
}

//function to display or hide a given element
function showHidePost(myItem, myButton){
	//this is the ID of the hidden item
	var myItem = document.getElementById(myItem);
	//this is the ID of the plus/minus button image
	var myButton = document.getElementById(myButton);
		if (myItem.style.display != "none") {
			//items are currently displayed, so hide them
			myItem.style.display = "none";
			myButton.innerHTML = "Post a comment";
			//swapImageForum(myButton,"plus", imgPath);
		}
		else {
			//items are currently hidden, so display them
			myItem.style.display = "block";
			myButton.innerHTML = "Hide posting box";
		}
}


//function to display or hide a given element
function showHideForum(myItem, myButton){
	//this is the ID of the hidden item
	var myItem = document.getElementById(myItem);
	//this is the ID of the plus/minus button image
	var myButton = document.getElementById(myButton);
		if (myItem.style.display != "none") {
			//items are currently displayed, so hide them
			myItem.style.display = "none";
			myButton.innerHTML = "View";
			//swapImageForum(myButton,"plus", imgPath);
		}
		else {
			//items are currently hidden, so display them
			myItem.style.display = "block";
			myButton.innerHTML = "Hide";
		}
}

// Image Rotation Script

// ['Image Path','URL','Target']
var strImgInfo = [
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/overview1st.jpg','boards/l/videoTut1','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/overview2nd.jpg','boards/l/videoTut1','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/guidedReadingIntro.jpg','boards/l/videoTut4','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/guidedReading2Volcano.jpg','boards/l/videoTut4','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/guidedReading3Volcanoes.jpg','boards/l/videoTut4','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/guidedReading4AmazingCrickets.jpg','boards/l/videoTut4','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/poetryRunnyBabbit.jpg','boards/l/videoTut8','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/ReadAlouds2MLK.jpg','boards/l/videoTut9','_self'],
	['http://www.edb.utexas.edu/visionawards/hoffman/mv/screenshot/readAloudsMoth.jpg','boards/l/videoTut9','_self']
];

// Rotation Time (sec)
var intChangeTime = 5;

// Imgage number for the first displaying
var intNowImgNo = 0;

// Image change logic
function ChangeImage() {
	var objPagrURL = document.getElementsByName('pageurl')[0];
	var objImageURL = document.getElementsByName('imageurl')[0];

	objImageURL.src = strImgInfo[intNowImgNo][0];
	objPagrURL.href = strImgInfo[intNowImgNo][1];
	objPagrURL.target = strImgInfo[intNowImgNo][2];

	if(intNowImgNo < (strImgInfo.length - 1)) {
		intNowImgNo++;
	} else {
		intNowImgNo = 0;
	}

	setTimeout('ChangeImage();', intChangeTime+'000');
}
//-->


// Show and Hide toggle Layer 

function toggleLayer(whichLayer){
	if (document.getElementById){
		// this is the way the standards work
		var style2 = document.getElementById(whichLayer).style;
		style2.display = style2.display? "":"block";
		}
	else if (document.all){
		// this is the way old msie versions work
		var style2 = document.all[whichLayer].style;
		style2.display = style2.display? "":"block";
		}
	else if (document.layers){
		// this is the way nn4 works
		var style2 = document.layers[whichLayer].style;
		style2.display = style2.display? "":"block";
		}
	}

//-->

// Show and Hide toggle Layer - Absolute position

function toggleBox(szDivID, iState) // 1 visible, 0 hidden
{
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        obj.style.visibility = iState ? "visible" : "hidden";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}
// -->


function hide(myItem){
	var divX=document.getElementById(myItem);   
	divX.style.visibility="hidden";
}
function show(myItem){
	var divX=document.getElementById(myItem);
	divX.style.visibility="visible";
}