// This Javascript is written by Peter Velichkov (http://blog.creonfx.com)
// and is distributed under the following license : http://creativecommons.org/licenses/by-sa/3.0/
// Use and modify all you want just keep this comment. Thanks

var incdec = 0;
var headID = document.getElementsByTagName("head")[0];
var cssNode = document.createElement("style");
cssNode.type = 'text/css';
cssNode.id="resizingText";

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

function loadCss(x){
	try{
		var cssStr = '\
		.site {font-size:' + (12+x) +'px;}\
		';
		if(cssNode.styleSheet){
			cssNode.styleSheet.cssText = cssStr; // for IE
		} else {
			var cssText = document.createTextNode(cssStr);
			cssNode.appendChild(cssText); // breaks ie
			//cssNode.innerHTML = cssStr; // breaks saffari
		}
		if(!document.getElementById("resizingText"))headID.appendChild(cssNode);
	}catch(err){ 
		// some debugging code
	}
}

function increaseFontSize() {
	if(incdec < 3){
		incdec++;
		loadCss(incdec);
		createCookie('textsize',incdec,1); 
	}
}

function decreaseFontSize() {
	if(incdec > 0){
		incdec--;
		loadCss(incdec);
		createCookie('textsize',incdec,1); 
	}		
}

var x = readCookie('textsize')
if (x && x!=0) {
	x = parseInt(x);
	incdec = x;
	loadCss(x);
}

//eraseCookie('textsize');

