<!-- // JavaScript Document

function verifyCompatibleBrowser(){ 
version = parseInt(navigator.appVersion);
isIE56 = ((navigator.userAgent.indexOf("MSIE 5") >= 0)
       || (navigator.userAgent.indexOf("MSIE 6") >=0 ) 
		|| (navigator.userAgent.indexOf("MSIE 7") >=0 ))? 1 : 0;
isOp = (navigator.userAgent.indexOf("Opera") >= 0) ? 1 : 0;
this.isW3 = ((version > 4) || isIE56 || (isOp && version > 4)) ? 1: 0;
    this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5) 
    return this 
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function mouseover_event(evt){
	evt = (evt) ? evt : ((window.event) ? window.event : "")
     if (evt) {
          var elem = (evt.target) ? evt.target : evt.srcElement
		  //alert('mouseOver'+' name:'+elem.id+' parent id:'+elem.parentNode.id+' nodeType:'+elem.nodeType+'parent.parentnode:'+elem.parentNode.parentNode.id+'.');
		  //elem.style.background='#F7F6DA';
		  if (timerID) clearTimeout(timerID);
		  //clearSubmenus();
		  //if (elem.parentNode.id.match(/\d+/)) {
		  if (elem.parentNode.parentNode.parentNode.id == 'website-section-links') {
		  		//alert('top');
				clearSubmenus("all");
				if (timerID) clearTimeout(timerID);
			}else{
				if (timerID) clearTimeout(timerID);
		 		 //alert('sub');		
			}
		// check if top level menu
			//alert(elem.parentNode.parentNode.parentNode.parentNode.id);
		  if (elem.parentNode.parentNode.parentNode.id=='website-section-links') {
		  //alert('top level: parent.parentnode: '+elem.parentNode.parentNode.id+' '+'parentnode: '+elem.parentNode.id+' node: '+elem.id);
		  		//roll out submenu
				submenu_li_list= elem.parentNode.getElementsByTagName('ul');
				//elem.style.visibility='visible';
				//alert(elem.id+' '+submenu_li_list+submenu_li_list.length);
				if (menu=='quotes'){
				mquotes=MM_findObj('quotes');
				if (submenu_li_list.length!=0) {
					fader1.haltFade();fader2.haltFade();fader3.haltFade();box1.style.visibility='hidden';box2.style.visibility='hidden';box3.style.visibility='hidden';
					//mquotes.style.visibility='hidden';
				} else {
					fader1.resumeFade();fader2.resumeFade();fader3.resumeFade();
					//mquotes.style.visibility='visible';
				}
				}
				for (var i=0; i<submenu_li_list.length; i++){
					//alert(submenu_li_list[i].id+submenu_li_list[i].style.visibility);
					submenu_li_list[i].style.visibility='visible';
					
				}	
			}
			
          //elem.className = (evt.type == "mouseover") ? "highlight" : "normal"
     }
}
function mouseout_event(evt){
	evt = (evt) ? evt : ((window.event) ? window.event : "")
     if (evt) {
          var elem = (evt.target) ? evt.target : evt.srcElement
		  //alert('out'+elem.id);
		  //elem.style.background='#E5DDB8';
		  if (timerID) clearTimeout(timerID);
			timerID=setTimeout('clearSubmenus("default")',1000);
			//alert('parent.parentnode: '+elem.parentNode.parentNode.id+' '+'parentnode: '+elem.parentNode.id);
		   if (elem.parentNode.parentNode.id=='website-section-links') {
		  		//hide submenu
				//alert('sub');
				//elem.style.background='#c1311e';
				//elem.style.background='';
				submenu_li_list= elem.getElementsByTagName('ul');
				for (var i=0; i<submenu_li_list.length; i++){
					//submenu_li_list[i].style.visibility='hidden';
				}	
			}
          //elem.className = (evt.type == "mouseover") ? "highlight" : "normal"
     }
}

function clearSubmenus(action) {
	//alert('clearing');
	links_pointer = MM_findObj('website-section-list');
	
	a_list= links_pointer.getElementsByTagName('ul');
	//alert(a_list.length);
	for (var j=0; j<a_list.length; j++){
		//alert(a_list[j].id+' '+a_list[j].style.[1]);
		//test for numeric id
		//alert (a_list[j].id+' '+menu);
		//if (a_list[j].id.match(/\d+/)) {
			//alert(a_list[i].id);
			//set visibility to hidden
			if (menu!='' && a_list[j].id==menu && action=='default'){
				a_list[j].style.visibility='visible';
			}else{
				a_list[j].style.visibility='hidden';
			}
		//}
	}
	//alert (j);
	if (menu=='quotes'){
		mquotes=MM_findObj('quotes');
		if (menu!='' && menu=='quotes' && action=='default'){
			fader1.resumeFade();fader2.resumeFade();fader3.resumeFade();
			//mquotes.style.visibility='visible';
		}else{
			//mquotes.style.visibility='hidden';
		}
	}
}

bw=new verifyCompatibleBrowser();
var isDOM = (document.getElementById ? true : false);
var speed=50 
var loop, timer 
var timerID=null;

function generic(){
	//alert(menu);
	//add rollover events to top level LI's
	//
	if (typeof( window[ 'bw' ] ) != 'undefined') {if (bw.isW3) {
//alert('Generic onload function');
// initialise menus
		//get pointer to main links
		links_pointer = MM_findObj("website-section-links");
		//get list of a's under "main-links"
		a_list= links_pointer.getElementsByTagName('a');
		//alert (a_list.length);
		//loop over links
		for (var i=0; i<a_list.length; i++){
			//add mouseover to change backgound
			a_list[i].onmouseover=mouseover_event;
			//add mouseout revert
			a_list[i].onmouseout=mouseout_event;
			//test for numeric id
			//alert (a_list[i].parentNode.id);
			if (a_list[i].id.match(/\d+/)) {
				//alert(a_list[i].id);
				//set visibility to hidden			
				//a_list[i].style.visibility='hidden';
				//add event to../.
			} else {
				//add corners if has sublink node
				//alert (a_list[i].parentNode.id);
				
				//add click event
				
			}
			
		}
	}}
}


//setup onload function
if (bw.isW3){
if(typeof window.addEventListener != 'undefined')
{
	//.. gecko, safari, konqueror and standard
	window.addEventListener('load', generic, false);
}
else if(typeof document.addEventListener != 'undefined')
{
	//.. opera 7
	document.addEventListener('load', generic, false);
}
else if(typeof window.attachEvent != 'undefined')
{
	//.. win/ie
	window.attachEvent('onload', generic);
}

//** remove this condition to degrade older browsers
else
{
	//.. mac/ie5 and anything else that gets this far
	
	//if there's an existing onload function
	if(typeof window.onload == 'function')
	{
		//store it
		var existing = onload;
		
		//add new onload handler
		window.onload = function()
		{
			//call existing onload function
			existing();
			
			//call generic onload function
			generic();
		};
	}
	else
	{
		//setup onload function
		window.onload = generic;
	}
}
}

if (document.images)
{
  pic1= new Image(136,10); 
  pic1.src="images/common/st.gif"; 

  pic2= new Image(136,10); 
  pic2.src="images/common/sb.gif"; 
}

//  -->
