// ---- BEGIN BROWSER DETECTION FUNCTIONS ----

var isIE4 = (document.all) ? true : false;
var isNS4 = (document.layers) ? true : false;
var isDOM = (document.getElementById && !document.all) ? true : false;

/*************************************************************************

  dw_viewport.js
  version date Nov 2003
  
  This code is from Dynamic Web Coding 
  at http://www.dyn-web.com/
  Copyright 2003 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  Permission granted to use this code 
  as long as this entire notice is included.

*************************************************************************/  
  
viewport = {
  getWinWidth: function () {
    this.width = 0;
    if (window.innerWidth) this.width = window.innerWidth - 18;
    else if (document.documentElement && document.documentElement.clientWidth) 
  		this.width = document.documentElement.clientWidth;
    else if (document.body && document.body.clientWidth) 
  		this.width = document.body.clientWidth;
  },
  
  getWinHeight: function () {
    this.height = 0;
    if (window.innerHeight) this.height = window.innerHeight - 18;
  	else if (document.documentElement && document.documentElement.clientHeight) 
  		this.height = document.documentElement.clientHeight;
  	else if (document.body && document.body.clientHeight) 
  		this.height = document.body.clientHeight;
  },
  
  getScrollX: function () {
    this.scrollX = 0;
  	if (typeof window.pageXOffset == "number") this.scrollX = window.pageXOffset;
  	else if (document.documentElement && document.documentElement.scrollLeft)
  		this.scrollX = document.documentElement.scrollLeft;
  	else if (document.body && document.body.scrollLeft) 
  		this.scrollX = document.body.scrollLeft; 
  	else if (window.scrollX) this.scrollX = window.scrollX;
  },
  
  getScrollY: function () {
    this.scrollY = 0;    
    if (typeof window.pageYOffset == "number") this.scrollY = window.pageYOffset;
    else if (document.documentElement && document.documentElement.scrollTop)
  		this.scrollY = document.documentElement.scrollTop;
  	else if (document.body && document.body.scrollTop) 
  		this.scrollY = document.body.scrollTop; 
  	else if (window.scrollY) this.scrollY = window.scrollY;
  },
  
  getAll: function () {
    this.getWinWidth(); this.getWinHeight();
    this.getScrollX();  this.getScrollY();
  }
  
}

function GetViewableBrowserDimension(dimension)
{
    var bWidth = 0, bHeight = 0;
    
    if(typeof(window.innerWidth) == 'number')
    {
        //Non-IE
        bWidth = window.innerWidth;
        bHeight = window.innerHeight;
    }
    else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight))
    {
        //IE 6+ in 'standards compliant mode'
        bWidth = document.documentElement.clientWidth;
        bHeight = document.documentElement.clientHeight;
    }
    else if(document.body && (document.body.clientWidth || document.body.clientHeight))
    {
        //IE 4 compatible
        bWidth = document.body.clientWidth;
        bHeight = document.body.clientHeight;
    }
    else
    {
        bWidth = document.offsetWidth;
        bHeight = document.offsetHeight;
    }
    
    if(dimension.toLowerCase() == 'w')
    {
        return bWidth;
    }
    else if(dimension.toLowerCase() == 'h')
    {
        return bHeight;
    }
}

function GetViewableBrowserWidth()
{
    return GetViewableBrowserDimension('w');
}

function GetViewableBrowserHeight()
{
    return GetViewableBrowserDimension('h');
}

function GetScrollPosition(scrollType)
{
    var vXOffset;
    var vYOffset;
 
     if(typeof(window.pageXOffset) == 'number')
    {
        //Non-IE
        vXOffset = window.pageXOffset;
        vYOffset = window.pageYOffset;
    }
    else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop))
    {
        //IE 6+ in 'standards compliant mode'
        vXOffset = document.documentElement.scrollLeft;
        vYOffset = document.documentElement.scrollTop;
    }
    else if(document.body && (document.body.scrollLeft || document.body.scrollTop))
    {
        //IE 4 compatible
        vXOffset = document.body.scrollLeft;
        vYOffset = document.body.scrollTop;
    }
    
    if(scrollType.toLowerCase() == 'x')
    {
        return vXOffset;
    }
    else if(scrollType.toLowerCase() == 'y')
    {
        return vYOffset;
    }
}

