<!--  Hide from old browsers

var turnover_savings_calc_method = 'subtract';

if (document.layers) {
  visible = 'show';
  hidden = 'hidden';

} else if (document.all && !document.getElementById) {
  visible = 'visible';
  hidden = 'hidden';

} else if (document.getElementById) {
  visible = 'visible';
  hidden = 'hidden';  
}

function resize800 () {

/* TASKS:
	detect browser size
	Resize logo to 250px wide and height 67
	Move menus. Shift left 150 and up 40 */

  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement &&
      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }

	if (myWidth < 1000) {
		if (document.all && !document.getElementById) {    		
   		document.all("wt_text").src="img/cc_text-green_small.gif";
   		document.all("wt_text").style.width=250;
   		document.all("wt_text").style.height=67;
   		document.all("menu1").style.left="260";
   		document.all("menu2").style.left="387";
   		document.all("menu3").style.left="514";
   		document.all("menu4").style.left="621";
   		document.all("menu1").style.top="73";
   		document.all("menu2").style.top="73";
   		document.all("menu3").style.top="73";
   		document.all("menu4").style.top="73";

		} else if (document.getElementById) {
			if (document.getElementById("wt_text")) {
   			document.getElementById("wt_text").src="img/cc_text-green_small.gif";
   			document.getElementById("wt_text").style.width=250;
	   		document.getElementById("wt_text").style.height=67;
   			document.getElementById("menu1").style.left="260";
   			document.getElementById("menu2").style.left="387";
   			document.getElementById("menu3").style.left="514";
   			document.getElementById("menu4").style.left="621";
   			document.getElementById("menu1").style.top="73";
   			document.getElementById("menu2").style.top="73";
   			document.getElementById("menu3").style.top="73";
   			document.getElementById("menu4").style.top="73";
			}
  		}

	}
						
	document.getElementById("javascript_test").style.display="none";
}

function hide(menu) {
  if (window.countdown) {
    clearTimeout(countdown);
  }

  if (document.layers) {
	document.layers[menu].visibility="hidden";

  } else if (document.all && !document.getElementById) {
	document.all(menu).style.visibility="hidden";
  } else if (document.getElementById) {
    document.getElementById(menu).style.visibility="hidden";
  }
}


function exponent(a,b)
{
   t = 1;
    for(x = 1; x <= b; x++) 
       {
        t = t * a;
       }
   EXP = t;
   return(EXP);
}


function show(menu) {

  if (window.countdown) {
    clearTimeout(countdown);
  }

  if (document.layers) {
    document.layers[menu].visibility="visible";

  } else if (document.all && !document.getElementById) {
    document.all(menu).style.visibility="visible";

  }  else if (document.getElementById) {
    document.getElementById(menu).style.visibility="visible";
  }
}

function timeclose(menu) {
  menux=eval('menu+""');
  countdown=setTimeout("hide(menux)", 250);
  countdown;
}


function timepause() {
  clearTimeout(countdown);
}


function highlight(item) {
  if (document.all && !document.getElementById) {
    document.all(item).style.color="black";
	document.all(item).style.background="#aaff29";
  } else if (document.getElementById) {
  	if (document.getElementById(item)) {
    	document.getElementById(item).style.color="black";
    	document.getElementById(item).style.background="#aaff29";
	}
  }

}


function unhighlight(item) {
  if (document.all && !document.getElementById) {
    document.all(item).style.color="black";
	document.all(item).style.background="white";

  } else if (document.getElementById) {
  	if (document.getElementById(item)) {
    	document.getElementById(item).style.color="black";
    	document.getElementById(item).style.background="white";
	}
  }
}



function highlight_press(item) {
  if (document.all && !document.getElementById) {
    document.all(item).style.backgroundColor ="white";
    document.all(item).style.color ="red";

  } else if (document.getElementById) {
  	if (document.getElementById(item)) {
    	document.getElementById(item).style.backgroundColor ="white";
    	document.getElementById(item).style.color ="red";
	}
  }

}


function unhighlight_press(item) {
  if (document.all && !document.getElementById) {    		
    document.all(item).style.backgroundColor ="white";
    document.all(item).style.color="black";

  } else if (document.getElementById) {
  	if (document.getElementById(item)) {
	    document.getElementById(item).style.backgroundColor ="white";
	    document.getElementById(item).style.color="black";
	}
  }
}

/* These two functions find the mouse position for pop-up placement */
function mouseX(evt) {
if (evt.pageX) return evt.pageX;
else if (evt.clientX)
   return evt.clientX + (document.documentElement.scrollLeft ?
   document.documentElement.scrollLeft :
   document.body.scrollLeft);
else return null;
}

function mouseY(evt) {
if (evt.pageY) return evt.pageY;
else if (evt.clientY)
   return evt.clientY + (document.documentElement.scrollTop ?
   document.documentElement.scrollTop :
   document.body.scrollTop);
else return null;
}

function show_popup(target, event)  {
	hide_popup();
	x = mouseX(event) - document.body.scrollLeft + 15;
	y = mouseY(event) - document.body.scrollTop + 5;

	/*Establish Window Height*/
	if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myHeight = window.innerHeight;
	  } else if( document.documentElement &&
	      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myHeight = document.documentElement.clientHeight;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myHeight = document.body.clientHeight;
	}
	
	/*Establish Window Width*/
	if( typeof( window.innerWidth ) == 'number' ) {
	    //Non-IE
	    myWidth = window.innerWidth;
	  } else if( document.documentElement &&
	      ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
	    //IE 6+ in 'standards compliant mode'
	    myWidth = document.documentElement.clientWidth;
	  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
	    //IE 4 compatible
	    myWidth = document.body.clientWidth;
	}

	//new_Height= myHeight + document.body.scrollTop;
	//alert ("Mouse Y:" + y + " MyHeight: " + myHeight);

	if (y+200>myHeight) {
		y = myHeight-190;
	}
	
	if (x+240 > myWidth) {
		x = myWidth - 260;
	}
	
	//alert ("New Y: " + y);

	y = y + document.body.scrollTop;
	
        /* display the pop-up */
        document.getElementById(target + '_popup').style.display="block";
        /* set the pop-up's left */
        document.getElementById(target + '_popup').style.left = x;
        /* set the pop-up's top */
        document.getElementById(target + '_popup').style.top = y;
        
        
}

/* this function hides the pop-up when user moves the mouse out of the link */
//function hide_popup() {
//        /* hide the pop-up */
//        document.getElementById('shoresh_popup').style.display="none";
//}


function hide_popup () {

	needle = "popup";
   var my_array = document.getElementsByTagName("*");
   var retvalue = new Array();
   var i;
   var j;

   for (i=0,j=0;i<my_array.length;i++) {
      var c = " " + my_array[i].className + " ";
      if (c.indexOf(" " + needle + " ") != -1) {
      	retvalue[j++] = my_array[i];
      	document.getElementById(my_array[i].id).style.display="none";
      }
   }
   

}