// Pop-ups & Troubleshooting


function loggingIN() 

{ popupWin1 = window.open('../billing/log_into_billing_popup.html', "LoggingIn", 'scrollbars=0,toolbar="no",menubar="yes",resize="yes",width=614,height=405,left=370,top=0'); 

popupWin1.focus(); } 


function troubleshooterDSL() 

{ popupWin1 = window.open('3webinternetaccess/intro.html', "Troubleshooter", 'scrollbars=1,toolbar="no",menubar="yes",resize="yes",width=500,height=548,left=150,top=100'); 

popupWin1.focus(); } 



function troubleshooterCABLE() 

{ popupWin1 = window.open('3webinternetaccess/intro.html', 'Troubleshooter', 'scrollbars=1,toolbar="no",menubar="yes",resize="yes",width=500,height=548,left=150,top=100'); 

popupWin1.focus(); } 



function troubleshooterCABLE1() 

{ popupWin1 = window.open('intro.html', 'Troubleshooter', 'scrollbars=1,toolbar="no,menubar="yes",resize="yes",width=500,height=548,left=150,top=100'); 

popupWin1.focus(); } 


// Site Chatter Sales Support 

function openwindowTechSupport() {
   newwin = window.open('contact/popup_site_chatter.html', 'Chatter', 'scrollbars="no",toolbar="no",menubar="yes",resize="yes",width=300,height=250,left=150,top=100');}

function openwindowSitechatter() {
   newwin = window.open("http://chat3.sitechatter.com/www3webcom/request2.php","sitechatter", "height=330, width=450, left=260, top=150 scrollbars=yes, noresize=no");}


// Today's Date

function DisplayDate()



  {             

  // Array of Day Names

  var dayNames = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");

  // Array of Month Names

  var monthNames = new Array(

  "January","February","March","April","May","June","July","August","September","October","November","December");

  var now = new Date();

  document.write(dayNames[now.getDay()] + ", " + monthNames[now.getMonth()] + " " + now.getDate() + ", " + GetFullYear (now));

  }







function GetFullYear (d)



  {

  var y = d.getYear();

  if (y < 1000) y += 1900;

  return y;

  }





// Use Freely as long as following disclaimer is intact:

//---------------------------------------------------------------

// Cross Browser Multi-Orientation Menu v1.2 11th February 2004

// Written by Rik Comery. www.ricom.co.uk, support at www.ricom.co.uk           

// All rights reserved.                                         

// Featured in the SimplytheBest DHTML Scripts Library at http://simplythebest.net/scripts/



//  MENU ITEMS - DUPLICATE THIS ENTIRE SECTION FOR MULTIPLE MENUS.   

var Menu1 = new Array ()