function GetScrollPositionWidth()
{
    return GetScrollPosition('x');
}

function GetScrollPositionHeight()
{
    return GetScrollPosition('y');
}

function GetObjectPosition(obj, positionType)
{
    var curLeft = 0;
    var curTop = 0;
    
    if(obj.offsetParent)
    {
//        alert('IN IF STATEMENT');
        curLeft = obj.offsetLeft;
        curTop = obj.offsetTop;
        
        while(obj = obj.offsetParent)
        {
            curLeft += obj.offsetLeft;
            curTop += obj.offsetTop;
        }
    }
    else
    {
//        alert(obj.offsetParent);
//        alert('Left is: ' + obj.x + '\n Top is: ' + obj.y);
    }
    
    if(positionType.toLowerCase() == 'x')
    {
        return curLeft;
    }
    else if(positionType.toLowerCase() == 'y')
    {
        return curTop;
    }
}

function GetObjectPositionX(obj)
{
    return GetObjectPosition(obj,'x');
}

function GetObjectPositionY(obj)
{
    return GetObjectPosition(obj,'y');
}

// ---- END BROWSER DETECTION FUNCTIONS ----

// ---- BEGIN IFRAME FUNCTIONS ----

function getIFrameHeight() {
	var varHeight;
	
	if(document.getElementById && !(document.all))
	{
		alert('I am document.getElementById');
	
		varHeight = document.getElementById('iFrameName').contentDocument.body.scrollHeight;
		
		document.getElementById('iFrameName').style.height = varHeight;
	}
	else if(document.all)
	{
		alert('I am document.all');
		alert('Iframe Scroll Height is: ' + document.frames('iFrameName').document.body.scrollHeight);
	
		varHeight = document.frames('iFrameName').document.body.scrollHeight;
		
		document.all.iFrameName.style.height = varHeight;
	}
}

// ---- END IFRAME FUNCTIONS ----

// ---- BEGIN POPUP WINDOW FUNCTIONS ----

function OpenPopup(URL, width, height) {
	window.self.name = "main";
	//var now = new Date();
	//var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=0");
	var remote = window.open(URL, "popup", "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=0");
	remote.resizeTo(parseInt(width)+2,parseInt(height)+35);
	remote.focus();	
}

function OpenBarlessScrollingPopup(URL, width, height) {
	window.self.name = "main";
	//var now = new Date();
	//var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=0,status=0,menubar=0,scrollbars=yes");
	var remote = window.open(URL, "popup", "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=0,status=0,menubar=0,scrollbars=yes");
	remote.resizeTo(parseInt(width)+2,parseInt(height)+35);
	remote.focus();	
}

function OpenBarlessPopup(URL, width, height) {
	window.self.name = "main";
	//var now = new Date();
	//var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=0,status=0,menubar=0,scrollbars=0");
	var remote = window.open(URL, "popup", "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=0,status=0,menubar=0,scrollbars=0");
	remote.resizeTo(parseInt(width)+2,parseInt(height)+35);
	remote.focus();
}

function OpenScrollingPopup(URL, width, height) {
	window.self.name = "main";
	//var now = new Date();
	//var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=yes");
	var remote = window.open(URL, "popup", "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=yes");
	remote.resizeTo(parseInt(width)+2,parseInt(height)+35);
	remote.focus();	
}

function OpenScrollingToolPopup(URL, width, height) {
	window.self.name = "main";
	//var now = new Date();
	//var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=0,scrollbars=yes");
	var remote = window.open(URL, "popup", "width=" + width + ",height=" + height + ",toolbar=1,location=0,directories=0,resizable=1,status=1,menubar=1,scrollbars=yes");
	remote.resizeTo(parseInt(width)+2,parseInt(height)+35);
	remote.focus();	
}

