var MM_contentVersion = 8;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i)
		{
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
		}
	var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
if ( MM_FlashCanPlay ) {
	var globalURL = "http://roomplanner.icovia.com/"
	var targetURL = globalURL + clientID;
	var launchURL = targetURL + "/resources/launch.swf";
	
<!-- FLASH LAUNCH BUTTON -->
	document.write(' <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
	document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
	document.write(' ID="launch" WIDTH="60" HEIGHT="30">');
	document.write(' <PARAM NAME=quality VALUE=high> '); 
	document.write(' <PARAM NAME=wmode VALUE=transparent> '); 
	document.write(' <PARAM NAME=movie VALUE='+launchURL+'> ');
	document.write(' <PARAM NAME=bgcolor VALUE=#E0DFD3> ');
	document.write(' <PARAM NAME=allowScriptAccess VALUE=always> ');
	document.write(' <EMBED src='+launchURL+' ');
	document.write(' quality=high wmode=transparent swLiveConnect=FALSE bgcolor=#E0DFD3 WIDTH="60" HEIGHT="30" NAME="launch" allowScriptAccess="always"' );
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </EMBED>');
	document.write(' </OBJECT>');
	
} else{
	document.write(' <a href="http://www.macromedia.com/go/getflashplayer">get Flash Player</a> ');
}

function icx_windowopen() {
	var launchURL = targetURL +'/resources/icovia.aspx'

	if(planID.length > 20){
		launchURL = launchURL +'?planID='+ planID;
	}
	
	var newWindow = null;
	newWindow=window.open(launchURL ,'RP','height=550,width=800,top='+((screen.height/2)-(300))+',left='+((screen.width/2)-(400))+',status=no,toolbar=no,scrollbars=no,resizable=yes,menubar=no'); void(0);
	
	var popUpMsg = "You appear to have a pop-up blocker that prevents the Room Planner from opening. Please enable pop-ups for this site and try again. Thank you.";
	if(!newWindow){
		alert(popUpMsg);
	}
	
}

