<!--
var delay = 4000;
var timerID = null;
var boatpos = -666;	// start off the left of the screen

// MJP 01-09-09
// Turn off pop-up sailor
// MJP 08-10-09
// Turn back on
//if( checkCookie() )
//{
//	ie6hack();
//	timerID = self.setTimeout("ShowSailor()", 2000);	
//}
timerID = self.setTimeout("MoveOffers()", 2000);


var foo = null; // object


function doMove() {
	boatpos = boatpos+1;
	if( boatpos > 1000 )
	{
		foo.style.left= '0px';
		boatpos =0;
	}
  foo.style.left = parseInt(foo.style.left)+1+'px';
  setTimeout(doMove,20); // call doMove in 20msec
  document.title=foo.style.left;
}


function ie6hack()
{
	isIE6 = navigator.userAgent.toLowerCase().indexOf('msie 6') != -1;
	if( isIE6 )
	{
		//alert("IE 6");
		document.getElementById('sailor').style.position="absolute";
	}
	else
		{
			//alert("NOT IE6");
		}
}
function ShowSailor()
{
	
  $('sailor').appear();  
  timerID = self.setTimeout("PlayFloat()", 2000);	
  

}

function HideSailor()
{
	
  $('sailor').fade();
  

}

function PlayFloat()
{
	
  PlaySound("floatyourboat");
  timerID = self.setTimeout("HideSailor()", 7000);

}

function PlaySound(thissound)
{
	var sound = document.getElementById(thissound);
	try
	{
		sound.Play();
	} 
	catch(e)
		{
			try 
			{
				sound.Play();
			}
			catch (e)
				{
					//alert(thissound);
				}
		}		
}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,expiredays)
{
var exdate=new Date();
exdate.setDate(exdate.getDate()+expiredays);
document.cookie=c_name+ "=" +escape(value)+
((expiredays==null) ? "" : ";expires="+exdate.toUTCString());
}

function checkCookie()
{
	ok=false;
sailordate=getCookie('sailor');
expireDate = new Date();

// If the cookie isn't there or has expired then we want to show the sailor, so return true.  Otherwise we'll return false.
if (sailordate==null || sailordate=="")
  {
  	//setCookie('sailor',expireDate,1);
  	//Let it expire when the browser closes - that way we'll only display the sailor when they first open the home page and not on subsequent visits that are part of the same sesssion.
  	setCookie('sailor',expireDate);
  ok=true;
  
  }
  
  return ok;
}

function MoveOffers()
{
	var boat = document.getElementById('offers');
	//alert("Margin left = " + boat.style.marginLeft);
	//boat.style.marginLeft = (boat.style.marginLeft+10)+'px';
	
	boatpos = boatpos + 1;
	boat.style.marginLeft = boatpos +'px';
	if( boatpos > 948 )
	{
		boatpos = -666;
		//boat.style.marginLeft = '-333px';
		//new Effect.Move('newnews', { x: -600, y: 0, mode: 'absolute' });
	}
	//new Effect.Move('newnews', { x: 800, y: 0, mode: 'relative', transition: Effect.Transitions.linear });
	timerID = self.setTimeout("MoveOffers()", 10);
}

//-->