function initFlash(detection,parameters,slash_count){
	//alert("RFP.swf" + parameters)

	expandWindow()
	switch (detection){
		case "fulldetect":
			FlashControl.createSWFObject(
				slash_count + "RFP.swf",
				{
					width:"100%",
					height:"100%", 
					bgcolor:"#000000",
					wmode:"transparent",
					quality:"high",
					align:"middle",
					salign:"t",
					FlashVars:parameters,
					allowScriptAccess:"sameDomain",
					id:"rfp"
				},
				"content_wrapper",
				{
					detectFlash:true,
					flashVersion:9,
					detectResolution:false,
					resolutionY:890,
					//resolutionX:1190,
					/* detectViewport:true,
					viewportY:1000,
					viewportX:700, */
					onError:errorHandler
				}
			)
			//setBackgroundAndPop()
		break;
		case "nodetect":
			FlashControl.createSWFObject(
				slash_count + "RFP.swf",
				{
					width:"100%",
					height:"100%",
					bgcolor:"#000000",
					wmode:"transparent",
					quality:"high",
					align:"middle",
					FlashVars:parameters,
					salign:"t",
					allowScriptAccess:"sameDomain",
					id:"nona"
				},
				"content_wrapper",
				{
					detectFlash:false,
					detectResolution:false
				}
			)
		break;
	}
}
function expandWindow(){
	//var w = screen.availWidth;
	//var h = screen.availHeight;
	//window.resizeTo(w, h);	
	//window.moveTo(0,0);
  self.moveTo(0,0);
  self.resizeTo(screen.availWidth,screen.availHeight);
}
function setBackgroundAndPop(){
	var wrapper = document.getElementById("content_wrapper")
	var _html=""
	_html+= '<div><a href="javascript:exploreRFP()"><img src="data/htmlimages/RiverfrontPark_PopUpSplash.gif" border="0" /></a><br /><a href="http://blog.riverfrontpark.com"><img src="data/htmlimages/JustTakeMeToTheBlog.gif" border="0" /></a></div>'
	wrapper.innerHTML = _html
	exploreRFP();
	
}
function errorHandler(err,erros){
	var wrapper = document.getElementById("content_wrapper")
	var _html=""
	
	switch (err){
		case "invalidFlash":
			if ((ScreenControl.resolutionY() <= 480) && (ScreenControl.resolutionX() <= 320)){
				location.href = "http://m.riverfrontpark.com";
			}
			_html+= '<a href="http://www.macromedia.com/go/getFlashPlayer"><img src="http://riverfrontpark.com/data/htmlimages/RiverfrontPark_NoFlash.gif" border="0" /></a><br /><a href="http://blog.riverfrontpark.com" target="_blank"><img src="http://riverfrontpark.com/data/htmlimages/JustTakeMeToTheBlog.gif" border="0" /></a>'
			wrapper.innerHTML = _html
		
		break;
		case "invalidResolution":
			if ((ScreenControl.resolutionY() <= 480) && (ScreenControl.resolutionX() <= 320)){
				location.href = "http://m.riverfrontpark.com";
			}else if (ScreenControl.resolutionY()>700){
				
				_html+= '<div><a href="javascript:exploreRFP()"><img src="http://riverfrontpark.com/data/htmlimages/RiverfrontPark_PopUpSplash.gif" border="0" /></a><br /><a href="http://blog.riverfrontpark.com" target="_blank"><img src="http://riverfrontpark.com/data/htmlimages/JustTakeMeToTheBlog.gif" border="0" /></a></div>'
				wrapper.innerHTML = _html
				exploreRFP();
				
			}else{
				_html+= '<div><a href="javascript:exploreRFP()"><img src="http://riverfrontpark.com/data/htmlimages/RiverfrontPark_NoRes.gif" border="0" /></a><br /><a href="http://blog.riverfrontpark.com" target="_blank"><img src="http://riverfrontpark.com/data/htmlimages/JustTakeMeToTheBlog.gif" border="0" /></a></div>'
				wrapper.innerHTML = _html
			}
		break;
		/* case "invalidViewport":
			alert('invalidviewport');
		break; */
	}
}

function initSite(d){
	var wrapper = document.getElementById("content_wrapper")
	var _html=""
	//if(prompt("Please Enter Password") == "RFP_demo"){
	//	if(FlashControl.detectFlash(8)){
	//		if(d =='nodetect'){
	//			initFlash(d)
	//		}else{
				_html+= '<div><a href="javascript:exploreRFP()"><img src="data/htmlimages/ThanksLaunchAgain.gif" border="0" /></a></div>'
				wrapper.innerHTML = _html
				exploreRFP()
	//		}
	//	}else{
	//		errorHandler('invalidFlash')
	//	}
	//}else{
	//	alert("Incorrect Password")
	//}
}
function exploreRFP(){
	//alert('exploreRFP()');
	
	var RFPWin = window.open('index.aspx?detect=nodetect', 'RFP', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+screen.availWidth+',height='+screen.availHeight)
	if (RFPWin==undefined){
		//var a = "As you begin this course you may have many questions running through your head, such as: 'What is Nonaology, exactly?' and 'Does this have anything to do with that Lake Nona in Orlando, Florida?' or 'Is it true you can build a self-levitation device out of spare household parts?' \r\nThe answers are all inside, but in order to learn more, you have to enable popups."
		var a = "This site needs to use pop-ups. Please enable pop-ups and try again."
		alert(a)
	}else{
		RFPWin.focus()
	}
			
}

	
