var message0 = "Available now on iTunes; Pilots Guide for iPad and iPhone/iPod touch...<a name=\"link\" id=\"link\"></a>";
var message1 = "Log into our Additional Changes system for the latest airport updates...<a name=\"link\" id=\"link\"></a>";
var message2 = "Sign up now for our new Email Notification List to receive important updates and announcements...<a name=\"link\" id=\"link\"></a>";
var message3 = "Revision 119 for Pilots Guide to California Airports is the current CA Revision...<a name=\"link\" id=\"link\"></a>";
var message4 = "Revision 25 for Pilots Guide to Northwestern Airports is the current NW Revision...<a name=\"link\" id=\"link\"></a>";
var message5 = "Revision 68 for Pilots Guide to Southwestern Airports is the current SW Revision...<a name=\"link\" id=\"link\"></a>";


var totalmessages = 6;

var counter = 0
var r = 0
var g = 0
var b = 0

function showColorin(){
	document.getElementById('fade2').style.color = "rgb(" + r + "," + g + "," + b + ")"
	document.getElementById('link').style.color = "rgb(" + r + "," + g + "," + b + ")"
	setTimeout('fadein()', 15)
}
function showColorout(){
	document.getElementById('fade2').style.color = "rgb(" + r + "," + g + "," + b + ")"
	document.getElementById('link').style.color = "rgb(" + r + "," + g + "," + b + ")"
	setTimeout('fadeout()', 20)
}

function fadeout(){
	r += 10
	g += 10
	b += 10
	if (b >= 210){

		if (counter <= (totalmessages - 2)) {
			counter += 1
			document.getElementById('fade2').innerHTML = eval("message" + counter);
			showColorin()
        }
		else {
			counter = 0
			document.getElementById('fade2').innerHTML = eval("message" + counter);
			showColorin()
		}
		return false
	}
	showColorout()
}

function fadein(){
	r -= 5
	g -= 5
	b -= 5
	if (r <= 00) {
		setTimeout('fadeout()', 3500)
		return false
	}
	showColorin()
}

