function set_cookie ( name, value, expires_year, expires_month, expires_day, path, domain, secure )
{
  var cookie_string = name + "=" + escape ( value );

  if ( expires_year )
  {
    var expires = new Date ( expires_year, expires_month, expires_day );
    cookie_string += "; expires=" + expires.toGMTString();
  }

  if ( path )
	cookie_string += "; path=" + escape ( path );

  if ( domain )
	cookie_string += "; domain=" + escape ( domain );

  if ( secure )
	cookie_string += "; secure";
  document.cookie = cookie_string;
}
function delete_cookie ( cookie_name )
{
  var cookie_date = new Date ( );  // current date & time
  cookie_date.setTime ( cookie_date.getTime() - 1 );
  document.cookie = cookie_name += "=; expires=" + cookie_date.toGMTString();
}

function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}

if (!get_cookie("username"))
{
    var username = ( "Whitetracks" );
    var current_date = new Date;
    var cookie_year = current_date.getFullYear ( );
    var cookie_month = current_date.getMonth ( );
    var cookie_day = current_date.getDate ( ) + 1;
    set_cookie ( "username", username );
    document.write ( "<div id=\"fa\">" );
    document.write ( "<div id=\"fake\">" );
    document.write ( "<div id=\"textbox\">" );
document.write ( "<div class=\"fa_close\"><a href=\"\" onClick=\"window.location.reload()\">Close <img src=\"close1.jpg\" /></a></div>" );

  document.write ( "<i><font color=WHITE><h3>NEW!!!</h3></font></i><font color=red><h4>Shared Helicopter Airport Transfers<br><br></font><font color=#FFFFFF>Whitetracks Helicopters</h4></font>" );
	document.write ( "<strong><font color=#FFFFFF>Shared helicopter transfers from all airports and resorts across the French Alps, Switzerland, Italy and Austria.<br><br>Click <a href=http://www.whitetracks.co.uk/Shared-Helicopter-Transfers_Listings.php?agent=popup>HERE</a> for listings.</strong></font>" );
	document.write ( "<strong><font color=#FFFFFF><br><br>Or click <a href=http://www.whitetracks.co.uk/Contact_Whitetracks-Helicopters.php>HERE</a> to contact us.</font></strong></div>")
	
	document.write ( "<div id=\"textbox2\">" );
   document.write ( "<div class=\"fa_close\"><a href=\"\" onClick=\"window.location.reload()\">Close <img src=\"close1.jpg\" /></a></div>" );

	document.write ( "<i><font color=red><h3>NEW!!!</h3></font></i><font color=red><h4>Shared Helicopter Airport Transfers<br><br></font><font color=#000066>Whitetracks Helicopters</h4></font>" );
	document.write ( "<strong><font color=#000066>Shared helicopter transfers from all airports and resorts across the French Alps, Switzerland, Italy and Austria.<br><br>Click <a href=http://www.whitetracks.co.uk/Shared-Helicopter-Transfers_Listings.php?agent=popup>HERE</a> for listings.</strong></font>" );
	document.write ( "<strong><font color=#000066><br><br>Or click <a href=http://www.whitetracks.co.uk/Contact_Whitetracks-Helicopters.php>HERE</a> to contact us.</font></strong></div>")
	
	document.write ( "<div id=\"heli\"><center><img src=http://www.whitetracks.co.uk/database/popup-helicopter.gif width=1000></center></div></div>" );

}
else
{
  var username = get_cookie ( "username" );
  
}
