			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 = "/"
				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(' <EMBED src='+launchURL+' ');
	document.write(' quality=high wmode=transparent swLiveConnect=FALSE bgcolor=#E0DFD3 WIDTH="60" HEIGHT="30" NAME="launch"');
	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
	document.write(' </EMBED>');
	document.write(' </OBJECT>');

//				document.write(' <div class="body"><a href="javascript:icx_windowopen()">launch</a></div> ');
				
			} else{
				document.write(' <a href="http://www.macromedia.com/go/getflashplayer">get Flash Player</a> ');
			}

			function icx_windowopen() {
				var launchURL = targetURL +'/resources/icovia.aspx';
				
				var sentPlanID = "";
				var sentCartID = "";
				var sentUserID = "";
				
				sentPlanID = planID;
				sentCartID = getValue("cartid");
				sentUserID = getValue("uguid");
				
				launchURL = launchURL +'?';
				
				if(planID.length > 20)
				{
					launchURL = launchURL +'planID='+ sentPlanID+'&';
				}
				if(sentCartID.length > 0)						
				{						
					launchURL = launchURL + 'cartid=' + sentCartID+'&';
				}
				if(sentUserID.length > 0)						
				{						
					launchURL = launchURL + 'uguid=' + sentUserID+'&';
				}				
				
// check for plan
//				if(planID.length > 20)
//				{
//					launchURL = launchURL +'?planID='+ planID;
	
//					var sentGUID = "";				
//					sentGUID = getValue("cartid");
//					if(sentGUID.length > 0)						
//					{						
//						launchURL = launchURL + '&cartid=' + sentGUID;
//					}
//				}
				// no plan, check for cart
//				else
//				{
//					var sentGUID = "";				
//					sentGUID = getValue("cartid");
//					if(sentGUID.length > 0)						
//					{						
//						launchURL = launchURL + '?cartid=' + sentGUID;
//					}
//				}

				
				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);
				}
			}
			
			function getValue(varname){
			  // First, we load the URL into a variable
			  var url = window.location.href;
			
			  // Next, split the url by the ?
			  var qparts = url.split("?");
			
			  // Check that there is a querystring, return "" if not
			  if (qparts.length == 0)  {
				return "";
			  }
			
			  // Then find the querystring, everything after the ?
			  var query = qparts[1];

			  // Split the query string into variables (separates by &s)
			  if (query!=null) {
				  var vars = query.split("&");
			  }
			  else {
			  	return "";
			  }
			
			  // Initialize the value with "" as default
			  var value = "";
			
			  // Iterate through vars, checking each one for varname
			  for (i=0;i<vars.length;i++)  {
				// Split the variable by =, which splits name and value
				var parts = vars[i].split("=");
				
				// Check if the correct variable
				if (parts[0].toLowerCase() == varname)	{
				  // Load value into variable
				  value = parts[1];
			
				  // End the loop
				  break;
				}
			  }
  
			  // Convert escape code
			  value = unescape(value);
			
			  // Convert "+"s to " "s
			  value.replace(/\+/g," ");
			
			  // Return the value
			  return value;
			}


