// JavaScript Document

// EDIT THESE VALUES IF REQUIRED
var alertText = 'Are you sure you wish to perform this action' + "\n"; //DEFAULT TEXT DISPLAYED ON CONFIRM BUTTONS/LINKS WHEN NO ALT/TITLE
var newWindowLink = true; //OPEN EXTERNAL LINKS BY DEFAULT IN A NEW WINDOW (TRUE/FALSE)?


var woms = new Array(); //CREATE ARRAY OF FUNCTIONS TO LAUNCH ONLOAD

//ONLOAD MANAGER
function womOn(){
  window.onload = womGo;
}

function womGo(){
  for(var i = 0;i < woms.length;i++)
    eval(woms[i]);
}

function womAdd(func){
  woms[woms.length] = func;
}

function CreateBookmarkLink() {

	title = document.title;
	url = window.location.href;
	
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,"");
	} else if(window.external) {
		window.external.AddFavorite( url, title); 
	} else if(window.opera && window.print) {
		return true;
	}
	
}

function objToggle(obj) { 

	var obj = document.getElementById(obj);

	if(obj.style.display == "block") { 
		obj.style.display = "none";
	} else { 
		obj.style.display = "block";
	}

}

function siteMenu() {

	if(!document.getElementById('top_nav')) return false;
	
	var top_nav      = document.getElementById('top_nav');
	var list_element = top_nav.getElementsByTagName('li');
	
	for(var i=0; i<list_element.length; i++) {
	
		list_element[i].onmouseover = function() {
			
			var sub_menu = this.getElementsByTagName('ul');
			
			if(sub_menu.length > 0) {
				
				this.className = 'over';
				
			}
		
		}
		
		list_element[i].onmouseout = function() {
			
			var sub_menu = this.getElementsByTagName('ul');
			
			if(sub_menu.length > 0) {
				
				this.className = '';
				
			}
		
		}
	
	}
	

}


function removeDefault(inputID){
	
	var input	=	document.getElementById(inputID);
	
	input.value				=	'';
	input.style.fontStyle	=	'normal';
	input.style.color		=	'#666';
	
}


function getMovie(movieName) {
    return document.getElementById(movieName);
}


function stopMovie(){

	//GET FLASH FILE ID
	var flash	=	getMovie('flash');
			
	//CALL FUNCTION IN FLASH FILE
	flash.gotoEnd();

}

