// scripts/main.css contains javascript functions
//

// function browsr detects which web browser is being 
// used to display the page
	var browser = 0;
	var version = parseInt(navigator.appVrsion);
	var name = navigator.appName;
	
	function browsr(choice) {
	//
		if (name == "Netscape") {
			//
			browser = 2;
			}
		else if (name == "Microsoft Internet Explorer") {
			//
			browser = 1;
			}
	}	
	
	var w;	// the popup window
	var myPage = ""; // page address
	var myTemp = ""; // page title
	
	function popup(choice) {
		//

		switch(choice) {
			case 1:
				if (w) {w.close(); }
				myTemp = "Introduction";
				myPage ="popups/introduction.html";
				break;
			case 2:
				if (w) {w.close(); }
				myPage = "popups/valueformoney.html";
				myTitle = "ValueForMoney";
				break;
			case 3:
				if (w) {w.close(); }
				myPage = "popups/improvingdemocracy.html";
				myTitle = "ImprovingDemocracy";
				break;
			case 4:
				if (w) {w.close(); }
				myPage = "popups/housing.html";
				myTitle = "Housing";
				break;
			case 5:
				if (w) {w.close(); }
				myPage = "popups/climategreen.html";
				myTitle = "Climate Change & Green Issues";
				break;
			case 6:
				if (w) {w.close(); }
				myPage = "popups/environment.html";
				myTitle = "The Living Environment";
				break;
			case 7:
				if (w) {w.close(); }
				myPage = "popups/crimeorder.html";
				myTitle = "Crime and Order";
				break;
			case 8:
				if (w) {w.close(); }
				myPage = "popups/economicstrength.html";
				myTitle = "Economic strength";
				break;
			case 9:
				if (w) {w.close(); }
				myPage = "popups/sustainability.html";
				myTitle = "Sustainability and Community";  
				break;
			case 10:
				if (w) {w.close(); }
				self.location.replace("index.html");

				break;
			default: 
			} 
		if (choice != 10) { 
		if (browser == 1) {
		w = window.open(myPage, myTemp, "width=500, height=600, resizable=yes, scrollbars=yes" ); 
			}
		else if (browser == 2){
		w = window.open(myPage, myTemp, "width=500, height=600, resizable=yes, scrollbars=yes" ); 
			}		
		w.moveTo(250, 100);
		w.focus(); 
		}
	}
	

		


	