var subMenu1 = new Array ()



   Menu1[0] = new Array("<u>Top Links</u>", "/splash.jsp","_top", "left")

     subMenu1[0] = new Array()

	 subMenu1[0][0] = new Array ("&nbsp;Using Online Account Services", "/menu.jsp?page=UsingOnlineAccountServices","_top")

     subMenu1[0][1] = new Array ("&nbsp;Combat Viruses &amp; Spyware", "/menu.jsp?page=VirusesPreventionAndRemoval","_top")
    
	 subMenu1[0][2] = new Array ("&nbsp;First Payment (Pro-rated fees)", "/menu.jsp?page=FirstPayment","_top")

     subMenu1[0][3] = new Array ("&nbsp;Automated Phone Support", "/menu.jsp?page=AutomatedPhoneSupport","_top")

     subMenu1[0][4] = new Array ("&nbsp;3webTLC HiSpeed Dial-up", "/menu.jsp?page=3webtlcindex","_top")

     subMenu1[0][5] = new Array ("&nbsp;Live Technical Support", "/menu.jsp?page=LiveTechnicalSupport","_top")

	 subMenu1[0][6] = new Array ("&nbsp;Using Advanced Spam Filtering", "/menu.jsp?page=UsingAdvancedSpamFiltering","_top")

     subMenu1[0][7] = new Array ("&nbsp;Dealing with Pop-Ups", "/menu.jsp?page=DealingWithPopUps","_top")

     subMenu1[0][8] = new Array ("&nbsp;High-Speed Troubleshooter", "javascript:troubleshooterDSL()","_top")

	 subMenu1[0][9] = new Array ("&nbsp;Email Configuration", "/menu.jsp?page=EmailConfiguration","_top")

	 subMenu1[0][10] = new Array ("&nbsp;Ethernet Settings", "/menu.jsp?page=EthernetSettings","_top")

   Menu1[1] = new Array("<u>Viruses/Spyware</u>", "/menu.jsp?page=securityindex","_top", "left")

     subMenu1[1] = new Array()
	 
	 subMenu1[1][0] = new Array("<b>&nbsp;How do I remove a virus?</b>", "/menu.jsp?page=virus","_top")

	 subMenu1[1][1] = new Array ("<b>&nbsp;How do I remove spyware?</b>", "/menu.jsp?page=spyware","_top")

	 subMenu1[1][2] = new Array ("&nbsp;How do I stop pop-ups?", "/menu.jsp?page=DealingWithPopUps","_top")

     subMenu1[1][3] = new Array ("&nbsp;How do I stop spam?", "/menu.jsp?page=dospam","_top")

     subMenu1[1][4] = new Array ("&nbsp;Do I need a firewall?", "/menu.jsp?page=dialupfrequentdisconnectfirewall","_top")

     subMenu1[1][5] = new Array ("&nbsp;More security support...", "/menu.jsp?page=securityindex","_top")
	 
   Menu1[2] = new Array("<u>Billing</u>", "/menu.jsp?page=billingindex","_top", "left")

     subMenu1[2] = new Array()

     subMenu1[2][0] = new Array ("&nbsp;Using Online Account Services", "/menu.jsp?page=UsingOnlineAccountServices","_top")

     subMenu1[2][1] = new Array ("&nbsp;How do I contact billing support?", "/menu.jsp?page=contactbilling","_top")

     subMenu1[2][2] = new Array ("&nbsp;1st Prorated Charge", "/menu.jsp?page=FirstPayment","_top")

     subMenu1[2][3] = new Array ("&nbsp;Technical Support Charges", "/menu.jsp?page=techsupportcharges","_top")

     subMenu1[2][4] = new Array ("&nbsp;More billing support...", "/menu.jsp?page=billingindex","_top")

	 

   Menu1[3] = new Array("<u>3webXS Internet</u>", "/menu.jsp?page=3webinternetaccessindex","_top", "left")

     subMenu1[3] = new Array()

	 subMenu1[3][0] = new Array ("&nbsp;What should my computers Ethernet settings be? ", "/menu.jsp?page=EthernetSettings","_top")

	 subMenu1[3][1] = new Array ("&nbsp;<b>Dial-up Internet</b>", "/menu.jsp?page=indexdial","_top")

     subMenu1[3][2] = new Array ("&nbsp;&nbsp;- How do I install 3webXS Basic Dial-up?", "/menu.jsp?page=dmsdialinstall","_top")

     subMenu1[3][3] = new Array ("&nbsp;&nbsp;- How do I setup my connection?", "/3webinternetaccess/3webMenu.jsp?page=dmscsdial","_top")

	 subMenu1[3][4] = new Array ("&nbsp;&nbsp;- More internet support...", "/menu.jsp?page=3webinternetaccessindex","_top")

     subMenu1[3][5] = new Array ("&nbsp;<b>High-Speed DSL Internet</b>", "/menu.jsp?page=indexdsl","_top")

     subMenu1[3][6] = new Array ("&nbsp;&nbsp;- What is DSL Internet?", "/3webinternetaccess/3webMenu.jsp?page=whatisadsl","_top")

     subMenu1[3][7] = new Array ("&nbsp;&nbsp;- Online DSL Troubleshooter", "javascript:troubleshooterDSL()","_top")

     subMenu1[3][8] = new Array ("&nbsp;&nbsp;- How do I setup my modem?", "/3webinternetaccess/3webMenu.jsp?page=wireadsl","_top")

     subMenu1[3][9] = new Array ("&nbsp;&nbsp;- How do I install 3webXS for DSL?", "/menu.jsp?page=adsldmsinstall","_top")

	 subMenu1[3][10] = new Array ("&nbsp;&nbsp;- Download our NEW CIA QuickStart Guide for DSL", "/downloads/CIA_QuickStartGuide_DSLProducts.pdf","_top")

	 subMenu1[3][11] = new Array ("&nbsp;&nbsp;- More internet support...", "/menu.jsp?page=3webinternetaccessindex","_top")

     subMenu1[3][12] = new Array ("&nbsp;<b>High-Speed CABLE Internet</b>", "/menu.jsp?page=indexcable","_top")

     subMenu1[3][13] = new Array ("&nbsp;&nbsp;- What is a Cable Modem?", "/3webinternetaccess/3webMenu.jsp?page=whatiscablemodem","_top")

	 subMenu1[3][14] = new Array ("&nbsp;&nbsp;- Online Cable Troubleshooter", "javascript:troubleshooterCABLE()","_top")

	 subMenu1[3][15] = new Array ("&nbsp;&nbsp;- How do I setup my modem?", "/3webinternetaccess/3webMenu.jsp?page=cablewire","_top")

	 subMenu1[3][16] = new Array ("&nbsp;&nbsp;- How do I install 3webXS for Cable?", "/menu.jsp?page=cabledmsinstall","_top")

	 subMenu1[3][17] = new Array ("&nbsp;&nbsp;- Download our NEW CIA QuickStart Guide for Cable", "/downloads/CIA_QuickStartGuide_CableServices.pdf","_top")

	 subMenu1[3][18] = new Array ("&nbsp;&nbsp;- More internet support", "/menu.jsp?page=3webinternetaccessindex","_top")

   
   Menu1[4] = new Array("<u>Home Phone</u>", "/voip/menu.jsp","_top", "right")

     subMenu1[4] = new Array()

     subMenu1[4][0] = new Array ("&nbsp;Important 9-1-1 Information", "/voip/menu.jsp#911","_top")
	 
	 subMenu1[4][1] = new Array ("&nbsp;Getting Started", "/voip/menu.jsp#gs","_top")
	 
	 subMenu1[4][2] = new Array ("&nbsp;F.A.Q.", "/voip/menu.jsp#faq","_top")
	 
	 subMenu1[4][3] = new Array ("&nbsp;Calling Features", "/voip/menu.jsp#cf","_top")
	 
	 subMenu1[4][4] = new Array ("&nbsp;Troubleshooting", "/voip/menu.jsp#ts","_top")
	 
	 subMenu1[4][5] = new Array ("&nbsp;Home Installation", "/voip/menu.jsp?page=techsquad","_top")	 

	 subMenu1[4][6] = new Array ("&nbsp;Download our NEW CIA QuickStart Guide for Cable", "/downloads/CIA_QuickStartGuide_CableServices.pdf","_top")

 	 subMenu1[4][7] = new Array ("&nbsp;Download our NEW CIA QuickStart Guide for DSL", "/voip/menu.jsp?page=dslstart","_top")

	 subMenu1[4][8] = new Array ("&nbsp;Check number for FREE long distance", "http://www.cia.com/callingArea.do","_top")




   
   Menu1[5] = new Array("<u>3webTLC</u>", "/menu.jsp?page=3webtlcindex","_top", "left")

     subMenu1[5] = new Array()

	 subMenu1[5][0] = new Array ("&nbsp;What is 3webTLC?", "/menu.jsp?page=tlcwhatisincluded","_top")

     subMenu1[5][1] = new Array ("&nbsp;How do I install 3web HiSpeed Dial-up?", "/menu.jsp?page=propelinstall","_top")

     subMenu1[5][2] = new Array ("&nbsp;More 3webTLC support...", "/menu.jsp?page=3webtlcindex","_top")



   Menu1[6] = new Array("<u>3webLD</u>", "/menu.jsp?page=3weblongdistanceindex","_top", "right")

     subMenu1[6] = new Array()

     subMenu1[6][0] = new Array ("&nbsp;One minute charges", "/3weblongdistance/ldMenu.jsp?page=ldbillingoneminute","_top")

     subMenu1[6][1] = new Array ("&nbsp;Call Detail and Inquiries", "/billing/billingMenu.jsp?page=viewingldinvoices","_top")

     subMenu1[6][2] = new Array ("&nbsp;How can I change my plan?", "/3weblongdistance/ldMenu.jsp?page=ldbillingchangeldplan","_top")

	 subMenu1[6][3] = new Array ("&nbsp;Is my service active yet?", "/3weblongdistance/ldMenu.jsp?page=ldbillingactive","_top")

     subMenu1[6][4] = new Array ("&nbsp;Can I use 3webLD on my cell phone?", "/3weblongdistance/ldMenu.jsp?page=ldbillingcellphone","_top")

     subMenu1[6][5] = new Array ("&nbsp;More 3webLD support...", "/menu.jsp?page=3weblongdistanceindex","_top")



