// JavaScript Document

var whatPage = ''; 

function addLinks () {
  $$('.menuItems').each(function (e) {
    e.addEvents({
      mouseover: function () {
        
        $$('.menuItems').each(function (a) {
          a.getParent().setStyle('background','transparent');
        });
        
        $$('.subMenuItems').each(function (b) {
          b.setStyle('display','none');
        });
        
        if (e.name == 'menuItems1' || e.name == 'menuItems2' || e.name == 'menuItems3' || e.name == 'menuItems4' || e.name == 'menuItems5' || e.name == 'menuItems6') { 
          var divName = this.name;
          
          $(divName).setStyle('display','block');
          this.getParent().setStyles({
            background: 'url(images/menuitembg2.png) no-repeat',
            width: '160px',
            height: '36px',
          });
        } else {
          this.getParent().setStyles({
            background: 'url(images/menuitembg2.png) no-repeat',
            width: '160px',
            height: '36px',
          });
        }
      },
      
      click: function () {
        if (e.name == 'menuItems1') {
          window.location = '/contact-us.php';
        } else if (e.name == 'menuItems5') {
          window.location = '/index.php';
        }
        /*if (e.name == 'menuItems5') {
          window.location = '/index.php';
        } else if (e.name == 'menuItems1') {
          window.location = '/contact-us.php';
        } else if (e.name == 'menuItems4') {
          window.location = '/fda-study-possible-breast-cancer-risk.php';
        }*/
      } 
    });
    
    /*$(e.name).addEvent('mouseout',function () {
      $(e.name).setStyle('display','none');
    });*/
  });
  
}

