 function fixNN() {
 	if (document.layers) {
 		location.reload();	
 	} else {
 		return;	
 	}
 }
 
 window.onresize = fixNN;
 
 
 var sessionText = new Array('Session 1: Teaching Social Studies','Session 2: Teaching for Understanding','Session 3: Exploring Unity and Diversity','Session 4: Applying Themes and Disciplines','Session 5: Using Resources','Session 6: Engaging Students in Active Learning','Session 7: Assessing Students\' Learning','Session 8: Making Connections');
 var sessionLinks = new Array('/workshops/socialstudies/session1/index.html','/workshops/socialstudies/session2/index.html','/workshops/socialstudies/session3/index.html','/workshops/socialstudies/session4/index.html','/workshops/socialstudies/session5/index.html','/workshops/socialstudies/session6/index.html','/workshops/socialstudies/session7/index.html','/workshops/socialstudies/session8/index.html');
 window.onload = buildMenu;
 //build the nav window
 function buildMenu() {
 	if (document.lNav) {
 		var length = 8;
 		for (var i = 0;i < length;i++) {
 			document.lNav.lessonNav.options[i + 1] = new Option(sessionText[i],sessionLinks[i],0,0);
 		}
 	} 
 }
 
  function buildSpacer(difference,depth) {
	//set default depth if none given
	if (!depth) {
		depth = '';
	}
	if (document.layers) {
		var windowWidth = window.innerWidth;
		var width = windowWidth - difference;
		var spacer = '<img src="'+ depth +'images/spacer.gif" alt=" " width="' + width +'" height="1" class="spacer" />';
		return spacer;
	} else {
		var spacer = '<img src="'+ depth +'images/spacer.gif" alt=" " width="1" height="1" class="tcImage" />';
		return spacer;
	}
}

function imgOn(imgName) {
	if (document.images) {
     		 onImage = eval(imgName + "on.src");
     		 document[imgName].src = onImage;
    	}
 }

function imgOff(imgName) {
   	if (document.images) {
    		  offImage = eval(imgName + "off.src");
     		  document[imgName].src = offImage;
   	 }
 }
 
 function buildVerticalSpacer() {
 	if (document.layers) {
 		var image = '<img src="/workshops/socialstudies/images/spacer.gif" alt=" " width="84" height="190" class="spacer" />';
 		return image;
 	} else {
 		return '&nbsp;';	
 	}
 }
 
function goTo(url) {
	
 	if (!url || url == ' ') {
 		return;
 	}
 	location.href = url;
 }
 
 function ssPop(type,loc,w,h) {
	var stat = 'no';
	var reSize = 'yes';
	var scroll = 'no';
	var tools = 'yes';
	var locvar = 'no';
	if (type == "letter") {
		reSize = 'no';
		if (!w) {
			w = 440;
		}
		if (!h) {
			h= 500;
		}
	} else if (type == "image") {
		reSize = 'yes';
		if (!w) {
			w = 470;
		}
		if (!h) {
			h= 380;
		}
	} else if (type == "interactive") {
		reSize = 'yes';
		if (!w) {
			w = 600;
		}
		if (!h) {
			h= 475;
		}
	} else {
		if (!w) {
			w = 440;
		}
		if (!h) {
			h= 500;
		}
	}
	
	if (document.layers) {
		w = w + 10;
	}
	 var sswindow = window.open(loc,type,'width='+w+',height='+h+',toolbar='+tools+',status='+stat+',scrollbars='+scroll+',resizable='+reSize+',location='+locvar+',menubar=no,directories=no');
	sswindow.focus();
}

 
 
 

