<!--

	//================================================================================================
	// VARIABLES DECLARATION
	//================================================================================================	
	var MIN_HEIGHT = 400;	
	var area_h;	
	var index;
	var listOfImages;
	var theTimer;
	
	//================================================================================================
	// LAYOUT FUNCTIONS
	//================================================================================================		
	/*
	var resetSelected = function(item) {
		if(seriesSelected != item)
		{
			$(seriesSelected).getElement('span').removeClass('yellowtext selected');
			$(seriesSelected).getElement('a').setStyle('color', '#ffffff');
			
			$(item).getElement('span').addClass('yellowtext selected');
			$(item).getElement('a').setStyle('color', '#ff9900');
			
			seriesSelected = item;
		}
	}
	*/

	
	function resetTabFloater()
	{
		// area_h = window.getHeight() - 270;
		
		// if (area_h < MIN_HEIGHT) area_h = MIN_HEIGHT;		
		
		
		// $('articlebox').setStyle('height', area_h);
		
	}	
	
	/*
	function initImage()
	{
		index = 0;
		listOfImages = new Array(4);
		listOfImages[0] = new Image(900,180);
		listOfImages[0].src = "images/masthead/masthead01.jpg";
		listOfImages[1] = new Image(900,180);
		listOfImages[1].src = "images/masthead/masthead02.jpg";
		listOfImages[2] = new Image(900,180);
		listOfImages[2].src = "images/masthead/masthead03.jpg";
		listOfImages[3] = new Image(900,180);
		listOfImages[3].src = "images/masthead/masthead04.jpg";
		listOfImages[4] = new Image(900,180);
		listOfImages[4].src = "images/masthead/masthead05.jpg";
		listOfImages[5] = new Image(900,180);
		listOfImages[5].src = "images/masthead/masthead06.jpg";
		listOfImages[6] = new Image(900,180);
		listOfImages[6].src = "images/masthead/masthead07.jpg";
		listOfImages[7] = new Image(900,180);
		listOfImages[7].src = "images/masthead/masthead08.jpg";
		listOfImages[8] = new Image(900,180);
		listOfImages[8].src = "images/masthead/masthead09.jpg";
		listOfImages[9] = new Image(900,180);
		listOfImages[9].src = "images/masthead/masthead10.jpg";
		listOfImages[10] = new Image(900,180);
		listOfImages[10].src = "images/masthead/masthead11.jpg";
		listOfImages[11] = new Image(900,180);
		listOfImages[11].src = "images/masthead/masthead12.jpg";
		listOfImages[12] = new Image(900,180);
		listOfImages[12].src = "images/masthead/masthead13.jpg";

		theTimer = setTimeout("changeimage()", 5000);	
	}
	
	function changeimage()
	{		
		theTimer = setTimeout("changeimage()", 5000);
	}
	*/
	
	function startGallery() {
		var myGallery = new gallery($('myGallery'), {
			timed: true,
			showArrows: false,
			showCarousel: false,
			embedLinks: false,
			showInfopane: false,
			delay: 10000
		});
	}
	
	//================================================================================================
	// AJAX FUNCTIONS
	//================================================================================================			
	/*
	var showArticle = function(ID, field) {
		
		var div = $('newsbox');
		var url = "get_article.asp";
		if (field == "category")
			var data = "categoryID=" + ID
		else if(field == "article")
			var data = "articleID=" + ID
		
		var req = new Request( {url: '' + url, 
			
			onSuccess: function(txt) {
				$(div).set('html', txt);		
			},
			
			onFailure: function() {
				$(div).set('html', '<div class="ajax">Error loading... Please refresh the browser</div>');
			},
			
			onRequest: function() {
				$(div).set('html', '<div class="ajax">Loading articles...</div>');
			}
		
		}).send(data).chain(function() {
			resetTabFloater();
		});	
	}
	*/
	
	//================================================================================================
	// EVENTS FUNCTIONS
	//================================================================================================			
	window.addEvents({
	
		'domready' : function(e) {			
			
			resetTabFloater();
			//initImage();
			startGallery();
		},
		
		'resize' : function() {

			resetTabFloater();
		
		}
		
	});
	
//-->