// global nav rollovers
	
	citizenon = new Image();
	citizenoff = new Image();
	witon = new Image();
	witoff = new Image();
	inquiringon = new Image();
	inquiringoff = new Image();
	worldon = new Image();
	worldoff = new Image();
				
	benazon = new Image();
	benazoff = new Image();
	timelineon = new Image();
	timelineoff = new Image();
	exploreon = new Image();
	exploreoff = new Image();
	
	abouton = new Image();
	aboutoff = new Image();
	teacherson = new Image();
	teachersoff = new Image();
	siteon = new Image();
	siteoff = new Image();
	resourceon = new Image();
	resourceoff = new Image();				
	feedbackon = new Image();
	feedbackoff = new Image();
	
	citizenon.src = "images/nav_citizen_on.gif";
	citizenoff.src = "images/nav_citizen.gif";
	witon.src = "images/nav_wit_on.gif";
	witoff.src = "images/nav_wit.gif";
	inquiringon.src = "images/nav_inquiring_on.gif";
	inquiringoff.src = "images/nav_inquiring.gif";
	worldon.src = "images/nav_world_on.gif";
	worldoff.src = "images/nav_world.gif";			
	
	benazon.src = "images/nav_az_on.gif";
	benazoff.src = "images/nav_az.gif";
	timelineon.src = "images/nav_timeline_on.gif";
	timelineoff.src = "images/nav_timeline.gif";
	exploreon.src = "images/nav_explore_on.gif";
	exploreoff.src = "images/nav_explore.gif";
	
	abouton.src = "images/nav_about_on.gif";
	aboutoff.src = "images/nav_about.gif";
	teacherson.src = "images/nav_teachers_on.gif";
	teachersoff.src = "images/nav_teachers.gif";
	siteon.src = "images/nav_site_on.gif";
	siteoff.src = "images/nav_site.gif";
	resourceon.src = "images/nav_resource_on.gif";
	resourceoff.src = "images/nav_resource.gif";
	feedbackon.src = "images/nav_feedback_on.gif";
	feedbackoff.src = "images/nav_feedback.gif";
						
			
						
// open popup window

// var alreadyopen = new Array();
var newwin = new Array();

function openCenteredWindow(theURL, winName, features, w, h){

  openWindow(theURL, winName, features + ',height=' + h + ',width=' + w + ',top=' + ((screen.height - h - 29) / 2) + ',left=' + ((screen.width - w - 10) / 2));
}

function openWindow(theURL, winName, features){
	
//  if(alreadyopen[winName] && !newwin[winName].closed){
//    newwin[winName].focus();
//  }
//  else{
//    alreadyopen[winName] = 1;	
    newwin[winName] = window.open(theURL, winName, features);
    newwin[winName].focus();
 // }
}



// show enlarged photo

function showEnlarged(winname, filename, width, height){

	var win = scrapWindow("",winname,"toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no", width, height + 21);

	if(win){
		win.document.open();
		win.document.write('<html><head><title>Benjamin Franklin - Enlarged Photo</title><link rel="stylesheet" href="styles.css" type="text/css"></head><body bgcolor="#000000" text="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
		win.document.write('<a href="javascript:window.close()"><img src="images/' + filename + '_big.jpg" border="0" width="' + width +'" height="' + height + '"></a><br><center><a href="javascript:window.close()"><img src="images/close.gif" height="21" width="55" border="0"></a></center>');
		win.document.write('</body></html>');
		win.document.close();
		win.focus();
	}
}


var scrapalreadyopen = new Array();
var scrapnewwin = new Array();

function scrapWindow(theURL,winName,features,wid,hei){

	var winl = (screen.width - wid - 10) / 2;
	var wint = (screen.height - hei - 29) / 2;
	var winpos = ',height='+hei+',width='+wid+',top='+wint+',left='+winl;
	
	if(scrapalreadyopen[winName]){
		if(!scrapnewwin[winName].closed){
			scrapnewwin[winName].focus();
			return false;	
		}
		else{
			scrapnewwin[winName] = window.open(theURL,winName,features + winpos);
			return scrapnewwin[winName];
		}
	}
	else{
		scrapalreadyopen[winName] = 1;	
		scrapnewwin[winName] = window.open(theURL,winName,features + winpos);
		scrapnewwin[winName].focus();
		return scrapnewwin[winName];
	}
	return false;
}


