// Check for Flash plugin and identify version
flash = { installed:false, version:0, rev:0, forcehide:false }; 

if(navigator.plugins && navigator.plugins.length > 0) { // NS3+, Mozilla, Opera3+, IE5+ Mac (support plugin array)
	if(navigator.plugins["Shockwave Flash"]) {
		flash.installed = true;
		var flash_desc = navigator.plugins["Shockwave Flash"].description;
        flash.version=parseInt(flash_desc.substring(flash_desc.indexOf(".")-1));
        flash.rev=parseInt(flash_desc.substring(flash_desc.indexOf("r")+1));
	}
}
else if(window.ActiveXObject) { // IE4+ Win32:  attempt to create an ActiveX object using VBScript
	document.write('<scr' + 'ipt language="VBScript"\> \n'+
		'on error resume next \n'+
		'dim obFlash \n'+
		'set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.8") \n'+
		'if IsObject(obFlash) then \n'+
		'flash.version = 8 \n'+
		'flash.installed = true \n'+
		'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.7") end if \n'+
		'if flash.version < 8 and IsObject(obFlash) then \n'+
		'flash.version = 7 \n'+
		'flash.installed = true \n'+
		'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.6") end if \n'+
		'if flash.version < 7 and IsObject(obFlash) then \n'+
		'flash.version = 6 \n'+
		'flash.installed = true \n'+
		'else set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash.5") end if \n'+
		'if flash.version < 6 and IsObject(obFlash) then \n'+
		'flash.version = 5 \n'+
		'flash.installed = true \n'+
		'end if'+
		'</scr' + 'ipt\> \n');
}

flash.movies = new Array();

function addFlash() {
	if(flash.installed && flash.version >= 6) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="766" height="306"><param name="movie" value="header.swf"><param name="quality" value="high"><embed src="header.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="766" height="306"></embed></object>');
	} else {
		document.write('<img src="images/menu.jpg" alt="Menu" width="766" height="306" border="0" usemap="#menu"><map name="menu"><area shape="rect" coords="715,22,759,46" href="privacy.asp" alt="Privacy"><area shape="rect" coords="661,23,710,45" href="glossary.asp" alt="Glossary"><area shape="rect" coords="624,23,656,46" href="faq.asp" alt="FAQ"><area shape="rect" coords="573,110,761,298" href="contact.asp" alt="Contact"><area shape="rect" coords="385,110,573,298" href="profile.asp" alt="Profile"><area shape="rect" coords="196,110,384,298" href="services.asp" alt="Services"><area shape="rect" coords="7,110,195,298" href="loanapplication.asp" alt="Loan application"><area shape="rect" coords="579,23,619,46" href="index.asp" alt="Home"></map>');
	}
}
function addFlashTicker() {
	if(flash.installed && flash.version >= 6) {
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="450" height="50"><param name="movie" value="Newsticker.swf"><param name="quality" value="high"><embed src="Newsticker.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="50"></embed></object>');
	} else {
		document.write('Home Loans up to 97% of valuation... Highly competitive interest rates. Business and Investment Loans which do not require evidence of TAX returns to 80% of valuation. Loans for Commercial and Industrial properties up to 80% valuation. Residential Construction Loans up to 90% valuation. Asset lending - no financials, no credit checks to 80% of valuation. Loans to persons with poor credit rating up to 85% valuation. ');
	}
}
