
//
//		Image Rotator Setup	
//		

		//<!-- Rotating Clickable Promotion Image -->

		//Booking Block Rotator
		var timeDelay = 10;  // change delay time in seconds
		var Pix = new Array("images/na_ra_greatnorfolkairsale.jpg","images/na_ra_bestfare.gif","images/na_ra_routemap3.gif","images/na_ra_nlkair2a.gif");
		var Dest1 = new Array("javascript:adPopup(10)","javascript:adPopup(0)","","");
		var Dest2 = new Array("","","","","","","");
		var iMap1 = new Array("0,0,363,242","0,0,363,242","","","");
		var iMap2 = new Array("","","","","","","");
		var Delay = new Array(12,12,6,6,6);
		var timerID = setInterval("slideshow()", 3000);
		clearInterval(timerID);

		// Bottom Image Rotator	
		var timeDelay2 = 10; // change delay time in seconds
		var Pix2 = new Array("images/na2_takeaseat.gif");
		var Dest1a = new Array("","","","","");
		var Dest2a = new Array("javascript:adPopup(8)","","","","");
		var iMap1a = new Array("","","","");
		var iMap2a = new Array("0,0,165,280","0,0,165,280","0,0,165,280","0,0,165,280");
		var Delay2 = new Array(8,8,8,8);
		var timerID2 = setInterval("slideshow()", 3000);
		clearInterval(timerID2);	

		// Top Banner Panel
		var timeDelay3 = 10; // change delay time in seconds
		var Pix3 = new Array("images/na2_banner_right.jpg");
		var Dest1b = new Array("","","");
		var Dest2b = new Array("","","");
		var iMap1b = new Array("","","");
		var iMap2b = new Array("","","");
		var Delay3 = new Array(6,6,6);
		var timerID3 = setInterval("slideshow()", 3000);
		clearInterval(timerID3);	

		
//	---------------------------------------------------------------------------------------------------------------------------------------		
//
//		News Ticker	Setup	
//		
			news_item = new Array();
			news_id = new Array();
			var current_news;

				news_item[0]= "Check out the great New Premium Economy Fares on Norfolk Air."		
//				news_item[0]= "19 April 2009: Kids Fly Free - School Holiday Special. See below for more information. "
//				news_item[2]= "For a limited time Norfolk Air is offering generous cash back deals. See below for more information. "
//				news_item[2]= "20 Sep 2007: Norfolk Air Continues to expand with Gold Coast Service"
				
				news_id[0] = "";
//				news_id[1] = "";
//				news_id[2] = "";
//				news_id[2] = "release004.aspx";
			
