<!--
function statuss()
{
window.status = "Holst Online";
}

function clearField(field)
{
	if (field.defaultValue==field.value)
		field.value = "";
} 

function LaunchTQ()
{
	new_window = window.open('/templates/todaysquotes.cfm','todaysquotes',
	'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,height=500,width=450,scrollbars=1');
}

function LaunchLogin()
{
	//var HolstOnlineWindow = window.open('https://www.holst.com.au/clients/index.cfm','HolstOnline',
	//	'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,scrollbars=1');
	//HolstOnlineWindow.focus();
	window.location.href = "/holstonline/index.cfm";
}

function setFocus()
{
	if (document.loginForm)
	{
		if (document.loginForm.UserName.value.length == 0)
			document.loginForm.UserName.focus();
		else
			document.loginForm.Password.focus();
	}
}

function SetFocusOn(NameOfForm,NameOfField)
{	
	document.forms[NameOfForm][NameOfField].focus();
}

function SubmitForm(NameOfForm)
{
	document.forms[NameOfForm].Submit();
}

function NameThisWindow(winName)
{
	window.name = winName;
}

function OpenInMain(thePage)
{
	if (opener && !opener.closed)
	{
		window.opener.location.href=thePage;
		window.opener.focus();
	}
	else
	{
		var newWindow = window.open(thePage,'HolstMain');
		newWindow.focus();
	}
}

function ReLogin()
{
	if (opener && !opener.closed)
	{
		window.opener.location.href="index.cfm?fuseaction=login.welcome";
		window.opener.focus();
	}
	else
	{
		var newWindow = window.open('index.cfm?fuseaction=login.welcome','HolstOnline',
			'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,scrollbars=1');
		newWindow.focus();
	}
	self.close();
}

function closeThisWindow()
{
	self.close();
}

function validatePwd() 
{
	var pw1 = document.changePasswordForm.newPassword1.value;
	var pw2 = document.changePasswordForm.newPassword2.value;

	if (document.changePasswordForm.newPassword1.value.length < 8) {
		alert('Your password must be at least 8 characters long. Please try again.');
		return false;
	}

	if (pw1 != pw2) 
	{
		alert ("The two entries for your new password does not match each other. Please ensure they are both the same.");
		return false;
	}
	else 
	{
		return true;
   	}
}

function validateEmail() 
{
	var email1 = document.changeEmailForm.newEmail1.value;
	var email2 = document.changeEmailForm.newEmail2.value;

	if (email1 != email2) 
	{
		alert ("The new email address does not match the confirmation email address. Please ensure that your new email address is typed in correctly in both fields.");
		return false;
	}
	else 
	{
		return true;
   	}
}

function Idle()
{
	return;
}

function InitDate(TFd,TFm,TTd,TTm)
{
	document.SearchForm.TimeFromDD.options[TFd].selected=true;
	document.SearchForm.TimeFromMM.options[TFm].selected=true;
	document.SearchForm.TimeToDD.options[TTd].selected=true;
	document.SearchForm.TimeToMM.options[TTm].selected=true;
}

function CodeSearch(NameOfForm,NameOfField)
{
		newWindow = window.open('index.cfm?fuseaction=codesearch.start&NameOfForm='+NameOfForm+'&NameOfField='+NameOfField,'codeSearch',
			'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,height=380,width=430,scrollbars=1');
		newWindow.focus();
}

function selectCode(NameOfForm,NameOfField,secCode)
{
	    window.opener.document.forms[NameOfForm][NameOfField].value = secCode;
		window.opener.focus();
		window.opener.document.forms[NameOfForm][NameOfField].focus();
		window.self.close(); 
}

function GetSecInfo(SecCode)
{
	SecInfoWindow = window.open("index.cfm?fuseaction=marketinfo.securityInfo&SecCode="+SecCode,'SecurityInformation',
		'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,height=790,width=690,scrollbars=1');
	SecInfoWindow.focus();
}

function OpenAnnouncement(code,vendor,time)
{
	AnnouncementPath = "index.cfm?fuseaction=announcements.SignalG&code="+code+"&vendor="+vendor+"&time="+time;
	AnnouncementWindow = window.open(AnnouncementPath,'Announcements',
		'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,height=600,width=690,scrollbars=1');
	AnnouncementWindow.focus();
}

function OpenPDSAnnouncement(AnnouncementPath,SecCode,Details) //set target to a new cfm page which first logs then redirects to target article
{	
	IntPath = "";	
	AnnouncementWindow = window.open(IntPath,'PDF',
		'toolbar=0,menubar=0,status=1,top=30,left=30,directories=0,location=0,resizable=1,height=600,width=690,scrollbars=1');
	document.HiddenForm.p.value = AnnouncementPath;
	document.HiddenForm.SecCode.value = SecCode;
	document.HiddenForm.d.value = Details;
   	document.HiddenForm.submit();
	AnnouncementWindow.focus();
}

function GetAnnouncement(SecCode)
{
	AnnouncementWindow = window.open('index.cfm?fuseaction=announcements.today&SecCode='+SecCode,'Announcements',
		'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,height=600,width=690,scrollbars=1');
	AnnouncementWindow.focus();
}

function RemoveFromWL(SecCode)
{
	document.RefreshForm.action = 'index.cfm?fuseaction=watchlist.remove';
	document.RefreshForm.ToBeRemoved.value = SecCode;
	document.RefreshForm.submit();
}

