/* 
 * File:            placement.js         
 * Authors:         Lara Behrmann
 * Creation Date:   11/10/04
 * Purpose:         To perform placement for all
 *                  HTML pages in APA website.
 *                  This sets the position of the top,
 *                  links area, and main content area.
 **********************************************************************/


     /******************************************************
      * Function:    setPosition
      * Parameters:  theLinks, theMain, theTop
      * Arguments:   Links, Main, Top
      * Returns:     none
      * Purpose:     this function is called with the 
      *              onLoad event. It changes the
      *              position of the links area and 
      *              the main content area depending 
      *              on the size of the user's screen.
      */
      function setPosition(theTop, theLinks, theMain){
      
        var winW = 0;                             //window width
        var winH = 0;                             //window height
        var setLinks = null;                      //element to be positioned
        var setMain = null;                       //element to be positioned
        var setTop = null;

	  // determine screen widths
        if (parseInt(navigator.appVersion)>3){ 
	    if (navigator.appName=='Netscape'){	
		winW = window.innerWidth;  
		winH = window.innerHeight;
	    } 
	    if (navigator.appName.indexOf('Microsoft')!=-1){  
		winW = document.body.offsetWidth;  
		winH = document.body.offsetHeight;
	    }	
        } //end if screen width

         
        //find element and use DOM-compliant technique if the browser
        //supports it; otherwise, fall back on browser-specific code
        if (document.getElementById){                    //if this is a DOM compliant browser
          setLinks = document.getElementById(theLinks);  //use the DOM method
          setMain = document.getElementById(theMain);
          setTop = document.getElementById(theTop);
        }
        else if (document.all){                          //if the IE API is supported
          setLinks = document.all[theLinks];             //use the all[] array
          setMain = document.all[theMain];
          setTop = document.all[theTop];
        }
        else if (document.layers){                       //if netscape API is supported
          setLinks = document.layers[theLinks];          //use the layers[] array
          setMain = document.layers[theMain];
          setTop = document.layers[theTop];
        }  //end if


        //check if screen is 800x600 and set style...............................
        if (winW<810){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.visibility = "visible";
              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.left = "1%";
              setLinks.style.width = "19%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
	        setMain.style.left = "21.5%";
	        setMain.style.width = "75.6%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.visibility = "visible";
	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.left = "1.75%";
              setLinks.style.width = "19.75%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
	        setMain.style.left = "22.5%";
	        setMain.style.width = "76.5%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      } //end if netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.visibility = "visible";
              setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.left = "1%";
              setLinks.width = "19%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
	        setMain.left = "21.5%";
	        setMain.width = "75.6%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.visibility = "visible";
	        setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.left = "1.75%";
              setLinks.width = "19.75%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
	        setMain.left = "22.5%";
	        setMain.width = "76.5%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      } //end if/else netscape
          } //end if/else browser support
        } //end if 800x600 

        //check if screen is 1024x768 and set style...........................
        if ((winW>820) && (winW<1034)){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.visibility = "visible";
              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.left = "13%";
              setLinks.style.width = "14.75%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
	        setMain.style.left = "28.9%";
	        setMain.style.width = "56.8%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.visibility = "visible";
	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.left = "12.5%";
              setLinks.style.width = "15.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
	        setMain.style.left = "28.75%";
	        setMain.style.width = "58.75%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      } //end if/else netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.visibility = "visible";
              setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.left = "13%";
              setLinks.width = "14.75%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
	        setMain.left = "28.9%";
	        setMain.width = "56.8%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.visibility = "visible";
	        setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.left = "12.5%";
              setLinks.width = "15.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
	        setMain.left = "28.75%";
	        setMain.width = "58.75%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      } ////end if/else netscape
          } //end if/else browser support
        } //end if 1024x768

	
	  //check if screen is 1152x864 and set style...........................
        if ((winW>1044) && (winW<1162)){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "1%";
              setTop.style.left = "13.35%";

              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
		  setLinks.style.top = "30%";
              setLinks.style.left = "13%";
              setLinks.style.width = "13.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
		  setMain.style.top = "30%";
	        setMain.style.left = "27.5%";
	        setMain.style.width = "50%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "2%";
              setTop.style.left = "12.52%";

	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
		  setLinks.style.top = "28%";
              setLinks.style.left = "12.5%";
              setLinks.style.width = "13.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
		  setMain.style.top = "28%";
	        setMain.style.left = "26.75%";
	        setMain.style.width = "52%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      } //end if/else netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "1%";
              setTop.left = "13.5%";

              setMain.position = "absolute";
              setLinks.position = "absolute";
		  setLinks.top = "30%";
              setLinks.left = "13%";
              setLinks.width = "13.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
		  setMain.top = "30%";
	        setMain.left = "27.5%";
	        setMain.width = "50%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "2%";
              setTop.left = "12.52%";

	        setMain.position = "absolute";
              setLinks.position = "absolute";
		  setLinks.style.top = "28%";
              setLinks.left = "12.5%";
              setLinks.width = "13.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
		  setMain.top = "28%";
	        setMain.left = "26.75%";
	        setMain.width = "52%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      } ////end if/else netscape
          } //end if/else browser support
        } //end if 1152x864 

	  
	  //check if screen is 1280x1024 and set style...........................
        if (winW>1172){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "1%";
              setTop.style.left = "20%";

              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
		  setLinks.style.top = "24.15%";
              setLinks.style.left = "20%";
              setLinks.style.width = "11.85%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
		  setMain.style.top = "24.15%";
	        setMain.style.left = "32.75%";
	        setMain.style.width = "44.75%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "2%";
              setTop.style.left = "20%";

	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
		  setLinks.style.top = "23.7%";
              setLinks.style.left = "20%";
              setLinks.style.width = "12.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
		  setMain.style.top = "23.7%";
	        setMain.style.left = "33.25%";
	        setMain.style.width = "46%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";
	      } //end if/else netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "1%";
              setTop.left = "20%";

              setMain.position = "absolute";
              setLinks.position = "absolute";
		  setLinks.top = "24.15%";
              setLinks.left = "20%";
              setLinks.width = "11.85%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
		  setMain.top = "24.15%";
	        setMain.left = "32.75%";
	        setMain.width = "44.75%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      }
	      else {
	        //otherwise it's IE
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "2%";
              setTop.left = "20%";

	        setMain.position = "absolute";
              setLinks.position = "absolute";
		  setLinks.style.top = "23.7%";
              setLinks.left = "20%";
              setLinks.width = "12.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
		  setMain.top = "23.7%";
	        setMain.left = "33.25%";
	        setMain.width = "46%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";
	      } ////end if/else netscape
          } //end if/else browser support
        } //end if 1280x1024 


	}  //end function setPosition


     /******************************************************
      * Function:    setPositionIndex
      * Parameters:  thePre, theLinks, theMain, theTop
      * Arguments:   preImage, Links, Main, Top
      * Returns:     none
      * Purpose:     this function is called with the 
      *              onLoad event for the index page only. 
      *              It changes the position of the links area, 
      *              the top, and the main content area depending 
      *              on the size of the user's screen.  It also
      *              makes the preload image invisible once everything
      *              else has loaded.
      */
      function setPositionIndex(thePre, theTop, theLinks, theMain){
      
        var winW = 0;                             //window width
        var winH = 0;                             //window height
        var setLinks = null;                      //element to be positioned
        var setMain = null;                       //element to be positioned
        var setTop = null;
        var setPre = null;

	  // determine screen widths
        if (parseInt(navigator.appVersion)>3){ 
	    if (navigator.appName=='Netscape'){	
		winW = window.innerWidth;  
		winH = window.innerHeight;
	    } 
	    if (navigator.appName.indexOf('Microsoft')!=-1){  
		winW = document.body.offsetWidth;  
		winH = document.body.offsetHeight;
	    }	
        } //end if screen width

         
        //find element and use DOM-compliant technique if the browser
        //supports it; otherwise, fall back on browser-specific code
        if (document.getElementById){                    //if this is a DOM compliant browser
          setLinks = document.getElementById(theLinks);  //use the DOM method
          setMain = document.getElementById(theMain);
          setTop = document.getElementById(theTop);
          setPre = document.getElementById(thePre);
        }
        else if (document.all){                          //if the IE API is supported
          setLinks = document.all[theLinks];             //use the all[] array
          setMain = document.all[theMain];
          setTop = document.all[theTop];
          setPre = document.all[thePre];
        }
        else if (document.layers){                       //if netscape API is supported
          setLinks = document.layers[theLinks];          //use the layers[] array
          setMain = document.layers[theMain];
          setTop = document.layers[theTop];
          setPre = document.layers[thePre];
        }  //end if


        //check if screen is 800x600 and set style...............................
        if (winW<810){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
		  setTop.style.top = "2%";
              setTop.style.left = "1.3%";

              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "49.5%";
              setLinks.style.left = "1%";
              setLinks.style.width = "19%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "49.5%";
	        setMain.style.left = "21.5%";
	        setMain.style.width = "75.6%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

	        setPre.style.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "3%";
              setTop.style.left = "1.65%";

	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "46%";
              setLinks.style.left = "1.75%";
              setLinks.style.width = "19.75%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "46%";
	        setMain.style.left = "22.5%";
	        setMain.style.width = "76.5%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      } //end if netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "2%";
              setTop.left = "1.3%";

              setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.top = "49.5%";
              setLinks.left = "1%";
              setLinks.width = "19%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.style.top = "49.5%";
	        setMain.left = "21.5%";
	        setMain.width = "75.6%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE and layers
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.style.top = "3%";
              setTop.left = "1.65%";

	        setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.style.top = "46%";
              setLinks.left = "1.75%";
              setLinks.width = "19.75%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.style.top = "46%";
	        setMain.left = "22.5%";
	        setMain.width = "76.5%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      } //end if/else netscape
          } //end if/else browser support
        } //end if 800x600 

        //check if screen is 1024x768 and set style...........................
        if ((winW>820) && (winW<1034)){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "1%";
              setTop.style.left = "13.35%";

              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "34.5%";
              setLinks.style.left = "13%";
              setLinks.style.width = "14.75%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "34.5%";
	        setMain.style.left = "28.9%";
	        setMain.style.width = "56.8%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "2%";
              setTop.style.left = "12.52%";

	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "33.25%";
              setLinks.style.left = "12.5%";
              setLinks.style.width = "15.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "33.25%";
	        setMain.style.left = "28.75%";
	        setMain.style.width = "58.75%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      } //end if/else netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "1%";
              setTop.left = "13.5%";

              setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.top = "34.5%";
              setLinks.left = "13%";
              setLinks.width = "14.75%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.top = "34.5%";
	        setMain.left = "28.9%";
	        setMain.width = "56.8%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE and layers
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "2%";
              setTop.left = "12.52%";

	        setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.style.top = "33.25%";
              setLinks.left = "12.5%";
              setLinks.width = "15.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.top = "33.25%";
	        setMain.left = "28.75%";
	        setMain.width = "58.75%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      } ////end if/else netscape
          } //end if/else browser support
        } //end if 1024x768

	  //check if screen is 1152x864 and set style...........................
        if ((winW>1044) && (winW<1162)){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "1%";
              setTop.style.left = "13.35%";

              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "30%";
              setLinks.style.left = "13%";
              setLinks.style.width = "13.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "30%";
	        setMain.style.left = "27.5%";
	        setMain.style.width = "50%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "2%";
              setTop.style.left = "12.52%";

	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "28%";
              setLinks.style.left = "12.5%";
              setLinks.style.width = "13.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "28%";
	        setMain.style.left = "26.75%";
	        setMain.style.width = "52%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      } //end if/else netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "1%";
              setTop.left = "13.5%";

              setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.top = "30%";
              setLinks.left = "13%";
              setLinks.width = "13.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.top = "30%";
	        setMain.left = "27.5%";
	        setMain.width = "50%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE and layers
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "2%";
              setTop.left = "12.52%";

	        setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.style.top = "28%";
              setLinks.left = "12.5%";
              setLinks.width = "13.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.top = "28%";
	        setMain.left = "26.75%";
	        setMain.width = "52%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      } ////end if/else netscape
          } //end if/else browser support
        } //end if 1152x864


	  //check if screen is 1280x1024 and set style...........................
        if (winW>1172){

          //if the browser supports it
          if (setLinks.style && setMain.style){

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "1%";
              setTop.style.left = "20%";

              setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "24.15%";
              setLinks.style.left = "20%";
              setLinks.style.width = "11.85%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "24.15%";
	        setMain.style.left = "32.75%";
	        setMain.style.width = "44.75%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE
              setTop.style.position = "absolute";
              setTop.style.visibility = "visible";
              setTop.style.top = "2%";
              setTop.style.left = "20%";

	        setMain.style.position = "absolute";
	        setLinks.style.position = "absolute";
              setLinks.style.top = "23.7%";
              setLinks.style.left = "20%";
              setLinks.style.width = "12.5%";
	        setLinks.style.borderLeft = "10px ridge #EFEFEF";
	        setLinks.style.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.style.visibility = "visible";

	        setMain.style.position = "absolute";
              setMain.style.top = "23.7%";
	        setMain.style.left = "33.25%";
	        setMain.style.width = "46%";
	        setMain.style.paddingLeft = "1%";
	        setMain.style.backgroundColor = "white";
              setMain.style.visibility = "visible";

              setPre.style.visibility = "hidden";
	      } //end if/else netscape
          }
	    else {
            //otherwise assume that setLinks and setMain are layers

	      //if the browser is netscape eliminate rounding problem
	      if (navigator.appName=='Netscape'){
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "1%";
              setTop.left = "20%";

              setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.top = "24.15%";
              setLinks.left = "20%";
              setLinks.width = "11.85%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.top = "24.15%";
	        setMain.left = "32.75%";
	        setMain.width = "44.75%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      }
	      else {
	        //otherwise it's IE and layers
              setTop.position = "absolute";
              setTop.visibility = "visible";
              setTop.top = "2%";
              setTop.left = "20%";

	        setMain.position = "absolute";
              setLinks.position = "absolute";
              setLinks.style.top = "23.7%";
              setLinks.left = "20%";
              setLinks.width = "12.5%";
	        setLinks.borderLeft = "10px ridge #EFEFEF";
	        setLinks.backgroundImage = "url('images/sublinks background.jpg')";
              setLinks.visibility = "visible";

	        setMain.position = "absolute";
              setMain.top = "23.7%";
	        setMain.left = "33.25%";
	        setMain.width = "46%";
	        setMain.paddingLeft = "1%";
	        setMain.backgroundColor = "white";
              setMain.visibility = "visible";

              setPre.visibility = "hidden";
	      } ////end if/else netscape
          } //end if/else browser support
        } //end if 1280x1024


      }  //end function setPositionIndex