Menu1[7] = new Array("<u>Email</u>", "/menu.jsp?page=emailindex","_top", "left")

     subMenu1[7] = new Array()

	 subMenu1[7][0] = new Array ("&nbsp;How do I change spam settings?", "/menu.jsp?page=UsingAdvancedSpamFiltering","_top")

     subMenu1[7][1] = new Array ("&nbsp;How do I set up my email?", "/menu.jsp?page=outlookexpress","_top")

     subMenu1[7][2] = new Array ("&nbsp;How do I send email?", "/menu.jsp?page=sendingemailusingoe","_top")

	 subMenu1[7][3] = new Array ("&nbsp;What is 3web mail?", "/menu.jsp?page=whatiswebmail","_top")

     subMenu1[7][4] = new Array ("&nbsp;How can I check my email settings?", "/menu.jsp?page=confirmemailsettingsoe","_top")

	 subMenu1[7][5] = new Array ("&nbsp;How can I change my password?", "/menu.jsp?page=changeemailpassword","_top")

     subMenu1[7][6] = new Array ("&nbsp;More email support...", "/menu.jsp?page=emailindex","_top")

	 

   Menu1[8] = new Array("<u>Browsers</u>", "/menu.jsp?page=browsersindex","_top", "right")

     subMenu1[8] = new Array()

     subMenu1[8][0] = new Array ("&nbsp;What is a browser?", "/menu.jsp?page=whatisbrowser","_top")

     subMenu1[8][1] = new Array ("&nbsp;How do I configure my browser?", "/menu.jsp?page=3webconnectsbutcannotsee","_top")

	 subMenu1[8][2] = new Array ("&nbsp;What are Plug-ins?", "/menu.jsp?page=plugins","_top")

     subMenu1[8][3] = new Array ("&nbsp;How do I search the web?", "/menu.jsp?page=../webtutorial/searchtheweb","_top")

	 subMenu1[8][4] = new Array ("&nbsp;How do I prevent pop-ups?", "/menu.jsp?page=stoppopups","_top")

     subMenu1[8][5] = new Array ("&nbsp;More browser support...", "/menu.jsp?page=browsersindex","_top")



   Menu1[9] = new Array("<u>Free Software</u>", "/menu.jsp?page=softwareindex","_top", "right")

     subMenu1[9] = new Array()

     subMenu1[9][0] = new Array ("&nbsp;Download Software", "/menu.jsp?page=softwareindex","_top")