function CRRMode(mode,show)
{
	document.ModeForm.fuseaction.value = mode;
	document.ModeForm.show.value = show;
	document.ModeForm.submit();
}

function OpenResearchReport(filename,type)
{
	newWindow = window.open('http://www.holst.com.au/holstonline/index.cfm?fuseaction='+type+'.open&id='+filename,'PDF',
		'menubar=1,status=1,top=0,left=0,toolbar=1,location=0,resizable=1,scrollbars=1');
	newWindow.focus();
}

function ConfirmDelete(ListName, CurrentAction)
{
	if (document.ActionsForm.fuseaction.value == 'mywatchlist.delete')
	{
		var proceed = confirm("Are you sure you want to delete '" + ListName + "' from My Watchlists?");
		if (proceed)
			document.ActionsForm.submit();
		else
		{
			if (CurrentAction == 'mywatchlist.start' || CurrentAction == 'mywatchlist.listempty')
				document.ActionsForm.fuseaction.value = 'mywatchlist.view';
			else if (CurrentAction == 'mywatchlist.savechanges' || CurrentAction == 'mywatchlist.add' || CurrentAction == 'mywatchlist.invalidcode')
				document.ActionsForm.fuseaction.value = 'mywatchlist.edit';
			else
				document.ActionsForm.fuseaction.value = CurrentAction;
		}
	}
	else if (document.ActionsForm.fuseaction.value == 'mywatchlist.download')
	{
		document.ActionsForm.submit();
		document.ActionsForm.fuseaction.value = '';
	}
	else
		document.ActionsForm.submit();
}

function ChangeList()
{
	if (document.ActionsForm.fuseaction.value != '')
		document.ActionsForm.submit();
	else
	{
		document.ActionsForm.fuseaction.value = 'mywatchlist.view';
		document.ActionsForm.submit();
	}
}

function RefreshMyWL()
{
	document.ActionsForm.fuseaction.value = 'mywatchlist.view';
	ActionsForm.submit();
}

function relocateTo(theURL)
{
	window.location.href=theURL;
}

function CancelChanges(ListID,XFA)
{
	window.location.href = 'index.cfm?fuseaction=' + XFA + '&ListID=' + ListID;
}

function NetscapeExpire()
{
	if ('Navigator' == navigator.appName)
		document.forms[0].reset();
}

function SetIntraDay(dd,mm,yyyy)
{
	if (document.SearchForm.Frequency.value == 'IntraDay')
	{
		document.SearchForm.TimeFromDD.value = dd;
		document.SearchForm.TimeFromMM.value = mm;
		document.SearchForm.TimeFromYYYY.value = yyyy;
	}
}

function OpenIn(theLink,windowName)
{
	newWindow = window.open(theLink, windowName);
	newWindow.focus();
}

function JumpToPage(page)
{
	document.InputForm.currentPage.value = page;
	InputForm.submit();
}

function ViewDetails(r)
{
	document.HiddenForm.r.value = r;
	HiddenForm.submit();
}

function IndustryGroup(group,cc,ivalue)
{	
	newWindow = window.open('','IndGroup',
			'toolbar=0,menubar=0,status=1,top=0,left=0,directories=0,location=0,resizable=1,height=500,width=430,scrollbars=1');
	newWindow.focus();
	document.IGForm.g.value = group;
	document.IGForm.a.value = cc;
	document.IGForm.ivalue.value = ivalue;
	IGForm.submit();
}

function Show(type,a)
{
	if (type == "Equities")
		var xfa = "equities.show";
	else if (type == "Managed+Investments")
		var xfa = "managed.show";
	else if (type == "Fixed+Interest+Investments")
		var xfa = "fixedinterest.show";
	else if (type == "Money+Market+Deposits")
		var xfa = "moneymarket.show";
	else
		var xfa = "cash.show";
		
	document.DestinationForm.a.value = a;
	document.DestinationForm.fuseaction.value = xfa;
	DestinationForm.submit();
}

function TR_set_toggle()
{
	var toggleRow = function()
	{
		this.style.display = ((this.style.display == 'none') ?  '' : 'none');
		return false;
	}

	for (var oTable, a = 0; a < arguments.length; ++a)
	{
		oTable = document.getElementById(arguments[a]);
     		var r = 0, row, rows = oTable.rows;
     		while (row = rows.item(r++))
			row.toggle = toggleRow;
	}

	self.toggleRow = function(row_id)
	{
		document.getElementById(row_id).toggle();
	}
}

function toggleRows(target,count)
{
	for (var targetID, i = 1; i <= count; i++)
	{
		targetID = target + i;
		toggleRow(targetID);
	}
	
	var targetImg = target + 'img';
	
	if (document.getElementById(targetImg).alt == "Click To Show Individual Holdings Of " + target)
	{
		document.getElementById(targetImg).src = "/images/common/minus.gif";
   		document.getElementById(targetImg).alt = "Click To Hide Individual Holdings Of " + target;
		document.getElementById(target).title = "Click To Hide Individual Holdings Of " + target;
	}
	else
	{
		document.getElementById(targetImg).src = "/images/common/plus.gif";
      	document.getElementById(targetImg).alt = "Click To Show Individual Holdings Of " + target;
		document.getElementById(target).title = "Click To Show Individual Holdings Of " + target;
	}
}

function LaunchHPA()
{
	newWindow = window.open('https://www.holst.com.au/hpt/redirect.cfm','HPT',
		'menubar=0,status=1,top=0,left=0,toolbar=0,location=0,resizable=1,scrollbars=1');
	newWindow.focus();
}
// -->