// JavaScript Document

// jquery stuff

$(function(){
	
var popup = $('.popup_window');
	popup.click(function(event){
			if(this == event.target)
				{
					var page_link = $(this).attr('href');
					window.open(page_link, '', 'width=730,height=720,resizable=yes,scrollbars=yes');
					return false;
				}
		});
		
var jpopup2 = $('.popup_javascript');
jpopup2.click(function(event){
			if(this == event.target)
				{
					var message = $(this).attr('title');
					alert(message);
					return false;
				}
		});
		
	var popup3 = $('.popupWebinars');
	popup3.click(function(event){
			if(this == event.target)
				{
					var page_link = $(this).attr('href');
					window.open(page_link, '', 'width=730,height=720,resizable=yes,scrollbars=yes');
					return false;
				}
		});
		


});

//
// !!!! Be Careful here. If this is a mistake in this file IE 6 png transparency will not work.

//************************************************************
// LOADS THE NECESSARY FUNCTIONS FOR SITE
function addLoadEvent(func)
	{
		var oldonload = window.onload;
		if (typeof window.onload != 'function')
			{
				window.onload = func;
			}
		else
			{
				window.onload = function()
					{
						oldonload();
						func();
					}
			}
	}
	
// END LOADS THE NECESSARY FUNCTIONS FOR SITE
//************************************************************

//************************************************************
// FOR POPUP WINDOWS - NEW WINDOW
// add 'class="popup"' to any link that you want to open in a new window

function popUp(winURL)
	{
		window.open(winURL, "popup");	
	}
	
function popUpInfo(winURL)
	{
		window.open(winURL, "popup","width=400,height=600,scrollbars=yes,resizable=yes");	
	}
	
function popUpURL(winURL)
	{
		window.open(winURL, "popup", "width=700,height=600,scrollbars=yes,resizable=yes,toolbar=yes");	
	}
	
function popUpSeatProfile(winURL)
	{
		window.open(winURL, "popup", "width=675,height=600,scrollbars=yes,resizable=yes");	
	}
	

function openNewWindow() 
	{
		//if (!document.getElementsByTagName) return false;
		var lnks = document.getElementsByTagName("a");
		for (var i=1; i<lnks.length; i++) 
			{
				// alert('made it');
				if(lnks[i].className == "popup")
					{
						lnks[i].onclick = function()
							{
								popUp(this.getAttribute("href"));
								return false;
							}
					}
					
				if(lnks[i].className == "popupInfo")
					{
						lnks[i].onclick = function()
							{
								popUpInfo(this.getAttribute("href"));
								return false;
							}
					}
					
				if(lnks[i].className == "popupURL")
					{
						lnks[i].onclick = function()
							{
								popUpURL(this.getAttribute("href"));
								return false;
							}
					}
					
				if(lnks[i].className == "popupSeatProfile")
					{
						lnks[i].onclick = function()
							{
								popUpSeatProfile(this.getAttribute("href"));
								return false;
							}
					}
					
					
			}
		
	}
	
// END FOR POPUP WINDOWS - NEW WINDOW
//************************************************************


var b_moving = true;
	function toggle (o_btn) {
		if (b_moving) {
			TScroll[0].stop(2);
			o_btn.value = ' Resume ';
		}
		else {
			TScroll[0].move(2);
			o_btn.value = ' Pause ';
		}
		b_moving = !b_moving;
		return false;
	}
	function reverse (o_btn) {
		TScroll[0].step = -TScroll[0].step;
		o_btn.value = (TScroll[0].step > 0 ? ' Back ' : ' Forward ');
		return false;
	}

function confirmSubmit(message) {
		var message = message;
		var sendForm = confirm(message)
		if(sendForm == true)
			return true;
			return false;
		}


//************************************************************
// load the functions
// !!!! Be Careful here. If this is a mistake in the file IE 6 png transparency will not work.
// dont list a function here that is not being used.
addLoadEvent(openNewWindow);


