//************************************************************************
// Loads all onload window events in one go to avoid JS onevent problems
//************************************************************************ 
				
function init() 
{ 

	  
      
		//********************
		// Load clippings
		//********************
		
		//fix for differences in how IE and Netscape setAttribute to the class property
		if (document.all) classFix = "className";
		else classFix = "class";
		
		//create a screen object, handles height, width of the screen
		userScreen = new screenObject(); 
		
		//in window.js
		window.onresize = windowResize;
		
		initClippings();
		
		today = new Date
weekDayName = new Array ("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
monthName = new Array ("January","February","March","April","May","June","July","August","September","October","November","December")
function printDate()
{
var MD = document.getElementById('dateDiv');
if (MD)
MD.innerHTML = "" + weekDayName[today.getDay()]+ ", " + monthName[today.getMonth()] + " " + today.getDate()+ "";
}
		printDate();
		
// Add new events here...
		
		}

// load init with all events
addEvent(window, "load", init); 



// toggle the about us text on off from the footer nav
    function toggle_visibility(id) {
       var e = document.getElementById(id);
       if(e.style.display == 'block')
          e.style.display = 'none';
       else
          e.style.display = 'block';
    }
    
    
   		//
		//  Load the accordion menu
		// 
		Event.observe(window, 'load', loadAccordions, false);
	
		//
		//	Set up accordion
		//
		function loadAccordions() {
			var topAccordion = new accordion('horizontal_container', {
				classNames : {
					toggle : 'horizontal_accordion_toggle',
					toggleActive : 'horizontal_accordion_toggle_active',
					content : 'horizontal_accordion_content'
				},
				defaultSize : {
					width : 690
				},
				direction : 'horizontal'
			});
			
			
			// Open
			topAccordion.activate($$('#horizontal_container .horizontal_accordion_toggle')[2]);
			
		}

// show/hide JS for prepare a quote form		
function showHide(shID) {
    if (document.getElementById(shID)) {
        if (document.getElementById(shID+'-show').style.display != 'none') {
            document.getElementById(shID+'-show').style.display = 'none';
            document.getElementById(shID).style.display = 'block';
        }
        else {
            document.getElementById(shID+'-show').style.display = 'inline';
            document.getElementById(shID).style.display = 'none';
        }
    }
}
		