function OpenFullPopup(URL, width, height) {
	window.self.name = "main";
	//var now = new Date();
	//var remote = window.open(URL, "popup" + now.getTime(), "width=" + width + ",height=" + height + ",toolbar=0,location=0,directories=0,resizable=1,status=1,menubar=1,scrollbars=yes");
	var remote = window.open(URL, "popup", "width=" + width + ",height=" + height + ",toolbar=1,location=0,directories=0,resizable=1,status=1,menubar=1,scrollbars=yes");
	remote.resizeTo(parseInt(width)+2,parseInt(height)+35);
	remote.focus();	
}

// ---- END POPUP WINDOW FUNCTIONS ----

// ---- BEGIN DHTML DISPLAY FUNCTIONS ----

function ToggleDivDisplay(div)
{
    if(document.getElementById(div).style.display == 'none')
    {
        document.getElementById(div).style.display = 'block';
    }
    else
    {
        document.getElementById(div).style.display = 'none';
    }
}

function CenterLayerPosition(divLayer)
{
    var elem = document.getElementById(divLayer);
    var scrollX = parseInt(GetViewableBrowserWidth());
    var scrollY = parseInt(GetViewableBrowserHeight());
    
    elem.style.left = ((scrollX/2) - (parseInt(elem.style.width)/2)) + 'px';
    elem.style.top = ((scrollY/2) + (parseInt(elem.style.height)/2) + GetScrollPositionHeight() - 120) + 'px';
    elem = null;
}

function CenterOffsetLayerPosition(divLayer, offsetX, offsetY)
{
    var elem = document.getElementById(divLayer);
    var scrollX = parseInt(GetViewableBrowserWidth());
    var scrollY = parseInt(GetViewableBrowserHeight());
    
    elem.style.left = ((scrollX/2) - offsetX - (parseInt(elem.style.width)/2)) + 'px';
    elem.style.top = ((scrollY/2) + (parseInt(elem.style.height)/2) + GetScrollPositionHeight() - 120) + 'px';
    elem = null;
}

function CenterParentOffsetLayerPosition(divLayer,divParent)
{
    //var offsetX = GetObjectPositionX(divParent);
    //var offsetY = GetObjectPositionY(divParent);
    viewport.getAll();
    document.getElementById(divLayer).style.position = 'absolute';
    
    //manually setting these values
    var leftColumnOffset = 175;
    var progressBarWidth = 125;
    var headerOffset = 125;
    
    var offsetX = 0;
    if(viewport.width > 960){
        offsetX = (viewport.width - 960)/2
    }
    document.getElementById(divLayer).style.left = ((viewport.width + viewport.scrollX)/2  - progressBarWidth) - offsetX - leftColumnOffset   + "px";
    document.getElementById(divLayer).style.top = ((viewport.height )/2 + viewport.scrollY - headerOffset) + "px";

    //return CenterOffsetLayerPosition(divLayer,155,500);
}

//function CenterLayerPosition(divLayer)
//{
//    var elem = document.getElementById(divLayer);
//    var scrollY = parseInt(GetViewableBrowserHeight());

//    elem.style.left = (785 - (parseInt(elem.style.width)/2)) + 'px';
//    elem.style.top = ((scrollY/2) - (parseInt(elem.style.height)/2) + GetScrollPositionHeight() - 120) + 'px';
//    elem = null;
//}

// ---- END DHTML DISPLAY FUNCTIONS ----