function checkPage (str1) {
  whatPage = str1;
  
  if (whatPage == '/index.php') {
    $$('.menuItems').each(function (e) {
      if (e.name == 'menuItems3') {
        //$('dummyBg').setStyle('display','none');
        
        e.getParent().setStyles({
          background: 'url(images/menuitembg2.png) no-repeat',
          width: '160px',
          height: '36px',
        });
      } else {
        //$('dummyBg').setStyle('display','block');
      }
    });
    
    $('menuItems3').setStyle('display','block');
  } else if (whatPage == '/dow-settlement-for-breast-implants.php' || whatPage == '/dow-payment-grid.php' || whatPage == '/sfdct-dow-corning-settlement-resources.php' || whatPage == '/dow-deadlines.php' || whatPage == '/dow-settlement-news.php' || whatPage == '/dow-settlement-explant-claims.php' || whatPage == '/dow-settlement-explant-claims-faq.php' || whatPage == '/dow-rupture-claims-faq.php' || whatPage == '/fda-study-possible-breast-cancer-risk.php' || whatPage == '/dow-settlement-explant-claims-faq-2.php' || whatPage == '/dow-settlement-explant-claims-faq-3.php' || whatPage == '/dow-settlement-explant-claims-faq-4.php' || whatPage == '/dow-rupture-claims-faq-2.php' || whatPage == '/dow-rupture-claims-faq-3.php' || whatPage == '/dow-rupture-claims-faq-4.php' || whatPage == '/dow-rupture-claims-faq-4.php' || whatPage == '/dow-rupture-claims-faq-5.php' || whatPage == '/dow-rupture-claims-faq-6.php' || whatPage == '/dow-rupture-claims-faq-7.php' || whatPage == '/dow-rupture-claims-faq-8.php' || whatPage == '/dow-medical-criteria-gcts.php' || whatPage == '/dow-medical-criteria-gcts-group-1.php' || whatPage == '/dow-medical-criteria-gcts-group-2.php' || whatPage == '/dow-medical-criteria-gcts-group-3.php' || whatPage == '/dow-medical-criteria-lupus-sle.php' || whatPage == '/dow-medical-criteria-atypical-neurological-disease-syndrome.php' || whatPage == '/dow-medical-criteria-mixed-connective-tissue-disease.php' || whatPage == '/dow-medical-criteria-multiple-sclerosis-like-syndrome.php' || whatPage == '/dow-medical-criteria-als-like-syndrome.php' || whatPage == '/dow-medical-criteria-polymyositis-dermatomyositis.php' || whatPage == '/dow-medical-criteria-primary-sjogrens-syndrome.php') {
    $$('.menuItems').each(function (e) {
      if (e.name == 'menuItems3') {
        e.set('text','Dow Settlement');
                        
        e.getParent().setStyles({
          background: 'url(images/menuitembg2.png) no-repeat',
          width: '160px',
          height: '36px',
        });
      } else if (e.name == 'menuItems4') {
        e.set('text','About Us');

        var theHTML = '<div style="padding-left: 400px;">'
                      + '<a href="/attorney-robert-p-hummer.php" style="text-decoration: none; color: #fff;">Robert P. Hummer, Attorney</a>'
                      + '</div>';
        
                      
        $('menuItems4').set('html',theHTML);
      } else if (e.name == 'menuItems2') {
        e.set('text','Practice Areas');

        var theHTML = '<a href="dow-settlement-for-breast-implants.php" style="text-decoration: none; color: #fff;">Dow Settlement</a> &nbsp; | &nbsp;'
                      + '<a href="/mdl926-revised-settlement-for-breast-implants.php" style="text-decoration: none; color: #fff;">Revised Settlement</a> &nbsp; | &nbsp;'
                      + '<a href="/depuy-hip-implants.php" title="DePuy Hip Implant Recall" style="text-decoration: none; color: #fff;">DePuy Hip Implants</a> &nbsp; | &nbsp;'
                      + '<a href="/bard-composix-kugel-hernia-mesh-recall.php" style="text-decoration: none; color: #fff;">Kugel Hernia Mesh</a> &nbsp; | &nbsp;'     
                      + '<a href="/birth-control-drugs-yaz-yasmin-lawsuits.php" style="text-decoration: none; color: #fff;">Yaz, Yasmin & Ocella</a> &nbsp; | &nbsp;'
                      + '<a href="/contraceptives-nuva-ring-lawsuits.php" style="text-decoration: none; color: #fff;">NuvaRing</a> &nbsp; | &nbsp;'
                      + '<a href="/contraceptives-nuva-ring-lawsuits.php" style="text-decoration: none; color: #fff;"><a href="http://www.hummerlaw.com/osteoporosis-bone-loss-drugs-aredia-zometa-fosamax-lawyers-lawsuits.php" style="text-decoration: none; color: #fff;">Bone Loss Drugs</a></a>';
                      
        $('menuItems2').set('html',theHTML);                        
      }
      
      var theHTML = '<a href="dow-payment-grid.php" style="text-decoration: none; color: #fff;">Payment Grid</a> &nbsp; | &nbsp;'
                    + '<a href="/sfdct-dow-corning-settlement-resources.php" style="text-decoration: none; color: #fff;">Medical Criteria</a> &nbsp; | &nbsp;' 
                    + '<a href="/dow-deadlines.php" style="text-decoration: none; color: #fff;">Deadlines</a> &nbsp; | &nbsp;'
                    + '<a href="/dow-settlement-news.php" style="text-decoration: none; color: #fff;">Settlement News</a> &nbsp; | &nbsp;'
                    + '<a href="/dow-settlement-explant-claims.php" style="text-decoration: none; color: #fff;">Explant Claims</a> &nbsp; | &nbsp;'
                    + '<a href="/dow-settlement-explant-claims-faq.php" style="text-decoration: none; color: #fff;">Explant FAQ</a>'
                    //+ '<a href="/dow-rupture-claims-faq.php" style="text-decoration: none; color: #fff;">Rupture Claims</a> &nbsp; | &nbsp;'
                    
      $('menuItems3').set('html',theHTML);
      $('menuItems3').setStyle('display','block');
    });
  }
}

window.addEvent('domready',function () {
  //alert('tiks');
  addLinks();
});

