function newWindow(filePath,winName,winProperties){
	var newWin = window.open(filePath,winName,winProperties);
	newWin.focus();
}

function openPopup(filename, type){
	if (type == "programs"){
		newWindow(filename, type, "width=596, height=490, scrollbars=yes, menubar=no, toolbar=no, location=no, status=no, resizable=no");
	}	
	else {
		newWindow(filename, type, "width=596, height=386, scrollbars=yes, menubar=no, toolbar=no, location=no, status=no, resizable=no");
	}	
}

function targetOpener(filepath){
	opener.location = filepath;
}




// Check for Flash and write Flash HTML, non-Flash HTML, or redirect to non-Flash page
var flashInstalled=0;
if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("windows")!=-1){
	document.write('<scr'+'ipt language="VBScript"\>\non error resume next\n');
	document.write('flash2Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2")))\n');
	document.write('flash3Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
	document.write('flash4Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
	document.write('flash5Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
	document.write('flash6Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))\n');
	document.write('flash7Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7")))\n');
	document.write('flash8Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.8")))\n');
	document.write('flash9Installed=(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.9")))\n');
	document.write('for i=2 to 9\nif eval("flash"&i&"Installed")=true then flashInstalled=i\nnext\n');
	document.write('</scr'+'ipt\>\n');
}
function detectFlash(fPath,fWidth,fHeight,fColor,nfPath,fVersion){
	if(navigator.plugins)if(navigator.plugins["Shockwave Flash"])if(parseInt(navigator.plugins["Shockwave Flash"].description.charAt(navigator.plugins["Shockwave Flash"].description.indexOf(".")-1))>=fVersion)flashInstalled=fVersion;
	if(flashInstalled>=fVersion){document.write(''
		+'<object width="'+fWidth+'" height="'+fHeight+'" id="flashmov" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000">'
			+'<param name="allowScriptAccess" value="sameDomain" />'
			+'<param name="movie" value="'+fPath+'" />'
			+'<param name="quality" value="high" />'
			+'<param name="bgcolor" value="'+fColor+'" />'
			+'<embed src="'+fPath+'" quality="high" bgcolor="'+fColor+'" width="'+fWidth+'" height="'+fHeight+'" name="flashmov" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
		+'</object>'
	)}else if(nfPath.length>1){location.href=nfPath}else{document.write(noflash)}
}
noflash = '<img src="images/home_noflash_grant.jpg" width="798" height="373" alt="" border="0">';

