var MM_contentVersion = 7;

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";

		

	document.write(' <a href="javascript:icx_windowopen();" onMouseOver="window.status=\'Launch Room Planner\'; return true" onMouseOut="window.status=\'\';return true"><img src="/images/planner.jpg" width="148" height="153" border="0"></a>');



	

} 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);

	}

	

}

