function initFlash(detection,parameters){
	//alert("RFP.swf" + parameters)
	switch (detection){
		case "fulldetect":
			FlashControl.createSWFObject(
				"windrose.swf",
				{
					width:"100%",
					height:"100%",
					bgcolor:"#ffffff",
					quality:"high",
					align:"left",
					salign:"t",
					FlashVars:parameters,
					allowScriptAccess:"sameDomain",
					id:"windrose"
				},
				"content_wrapper",
				{
					detectFlash:true,
					flashVersion:9,
					detectResolution:true,
					resolutionY:801,
					//resolutionX:1024,
					/* detectViewport:true,
					viewportY:1000,
					viewportX:700, */
					onError:errorHandler
				}
			)
		break;
		case "nodetect":
			FlashControl.createSWFObject(
				"windrose.swf",
				{
					width:"100%",
					height:"100%",
					bgcolor:"#ffffff",
					quality:"high",
					align:"left",
					salign:"t",
					allowScriptAccess:"sameDomain",
					id:"windrose"
				},
				"content_wrapper",
				{
					detectFlash:false,
					detectResolution:false
				}
			)
		break;
	}
}
function errorHandler(err,erros){
	var wrapper = document.getElementById("content_wrapper")
	var _html=""
	
	switch (err){
		case "invalidFlash":
			_html+= '<a href="http://www.macromedia.com/go/getFlashPlayer"><img src="data/htmlimages/Detection_Flash.gif" border="0" /></a>'
			wrapper.innerHTML = _html
		break;
		case "invalidResolution":
			if (ScreenControl.resolutionY()>700){
				
			_html+= '<div><a href="javascript:explore()"><img src="data/htmlimages/Detection_PopUpSplash.gif" border="0" /></a></div>'
			wrapper.innerHTML = _html
			explore();
				
			}else{
				_html+= '<div><a href="Javascript:location.reload(true)"><img src="data/htmlimages/Detection_ScreenRes.gif" border="0" /></a></div>'
				wrapper.innerHTML = _html
			}
		break;
		/* case "invalidViewport":
			alert('invalidviewport');
		break; */
	}
}

function explore(){
	var RFPWin = window.open('index.aspx?detect=nodetect', '32Winds', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width='+screen.availWidth+',height='+screen.availHeight)
	if (RFPWin==undefined){
		var a = "This site needs to use pop-ups. Please enable pop-ups and try again."
		alert(a)
	}else{
		RFPWin.focus()
	}
	
}	
