
//
//		Image Rotator Setup	
//		

		//<!-- Rotating Clickable Promotion Image -->

		//Booking Block Rotator

	var timeDelay = 10; // change delay time in seconds
	var Pix = new Array("images/ra_Bali.gif","images/ra_BaliComp.gif","images/ra_Albany_$129_A.gif","images/ra_Esperance_$159.gif","images/ra_Geraldton_$129.gif","images/ra_KGI-MEL-$229.gif","images/ra_MEL-KGI-$229.gif");
	var Pix2 = new Array("","","","","","","","");
	var Dest1 = new Array("","","","","","","","");
	var Dest2 = new Array("","","","","","","","");
	var iMap1 = new Array("","","","","","","","");
	var iMap2 = new Array("","","","","","","","");
	var Delay = new Array(8,8,8,8,8,8,8,8);
		var timerID = setInterval("slideshow()", 3000);
		clearInterval(timerID);
	
//	---------------------------------------------------------------------------------------------------------------------------------------		

//	 Text Fader Setup

	/* *****
	 * User defined fade objects and messages
	 */
	 
		fader[0] = new fadeObj(0, 'fade2', '4993DE', 'ffffff',  50, 50, false);
		fader[0].message[0] = "<b>21-07-2010</b><br><br>Skywest and Virgin Blue sign Memorandum of Understanding (MOU)";
		fader[0].message[1] = "<b>14-01-2010</b><br><br>Skywest announces direct Kalgoorlie-Melbourne service";
		// fader[0].message[2] = "<b>17-11-2009</b><br><br>Skywest increases services to Exmouth (Learmonth)";
		// fader[0].message[3] = "<b>05-11-2009</b><br><br>Skywest provides additional services to Karratha";
		// fader[0].message[4] = "<b>24-08-2009</b><br><br>Skywest expands its jet fleet";

//		var fadelink = new Array("http://www.skywest.com.au/home.asp?documentid=456","http://www.skywest.com.au/home.asp?documentid=445","http://www.skywest.com.au/home.asp?documentid=444","http://www.skywest.com.au/home.asp?documentid=440","http://www.skywest.com.au/home.asp?documentid=438","","","")
		
		var fadelink = new Array();
		fadelink[0] = "http://www.skywest.com.au/home.asp?documentid=456";
		fadelink[1] = "http://www.skywest.com.au/home.asp?documentid=445";
		// fadelink[2] = "http://www.skywest.com.au/home.asp?documentid=444";
		// fadelink[3] = "http://www.skywest.com.au/home.asp?documentid=440";
		// fadelink[4] = "http://www.skywest.com.au/home.asp?documentid=438";
		
		var throbStep = 0;
		
	
//	---------------------------------------------------------------------------------------------------------------------------------------		

//	Webbit Specials

	var Webbit1 = new Array("Albany","$129")
	var Webbit2 = new Array("Carnarvon","$149")
	var Webbit3 = new Array("Broome","$199")
	
//	---------------------------------------------------------------------------------------------------------------------------------------		

//
//		Image Rotator Functions
//		

		// Image Rotator
		var howMany = Pix.length;
		var PicCurrentNum = 0;
		timeDelay=Delay[PicCurrentNum]*1000;	
		var PicCurrent = new Image();
		PicCurrent.src = Pix[PicCurrentNum];

		function startPix() {
		timerID = setInterval("slideshow()", timeDelay);
		createImageMap();
		document["ChangingPix"].src  = Pix[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 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 clearImageMap () {
   		mapObj3 = document.getElementById("PromoMap");
   		while (mapObj3.childNodes.length)
	   		{
	   		mapObj3.removeChild(mapObj3.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');
		}		

//	---------------------------------------------------------------------------------------------------------------------------------------

	
		<!--   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);		
		}
