<!--

/* This section of code fixes a netscape resizing bug for DHTML pages.
If you use this code please leave these comments in place so that
others may benefit.  You'll need to also un-remark the ns4 line by taking out
the two //'s at the beginning.  For use by anyone who needs it, this code
was created for by Glenn Davis of Project Cool, Inc. */

ns4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4 ))
function ns4bugfix(){
        if (document.pcool.ns4bugfix.startWidth != window.innerWidth || document.pcool.ns4bugfix.startHeight != window.innerHeight){
                document.location = document.location
        }
}

if (ns4 &&(typeof document.pcool == 'undefined')){
          document.pcool = new Object;
          document.pcool.ns4bugfix = new Object;
      document.pcool.ns4bugfix.startWidth = window.innerWidth;
      document.pcool.ns4bugfix.startHeight = window.innerHeight;
          window.onresize = ns4bugfix;
}


// The syntax for using these functions in an HTML document are as follows:
//
// <a href="#" onMouseOver="imgOn('img2')" onMouseOut="imgOff('img2')">
// <img src="file.gif" name="img2" width="60" height="60" border="0"></a>

var loaded=0;

//set an array for the to turn on the appropriate nav button				
var webSections = new Array();

webSections[0] = "web";
webSections[1] = "des";
webSections[2] = "par";
webSections[3] = "mtc";
webSections[4] = "por";
webSections[5] = "acc";
webSections[6] = "store";

var currentPage = '';

// loop through the section array to identify the subscript of the section we're in                
/*
for (i=0; i < webSections.length; i++) {
                
	if (webSections[i] == section) {
		i++;
		currentPage = "img" + i;
	}
}
*/
if ((is_nav3) || (is_nav4up) || (is_ie4up)) br = "good";
else br = "bad";


if (br == "good") {
	
	
	//these are for the horizontal inside nav
	img1on = new Image(); img1on.src = "/images/home_on.gif";
	img1off = new Image(); img1off.src ="/images/home_off.gif";
	img2on = new Image(); img2on.src ="/images/print_on.gif";
	img2off = new Image(); img2off.src ="/images/print_off.gif";
	img3on = new Image(); img3on.src ="/images/login_on.gif";
	img3off = new Image(); img3off.src ="/images/login_off.gif";
	img4on = new Image(); img4on.src = "/images/shirts_on.gif";
	img4off = new Image(); img4off.src ="/images/shirts_off.gif";
	img5on = new Image(); img5on.src = "/images/cart_on.gif";
	img5off = new Image(); img5off.src ="/images/cart_off.gif"; 
	img6on = new Image(); img6on.src = "/images/contact_on.gif";
	img6off = new Image(); img6off.src ="/images/contact_off.gif";
	
	img101on = new Image(); img101on.src ="/images/hm_nav_abt_on.gif";
	img101off = new Image(); img101off.src ="/images/hm_nav_abt_off.gif";
	img102on = new Image(); img102on.src ="/images/hm_nav_web_on.gif";
	img102off = new Image(); img102off.src ="/images/hm_nav_web_off.gif";
	img103on = new Image(); img103on.src = "/images/hm_nav_des_on.gif";
	img103off = new Image(); img103off.src ="/images/hm_nav_des_off.gif";
	img104on = new Image(); img104on.src = "/images/hm_nav_par_on.gif";
	img104off = new Image(); img104off.src ="/images/hm_nav_par_off.gif";
	img105on = new Image(); img105on.src = "/images/hm_nav_por_on.gif";
	img105off = new Image(); img105off.src ="/images/hm_nav_por_off.gif";
	img106on = new Image(); img106on.src = "/images/hm_nav_serv_on.gif";
	img106off = new Image(); img106off.src ="/images/hm_nav_serv_off.gif";
	img107on = new Image(); img107on.src = "/images/hm_nav_sol_on.gif";
	img107off = new Image(); img107off.src ="/images/hm_nav_sol_off.gif";
	        
}



function imgOn(imgName) {
	if (br == "good") {
		document[imgName].src = eval(imgName + "on.src");
		//document.hold.src = eval(imgName + "hold.src");
		//window.status = eval(imgName + "copy");
	}

}

function imgOff(imgName) {
	if (br == "good") {
		
			document[imgName].src = eval(imgName + "off.src");
		}        

}

