// JavaScript Document

var idFeature = 1;
var lastIdFeature = -1;

function animFeature() {
	lastIdFeature = idFeature
	idFeature++;
	var t = document.getElementById( "feature" + idFeature );
	if ( t == null ) {
		idFeature = 1;
		t = document.getElementById( "feature" + idFeature );
	} 
	var tOld = document.getElementById( "feature" + lastIdFeature );
	tOld.style.display = 'none';
	t.style.display = 'block';
}
			
function startAnim() {
	if ( document.getElementById( "features" ) ) {
		setInterval( animFeature, 3500 );
	}
}

/* 
getDay() - Day of the week(0-6). 0 = Sunday, ... , 6 = Saturday
getDate() - Day of the month (0-31)
getMonth() - Number of month (0-11) */

function writeDiscount() {
	var myDate=new Date();
	myDate.setDate(myDate.getDate()+5);
	
	var months = new Array( "January", "February", "March", "April", "May", "June", "July", "August",  "September", "October", "November", "December" );

	document.write( months[ myDate.getMonth() ] + " " + myDate.getDate() + ", " + myDate.getFullYear() );
}
