function installGoogAzon(){
	var agent=window.navigator.userAgent;
	var url="http://spandexfox.com/media/googazon.xpi";
	if(agent.indexOf("Firefox")<=0)
	{
		window.alert("Sorry! GoogAzon will only run in Flock or Firefox right now.");
		return false;
	}	
	g_onloadHeight = window.innerHeight;
	installClicked = true;
	InstallBarCheck();
	InstallTrigger.install({
		"GoogAzon": { URL: url,
			IconURL: "",
			toString : function() { return this.URL; } } });
			return false;	
		}
var g_onloadHeight = window.innerHeight;
var step = 0;
var installBarTriggered = 0;
var creep = false;
var installClicked = false;
var installBandDown = false;
function InstallBarCheck() {
	if (g_onloadHeight -15 > window.innerHeight) {
		if (!installBandDown && installClicked)
		{
			installClicked = false;
			installBarTriggered++;
			bringDownInstallBand(5);
		}
	} else if (installBarTriggered % 3 == 1) {
		installBarTriggered++;
	}
	setTimeout(function() {InstallBarCheck();}, 500);
}
var divInstallBand = false;
var darkening = false;
var nonInstallerBody = false;
function bringDownInstallBand(val)
{
	if (val > 120) return;
	installBandDown = true;
	if (!divInstallBand)
	{
		divInstallBand   = document.getElementById("installer");
		darkening        = document.getElementById("darken");
		nonInstallerBody = document.getElementById("noinstaller");
	}
	divInstallBand.style.display='block';
	darkening.style.display = "block";
	if( document.body.offsetWidth ) {
		darkening.style.width = document.body.offsetWidth+'px';
		if( window.screen.availHeight )
		darkening.style.height =window.screen.availHeight+'px';
		else
		darkening.style.height = document.body.offsetHeight+'px';
	} 
	else if( document.body && ( document.body.scrollWidth || document.body.scrollHeight ) ) {
		darkening.style.width = document.body.scrollWidth+'px';
		darkening.style.height = (document.body.scrollHeight+120)+'px';
	} else {
		darkening.style.width='100%';
		darkening.style.height='100%';
	}   
	darkening.style.MozOpacity= (0.8) ;    
	divInstallBand.style.marginTop =  '0px';
	// if (!val) val = 5;
	// bringDownInstallBandAnimate(val);
}
function bringDownInstallBandAnimate(val)
{
	if (val > 120) return;          
	if (val < 80) darkening.style.MozOpacity= (val/100) ;   
	divInstallBand.style.marginTop = (val - 110) + 'px';
	//nonInstallerBody.style.marginTop= val + 'px';
	setTimeout("bringDownInstallBandAnimate("+ ( val + 25 ) +")", 40);
}
function closeUpInstallBandAnimate(val)
{
	if (val > 120) return closeUpInstallBand();
	if (val < 80) darkening.style.MozOpacity= ((80-val)/100) ;      
	divInstallBand.style.marginTop = (0-val) + 'px';
	// nonInstallerBody.style.marginTop= (120-val) + 'px';
	setTimeout("closeUpInstallBandAnimate("+ ( val + 5 ) +")", 30);            
}
function closeUpInstallBand()
{
	divInstallBand.style.display='none';
	darkening.style.display = "none";
	installBandDown = false;
	//location.href = unescape(window.location.pathname);
	return false;
}
function closeInstaller()
{
	closeUpInstallBand();
	//closeUpInstallBandAnimate(3);
}
/*
function hideWebcast(){
	document.getElementById("webcast").style.display="none";
	document.getElementById("webcast").style.left="0px";
	document.getElementById("webcast_button_close").style.display="none";
	document.getElementById("webcast_embed").style.display="none";
	document.getElementById("welcome").style.display="block";
	document.getElementById("webcast").style.left="0px";
	document.getElementById("welcome").style.left="0px";
	document.getElementById("webcast_button_a").style.display="block";
	document.getElementById("webcast_embed").style.display="none";
	document.getElementById("webcast_embed").innerHTML="";
	}
function hideButton(){
	document.getElementById("webcast_button_a").style.display="none";
	//document.getElementById("webcast_embed").style.display="none";
	}
function afterFinishShow(){
	document.getElementById("welcome").style.display="none";
	window.setTimeout("showFlash()",500);
	}
function showFlash(){
		document.getElementById("webcast").style.display="block";
		document.getElementById("webcast_button_close").style.display="block";
		document.getElementById("webcast_embed").style.display="block";
		var so = new SWFObject( "http://vimeo.com/moogaloop.swf", "csSWF", "504", "316", "9.0.28", "#1a1a1a");
		so.addParam( "quality", "best" );
		so.addParam( "allowFullScreen", "true" );
		so.addParam( "scale", "showall" );
		so.addParam( "allowScriptAccess", "always" );
		so.addParam( "wmode", "opaque" );
		so.addVariable( "autostart", "true" );
		so.addVariable( "autoplay", "1" );
		so.addVariable( "clip_id", "2096411" );
		so.addVariable( "server", "vimeo.com" );
		so.addVariable( "show_title", "1" );
		so.addVariable( "show_byline", "1" );
		so.addVariable( "show_portrait", "0" );
		so.addVariable( "color", "00ADEF" );
		so.addVariable( "fullscreen", "1" );
		
		so.write("webcast_embed");			
	}		
	*/
function showWebcast(){
	//alert(Effect);

	
	new Effect.Move('welcome', {
		x:900,
		y:0,
		beforeStart:hideButton, 
		afterFinish:afterFinishShow
	});
	/*new Effect.Move('webcast', {
		x:500,
		y:0,
		beforeStart:hideButton, 
		afterFinish:afterFinishShow
	});
	*/
}