whatsNewItems = new Array(
	'<p><strong>NECT Bus Company Gets BIW Contract</strong> <br><img src="images/biw-logo.jpg" style="float:right;width:40%;margin:5px 0 5px 5px;" class="headshot" alt="">The  Northeast Charter &amp; Tour bus company recently announced that the company  has agreed to a contract with Naval Sea Systems Command (NAVSEA) to provide  transportation for military troops from the barracks at the Brunswick Naval Air  Station to Bath Iron Works. Buses will run eight times a day Monday thru Friday  from May until August.</p> To service the troops, NECT also announced the hiring of  bus driver Suzy Lawrence. Lawrence also works as a school bus driver for the  Auburn School District.</p>',
	'<p align="left"> With a <strong>brand new website</strong>, enhanced <strong>safety initiatives</strong> and an outstanding <strong>commitment to the  environment</strong>, there&rsquo;s a lot to be excited about at Northeast Charter &amp; Tour.<p align="left"><img src="../images/scott-riccio-nect.jpg" width="82" height="135" hspace="5" vspace="5" border="1" align="right" />Recently, the American Bus Association (ABA) featured Northeast Charter &amp;  Tour President, Scott A. Riccio, in a Q &amp; A session in their newsletter. To  read the article, <a href="../downloads/aba-newsletter-article.pdf">click here</a>.<p/>',
	'<p><strong>New WiFi Technology </strong><br><img src="images/whats-new/wifi.jpg" style="float:right;width:40%;margin:5px 0 5px 5px;" class="headshot" alt="">All over the road motor coaches  from Northeast Charter &amp; Tour and Richards Coach feature WiFi technology.  WiFi technology allows travelers to connect a Wi-Fi enabled device such as a personal computer, video game console, mobile phone, MP3 player or personal digital  assistant to the Internet.</p>',
	'<p><strong>Northeast Charter &amp; Tour adds Setra 417 to fleet</strong><br><img src="images/fleet/setra-417-box.jpg" alt="Setra 417 bus" style="width:95%;margin:5px 0 5px 5px;" class="headshot">In 2010, Northeast Charter &amp; Tour added the brand new Setra  417 to their fleet of vehicles. The 56-passenger motor coach includes a DVD  player, five 16 inch monitors, 110 volt power outlets, Wi-Fi, XM/Sirus radio,  reclining seats, front tray tables, foot rests, shades, rear window and  lavatory. </p>',
	'<p><strong>We use GPS Technology</strong><br><img src="images/whats-new/gps.jpg" style="float:right;width:40%;margin:5px 0 5px 5px;" class="headshot" alt="">At Northeast Charter &amp; Tour, 75% of our over the road  buses are GPS compliant. This means the location of the bus can be tracked,  along with the speed and other safety regulations. The Voyager GPS Tracking  System allows information to be securely communicated to a datacenter from a  remote vehicle. </p>',
	'<p><strong>NECT Adds More School Buses</strong><br><img src="images/fleet/school-buses-box.jpg" style="width:95%;margin:5px 0 5px 5px;" class="headshot" alt="">In June, Northeast Charter &amp; Tour announced the  company now offers five school buses as part of their extensive fleet of vehicles.  The school buses are available for hire and provide a very economical option  for large group transportation. If your group needs bus transportation for a  field trip, company retreat or just a fun way to get around for a day in an  economical fashion, give us a call.</p>',
	'<p><strong>XM/Sirius Radio Available </strong><br><img src="images/whats-new/sirius_satellite_radio_1.jpg" alt="NECT driver Staci Drake" style="float:right;width:40%;margin:5px 0 5px 5px;" class="headshot">In April, Northeast Charter &amp; Tour added XM/Sirius  Radios to select motorcoaches to enhance your traveling experience. With this  service, guests can now enjoy thousands of music stations, talk shows or even  the Red Sox games from anywhere in the U.S. or Canada. </p>',
	'<p><strong>Northeast Charter & Tour Brings Home Big Winner!</strong> <br><img src="images/whats-new/mohegan-winner.jpg" style="float:right;width:60%;margin:5px 0 5px 5px;" class="headshot" alt="">On June 8th, during a casino trip on Northeast Charter & Tour, <strong>Gloria Mank </strong>from Rockport, Maine won $129,000 on a penny slot machine at Mohegan Sun Casino in Connecticut. Mank enjoys frequent trips to the casino and has been traveling with Northeast Charter & Tour since 2000.</p>&ldquo;I enjoy riding with  Northeast Charter &amp; Tour, because I love their drivers, they are all so  friendly. I really enjoy their trips to Mohegan Sun with my husband, but he  said next time, I&rsquo;ve got to win bigger.&rdquo; said Mank.</p>',
	'<p><strong>NECT Announces New Casino Schedule</strong> <br><img src="images/mohegan-sun-logo.jpg" style="width:95%;margin:5px 0 5px 5px;" class="headshot" alt="">Recently,  Northeast Charter &amp; Tour announced their summer travel schedule for trips  from Maine to Mohegan Sun and Foxwoods casinos in Connecticut. The list of  dates includes a variety of Sunday and Tuesday trips to Mohegan Sun as well as  new Saturday excursions to Foxwoods. For more information and the full list of  dates and itineraries, call toll free 888-593-6328  or view the full schedule <a href="casino_trips.php">online</a></p>',
	'<p><strong>Find Northeast Charter &amp; Tour on Facebook!</strong> <br><img src="images/whats-new/facebook-logo.jpg" style="width:50%;float:right;margin:5px 0 5px 5px;" class="headshot" alt="">Now you can find Northeast Charter &amp; Tour on Facebook! We invite you to visit our <a href="http://www.facebook.com/#!/pages/Lewiston-ME/Northeast-Charter-and-Tour-Co-Inc/226424798725?ref=ts&__a=14&ajaxpipe=1" target="_blank">Facebook page </a> to share the experience from your last trip or see photos our recent trips to Mohegan Sun and other tourist destinations in Maine, New England and beyond! </p>',
	'<p><strong>Northeast Charter &amp; Tour Announces Major Investment and Partnership</strong> <br><img src="images/whats-new/green-bus.jpg" style="width:50%;float:right;margin:5px 0 5px 5px;" class="headshot" alt="">Northeast Charter &amp; Tour recently announced an investment of over one million dollars to expand their fleet of environmentally friendly vehicles with the addition of three new environmentally friendly vehicles. The company also announced a new five-year partnership to provide transportation services for the Auburn/Lewiston YMCA and the promotion and hiring of staff members.  <a href="nect-expansion-release.php">Full story</a></p>'
);
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()
{
whatsnewindex=getCookie('whatsnewindex');
//alert(whatsNewItems.length);
if (whatsnewindex!=null && whatsnewindex!="")
  {
  ++whatsnewindex;
  if ( whatsnewindex >= whatsNewItems.length ) { whatsnewindex = 0; }
  setCookie('whatsnewindex',whatsnewindex,365);
  return whatsnewindex;
  }
else
  {
  whatsnewindex=0;
  setCookie('whatsnewindex',whatsnewindex,365);
  return whatsnewindex;
  }
}