//	---------------------------------------------------------------------------------------------------------------------------------------		

		<!--   Text Fader Setup   -->
	/* *****
	 * User defined fade objects and messages
	 */

		fader[0] = new fadeObj(0, 'fade2', 'ffffff', '000033',  50, 50, false);

		fader[0].message[0] = '<b>Best Available Fare - The Best Way To Travel</b><br><br>Our Best Available Fare starts from these great low prices of $490 plus taxes return from Brisbane to Norfolk Island, $530 plus taxes from Sydney or Newcastle, and $640 plus taxes from Melbourne.<br><br>The Best Available Fare allows passengers to book right up until the day of travel for great savings. This fare is subject to availability on all flights and terms and conditions do apply<br><br>*For Full Terms & Conditions of the Best Available Fare <a href="javascript:adPopup(1);">click here</a>';
		fader[0].message[1] = '<b>NORFOLK AIR PREMIUM ECONOMY SEATING</b><br>is now even more affordable look at these great Prices<br><br>Starting from $479 + taxes one-way from Brisbane to Norfolk Island, $498 + taxes one-way from Sydney and $539 + taxes one-way from Melbourne.<br><br>Premium Economy passengers travel in comfort whilst seated in our Extra Large Luxurious Seats located at the front of the aircraft. Premium Economy passengers also receive an extra 10kg of Free Baggage Allowance giving 30kgs in total.<br><br>For those looking to get the absolute most out of your holiday, ask your local Travel Agent, Norfolk Air Wholesaler (find listed at "About Norfolk Air") or simply return to our Home Page to purchase your Premium Economy Seat.<br><br>*For Full Terms & Conditions of the Premium Economy Fare <a href="javascript:adPopup(2);">click here</a>';
		fader[0].message[2] = '<b>Our Flight To Brisbane and Sydney on a Wednesday <br>operates as -</b><p>All Passengers Travelling to Brisbane and Sydney Depart Norfolk Island at 8.00am - Arriving into Brisbane at 8.45am.<br>(Sydney Passengers will Transit for 1 hour in Brisbane)<p>The Flight then Departs Brisbane at 9.45am - Arriving into Sydney at 11.15am. (Brisbane Passengers will Transit for 1 hour in Sydney)<p>The Flight will then Depart Sydney at 12.15pm - Arriving into Norfolk Island at 4.20pm.<p>Please refer to the L.A.G.S restrictions which will now apply for passengers who transit - <br><a href="http://www.infrastructure.gov.au/transport/security/aviation/lag" target="_blank">www.infrastructure.gov.au/transport/security/aviation/LAG</a><p>Please note all flights still Depart and Arrive at the International Terminal on the above ports.<p>'
		fader[0].message[3] = '<b>WELCOME ONBOARD NORFOLK AIR!</b><br><br>When you step onboard your Norfolk Air flight, your relaxing holiday begins. Our friendly locally based Cabin Crew make every passenger feel relaxed and pampered. You are a welcome guest.<p>Sit back and relax with a glass of wine/beer or a softdrink. Tea or coffee will be served after your meal. All beverages are complimentary on our flights. You will enjoy reading the "2899" magazine which is full of exciting and interesting information about Norfolk Island.<p>Enjoy your Flight and <i>Welcome Onboard</i>.'
		fader[0].message[4] = '<b>Increase in Free Baggage Allowance when departing Norfolk Island.</b><br><br>In conjunction with Norfolk Island Tourism, Norfolk Air has increased the Free Baggage Allowance for all visitors departing Norfolk Island and travelling back to Australia to 30kgs for Standard Economy and 40kgs for Premium Economy.<br><br>The standard 20kgs for Economy, and 30kgs for Premium Economy applies to all flights departing Australia.<br><br>This increase allows our visitors to enjoy the Low-Tax Shopping Norfolk Island has to offer.<br><br>Valid for Travel Up Until 31 December 2010';
		fader[0].message[5] = '<b>Travel Insurance</b><br><br>Travel insurance is strongly recommended. Use the COVER.MORE link (right), choose "Indonesia & South West Pacific" for an obligation-free quote for Norfolk Island travel insurance cover. Medicare is not applicable to Norfolk Island.';

		var fadelink= new Array("","","","","","","")
		
		var throbStep = 0;

			
