// Written on the 19th of June
// Template by Joe Robens
// Variables for Nameing the Company, Event Name, Date and Start Time 
var cName="IAG";
var altName="Insurance Australia Group Limited (IAG)";
var eName="Class Meeting of holders of RPS1";
var eDate="2 February 2004";
var eDay = dayName(eDate);
var eTime="10.00am AEDT";

// Pop-Up Dimensions
var wciWidth= "750";
var wciHeight= "465";

// set to true once event starts
var eStart = true; 


//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(2);
agItems[0]="Introduction"; 
agItems[1]="Resolution";

var agAlias = new Array(2);
agAlias[0]="intro"; 
agAlias[1]="resolution";


function pAgenda() {
	for(i=0; i<agItems.length; i++) {
		if (eType == "archive") {
			if(pName != agAlias[i] || pName == "default") {
				if (agItems[i] == "space") {
					document.write ('<tr><td colspan="2" height="10"></td></tr>');
				}else{
			        document.write ('<tr><td class="agMenu" colspan="2" onMouseOver="this.className=\'agMenuOver\'" style="cursor: hand" ');
			     	document.write ('onMouseOut="this.className=\'agMenu\'" ');
					document.write ('onClick ="window.parent.location.href=\'../index_'+agAlias[i]+'.htm\'" ');
					document.write ('title="'+agItems[i]+'">'+agItems[i]+'</td></tr>');
				}
			}else{
				document.write ('<tr><td colspan="2" class="agMenuHit" title="'+agItems[i]+'">'+agItems[i]+'</td></tr>');
			}
		} else if (eType != "archive" && pTag == "live") {
			if(pName != agAlias[i] || pName == "default") {
					if (agItems[i] == "space") {
						document.write ('<tr><td colspan="2" height="10"></td></tr>');
					}else{
				        document.write ('<tr><td class="agMenu" colspan="2" style="cursor: auto" title="'+agItems[i]+'">'+agItems[i]+'</td></tr>');
					}
				}else{
					document.write ('<tr><td colspan="2" class="agMenuHit" title="'+agItems[i]+'">'+agItems[i]+'</td></tr>');
				}
			}
		}
	
}