// Written on the 19th of June
// Template by Pablo Bolomey (elbarto)
// Variables for Nameing the Company, Event Name, Date and Start Time 
var cName="National Australia Bank";
var eName="Merchant Fraud";
var eDate="23 February 2004";
var eDay = dayName(eDate);
var eTime="[9:45am AEST]";

// Pop-Up Dimensions
var wciWidth= "570";
var wciHeight= "540";

// set to true once event starts
var eStart = false; 

//Day Function - Displays day according to event date
function dayName(strDate)
{	// dayName function - returns string
	// Takes a date in string format and returns a string with the name of the weekday.
	myDays = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];
	myDate = new Date(strDate);
	return (myDays[myDate.getDay()]);
}

// Centred Pop Up window New Script
function STX_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    var myTop = myTop - 20;
    var myLeft = myLeft -15;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

// Old Pop Up Script. Try Not To Use it
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// Browser Detection for Single MouseOver Script
 browser_name = navigator.appName;
 browser_version = parseFloat(navigator.appVersion); 
 
 if (browser_name == "Netscape" && browser_version >= 3.0) { 
 	roll = 'true'; 
 } else if (browser_name == "Microsoft Internet Explorer" && browser_version >= 4.0) { 
    roll = 'true'; 
 } else { 
    roll = 'false'; 
 } 
 function msout1(img,ref) { if (roll == 'true') { document.images[img].src = ref; }}
 
// Builds the Agenda Dynamically. This is a text only Agenda. It may need to be customised per template.
// Add new agItems to add more agenda items. Be sure to add the agAlias as well (page which will be linked to name).
// Has been modified as of the 14/07/03 to work for both live and archive events. Set variables accordingly.
var i;
var pName;
var eType="archive";  //could be set to either 'live' or 'archive'. 

var agItems = new Array(1);
agItems[0] = "Part One - Fraud"; 
agItems[1] = "Part Two - Skimming";

var agAlias = new Array(1);
agAlias[0] = "part1"; 
agAlias[1] = "part2";


function pAgenda() {
	
	// Write out agenda for all modes except "test".
	if (eType != "test") {
		
		// Loop through all agenda items.
		for(i=0; i<agItems.length; i++) {			
			if (agAlias[i] == "space") {                 // Spacer line.
				document.write ('<tr><td height="1"><img src="../../../images/spacer.gif" width="1" height="10"></td></tr>');
			}
			else {
				switch (eType) {
					case "archive":
						if (agAlias[i]==pName) {
							// Current agenda point. Write agenda item without link.
							document.write ('<tr><td class="agMenuHit" height="24" style="padding-left: 6px" title="' + agItems[i] + '">' + agItems[i] + '</td></tr>');

						}
						else {
							// Non-current agenda point. Write agenda item and include link.
							document.write ('<tr><td class="agMenu" height="24" style="padding-left: 6px;" title="' + agItems[i] + '">');
							document.write ('<a href="../index_' + agAlias[i] + '.htm" target="_top" class="agMenu">' + agItems[i] + '</a></td></tr>');
						}
						break;

					case "live":
						if (agAlias[i]==pName) {
							// Current agenda point. Write highlighted agenda item.
							document.write ('<tr><td colspan="2" class="agMenuHit" title="'+agItems[i]+'">'+agItems[i]+'</td></tr>');
						}
						else {
							// Non-current agenda point. Write agenda item with normal formatting.
							document.write ('<tr><td class="agMenu" colspan="2" style="cursor: auto" title="'+agItems[i]+'">'+agItems[i]+'</td></tr>');
						}
						break;
				}
			}
		}
	}
}