//	---------------------------------------------------------------------------------------------------------------------------------------		

	<!--   Popup Box Setup   -->

			popW = new Array();
			popH = new Array();
			PopupFile = new Array();

			popW[0] = 495, popH[0] = 550, PopupFile[0] = "popup0.htm";					// Best Available Fare T+C
			popW[1] = 495, popH[1] = 550, PopupFile[1] = "popup1.htm";					// Best Available Fare T+C
			popW[2] = 495, popH[2] = 550, PopupFile[2] = "popup2.htm";					// Premium Economy Fare T+C
			popW[3] = 395, popH[3] = 500, PopupFile[3] = "takeaseat_onsale_BNE.htm";	// Take a Seat BNE
			popW[4] = 395, popH[4] = 500, PopupFile[4] = "takeaseat_onsale_MEL.htm";	// Take a Seat MEL
			popW[5] = 395, popH[5] = 500, PopupFile[5] = "takeaseat_onsale_NTL.htm";	// Take a Seat NTL
			popW[6] = 395, popH[6] = 500, PopupFile[6] = "takeaseat_onsale_SYD.htm";	// Take a Seat SYD
			popW[7] = 395, popH[7] = 550, PopupFile[7] = "takeaseat_onsale_OOL.htm";	// Take a Seat OOL
			popW[8] = 395, popH[8] = 400, PopupFile[8] = "takeaseat.htm";				// Take a Seat - General
			popW[9] = 500, popH[9] = 650, PopupFile[9] = "ibesale.htm";					// IBE Sale - General
			popW[10] = 550, popH[10] = 600, PopupFile[10] = "popup10.htm";				// Hot Winter Special
			popW[11] = 395, popH[11] = 500, PopupFile[11] = "ibesale_MEL.htm";			// IBE Sale - MEL
			popW[12] = 395, popH[12] = 500, PopupFile[12] = "ibesale_SYD.htm";			// IBE Sale - SYD
			
//	---------------------------------------------------------------------------------------------------------------------------------------		


//
//		Image Rotator Functions
//		

		// Booking Block Rotator
		var howMany = Pix.length;
		var PicCurrentNum = 0;
		timeDelay=Delay[PicCurrentNum]*1000;	
		var PicCurrent = new Image();
		PicCurrent.src = Pix[PicCurrentNum];

		// Bottom Promo Panel
