
/*
	File:		navigator.js
	Created:	May 14, 2002
	Copyright:	Copyright © 2002 Ag-Pak Inc.
			All rights reserved.

			No part of this site may be reproduced or 
			transmitted in any form or by any means, 
			electronic or mechanical, including but 
			not limited too, photocopying, recording, 
			or by any information and retrieval system 
			without expressed written permission. All 
			rights reserved. Use without expressed 
			written consent is a violation of applicable 
			laws.

	Purpose:	Define the javaScript functions
			that support navigation through the site. 

	
*/


/*
	Function:		displayCopyright()
	Parameters:		n/a
	Returns:		n/a

	Purpose:		Display the copyright tag on the 
				page footer.

*/
function displayCopyright()
{
	document.writeln('Copyright &copy; 2005, Ag-Pak Inc.&nbsp;&nbsp;');
	return;
}


/*
    Function:		displayDate()
    Parameters:		none
    Returns:		none

    Purpose:		The displayDate() function constructs
				a text string that displays the current
				date (i.e. today's date) in month, day, 
				year format (i.e. "July 4, 2000").

*/
function displayDate()
{
    var today      = new Date();
    var daysOfWeek = new Array(7);
    var months     = new Array(12);
    var dateStr    = new String();


    //
    //  Set the values for the days of week array
    //
    daysOfWeek[0] = 'Sunday';
    daysOfWeek[1] = 'Monday';
    daysOfWeek[2] = 'Tuesday';
    daysOfWeek[3] = 'Wednesday';
    daysOfWeek[4] = 'Thursday';
    daysOfWeek[5] = 'Friday';
    daysOfWeek[6] = 'Saturday';


    //
    //  Set the values for the months array
    //
    months[0]  = 'January';
    months[1]  = 'February';
    months[2]  = 'March';
    months[3]  = 'April';
    months[4]  = 'May';
    months[5]  = 'June';
    months[6]  = 'July';
    months[7]  = 'August';
    months[8]  = 'September';
    months[9]  = 'October';
    months[10] = 'November';
    months[11] = 'December';

   
    //
    //  Assign the day of the week
    //
    dateStr = daysOfWeek[today.getDay()];


    //
    //  Assign the month to the displayed 
    //  date string
    //
    dateStr += ' - ';
    dateStr += months[today.getMonth()];


    //
    //  Add the day of the month to the 
    //  displayed date string
    //
    dateStr += ' ';
    dateStr += today.getDate();


    //
    //  Add the year to the displayed
    //  date string
    //
    dateStr += ', ';
    dateStr += today.getFullYear();


    //
    //  Write the date out to the document
    //
    document.writeln(dateStr);  
}


/*
    Function:           navigateToProduct();
    Parameters:         Object reference to the HTML select tag
    Returns:            none

    Purpose:		Validate that the selected option in 
				the HTML select tag (i.e. "option" tag)
                        is not the base menu prompt, and 
				represents a valid URL.
	
				If the URL is valid, navigate to that URL.
				Otherwise do nothing.

				The option tag value of "#" represents that
				the currently selected option is the 
				base menu prompt, as it is assigned a value
				of "#"

				If an option with a tag value of "#" is 
				selected, reset the selectedIndex member
				of the HTML select tag to zero (0) (i.e.
				the first element in the list.
*/
function navigateToProduct(pSelect)
{
    var   goUrl = pSelect.options[pSelect.selectedIndex].value;


    /*
	  Ensure we have a valid URL.  If so,
	  navigate to the specified URL.  Otherwise,
	  reset to the first item in the menu,
	  which will always say "Select a Product".
    */
    if (goUrl != '#')
    {
        top.location.href = goUrl;
    }
    else
    {
        pSelect.selectedIndex = 0;
    }
}


