// JavaScript Document

<!--
var lang;
var pagetitle;

// this function is used by the fading javascript menus in conjunction with the menu.css file

function lite(obj) 
{
	if(document.all&&!window.opera) 
	{
		obj.filters.blendTrans.apply(); 
		obj.filters.blendTrans.play(); 
	} 
} 

// these are old window pop-up functions which i am trying to phase out with the new all-in-one function

function popUpOne(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=225');");
}

function popUpTwo(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=512,height=384');");
}

function popUpThree(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=640,height=480');");
}

function NewWindow(mypage, myname)
{
  winprops = 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=400,height=300,left=0,top=0'
  win = window.open(mypage, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4)
  {
	  win.window.focus();
  }
}

// this is the all-in-once pop-up window creator which allows all properties to be set from the call via arguements

var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height, scrollflag)
{
  if (scrollflag == null) {
	  scrollflag = 'no';
  }
  
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbars='+scrollflag+',resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

// these functions are used in any commmunication between two flash movies on a page

var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function send_to_flash_DoFSCommand(command, args) {
	document.menu.SetVariable("location", args);
}

if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && 
navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub send_to_flash_FSCommand(ByVal command, ByVal args)\n');
	document.write(' call send_to_flash_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

// this function is used in the feature pages to update the title header in flash



function updatetitle() {	
		document.header.SetVariable("title", pagetitle);
	}
	
function settitle(text) {	
		document.header.SetVariable("title", text);
	}

// these functions are used by the flash menus to get the page currently on (used in lang change)

function getLocation() {
	Plocation = document.location;
	updatetext(Plocation)
}

function updatetext(text) {
	document.menu.SetVariable("location", text);
}

// this function changes the source document of an iframe with 2 arguements - framename, newpage
function changeframesrc(frame, destpage) {
	document.getElementById(frame).src = destpage;
}

// a simple function to output a message to the user in an alert box
function givemsg(msg) 
{
	alert(msg);
} 

// AX3 CODE

function change_play(val)
{
  document.Ax3Player.PlayAnimation(val);
}

function change_bg_Color(c)
{
  document.Ax3Player.BackgroundColor = '#' + c;
}

function change_fg_Color(c)
{
  document.Ax3Player.ForegroundColor = '#' + c;
}

function change_nm_Color(c)
{
  document.Ax3Player.NormalColor = '#' + c;
}

function changeAX3file(file)
{
  
  if (file != "blank") // default setting on the drop down box
  {
  	document.Ax3Player.File = file;
  }
  
}
//-->