var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;

d = document;
n = navigator;
na = n.appVersion;
nua = n.userAgent;
win = ( na.indexOf( 'Win' ) != -1 );
mac = ( na.indexOf( 'Mac' ) != -1 );
lin = ( nua.indexOf( 'Linux' ) != -1 );

if ( !d.layers ){
	dom = ( d.getElementById );
	op = ( nua.indexOf( 'Opera' ) != -1 );
	konq = ( nua.indexOf( 'Konqueror' ) != -1 );
	saf = ( nua.indexOf( 'Safari' ) != -1 );
	moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
	ie = ( d.all && !op );
	ie4 = ( ie && !dom );

	/*
	ie5x tests only for functionality. ( dom||ie5x ) would be default settings. 
	Opera will register true in this test if set to identify as IE 5
	*/

	ie5x = ( d.all && dom );
	ie5mac = ( mac && ie5x );
	ie5xwin = ( win && ie5x );
}


function WriteMenus() {

document.write('<table border="0" cellpadding="0" cellspacing="0" width="874">');

document.write('<tr><td colspan="9"><img src="images/top_buttons_r1_c1.jpg" alt="" name="top_buttons_r1_c1" width="877" height="199" border="0" id="top_buttons_r1_c1" /></td></tr>');

document.write('<tr><td><img src="images/top_buttons_r4_c1.jpg" alt="" name="top_buttons_r4_c1" width="42" height="28" border="0" id="top_buttons_r4_c1" /></td>');

document.write('<td><a href="index.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'about_this_trust\',\'images/about_this_trust_mo.jpg\',1);" ');
document.write('onmouseover="MM_nbGroup(\'over\',\'about_this_trust\',\'images/about_this_trust_mo.jpg\',\'images/about_this_trust_mo.jpg\',1);" ');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/about_this_trust.jpg" alt="" border="0" id=\'about_this_trust\' /></a></td>');
	
document.write('<td><a href="about_vic.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'about_vic\',\'images/about_vic_mo.jpg\',1);"');
document.write('onmouseover="MM_nbGroup(\'over\',\'about_vic\',\'images/about_vic_mo.jpg\',\'images/about_vic_mo.jpg\',1);"');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/about_vic.jpg" alt="" border="0" id="about_vic" /></a></td>');
	
document.write('<td ><a href="application_forms.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'application_forms\',\'images/application_forms_mo.jpg\',1);"');
document.write('onmouseover="MM_nbGroup(\'over\',\'application_forms\',\'images/application_forms_mo.jpg\',\'images/application_forms_mo.jpg\',1);"');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/application_forms.jpg" alt="" border="0" id="application_forms" /></a></td>');
	
document.write('<td ><a href="application_guidelines.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'application_guidelines\',\'images/application_guidelines_mo.jpg\',1);"');
document.write('onmouseover="MM_nbGroup(\'over\',\'application_guidelines\',\'images/application_guidelines_mo.jpg\',\'images/application_guidelines_mo.jpg\',1);"');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/application_guidelines.jpg" alt="" border="0" id="application_guidelines" /></a></td>');
	
document.write('<td><a href="reporting_templates.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'reporting_templates\',\'images/reporting_template_mo.jpg\',1);"');
document.write('onmouseover="MM_nbGroup(\'over\',\'reporting_templates\',\'images/reporting_template_mo.jpg\',\'images/reporting_template_mo.jpg\',1);"');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/reporting_templates.jpg" alt="" border="0" id="reporting_templates" /></a></td>');
	
document.write('<td ><a href="media_releases.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'media_releases\',\'images/media_releases_mo.jpg\',1);"');
document.write('onmouseover="MM_nbGroup(\'over\',\'media_releases\',\'images/media_releases_mo.jpg\',\'images/media_releases_mo.jpg\',1);"');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/media_releases.jpg" alt="" border="0" id="media_releases" /></a></td>');
	
document.write('<td ><a href="successful_applicants.html" target="_top" onclick="MM_nbGroup(\'down\',\'navbar1\',\'successful_applicants\',\'images/succussful_applicants_mo.jpg\',1);"');
document.write('onmouseover="MM_nbGroup(\'over\',\'successful_applicants\',\'images/succussful_applicants_mo.jpg\',\'images/succussful_applicants_mo.jpg\',1);"');
document.write('onmouseout="MM_nbGroup(\'out\');">');
document.write('<img src="images/successful_applicants.jpg" alt="" name="successful_applicants" border="0" id="successful_applicants" /></a></td>');
	
    if ( ie5mac ) {
            document.write('<td><img src="images/top_buttons_r4_c15.jpg" alt="" name="top_buttons_r4_c15" border="0" id="top_buttons_r4_c15"  width=44 height=28 /></td>');
	}
	else if ( d.layers ){
		document.write('<td><img src="images/top_buttons_r4_c15.jpg" alt="" name="top_buttons_r4_c15" border="0" id="top_buttons_r4_c15"  width=44 height=28 /></td>');
	}
	else if ( ie4 ){
                document.write('<td><img src="images/top_buttons_r4_c15.jpg" alt="" name="top_buttons_r4_c15" border="0" id="top_buttons_r4_c15"  width=44 height=28 /></td>');
	}
	else if ( moz ){
		document.write('<td><img src="images/top_buttons_r4_c15.jpg" alt="" name="top_buttons_r4_c15" border="0" id="top_buttons_r4_c15"  width=45 height=28 /></td>');
	}
	else {
		document.write('<td><img src="images/top_buttons_r4_c15.jpg" alt="" name="top_buttons_r4_c15" border="0" id="top_buttons_r4_c15"  width=45 height=28 /></td>');
	}

document.write('</tr></table>');
}


/********************************************************
here is a sample use of the browser detector, it would load a browser specific stylesheet
for certain unsupported or improperly supported mac ie 5 css styles. The depth variable
is used so that the javascript library file can be used from anywhere in the website, you simply
insert the depth of the file like this, 
...
 <head>
 <title>Browser information Page</title>

 <meta http-equiv = "Content-Type" content = "text/html; charset = iso-8859-1" />
 <link rel = "stylesheet" type = "text/css" href = "/css/main.css" />
 <script type = "text/javascript" src = "/js/browser_detection.js"> </script>
 <script type = "text/javascript>browser_css( '/'); </script>
 </head>

in the head of the web page after the js file is loaded.
Or if you are always referring your site to the root, you wouldn't need that
 and could delete the depth variable and just use the absolute path to the root.

function browser_css( ) {
	d = document;// shorthand so we don't have to write out document each time..
	if ( ie5mac ) {
		d.write('<link rel = "stylesheet" type = "text\/css" href = "/css/ie5mac.css" />');
	}
	else if ( d.layers ){
		d.write('<link rel = "stylesheet" type = "text\/css" href = "/css/ns4x.css" />');
	}
	else if ( ie4 ){
		d.write('<link rel = "stylesheet" type = "text\/css" href = "/css/ie4.css" />');
	}
	else if ( moz ){
		d.write('<link rel = "stylesheet" type = "text\/css" href = "/css/moz.css" />');
	}
	else {
		d.write('< link rel = "stylesheet" type = "text\/css" href = "/css/moz5.css" />');
	}
}
********************************************************/





