// 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 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>U.S. Department of Transportation Certification </strong><br><img src="images/whats-new/dot-logo.png" style="float:right;width:40%;margin:5px 0 5px 5px;" alt="">As a United States of America Department of Transportation (U.S. DOT) certified charter company, Northeast Charter &amp; Tour, our primary goal is safe transportation. The U.S. DOT certification provides our customers with the confidence that proper safety management controls have been implemented throughout the company so our guests can enjoy their travel experience and have peace of mind when traveling with Northeast Charter &amp; Tour.</p>',
	
	'<p><strong>Department of Defense Certification </strong><br><img src="images/whats-new/dod-logo.jpg" style="float:right;width:40%;margin:5px 0 5px 5px;" alt="">With a constant commitment to safety, Northeast Charter & Tour is proud to be Department of Defense (DOD) certified with a commendable #1 rating. By receiving this top safety rating of the highest level, it makes definite that Northeast Charter & Tour is maintaining compliance with the Federal Motor Carrier Safety Regulation and Military Bus Agreement at an exemplary level. DOD certification also ensures travelers are receiving the best service and safest transportation available.</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/Sirius 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>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/Northeast-Charter-and-Tour-Co-Inc/226424798725" 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;
  }
}