////// FORMAT MENU

menuStyle = "flat"                                   // Menu Style (flat, 3d)

cellPadding = 1                                      // Cell Padding

cellBorder = 1                                       // Include table border (0 for no border)

verticalOffset = 0                                   // Vertical offset of Sub Menu. 

horizontalOffset = 0                                 // Horizontal offset of Sub Menu. 

subMenuDelay = 0.25                                    // Time sub menu stays visible for (in seconds)

subIndicate = 1                                      // Show if a sub menu is present (0 for "no")

indicator = "<img src='/images/en/arrow.gif' border='0'>"  // Symbol to show if a sub menu is present (subIndicate must be to set to 1)

                                                     // Use standard HTML <img> tag. You can use a character instead of an image. 

                                                     // e.g.      indicator = ">"

// Main Menu Items

borderColor = ""                      // Border Colour (flat mode only)

borderHighlight = ""                // Border Highlight Colour (3d mode only)

borderShadow = ""                   // Border Shadow Colour (3d mode only)

menuBackground = ""                 // Cell Background Colour

menuHoverBackground = "CCCCCC"              // Cell Background Colour on mouse rollover

fontFace = "arial"                         // Font Face

fontColour = "#000000"                     // Font Colour

fontHoverColour = ""                // Font Colour on mouse rollover

