<!-- Hide script from old browsers
var expireDate = new Date   
var hasFlash = false            
var numVisits = 0            
var skipFlashURL = "noflash.html"  
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring, writeFlash, Opsys;

function getBrowser()
{
	if (checkIt('konqueror'))
	{
		browser = 1 //"Konqueror";
		OS = "Linux";
	}
	else if (checkIt('omniweb')) browser = 1; //"OmniWeb"
	else if (checkIt('opera')) browser = 1; //"Opera"
	else if (checkIt('webtv')) browser = 1; // "WebTV";
	else if (checkIt('icab')) browser = 1; //"iCab"
	else if (checkIt('safari')) browser = 2; //"Safari"
       else if (checkIt('firefox')) browser = 2; //"FireFox"
	else if (checkIt('msie')) browser = 2; //"Internet Explorer"
	return browser;
}

getBrowser();
getOS();

function getOS()
{
	if (checkIt('linux')) OS = 1; //"Linux";
	else if (checkIt('x11')) OS = 1; //"Unix";
	else if (checkIt('mac')) OS = 2;//"Mac"
	else if (checkIt('win')) OS = 2; //"Windows"
	else OS = 1; //"an unknown operating system";	
	return OS;
}

getOS();

function checkOS1() {
var Opsys =2;
if (navigator.appVersion.indexOf("Win")!=-1) Opsys=2;
else Opsys = 1
return Opsys;
}


function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}


//Sets the browser cookie

function setCookie(){

expireDate.setMonth(expireDate.getMonth() + 6)

document.cookie = "numVisits=" + 0 + "; expires=" + expireDate.toGMTString()

	}

//Check for flash if browser is netscape
//submitted to www.a1javascripts.com by Joshua Luft-Glidden
if(navigator.appName == "Netscape"){

for(i=0; i<navigator.plugins.length; i++){

if(navigator.plugins[i].name == "Shockwave Flash"){

hasFlash = true

	}

}

}

//Check for flash if browser is IE

else if(navigator.appName == "Microsoft Internet Explorer" && checkOS1()==2){

document.writeln("<script language='VBscript'>")
document.writeln('\'Test to see if VBScripting works')
document.writeln("detectableWithVB = False")
document.writeln("If ScriptEngineMajorVersion >= 2 then")
document.writeln("   detectableWithVB = True")
document.writeln("End If")
document.writeln('\'This will check for the plugin')
document.writeln("Function detectActiveXControl(activeXControlName)")
document.writeln("   on error resume next")
document.writeln("   detectActiveXControl = False")
document.writeln("   If detectableWithVB Then")
document.writeln("      detectActiveXControl = IsObject(CreateObject(activeXControlName))")
document.writeln("   End If")
document.writeln("End Function")
document.writeln("</scr" + "ipt>")
hasFlash = detectActiveXControl("ShockwaveFlash.ShockwaveFlash.1")

	}				

//If there is no cookie (first time visitor) set one

if(document.cookie == ""){
setCookie()
	}
//If there is a cookie (visitor has been here before) update cookie

	else{

var dummy = document.cookie.split("=")

numVisits = dummy[1]
expireDate.setMonth(expireDate.getMonth() + 6)
document.cookie = "numVisits=" + ++numVisits + "; expires=" + expireDate.toGMTString()

	}
//If visitor has been to the site many times skip flash intro

//if((document.cookie != "") && (numVisits > 5) && hasFlash){

//document.location = skipFlashURL



	//}
//If visitor doesn't have flash skip intro
writeFlash='<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=780><img src=img/icon_home_strip.gif usemap=#services width=780 height=52 border=0 title=Busse Design - User Experience Experts></td><td width=100% class=orange-fill-bg><img src=img/ipx.gif width=1 height=1 border=0></td></tr><tr><td colspan=2 class=orange-border-bg><img src=img/ipx.gif width=1 height=1 border=0></td><tr><td width=780><img src=img/photo_home.gif alt=Busse Design - User Experience Experts width=780 height=75 border=0 title=Busse Design - User Experience Experts></td><td width=100% class=orange-fill-bg><img src=img/ipx.gif  width=1 height=1 border=0></td></tr></table>';

if(hasFlash && browser==2)
{writeFlash='<table width=100% border=0 cellspacing=0 cellpadding=0><tr><td width=780 rowspan=3><OBJECT classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 WIDTH=780 HEIGHT=129 id=home_flash4 ><PARAM NAME=movie VALUE=home_flash4.swf><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FA8710><EMBED src=home_flash4.swf quality=high bgcolor=#FA8710  WIDTH=780 HEIGHT=129 NAME=home_flash4 TYPE=application/x-shockwave-flash PLUGINSPAGE=http://www.macromedia.com/go/getflashplayer></EMBED></OBJECT></td><td width=100% class=orange-fill-bg><img src=img/ipx.gif width=1 height=52 border=0></td></tr><tr><td width=100% class=orange-border-bg><img src=img/ipx.gif width=1 height=1 border=0></td></tr><tr><td width=100% class=orange-fill-bg><img src=img/ipx.gif width=1 height=75 border=0></td></tr></table>';
}
//End script hiding -->