// ---- BEGIN NAVIGATION ROLLOVER FUNCTIONS ----
if(document.images)
{
	nav1On = new Image(); 
	nav1On.src = "http://www.cbre.com/images/menu/button_property_listings_o.gif"; 
	nav1Off = new Image(); 
	nav1Off.src = "http://www.cbre.com/images/menu/button_property_listings.gif"; 

	nav2On = new Image(); 
	nav2On.src = "http://www.cbre.com/images/menu/button_service_lines_o.gif"; 
	nav2Off = new Image(); 
	nav2Off.src = "http://www.cbre.com/images/menu/button_service_lines.gif"; 

	nav3On = new Image(); 
	nav3On.src = "http://www.cbre.com/images/menu/button_research_centre_o.gif"; 
	nav3Off = new Image(); 
	nav3Off.src = "http://www.cbre.com/images/menu/button_research_centre.gif"; 

	nav4On = new Image(); 
	nav4On.src = "http://www.cbre.com/images/menu/button_our_offices_o.gif"; 
	nav4Off = new Image(); 
	nav4Off.src = "http://www.cbre.com/images/menu/button_our_offices.gif"; 

	nav5On = new Image(); 
	nav5On.src = "http://www.cbre.com/images/menu/button_our_people_o.gif"; 
	nav5Off = new Image(); 
	nav5Off.src = "http://www.cbre.com/images/menu/button_our_people.gif"; 

	nav6On = new Image(); 
	nav6On.src = "http://www.cbre.com/images/menu/button_client_tools_o.gif"; 
	nav6Off = new Image(); 
	nav6Off.src = "http://www.cbre.com/images/menu/button_client_tools.gif"; 

	nav7On = new Image(); 
	nav7On.src = "http://www.cbre.com/images/menu/button_about_us_o.gif"; 
	nav7Off = new Image(); 
	nav7Off.src = "http://www.cbre.com/images/menu/button_about_us.gif";
	
	nav8On = new Image(); 
	nav8On.src = "http://www.cbre.com/images/menu/button_investor_relations_o.gif"; 
	nav8Off = new Image(); 
	nav8Off.src = "http://www.cbre.com/images/menu/button_investor_relations.gif"; 	
}
	
function turnOn(imgName)
{
	if (document.images)
	{
		imgOn = eval(imgName + "On.src");
		document[imgName].src = imgOn;
	}
}

function turnOff(imgName)
{
	if (document.images)
	{
		imgOff = eval(imgName + "Off.src");
		document[imgName].src = imgOff;
	}
}

function hideNavMenu(lay) {
	if (isIE4) {document.all[lay].style.visibility = "hidden";}
	if (isNS4) {document.layers[lay].visibility = "hide";}
	if (isDOM) {document.getElementById([lay]).style.visibility = "hidden";}
}

function showNavMenu(lay) {
	var i;

	if('nav0menu' != lay)
	{
		if((lay.charAt(0) == 'n') && (lay.charAt(lay.length - 1) == 'u')) {
			for(i = 1; i < 9; i++) {
				if(('nav' + i + 'menu') == lay) {
					//alert('nav' + i + 'menu is on');
					if (isIE4) {document.all[lay].style.visibility = "visible";}
					if (isNS4) {document.layers[lay].visibility = "show";}
					if (isDOM) {document.getElementById([lay]).style.visibility = "visible";}
				}
				else {
					//alert('nav' + i + 'menu is off');
					if (isIE4) {document.all['nav' + i + 'menu'].style.visibility = "hidden";}
					if (isNS4) {document.layers['nav' + i + 'menu'].visibility = "hide";}
					if (isDOM) {document.getElementById(['nav' + i + 'menu']).style.visibility = "hidden";}		
				}
			}
		}
		else {
				if (isIE4) {document.all[lay].style.visibility = "visible";}
				if (isNS4) {document.layers[lay].visibility = "show";}
				if (isDOM) {document.getElementById([lay]).style.visibility = "visible";}
		}
	}
	else
	{
		for(i = 1; i < 20; i++) {
			if (isIE4 && document.all['nav' + i + 'menu'] != null) {document.all['nav' + i + 'menu'].style.visibility = "hidden";}
			if (isNS4 && document.layers['nav' + i + 'menu'] != null) {document.layers['nav' + i + 'menu'].visibility = "hide";}
			if (isDOM && document.getElementById(['nav' + i + 'menu']) != null) {document.getElementById(['nav' + i + 'menu']).style.visibility = "hidden";}
		}
	}
}
function showNavLayerMenu(lay,intLayCount) {
	var i;
	var intNavCount;
	intNavCount = parseInt(intLayCount) + 1;

	if((lay.charAt(0) == 'n') && (lay.charAt(lay.length - 1) == 'u')) {
		for(i = 1; i < intNavCount; i++) {
			if(('nav' + i + 'menu') == lay) {
				//alert('nav' + i + 'menu is on');
				if (isIE4) {document.all[lay].style.visibility = "visible";}
				if (isNS4) {document.layers[lay].visibility = "show";}
				if (isDOM) {document.getElementById([lay]).style.visibility = "visible";}
			}
			else {
				//alert('nav' + i + 'menu is off');
				if (isIE4) {document.all['nav' + i + 'menu'].style.visibility = "hidden";}
				if (isNS4) {document.layers['nav' + i + 'menu'].visibility = "hide";}
				if (isDOM) {document.getElementById(['nav' + i + 'menu']).style.visibility = "hidden";}		
			}
		}
	}
	else if((lay.charAt(0) == 's') && (lay.charAt(lay.length - 1) == 'u')) {
		for(i = 1; i < intNavCount; i++) {
			if(('subnav' + i + 'menu') == lay) {
				//alert('subnav' + i + 'menu is on');
				if (isIE4) {document.all[lay].style.visibility = "visible";}
				if (isNS4) {document.layers[lay].visibility = "show";}
				if (isDOM) {document.getElementById([lay]).style.visibility = "visible";}
			}
			else {
				//alert('subnav' + i + 'menu is off');
				if (isIE4) {document.all['subnav' + i + 'menu'].style.visibility = "hidden";}
				if (isNS4) {document.layers['subnav' + i + 'menu'].visibility = "hide";}
				if (isDOM) {document.getElementById(['subnav' + i + 'menu']).style.visibility = "hidden";}		
			}
		}
	}	
	else {
			if (isIE4) {document.all[lay].style.visibility = "visible";}
			if (isNS4) {document.layers[lay].visibility = "show";}
			if (isDOM) {document.getElementById([lay]).style.visibility = "visible";}
	}
}
// ---- END NAVIGATION ROLLOVER FUNCTIONS ----