fontSize = "10pt"                           // Font Size

fontDecoration = "none"                    // Style of the link text (none, underline, overline, line-through)

fontWeight = "normal"                      // Font Weight (normal, bold)



// Sub Menu Items

sborderColor = "CCCCCC"                     // Border Colour (flat mode only)

sborderHighlight = "FF0000"               // Border Highlight Colour (3d mode only)

sborderShadow = ""                  // Border Shadow Colour (3d mode only)

smenuBackground = "beige"                  // Cell Background Colour

smenuHoverBackground = "#CCCCCC"           // Cell Background Colour on mouse rolloverr

sfontFace = "arial"                        // Font Face

sfontColour = "#000000"                    // Font Colour

sfontHoverColour = "#FFFFFF"               // Font Colour on mouse rollover

sfontSize = "8pt"                          // Font Size

sfontDecoration = "none"                   // Style of the link text (none, underline, overline, line-through)

sfontWeight = "normal"                     // Font Weight (normal, bold)

sShadow = 1



////// END FORMAT MENU



quantity = 1



////// DO NOT EDIT BELOW THIS LINE



// Browser Sniffer

var isIE = (document.getElementById && document.all)?true:false;

var isNS4 = (document.layers)?true:false;

var isNS6 = (document.getElementById && !document.all)?true:false;



var timer;

var obj = (isIE)?"document.all":"document.getElementById"



styleBorder=(menuStyle.toLowerCase() == "flat")?cellBorder:0 



// Menu Styles

document.writeln ('<style>');

document.writeln ('.rcMenuStatic {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontColour+';font-weight:'+fontWeight+';background-color:'+menuBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');

document.writeln ('.rcMenuHover  {font-family:'+fontFace+';font-size:'+fontSize+';color:'+fontHoverColour+';font-weight:'+fontWeight+';background-color:'+menuHoverBackground+'; cursor:hand; text-decoration:'+fontDecoration+'}');

document.writeln ('.rcSubMenuStatic {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuBackground+'; cursor:hand}');

document.writeln ('.rcSubMenuHover  {font-family:'+sfontFace+';font-size:'+sfontSize+';color:'+sfontHoverColour+';font-weight:'+sfontWeight+';text-decoration:'+sfontDecoration+';background-color:'+smenuHoverBackground+'; cursor:hand}');

document.writeln ('</style>');



// Build and show the main menu items

function showMenus(quant,definedOrientation)

{

  if(definedOrientation!=""){orientation=definedOrientation}

  if (orientation.toLowerCase() == "vertical"){document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor+'">')}

  else{document.writeln ('<table border="0" cellpadding="0" cellspacing="'+styleBorder+'" bgColor="'+borderColor+'"><tr>')}  

  for (x=0; x<eval("Menu"+quant).length; x++)

  {

    if (orientation.toLowerCase()=="vertical") document.writeln('<tr>')

    document.writeln ('<td onclick="tdMouseClick(\''+quant+'mainLink'+x+'\')" onMouseOver="hoverMenu(); popDown(\''+quant+'\','+x+', \''+quant+'button'+x+'\',\''+orientation+'\'); " onMouseOut="clearMenu('+quant+','+x+')" ')

    if (menuStyle.toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+borderHighlight+';border-top:'+cellBorder+'px solid '+borderHighlight+';border-right:'+cellBorder+'px solid '+borderShadow+';border-bottom:'+cellBorder+'px solid '+borderShadow+';"');}        

    document.writeln ('><div id="'+quant+'button'+x+'"><table border="0" cellpadding="'+cellPadding+'" cellspacing="0" width="100%"><tr><td class="rcMenuStatic" id="'+quant+'cell'+x+'" nowrap>');

    document.writeln ('<a id="'+quant+'mainLink'+x+'" href="'+eval("Menu"+quant)[x][1]+'" target="'+eval("Menu"+quant)[x][2]+'" class="rcMenuStatic">'+eval("Menu"+quant)[x][0]+'</a></td>');

    if (subIndicate == 1&&eval("subMenu"+quant)[x].length>=1){

      document.writeln('<td class="rcMenuStatic" id="'+quant+'cell'+x+'a" align="right">');

      document.writeln ('<a id="'+quant+'mainLink'+x+'a" href="'+eval("Menu"+quant)[x][1]+'" target="'+eval("Menu"+quant)[x][2]+'" class="rcMenuStatic">'+indicator+'</a></td>');}

    document.writeln ('</tr></table></div></td>');    

    if (orientation.toLowerCase()=="vertical") document.writeln('</tr>')

  }

  if (orientation.toLowerCase() == "vertical"){document.writeln ('</table>');}

  else{document.writeln ('</tr></table>');}   

  



