//funtion to select a menu and go
function jumpPage(newLoc) {
 newPage = newLoc.options[newLoc.selectedIndex].value

 if (newPage != "") {
 window.location.href = newPage
 }
}
//end of funtion to select a menu and go

//start function to change image rollovers//

 if (document.images) {



var about = new Image
var about_ro = new Image
var about_current = new Image
about.src = "img/about.gif"
about_ro.src = "img/about_hover.gif"
about_current.src = "img/about_down.jpg"

var practice = new Image
var practice_ro = new Image
var practice_current = new Image
practice.src = "img/practice.gif"
practice_ro.src = "img/practice_hover.gif"
practice_current.src = "img/practice_hover.gif"

var team = new Image
var team_ro = new Image
var team_current = new Image
team.src = "img/team.gif"
team_ro.src = "img/team_hover.gif"
team_current.src = "img/team_hover.gif"


var work = new Image
var work_ro = new Image
var work_current = new Image
work.src = "img/work.gif"
work_ro.src = "img/work_hover.gif"
work_current.src = "img/work_hover.gif"


var events = new Image
var events_ro = new Image
var events_current = new Image
events.src = "img/events.gif"
events_ro.src = "img/events_hover.gif"
events_current.src = "img/events_hover.gif"


var contact = new Image
var contact_ro = new Image
var contact_current = new Image
contact.src = "img/contact.gif"
contact_ro.src = "img/contact_hover.gif"
contact_current.src = "img/contact_hover.gif"








 }
 function ImgRoll(imgName,newImg) {
	 //alert(newImg);
	//alert(imgName);
 if (document.images) {
   document[imgName].src= eval(newImg + ".src")
 }
 }
 function Img_Head_Roll(id,newImg){
	 //alert(newImg1);
	//document.getElementById(id).src=eval(newImg1+".src");
	//alert(eval(newImg1));
	//id.src=;
	 //alert(document.getElementById(id));
     document.getElementById(id).src=eval(newImg+".src") 
 }


//pop up window function//

 leftPos = 0
 if (screen) {
 leftPos = screen.width-800
 }

function windowOpener(url,width,height,offsetLeft,menubar) {
winWidth = 520
winHeight = 440
winLeft = leftPos
winMenu = "no"

if (width) winWidth = width
if (height) winHeight = height
if (offsetLeft) winLeft -= offsetLeft
if (menubar) winMenu = menubar

newWindow = window.open(url, 'newin', 'scrollbars=no,resizable=no,status=no,width='+winWidth+',height='+winHeight+',left='+winLeft+',menubar='+winMenu+',top=100px,');
newWindow.focus();
}

//end of pop up window function//


//layer navigaiton function/

var activeSub=0;
var SubNum=0;

 //global variables

 var timerID = null;
 var timerOn = false;
 var timecount = 200;
 var what = null;
 var newbrowser = true;
 var check = false;

 function init(){
 if (document.layers) {
 layerRef="document.layers";
 styleSwitch="";
 visibleVar="show";
 screenSize = window.innerWidth;
 what ="ns4";


}else if(document.all){
 layerRef="document.all";
 styleSwitch=".style";
 visibleVar="visible";
 screenSize = document.body.clientWidth + 10;
 what ="ie";

 }else if(document.getElementById){
 layerRef="document.getElementByID";
 styleSwitch=".style";
 visibleVar="visible";
 what="moz";

 }else{
 what="none";
 newbrowser = false;
 }


 window.status='';
 check = true;
 }

 // This Function turns the layers on and off
 function showLayer(layerName){
	
	
  if(check){
  if (what =="none"){
return;
}
 else if (what == "moz"){
 document.getElementById(layerName).style.visibility="visible";
}
 else{

eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="visible"');
 }
 }
 else {
 return;}
 }

 function hideLayer(layerName){
 if(check){
 if (what =="none"){
 return;
 }
 else if (what == "moz"){
 document.getElementById(layerName).style.visibility="hidden";
 }
 else{
 eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility="hidden"');
 }

 }
 else {
 return;}
 }

 function hideAll(){
 hideLayer('nav1');
 hideLayer('nav2');
 hideLayer('nav3');
 hideLayer('nav4');
 hideLayer('nav5');
 hideLayer('nav6');
 }


 function startTime() {
 timerOn = false;
 if (timerOn == false) {
 timerID=setTimeout( "hideAll()" , timecount);
 timerOn = true;

 }

 }


 function stopTime() {
 if (timerOn) {
 clearTimeout(timerID);
 timerID = null;
 timerOn = false;
 }
 }

 function onLoad(){
init();

 }