// ---- BEGIN OFFICE FINDER REDIRECT FUNCTION ----

function RedirectOffice(strAppPath,frmValue)
{
	//alert(frm);

	if(frmValue != "")
	{
		var arrData = frmValue.split("|");
		var strLocale = arrData[2].replace(' ', '+');
		strLocale.replace('&aacute;','%E1');
		strLocale.replace('&oacute;','%F3');
		
		if(arrData[1] == "C")
		{
			//alert(strAppPath + "/about+us/office+finder/officeresults.htm?zone=" + arrData[0] + "&city=" + strLocale);
			window.location.href = strAppPath + "/about+us/office+finder/officeresults.htm?zone=" + arrData[0] + "&city=" + strLocale;
		}
		else if(arrData[1] == "A")
		{
			//alert(strAppPath + "/about+us/office+finder/officeresults.htm?zone=" + arrData[0] + "&area=" + strLocale);
			window.location.href = strAppPath + "/about+us/office+finder/officeresults.htm?zone=" + arrData[0] + "&area=" + strLocale;
		}
	}		
}

// ---- END OFFICE FINDER REDIRECT FUNCTION ----

// ---- BEGIN CLEAR DROP MENU FUNCTION ----

function ClearDropMenu(menu) 
{
    if(document.getElementById(menu))
    {    
	    document.getElementById(menu).selectedIndex = 0;
	}
}

function ClearFormBox(field)
{
    if(document.getElementById(field))
    {
        document.getElementById(field).value = '';
    }
}

// ---- END CLEAR DROP MENU FUNCTION ----

// ---- BEGIN FORM RELATED FUNCTIONS ----

function SetFocus(frmInput)
{
    if(document.getElementById(frmInput))
    {
        document.getElementById(frmInput).focus();
    }
}

// ---- END FORM RELATED FUNCTIONS ----

//---- BEGIN OBJECT ACTIVATION FIX ----
// EOLAS won a lawsuit vs. Microsoft.  Apparently EOLAS patented the ability to load an Active X control
// in the browser with the ability to interact with it immediately without pressing "ok".
// http://www.eweek.com/article2/0,1895,1865104,00.asp - Eolas Wins Round vs. MS in Browser Patent Fight
// http://www.eweek.com/article2/0,1895,1895907,00.asp - Microsoft Bows to Eolas, Revamps IE's Multimedia Handling

