function openFlash()
{
	if(document.getElementById('flashcontent') != null) {
		document.getElementById('flashcontent').style.visibility = 'hidden';
	}
	bod = document.getElementsByTagName('body')[0];
	overlay = document.createElement('div');
	overlay.id	= 'flashbox';
	overlay.innerHTML	= '<div id="flash_container" style="position:absolute; top:200px; left:350px; width:420px; height:255px; z-index:9999;' + 
								 'text-align:center; margin-left:auto; margin-right:auto;">' +
								'<div id="flash_outer">' +
									'<div id="flash">' +
										'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="tcrmap" width="550" height="350">' +
											'<param name="allowScriptAccess" value="sameDomain" />' +
											'<param name="allowFullScreen" value="false" />' +
											'<param name="movie" value="http://www.tcresidential.com/flash/tcrmap_office.swf" />' +
											'<param name="quality" value="high" />' +
											'<embed src="http://www.tcresidential.com/flash/tcrmap_office.swf" quality="high" name="tcrmap" align="left" width="550" height="350" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
										'</object>' +
									'</div>' +
								'</div>' +						
							'</div>' +
							'<div style="position:absolute; top:550px; left:350px; width:551px; height:50px; text-align:center; background-color:#000000;">' +
								'<input type="button" style="background-color:#000000; color:#ffffff; margin-top:2px; float:right;" value="Close" onclick="closeFlash()" />' +
							'</div>';
	bod.appendChild(overlay);
	document.getElementById('flashbox').style.visibility = 'visible';
}
function openFlashHome()
{
	if(document.getElementById('flashcontent') != null) {
		document.getElementById('flashcontent').style.visibility = 'hidden';
	}
	bod = document.getElementsByTagName('body')[0];
	overlay = document.createElement('div');
	overlay.id	= 'flashbox';
	overlay.innerHTML	=   '<div id="flash_container" style="position:absolute; top:150px; left:300px; width:700px; height:477px; z-index:9999;' + 
								 'text-align:center; margin-left:auto; margin-right:auto;">' +
								'<div id="flash_outer" style="width:100%;z-index:9999;right: 0px;">' +
									'<div id="flash" style="z-index:9999;">' +
										'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" id="tcrmap" width="700" height="477">' +
											'<param name="allowScriptAccess" value="sameDomain" />' +
											'<param name="allowFullScreen" value="false" />' +
											'<param name="wmode" value="transparent" />' +
											'<param name="movie" value="http://www.tcresidential.com/flash/flashmap2.swf" />' +
											'<param name="quality" value="high" />' +
											'<embed src="http://www.tcresidential.com/flash/flashmap2.swf" wmode="transparent" quality="high" name="tcrmap" align="left" width="700" height="477" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
										'</object>' +
									'</div>' +
								'</div>' +
								'<div id="map_layer" style="z-index:9999;"><iframe name="map_frame" style="background-color:black;" src="about:blank" frameborder="0" scrolling="no"></iframe></div>'+
							'</div>' +
							'<div style="position:absolute; top:635px; left:300px; width:701px; height:20px; text-align:center; background-color:#000000;">' +
								'<input type="button" style="background-color:#000000; color:#ffffff; margin-top:2px; float:right;" value="Close" onclick="closeFlash()" />' +
							'</div>';
	bod.appendChild(overlay);
	document.getElementById('flashbox').style.visibility = 'visible';
}
function closeFlash()
{
	var Node1 = document.getElementById('mainbody'); 
      var len = Node1.childNodes.length;
      
       for(var i = 0; i < len; i++)
       {           
            if(Node1.childNodes[i].id == 'flashbox')
            {
                Node1.removeChild(Node1.childNodes[i]);
            }
       }
	if(document.getElementById('flashcontent') != null) {
		document.getElementById('flashcontent').style.visibility = 'visible';
	}
}
function initializeFlash()
{
	//alert("here");
	//if(parent.document.getElementById('flashcontent') != null) {
		document.getElementById('flashcontent').style.visibility = 'visible';
	//}
}
function openMap(city, region, dontUpdateCombos)
	{
	if(typeof dontUpdateCombos == 'undefined') chooseRegionCombo(city ? city : region);
	var map = document.getElementById('map_layer');

	map.style.visibility = 'visible';
	map_frame.location = 'http://www.tcresidential.com/map.php?'+Math.random()+((city) ? "&city="+escape(city) : "");
	}
function closeMap()
	{
	var map = document.getElementById('map_layer');

	map.style.visibility = 'hidden';
	map_frame.location = 'about:blank';
	}