<!--

	//================================================================================================
	// VARIABLES DECLARATION
	//================================================================================================	
	var currentPage = 1
	var currentPerPage = 4
	var totalNews = 0
	
	var currentVideo = 1
	var currentPerVideo = 3	
	var totalVideos = 0
	
	//================================================================================================
	// AJAX FUNCTIONS
	//================================================================================================	
	function showPressClips(articleID)
	{ 		
		var url = "mod_pressclips.asp";

		var data = "articleID=" + articleID;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$("pressclips_downloads").set('html', txt);
				showClipsBox();
			},
			
			onRequest: function() {
				$('pressclips_downloads').set('html', '<em>Loading press clippings...</em>');
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);		
		
	}	
	
	function showNewsImage(imageID)
	{ 		
		var url = "mod_news_image.asp";

		var data = "imageID=" + imageID;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$('loading_news').setStyle('display', 'none');
				$("news_banner_box").set('html', txt);
			},
			
			onRequest: function() {
				$('loading_news').setStyle('display', 'block');
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);		
		
	}	
	
	function showNewsDetails(newsID)
	{ 		
		var url = "mod_news_details.asp";

		var data = "newsID=" + newsID;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$('loading_news').setStyle('display', 'none');
				$("div_news").set('html', txt);
				new Fx.Tween('div_news').start('opacity', 0, 1);
			},
			
			onRequest: function() {
				$('loading_news').setStyle('display', 'block');
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);		
		
	}	
	
	function showNewsIntro(page, introperpage)
	{
		var url = "mod_news_intro.asp";

		var data = "page=" + page;
		data = data + "&introperpage=" + introperpage;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$("div_news_intro").set('html', txt);
				new Fx.Tween('intro_items').start('opacity', 0, 1);
				
				currentPage = page;
				currentPerPage = introperpage;
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);
	}
	
	function showPrevPage()
	{
		var url = "mod_news_intro.asp";

		if (currentPage > 1) currentPage--;

		var data = "page=" + currentPage;
		data = data + "&introperpage=" + currentPerPage;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$("div_news_intro").set('html', txt);
				new Fx.Tween('intro_items').start('opacity', 0, 1);				
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);
	}
	
	function showNextPage()
	{
		var url = "mod_news_intro.asp";

		if (currentPage < totalNews) currentPage++;

		var data = "page=" + currentPage;
		data = data + "&introperpage=" + currentPerPage;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$("div_news_intro").set('html', txt);
				new Fx.Tween('intro_items').start('opacity', 0, 1);				
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);
	}	
	
	function showVideo(newsID)
	{ 
		var url = "mod_video_show.asp";

		var data = "newsID=" + newsID;
		data = data + "&sid=" + Math.random();		
		
		$("container_video").setStyle('display', 'block');
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$('loading_video').setStyle('display', 'none');
				$("video_show").set('html', txt);
				new Fx.Tween('video_show').start('opacity', 0, 1);
			},
			
			onRequest: function() {
				$('loading_video').setStyle('display', 'block');
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);
	}	
	
	function showPrevPageVideo()
	{ 	
		var url = "mod_video_list.asp";

		if (currentVideo > 1) currentVideo--;

		var data = "page=" + currentVideo;
		data = data + "&introperpage=" + currentPerVideo;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$("div_video_list").set('html', txt);
				new Fx.Tween('div_video_list').start('opacity', 0, 1);				
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);		
	}
	
	function showNextPageVideo()
	{ 	
		var url = "mod_video_list.asp";

		if (currentVideo < totalVideos) currentVideo++;

		var data = "page=" + currentVideo;
		data = data + "&introperpage=" + currentPerVideo;
		data = data + "&sid=" + Math.random();		
		
		var req = new Request( {method: 'get', url: '' + url, 

			onSuccess: function(txt) {
				$("div_video_list").set('html', txt);
				new Fx.Tween('div_video_list').start('opacity', 0, 1);				
			},
			
			onFailure: function() {
				alert("Error connecting to server. Please refresh this page...");
			}
			
		}).send(data);		
	}
	
	//================================================================================================
	// FORM FUNCTIONS
	//================================================================================================
	function setTotalNews(total)
	{
		totalNews = total;
	}	
	
	function setTotalVideos(total)
	{
		totalVideos = total;
	}	
	
	function hideVideoBox()
	{
		if ($chk($('container_video')))
		{
			$('container_video').setStyle('display', 'none');
		}
	}	

	function showClipsBox()
	{
		if ($chk($('container_pressclips')))
		{
			$('container_pressclips').setStyle('display', 'block');
		}
	}	

	function hideClipsBox()
	{
		if ($chk($('container_pressclips')))
		{
			$('container_pressclips').setStyle('display', 'none');
		}
	}	
	
	//================================================================================================
	// LAYOUT FUNCTIONS 
	//================================================================================================			
	function setupDraggableDivs()
	{
		if ($chk($('container_video')))
		{
			var dragVideo = new Drag('container_video');
		}
		
		if ($chk($('container_pressclips')))
		{
			var dragClips = new Drag('container_pressclips');
		}
		
	}		
	
	//================================================================================================
	// EVENTS FUNCTIONS
	//================================================================================================		
	function setupActions()
	{
		
	}	
	
	//================================================================================================
	// START THIS WHEN PAGE DOM READY
	//================================================================================================		
	window.addEvents({
	
		'domready' : function(e) {
			setupDraggableDivs();
		},
		
		'resize' : function() {

		}
		
	});
	

//-->