function EnableObjects()
{
	var arrObjects;
	var arrApplets;
	var arrEmbeds;
	
	arrObjects = document.getElementsByTagName("object");
	arrApplets = document.getElementsByTagName("applet");
	arrEmbeds = document.getElementsByTagName("embed");
	
	if(arrObjects.length > 0)
	{
		for(var i = 0; i < arrObjects.length; i++)
		{
			//arrObjects[i].outerHTML = arrObjects[i].outerHTML;
			
			if(arrObjects[i].id.indexOf('NCPHRICH') >= 0) //Enable only for MCMS Placeholder Controls
			{
				parentObj = arrObjects[i].parentNode;
				newObjContent = parentObj.innerHTML;
				parentObj.removeChild(arrObjects[i]);
				parentObj.innerHTML = newObjContent;
			}
		}
	}
	
	if(arrApplets.length > 0)
	{
		for(var j = 0; j < arrApplets.length; j++)
		{
			//arrApplets[j].outerHTML = arrApplets[j].outerHTML;
			parentApplet = arrApplets[j].parentNode;
			newAppContent = parentApplet.innerHTML;
			parentApplet.removeChild(arrApplets[j]);
			parentApplet.innerHTML = newAppContent;
		}
	}
	
	if(arrEmbeds.length > 0)
	{
		for(var k = 0; k < arrEmbeds.length; k++)
		{
			//arrEmbeds[k].outerHTML = arrEmbeds[k].outerHTML;
			parentEmbed = arrEmbeds[k].parentNode;
			newEmbedContent = parentEmbed.innerHTML;
			parentEmbed.removeChild(arrEmbeds[k]);
			parentEmbed.innerHTML = newEmbedContent;
		}
	}
}

//---- END OBJECT ACTIVATION FIX ----

//---- BEGIN FLASH DETECTION KIT ----

//Legacy Function
function SWFObject(strURL, strName, intWidth, intHeight, intVersion, strBGColor)
{
	DrawFlashImage(strURL,strName,intWidth,intHeight,strBGColor);
}

function DrawFlashImage(strURL, strName, intWidth, intHeight, strBGColor)
{
	//**Global Vars**

	//- Major version of Flash required
	var requiredMajorVersion = 9;

	//- Minor version of Flash required
	var requiredMinorVersion = 0;

	//- Minor revision of Flash required
	var requiredRevision = 0;

	//- Version check based upon the values entered in "Global Vars"
	var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

	//- Check to see if the version meets the requirements for playback
	if(hasRequestedVersion)
	{
		// embed the Flash content SWF when all tests are passed
		AC_FL_RunContent(
			/*"src", strURL,
			"width", intWidth,
			"height", intHeight,
			"align", "middle",
			"id", strName,
			"quality", "high",
			"bgcolor", strBGColor,
			"name", strName,
			"allowScriptAccess", "sameDomain",
			"WMode", "transparent",
			"type", "application/x-shockwave-flash",
			"codebase", "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"*/
			"codebase", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0",
			"width", intWidth,
			"height", intHeight,
			"src", strURL,
			"quality", "high",
			"pluginspage", "http://www.macromedia.com/go/getflashplayer",
			"align", "middle",
			"play", "true",
			"loop", "true",
			"scale", "showall",
			"wmode", "transparent",
			"devicefont", "false",
			"id", strName,
			"bgcolor", strBGColor,
			"name", strName,
			"menu", "true",
			"allowFullScreen", "false",
			"allowScriptAccess","always",
			"movie", strURL,
			"salign", ""
		);
	}
	else
	{
		//flash is too old or we can't detect the plugin
		var alternateContent = '<p>Adobe Flash Player 9 was not detected on your system.  Please update or download now.</p>' +
							'<p><a href=\"http://www.adobe.com/go/getflash/\">Get Flash</a>';
							
		document.write(alternateContent);
	}
}
//---- END FLASH DETECTION KIT ----