// Build the sub menu items

  for (x=0; x<eval("Menu"+quant).length; x++)

  { 

    if (eval("subMenu"+quant)[x].length > 0)

    {     

      document.writeln ('<div id="'+quant+'MENU'+x+'" style="visibility:hidden; position:absolute; z-index:2" >');

      document.writeln ('<table border="0" cellpadding="'+cellPadding+'" cellspacing="'+styleBorder+'" bgColor="'+sborderColor+'">');

      for (y=0; y<eval("subMenu"+quant)[x].length; y++)

      {

        document.writeln ('<tr><td id="'+quant+'subMenu'+x+y+'" class="rcSubMenuStatic" onMouseOver="hoverMenu(); highlightMenu(\'sub\','+x+','+y+',\'\','+quant+')" onMouseOut="clearMenu('+quant+','+x+');" onclick="tdMouseClick(\''+quant+'subLink'+x+y+'\')" nowrap')

        if (menuStyle.toLowerCase() == "3d"){document.writeln ('style="border-left:'+cellBorder+'px solid '+sborderHighlight+';border-top:'+cellBorder+'px solid '+sborderHighlight+';border-right:'+cellBorder+'px solid '+sborderShadow+';border-bottom:'+cellBorder+'px solid '+sborderShadow+';"');}

        document.writeln ('><a id="'+quant+'subLink'+x+y+'" href="'+eval("subMenu"+quant)[x][y][1]+'" target="'+eval("subMenu"+quant)[x][y][2]+'" class="rcSubMenuStatic">'+eval("subMenu"+quant)[x][y][0]+'</a></td></tr>');

      }

      document.writeln ('</table></div>');

    }

  }

} 



// Change colour or menu and submenu items when the mouse hovers over.  

function highlightMenu(element,mainMenu,dropMenu,state,quant)

{

  hoverMenu();

  state=(state == "hover")?"rcMenuHover":"rcMenuStatic"

  if (element == "sub")

  {

    for (x=0; x < eval("subMenu"+quant)[mainMenu].length; x++)

     {

      eval(obj+'("'+quant+'subMenu'+mainMenu+x+'").className = "rcSubMenuStatic"')

      eval(obj+'("'+quant+'subLink'+mainMenu+x+'").className = "rcSubMenuStatic"')

    }   

    eval(obj+'("'+quant+'subMenu'+mainMenu+dropMenu+'").className="rcSubMenuHover"')

    eval(obj+'("'+quant+'subLink'+mainMenu+dropMenu+'").className="rcSubMenuHover"')

  }

  else

  {

    eval(obj+'("'+quant+'cell'+mainMenu+'").className = "'+state+'"')

    eval(obj+'("'+quant+'mainLink'+mainMenu+'").className = "'+state+'"')

    if (subIndicate == 1&&eval("subMenu"+quant)[mainMenu].length>=1)

    {

      eval(obj+'("'+quant+'cell'+mainMenu+'a").className = "'+state+'"')

      eval(obj+'("'+quant+'mainLink'+mainMenu+'a").className = "'+state+'"')

    }

  }

}



// Find positioning for sub menus

function getOffset(obj, dim) 