/*
	Function:		writeProductMenu();
	Parameters:		n/a
	Returns:		n/a

	Purpose:		Writes out the option statements in the 
                        main product navigation menu, featured 
                        on every page.
*/
function writeProductMenu()
{
	/*
		Write the menu selection preamble
	*/
	document.writeln('<option value="#">Select a Product</option>');
	document.writeln('<option value="#">----</option>');

	/*
		Write the menu selections for the
		Ag-Pak product line
	*/
	document.writeln('<option value="octopak.html">Ag-Pak Octopak</option>');
	document.writeln('<option value="tiltousel.html">Ag-Pak Tiltousel</option>');
	document.writeln('<option value="doubleweigher.html">Ag-Pak Double Weigh Bagger</option>');
      document.writeln('<option value="ap60.html">Ag-Pak AP60 Wicketted Bagger</option>');
      document.writeln('<option value="agWeigher.html">Ag-Pak Weigher</option>');

	/*
		Write the product grouping delimiter
	*/
	document.writeln('<option value="#">----</option>');

	/*
		Write the menu selections for the
		Newtec product line
	*/
	document.writeln('<option value="pcSeries.html">NEWTEC PC Series</option>');
	document.writeln('<option value="xbSeries.html">NEWTEC XB Series</option>');
	document.writeln('<option value="xlSeries.html">NEWTEC XL Series</option>');
      document.writeln('<option value="2000.html">NEWTEC 2000 Series</option>');
      document.writeln('<option value="at60.html">NEWTEC AT60</option>');
	document.writeln('<option value="hc30.html">NEWTEC HC30</option>');
      document.writeln('<option value="1100.html">NEWTEC 1100</option>');
      document.writeln('<option value="2000pg320.html">NEWTEC 2000 / PG320</option>');
	document.writeln('<option value="2008g45.html">NEWTEC 2008(9)G / G45E</option>');
      document.writeln('<option value="2009a.html">NEWTEC 2009A / VB40CAE</option>');
      document.writeln('<option value="2009peb.html">NEWTEC 2009G / PEB30G</option>');
      document.writeln('<option value="2012a.html">NEWTEC 2012A / VB40CAE</option>');
      document.writeln('<option value="2012dpc.html">NEWTEC 2012D / DPC-50</option>');
      document.writeln('<option value="2012g45.html">NEWTEC 2012DG / 2G45E</option>');
      document.writeln('<option value="2012xbean.html">NEWTEC 2012xBDG</option>');
      document.writeln('<option value="2012xbd.html">NEWTEC 2012DG / 2PEB30G</option>');
      document.writeln('<option value="2014a.html">NEWTEC 2014A / 2VB40CAE</option>');
      document.writeln('<option value="2014cbag.html">NEWTEC 2014A / C-Bag Care</option>');
      document.writeln('<option value="2014bd.html">NEWTEC 2014xBD / PEB60KL</option>');
      document.writeln('<option value="3013md.html">NEWTEC 3013 MD / NBM-60</option>');
      document.writeln('<option value="a126.html">NEWTEC Astro 84 / 126</option>');
      document.writeln('<option value="peb60kl.html">NEWTEC PEB60KL</option>');
      document.writeln('<option value="uscb20.html">NEWTEC USCB20</option>');
      document.writeln('<option value="vb40cae.html">NEWTEC VB40CAE</option>');

	/*
		Write the product grouping delimiter
	*/
      document.writeln('<option value="#">----</option>');

	/*
		Write the menu selections for the 
		C-Pack product line
	*/
      document.writeln('<option value="929.html">C-Pack VAC 929</option>');
      document.writeln('<option value="955.html">C-Pack VAC 955</option>');
      document.writeln('<option value="966.html">C-Pack VAC 966</option>');
      document.writeln('<option value="983.html">C-Pack VAS 983</option>');
      document.writeln('<option value="991.html">C-Pack VAS 991</option>');
      document.writeln('<option value="996.html">C-Pack VAS 996</option>');

	/*
		Write the product grouping delimiter
	*/
      document.writeln('<option value="#">----</option>');

	/*
		Write the menu selections for the 
		Jasa product line
	*/
      document.writeln('<option value="jasa250.html">JASA 250</option>');
      document.writeln('<option value="jasa350.html">JASA 350</option>');
      document.writeln('<option value="jasa450.html">JASA 450</option>');
      document.writeln('<option value="jasaQuatro.html">JASA Quatroseal</option>');
      document.writeln('<option value="jasa35060.html">JASA 350 / 60 QuickPak</option>');
      document.writeln('<option value="jasa35090.html">JASA 350 / 90 QuickPak</option>');
}