//		var howMany2 = Pix2.length;
//		var PicCurrentNum2 = 0;
//		timeDelay2=Delay2[PicCurrentNum2]*1000;	
//		var PicCurrent2 = new Image();
//		PicCurrent2.src = Pix2[PicCurrentNum2];
		
		// Banner Promo Panel
		var howMany3 = Pix3.length;
		var PicCurrentNum3 = 0;
		timeDelay3=Delay3[PicCurrentNum3]*1000;	
		var PicCurrent3 = new Image();
		PicCurrent3.src = Pix3[PicCurrentNum3];

		function startPix() {
		timerID = setInterval("slideshow()", timeDelay);
		createImageMap();
		document["ChangingPix"].src  = Pix[0];

//		timerID2 = setInterval("slideshow2()", timeDelay2);
//		createImageMap2();
//		document["ChangingPix2"].src  = Pix2[0];

		timerID3 = setInterval("slideshow3()", timeDelay3);
		createImageMap3();
		document["ChangingPix3"].src  = Pix3[0];
		}
		
		function actionLink(linkDest)	{
		alert("Link To " + linkDest);
		
		if(linkDest != "")
			window.location=linkDest;
		}
		
		function slideshow() {
		clearInterval(timerID);	
		PicCurrentNum++;
		if (PicCurrentNum == howMany) {
		PicCurrentNum = 0;
		}
		timeDelay=Delay[PicCurrentNum]*1000;
		PicCurrent.src = Pix[PicCurrentNum];
		createImageMap();
		blendimage("bb_ad","ChangingPix",Pix[PicCurrentNum],1000);		//Fade in pic
//		document["ChangingPix"].src = PicCurrent.src;		// Set Image Source

		timerID = setInterval("slideshow()", timeDelay);
		}

		function slideshow2() {
		clearInterval(timerID2);	
		PicCurrentNum2++;
		if (PicCurrentNum2 == howMany2) {
		PicCurrentNum2 = 0;
		}
		timeDelay2=Delay2[PicCurrentNum2]*1000;
		PicCurrent2.src = Pix2[PicCurrentNum2];
		createImageMap2();
		blendimage("tas","ChangingPix2",Pix2[PicCurrentNum2],1000);		//Fade in pic
//		document["ChangingPix2"].src = PicCurrent2.src;		// Set Image Source

		timerID2 = setInterval("slideshow2()", timeDelay2);
		}

		function slideshow3() {
		clearInterval(timerID3);	
		PicCurrentNum3++;
		if (PicCurrentNum3 == howMany3) {
		PicCurrentNum3 = 0;
		}
		timeDelay3=Delay3[PicCurrentNum3]*1000;
		PicCurrent3.src = Pix3[PicCurrentNum3];
		createImageMap3();
		blendimage("banner","ChangingPix3",Pix3[PicCurrentNum3],1000);		//Fade in pic
//		document["ChangingPix3"].src = PicCurrent3.src;		// Set Image Source

		timerID3 = setInterval("slideshow3()", timeDelay3);
		}

   		function createImageMap () {
	   
   		// clear out existing image map
   		clearImageMap();
	   
   		dst1 = document.createElement("AREA");
   		dst1.shape = "rect";
   		dst1.coords = iMap1[PicCurrentNum];
	   
   		if (Dest1[PicCurrentNum] != "")
   		{
   		dst1.href = Dest1[PicCurrentNum];
   		}
   		else
   		{
   		dst1.href = "";
   		}
	   
   		dst2 = document.createElement("AREA");
   		dst2.shape = "rect";
   		dst2.coords = iMap2[PicCurrentNum];
	   
   		if (Dest2[PicCurrentNum] != "")
   		{
   		dst2.href = Dest2[PicCurrentNum];
   		}
   		else
   		{
   		dst2.href = "";
   		}
	   
  		mapObj = document.getElementById("PromoMap");
   		if(dst1.coords != "")
			mapObj.appendChild(dst1);
   		if(dst2.coords != "")
			mapObj.appendChild(dst2);
   		}
   		
   		function createImageMap2 () {
	   
   		// clear out existing image map
   		clearImageMap2();
	   
   		dst1a = document.createElement("AREA");
   		dst1a.shape = "rect";
   		dst1a.coords = iMap1a[PicCurrentNum2];
	   
   		if (Dest1a[PicCurrentNum2] != "")
   		{
   		dst1a.href = Dest2a[PicCurrentNum2];
   		}
   		else
   		{
   		dst1a.href = "";
   		}
	   
   		dst2a = document.createElement("AREA");
   		dst2a.shape = "rect";
   		dst2a.coords = iMap2a[PicCurrentNum2];
	   
   		if (Dest2a[PicCurrentNum2] != "")
   		{
   		dst2a.href = Dest2a[PicCurrentNum2];
   		}
   		else
   		{
   		dst2a.href = "";
   		}
	   
  		mapObj2 = document.getElementById("PromoMap2");
   		if(dst1a.coords != "")
			mapObj2.appendChild(dst1a);
   		if(dst2a.coords != "")
			mapObj2.appendChild(dst2a);
   		}

   		function createImageMap3 () {
	   
   		// clear out existing image map
   		clearImageMap3();
	   
   		dst1b = document.createElement("AREA");
   		dst1b.shape = "rect";
   		dst1b.coords = iMap1b[PicCurrentNum3];
	   
   		if (Dest1b[PicCurrentNum3] != "")
   		{
   		dst1b.href = Dest1b[PicCurrentNum3];
   		}
   		else
   		{
   		dst1b.href = "";
   		}
	   
   		dst2b = document.createElement("AREA");
   		dst2b.shape = "rect";
   		dst2b.coords = iMap2b[PicCurrentNum3];
	   
   		if (Dest2b[PicCurrentNum3] != "")
   		{
   		dst2b.href = Dest2b[PicCurrentNum3];
   		}
   		else
   		{
   		dst2b.href = "";
   		}
	   
  		mapObj3 = document.getElementById("PromoMap3");
   		if(dst1b.coords != "")
			mapObj3.appendChild(dst1b);
   		if(dst2b.coords != "")
			mapObj3.appendChild(dst2b);
   		}


   		function clearImageMap () {
   		mapObj3 = document.getElementById("PromoMap");
   		while (mapObj3.childNodes.length)
	   		{
	   		mapObj3.removeChild(mapObj3.firstChild);
	   		}
   		}

   		function clearImageMap2 () {
   		mapObj4 = document.getElementById("PromoMap2");
   		while (mapObj4.childNodes.length)
	   		{
	   		mapObj4.removeChild(mapObj4.firstChild);
	   		}
   		}

   		function clearImageMap3 () {
   		mapObj5 = document.getElementById("PromoMap3");
   		while (mapObj5.childNodes.length)
	   		{
	   		mapObj5.removeChild(mapObj5.firstChild);
	   		}
   		}

		
		function adPopup(nSelect) 
		{
				var w = 0, h = 0;
				var leftPos = 0, topPos = 0;
								
				if (document.all) {
				   /* the following is only available after onLoad */
				   w = document.body.clientWidth;
				   h = document.body.clientHeight;
				}
				else if (document.layers) {
				   w = window.innerWidth;
				   h = window.innerHeight;
				}
				
				leftPos = (w-popW[nSelect])/2;
				topPos = (h-popH[nSelect])/2;
				window.open(PopupFile[nSelect],'popup','width=' + popW[nSelect] + ',height=' + popH[nSelect] + ',top=' + topPos + ',left=' + leftPos + ', resizable = 0');
		}		