{

  if(dim=="left") 

  {     

    oLeft = obj.offsetLeft;    

    while(obj.offsetParent!=null) 

    {    

      oParent = obj.offsetParent     

      oLeft += oParent.offsetLeft 

      obj = oParent 	

    }

    return oLeft

  }

  else if(dim=="top")

  {

    oTop = obj.offsetTop;

    while(obj.offsetParent!=null) 

    {

      oParent = obj.offsetParent

      oTop += oParent.offsetTop

      obj = oParent 	

    }

    return oTop

  }

  else if(dim=="width")

  {

    oWidth = obj.offsetWidth

    return oWidth

  }  

  else if(dim=="height")

  {

    oHeight = obj.offsetHeight

    return oHeight

  }    

  else

  {

    alert("Error: invalid offset dimension '" + dim + "' in getOffset()")

    return false;

  }

}



// Show sub menus

function popDown(quant, param, id, orientation)

{

  var cellBorderOffset = (isNS6)?cellBorder:eval(cellBorder*2)

  var browserAdjustment = (isNS6)?cellBorder:0

  var menu;

  var button;



  if (id)

  {    

    getOffset(eval(obj+'(id)'),'left');

    getOffset(eval(obj+'(id)'),'top');    

    getOffset(eval(obj+'(id)'),'width');  

    getOffset(eval(obj+'(id)'),'height');

    

    if (eval("Menu"+quant+"["+param+"][3]")=="right") 

    { 

      oLeft=oLeft  

      oLeft=oLeft+oWidth; 

      getOffset(eval(obj+'("'+quant+'MENU'+param+'")'),'width');

      oLeft=oLeft-oWidth ;

      alignAdjustment = cellBorder*2 + 1

    }



    else 

    {

      alignAdjustment = 0

      oLeft=oLeft

    }    

  }  



  

  n = 0;    

  while (n < eval("Menu"+quant).length)

  {          

    menu = quant+"MENU"+n

    if (param == n)

    {

      theObj = eval(obj+'(menu)');

      if (theObj)

      {

         theObj.style.visibility = "visible"



          if (orientation.toLowerCase()=="vertical"){

            theObj.style.left=(menuStyle.toLowerCase()=="flat")?oLeft+oWidth+cellBorder+horizontalOffset:oLeft+oWidth+cellBorderOffset+horizontalOffset;

            theObj.style.top=(menuStyle.toLowerCase()=="flat")?oTop-cellBorder+verticalOffset:oTop+verticalOffset-browserAdjustment}

          else{

            theObj.style.left=(menuStyle.toLowerCase()=="flat")?oLeft-cellBorder+horizontalOffset+alignAdjustment:oLeft+horizontalOffset-browserAdjustment+alignAdjustment;

            theObj.style.top=(menuStyle.toLowerCase()=="flat")?oTop+oHeight+cellBorder+verticalOffset:oTop+oHeight+cellBorderOffset+verticalOffset;}

        }

      

       highlightMenu('main',n,'','hover',quant)

       if (eval("subMenu"+quant)[param].length > 0)

       {

         for (x=0; x<eval("subMenu"+quant)[param].length; x++)

         {

           eval (obj+'("'+quant+'subMenu'+param+x+'").className = "rcSubMenuStatic"')

           eval (obj+'("'+quant+'subLink'+param+x+'").className = "rcSubMenuStatic"')         

         }

       }

    }

    else 

    {  

      for (x=1; x<quantity+1; x++)

      {       

        menu = x+"MENU"+n   

        //alert(menu)     

        if (eval(obj+'(menu)'))

        {

          eval(obj+'(menu).style.visibility = "hidden"')            

        }

        highlightMenu ('main',n,'','static',quant)

      }

    }

    n++

  }  

}



// Re-set timer for sub menus

function hoverMenu()

{

  if(timer)

  clearTimeout(timer)

}



// Set timer for sub menus

function clearMenu(quant,menu)

{

  setDelay = subMenuDelay*1000

  delay = (eval("subMenu"+quant)[menu].length > 0)?setDelay:1

  

  timer = setTimeout("popDown("+quant+","+(eval("Menu"+quant).length + 1)+")",delay)

}



// when you click the box, perform the same function as if the user had clicked the hyperlink

function tdMouseClick(theElement)

{

  eval(obj+'(theElement).click()')

}