function popUp(URL,width,height) {
			
	//alert('Width is ' + width + ' and height is ' + height);
	newWindow=window.open(URL,"thenewwindow","toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=" + width + ",height=" + height + ",top="+((screen.height/2)-(height - height/2))+",left="+((screen.width/2)-(width - width/2)));
	newWindow.opener.name= "main";
	newWindow.focus();
		 
			
}

var n = (document.layers) ? 1:0
var ie = (document.all) ? 1:0
var range = "";
var styleObj = "";
var scroll = 0;
var yBegin =-150;
var ymax =0;
var ymin = 0;
var xBegin = 330;
var speed = 15;
var whichText;
var timeoutNum;

function init()
    {
        if (n)
        {
                showtext1 = document.textLayer1;
               	showtext2 = document.textLayer2;
                showtext3 =  document.textLayer3;
                //text4 = document.image4text;
                //showtext5 =  document.textLayer5;
                //alert('init');
                
		 }
		 
        else if (ie)
        {		
        	 	showtext1 = textLayer1.style;
                showtext2 = textLayer2.style;
                showtext3 = textLayer3.style;
                //showtext4 = textLayer4.style;
                //showtext5 = textLayer5.style;
                
		 }

}

//figure out which layer we are talkin' about
//pass a bunch of stuff to object builder

function getText(whichText) {
	
	if (ie) {
	        range = "all.";
	        styleObj = ".style";
	        layerAccess = "";
	        scrollThis = "textLayer" + whichText;
	        init2();
	}
		
	if (n) {
			scrollThis = "textLayer" + whichText;
			layerAccess = "textLayer" + whichText;
			init2();

	}
}

// move it baby

function shiftTo(obj, x, y) {
        if (n) {
                obj.moveTo(x,y);
        } else {
                obj.pixelLeft = x;
                obj.pixelTop = y;
        }
}

// push the layer out of view. This gets reset later so it can be almost anything.

function resetObj(obj) {
        if (n) {
        		obj.moveTo(330,-350);
        
        } else {
                obj.pixelLeft = 330;
                obj.pixelTop = -350;
        }
}


// build the object

function getObject(obj) {
        var theObj = eval("document." + range + obj + styleObj);
        return theObj;
} 


// find out what we are talkin' about then show it then do the scroll loop. 

function scrollDown() {

if (scroll == 1){
  var theObj = getObject(scrollThis);
  show(theObj);
  
  if (yBegin < ymax) {
      yBegin = yBegin + speed;
      if (yBegin > ymax) yBegin = ymax;
          shiftTo(theObj, xBegin, yBegin);
          
    setTimeout("scrollDown()",25);
  } 
}
}

// this scrolls up as of now we don't use it but it could be useful. 
  
function scrollUp() {
if (scroll == 1){
  var theObj = getObject(scrollThis);
  if (yBegin > ymin) {
      yBegin = yBegin - speed;
      if (yBegin < ymin) yBegin = ymin;
          shiftTo(theObj, xBegin, yBegin);
    setTimeout("scrollUp()",25);
  } 
} 
}


// put everything back so we can scroll again.

function resetMe() {

yBegin=-350;
theObj = getObject(scrollThis);
hide(theObj);
resetObj(theObj);
                

}


//run our layer through object builder then set some variables.
//ymax is where scroll stops once layer's Y hits it. different for NN and IE
// scroll begins at object height *-1

function init2() {
theObj = getObject(scrollThis);

if (n) {
	ymax = 33;
	ymin = (theObj.clip.height);
	yBegin= (ymin)*-1;

} else {
	ymax = 20;
    styleObj = "";
    theObj = getObject(scrollThis);
    ymin = theObj.offsetHeight;
    yBegin= (ymin)*-1;
    styleObj = ".style";
    
	}
}

function show(showobj)
        {
        if (n) {
        showobj.visibility = "show";
         }       
        else if (ie) showobj.visibility = "visible";
        }

function hide(hideobj)
        {
        if (n) {
        
        hideobj.visibility = "hide";
       }
        else if (ie) hideobj.visibility = "hidden";
       }
       
// let the user have a few seconds before we make the sub disappear. 
       
function setTimer() {

timeoutNum = setTimeout("resetMe()",3000);

}

//-->