// Popup script for FLV player

function launchFLVPopup (file, hiLo) {
	if (hiLo == "lo" || hiLo == "low") {
		//newWindowMedium.close();
		//newWindowLarge.close();
			w = 320;
		 h = 290;
			var x = (screen.width-w)/2;
	  var y = (screen.height-h)/2;
	  var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;			
			var newWindowSmall = window.open ('flvplayer.html?file=' + file + '&hiLo=' + hiLo, "pUpS", attribs); 
   newWindowSmall.focus();
	}
	else if (hiLo == "med" || hiLo == "medium") {
		w = 480;
		h = 435;
	 var x = (screen.width-w)/2;
	 var y = (screen.height-h)/2;
	  var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;			
			var newWindowMedium = window.open ('flvplayer.html?file=' + file + '&hiLo=' + hiLo, "pUpM", attribs); 
   newWindowMedium.focus();
	}
		else if (hiLo == "hi" || hiLo == "high") {
	var w = 640;
	var h = 580;
	 var x = (screen.width-w)/2;
	 var y = (screen.height-h)/2;
	  var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;			
			var newWindowLarge = window.open ('flvplayer.html?file=' + file + '&hiLo=' + hiLo, "pUpL", attribs); 
   newWindowLarge.focus();
	}
}
/////////////////////
/*function launchFLVPopup (file, hiLo) {

	var w = 640;
	var h = 580;
	
	if (hiLo == "lo" || hiLo == "low") {
		w = 320;
		h = 290;
	}
	else if (hiLo == "med" || hiLo == "medium") {
		w = 480;
		h = 435;
	}
	var x = (screen.width-w)/2;
	var y = (screen.height-h)/2;
	
	var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;
	//New code 9/9/9
	//newW = w + 2;
	//newH = h + 49;
	var newWindow = window.open ('flvplayer.html?file=' + file + '&hiLo=' + hiLo, "pUp", attribs); 
 newWindow.focus();
//newWindow.resizeTo(w + 50, h + 95);
//newWindow.resizeTo(w + 24, h + 105);// a bit too large, but close
//newWindow.resizeTo(w + 22, h + 96); //very close slightly large
//newWindow.resizeTo(w + 21, h + 94);// height ok, too wide
//newWindow.resizeTo(w + 21, h + 96);// much to large
//newWindow.resizeTo(w + 19, h + 91);
//newWindow.resizeTo(w + 2, h + 30);


	//End New Code
}*/


function launchInteractivePopup (file) {
	var w = 702;
	var h = 600;
	var x = (screen.width-w)/2;
	var y = (screen.height-h)/2;
	
	var flashLink = "";
	
	
	
	/*
	switch (file) {
		case "dinosaur_world": flashLink = "http://www.dl.ket.org/scalecity/dino.html"; break;
		case "louisville_slugger_museum": flashLink = "http://www.dl.ket.org/scalecity/bat.html"; break;
		case "world_of_mural_painting": flashLink = "http://www.dl.ket.org/scalecity/paint.html"; break;
		case "miniature_land": flashLink = "http://www.dl.ket.org/scalecity/mini.html"; break;
		case "sky_vue_drive_in": flashLink = "http://www.dl.ket.org/scalecity/drivein.html"; break;
		case "world_chicken_festival": flashLink = "http://www.dl.ket.org/scalecity/chicken.html"; break;
		case "belle_of_louisville": flashLink = "http://www.dl.ket.org/scalecity/belle.html"; break;
		case "kentucky_horse_park": flashLink = "http://www.dl.ket.org/scalecity/horse.html"; break;
		case "quiz": flashLink = "http://www.dl.ket.org/scalecity/quiz.html"; break;
	}
	*/
	flashLink = "swf/" + file + ".html";
	
	var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=no,resizable=yes,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;	
	var newFlashWindow = window.open (flashLink, "pUpquiz", attribs); 
 newFlashWindow.focus();
}

function launchScaleCityQuiz () {
	launchInteractivePopup ("quiz");
}


function launchWhatIsScaleCity () {
	var w = 350;
	var h = 350;
	var x = (screen.width-w)/2;
	var y = (screen.height-h)/2;	
	
	var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;	
	var newLaunchWhatIsScaleCity = window.open ("whatsscalecity.html", "pUp", attribs); 
	newLaunchWhatIsScaleCity.focus();
}

function launchSuggestedRoute () {
	var w = 350;
	var h = 330;
	var x = (screen.width-w)/2;
	var y = (screen.height-h)/2;	
	
	var attribs = "toolbar=no,statusbar=no,location=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=" + x + ",top=" + y;	
	var newLaunchSuggestedRoute = window.open ("suggestedroute.html", "pUp", attribs); 
	newLaunchSuggestedRoute.focus();
}

