function writeEmail(link)
{
	document.write('<a href="mailto:' + link + '@prismdevelopments.com">' + link + '@PRISMdevelopments.com</a>' )
}


var prism = '<a href="/commercial/prism-place/prism-place.htm"><img src="/images/property-prism-place.gif" alt="Feature Property: Prism Place" border="0"></a>'
var balzac = '<a href="/land/balzac/balzac-commercial-campus.htm"><img src="/images/property-balzac.gif" alt="Feature Property: Balzac Commercial Campus" border="0"></a>'
var bella_casa = '<a href="/condominiums/bella-casa/bella-casa.htm"><img src="/images/property-bella-casa.gif" alt="Feature Property: Bella Casa Condos" border="0"></a>'

function insertFooterBanner(target)
{

if(!window.featureProperty)
	{
		var so = new SWFObject("/swf/feature-banner.swf", "featureBanner", 463, 139, "6", "#ffffff"); // SWFmovie, id, width, height, version, background
		//so.useExpressInstall('expressinstall.swf');
		so.write(target);
	}
else if(window.featureProperty == "prism")
	{
		document.write(bella_casa)
	}
else if(window.featureProperty == "balzac")
	{
		document.write(prism)
	}
else if(window.featureProperty == "bella_casa")
	{
		document.write(prism)
	}
else
	{
		num = Math.random() * 3
		num = Math.ceil(num)
		switch (num)
		{
		case 1:
			document.write(prism)
			break;
		case 2:
			document.write(balzac)
			break;
		case 3:
			document.write(bella_casa)
			break;
		}	
	}
}

function insertH1Flash()
{
	if(document.getElementById)
		{
			target =document.getElementById('h1Flash')
			var headerText =target.innerHTML;
			var so = new SWFObject("/swf/h1.swf", "h1Banner", 600, 27, "8", "#ffffff"); // SWFmovie, id, width, height, version, background
			so.addVariable("headerText", headerText)
			if(so.write('h1Flash'))
				{
				target.className = "h1Flash"
				}
			
		}
}

function insertBanner(barPosition)
{
	if(document.getElementById)
		{
		target =document.getElementById('h1banner').firstChild
			var so = new SWFObject("/swf/banner.swf", "banner", 600, target.height, "7", "#ffffff"); // SWFmovie, id, width, height, version, background
			so.addParam("scale","noscale");
			so.addVariable("photo", target.src)
			if(barPosition)
				{
					so.addVariable("barPosition", barPosition)
				}
			so.write('h1banner');
		}
}


if (navigator.userAgent.indexOf('Opera') > -1)
	{
		opera = true
	}
else{opera = false}


function insertTopBanner(link)
{
	if(opera == false)
		{
			var so = new SWFObject("/swf/" + link + ".swf", "topBanner", "100%", 165, "6", "#2C2B2C"); // SWFmovie, id, width, height, version, background
			so.addParam("wmode", "opaque");
			so.addParam("scale","noscale");
			//so.useExpressInstall('/library/expressinstall.swf');
			so.write('top-photo');
		}
}