//	---------------------------------------------------------------------------------------------------------------------------------------

//
//		News Ticker	Functions
//		

			function addLetter(news_num, letter_num){
				current_news = news_id[news_num];
				var news = document.getElementById("NewsTicker");
				if(letter_num<105){
					if(letter_num < news_item[news_num].length){
						news.innerHTML += news_item[news_num].substring([letter_num],[letter_num+1]);
						setTimeout("addLetter("+news_num+","+(letter_num+1)+")",20);
					}else{
						news.innerHTML += " ...";
						if(news_item[news_num+1]){
							var new_news_num = news_num+1;
						}
						else{
							var new_news_num = 0;
						}
						setTimeout("document.getElementById('NewsTicker').innerHTML='';addLetter("+new_news_num+",0)",4000);
					}
				}else{
					news.innerHTML += " ...";
					if(news_item[news_num+1]){
						var new_news_num = news_num+1;
					}
					else{
						var new_news_num = 0;
					}
					setTimeout("document.getElementById('NewsTicker').innerHTML='';addLetter("+new_news_num+",0)",4000);
				}
			}

			function showNewsStory(){
			    if (current_news != "")
				    {
				    top.location.href = current_news;
				    }
			}

//	---------------------------------------------------------------------------------------------------------------------------------------
		<!--   Text Fader  Functions-->
	/* *****
	 * User defined fade objects and messages
	 *
	 * The code below describes how to make a throbbing or automatic fade
	 * sequence of messages.  The throbFade function is called repeatedly
	 * which controls what commands are sent to the fade engine, rather
	 * than using mouseovers.
	 *
	 * Notes:
	 * - A global variable throbStep is used to keep track of where the
	 *   animation is currently in the sequence.
	 * - The list of messages defined in the fader *must* start at zero (0)
	 *   and count upwards without skipping any integers.
	 * - The second line of the throbFade() function controls how fast
	 *   commands get sent to the fade engine.  It waits only 100 milli-
	 *   seconds when fading out, but 4000 milliseconds (4 seconds) when
	 *   fading in; this means the message will remain visible for about 4
	 *   seconds before fading out again.
	 *
	 * Other types of fade animation are possible simply by designing
	 * different ways to control the fade-ins and fade-outs!
	 */
		function throbFade() {
		  fade(0, Math.floor(throbStep / 2), (throbStep % 2) ? false : true);
		  setTimeout("throbFade();", (throbStep % 2) ? 1000 : 16000);
		  if (++throbStep > fader[0].message.length * 2 - 1) throbStep = 0;
		}
		function ReadMore() {
		window.location = fadelink[Math.floor(throbStep / 2)];
		}
		
		function StartFader(){
		setTimeout("throbFade();", 1000);		
		}

