function msieversion()
// return Microsoft Internet Explorer (major) version number, or 0 for others
// This function works by finding the "MSIE " string and extracting the version number
// following the space, up to the decimal point for the minor version which is ignored.
{
	var ua = window.navigator.userAgent
	var msie = ua.indexOf ( "MSIE " )
	if ( msie > 0 )		// is Microsoft Internet Explorer; return version number
		return parseInt ( ua.substring ( msie+5, ua.indexOf ( ".", msie ) ) )
	else
		return 0	// is other browser
}
window.IEVersion = msieversion();
window.RunningIEOld = (window.IEVersion <= 6);

function LoadAnimation()
{
    var meets = new Meets(GetMeetsFile());  
    var meetDestination = meets.getNearestMeet().destination.replace("\\'","'");
    var meetDate = meets.getNearestMeet().date.longFormat;
    
    var announcement;
    
    announcement="<p>";
    announcement+="Have you joined us before?";
    announcement+="<br />";
    announcement+="Try the next meet!";
    announcement+="<br />";
    announcement+="<b>";    
    announcement+="<a href='nextouting.htm'>" + meetDestination + "</a>";
    announcement+="<br />";    
    announcement+= meetDate;
    announcement+="</b>";
    announcement+="</p>"; 
    document.getElementById('bannertext').innerHTML=announcement;
    
    setTimeout("setNight()",3000);
}

function setNight()
{
    var fadeElement = new Spry.Effect.Fade("pnldaynight", {duration:12000, from:0, to:75, toggle:false, finish:function(){showBanner();}});                
    fadeElement.start();             
}

function showBanner()
{
    var blind_hidden = new Spry.Effect.Fade("pnlbanner", {duration: 5000, from: 0, to: 75, toggle: false, transition:Spry.linearTransition , finish:function(){setTimeout("hideBanner()",10000)} });                             
    blind_hidden.start();                
}

function hideBanner()
{
    var blind_hidden = new Spry.Effect.Grow("pnlbanner", {duration: 500, from: "100%", to: "0%", toggle: false, transition:Spry.squarerootTransition , finish:function(){setDay();} });
    blind_hidden.start();
}

function setDay()
{ 
    var fadeElement = new Spry.Effect.Fade("pnldaynight", {duration:30000, from:75, to:0, toggle:false, finish:function(){setTimeout("setNight()",3000)}});
    fadeElement.start(); 
    initializePnlbanner();
}

function initializePnlbanner()
{
    var elem = document.getElementById("pnlbanner");
    elem.style.width ="180px";
    elem.style.height ="92px";                                
    elem.style.position = "relative";
    elem.style.top = "15px";
    elem.style.left = "560px";                   
    elem.style.display = "none";
}

