function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
if (offsettype=="top")
{
totaloffset=totaloffset+25;
}
if (offsettype=="left")
{
totaloffset=totaloffset-250;
}
return totaloffset;
}

function overlay(curobj, subobj){
	if (document.getElementById)
	{
		if(document.getElementById(subobj).style.display == "none")
		{
			var subobj=document.getElementById(subobj);
			//subobj.style.left=getposOffset(curobj, "left")+"px"
			//subobj.style.top=getposOffset(curobj, "top")+"px"
			subobj.style.display="block";
		}
		else if(document.getElementById(subobj).style.display == "block") 
		{
			document.getElementById(subobj).style.display="none";
		}
	}
}

function overlayclose(subobj){
	
}


function ResizeContentDiv() {


var LeftContentHeight = 0;
var RightContentHeight = 0;
var CenterContentHeight =0;

if (document.getElementById('Column_1')) {

var LeftContent = document.getElementById('Column_1');
LeftContentHeight = LeftContent.offsetHeight;
}

if (document.getElementById('Column_2')) {

var CenterContent = document.getElementById('Column_2');
CenterContentHeight = CenterContent.offsetHeight;
}

//if (document.getElementById('Column_3')) {
//var RightContent = document.getElementById('Column_3');
//RightContentHeight = RightContent.offsetHeight;
//}



var maxHeight = Math.max(LeftContentHeight,RightContentHeight,CenterContentHeight);

if (document.getElementById('Column_1')) {

LeftContent.style.height = maxHeight + "px";
}
if (document.getElementById('Column_2')) {
CenterContent.style.height = maxHeight + "px";
}
//if (document.getElementById('Column_3')) {
//RightContent.style.height = maxHeight + "px";
//}

}

      
var popupWin
function openNewWindow(wfile,wtitle,wwidth,wheight){
	popupWin = window.open(wfile,wtitle,"toolbar=no,leftmargin=0,topmargin=0,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=" + wwidth + ",height=" + wheight);
	popupWin.focus();

}

function closeWindow(){
	if (window.opener){
		window.opener.focus();
	}
window.close();
}


function b_refer(){
	window.history.back ();
}

function closeTab()	
{
$('#miscLinks > ul').tabs({ selected: null, unselect: true});
}

function hideHTMLTab()	
{
	$("#tabsButtons").hide();

}

function showHTMLTab()	
{
	$("#tabsButtons").show();
}


function showFlashSection(section) {
if (document.getElementById) {
calleFlashMovie = document.getElementById("pulltabswf");
calleFlashMovie.showFlashSection(section);
}
}


// navigation

        
   var navigationh_menuObj;   // Reference to the horizontal menu div ->Top Menu
   var navigationv_menuObj;   // Reference to the vertical menu div   ->Left Menu
   var currentZIndex = 500; 
   var liIndex = 0; 
   var visibleMenus = new Array(); 
   var activeMenuItem = false; 
   var timeBeforeAutoHide = 500; // Microseconds from mouse leaves menu to auto hide. 
   var menu_arrow = '/images/sections/navigation/red-arrow_transparent.gif'; 
   var navigationh_menu_topnav = '/images/sections/navigation/topnavrule.gif'; 
   var navigationv_menu_topnav = '/images/sections/navigation/topnavrule.gif'; 
   var topnav_mouseover = '/images/sections/navigation/topnav_mouseover_background.gif'; 
   var topnav_selected = '/images/sections/navigation/topnav_selected_background.gif'; 
   //var navigationv_menu_bottom_px = 0;
    
   var MSIE = navigator.userAgent.indexOf('MSIE')>=0?true:false; 
   var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox')>=0?true:false; 
   var navigatorVersion = navigator.appVersion.replace(/.*?MSIE ([0-9]\.[0-9]).*/g,'$1')/1; 
   var menuBlockArray = new Array(); 
   var menuParentOffsetLeft = false;    

	

    // {{{ getStyle() 
   /** 
   * Return specific style attribute for an element 
   * 
   * @param Object el = Reference to HTML element 
   * @param String property = Css property 
   * @private 
   */        
   function getStyle(el,property) 
   {        

      if (document.defaultView && document.defaultView.getComputedStyle) { 

         var retVal = null;              
         var comp = document.defaultView.getComputedStyle(el, ''); 
         if (comp){ 
            retVal = comp[property]; 
              
            if(!retVal){ 
               var comp = document.defaultView.getComputedStyle(el, null); 
               retVal = comp.getPropertyCSSValue(property); 
            }          
         }    

         if(retVal==null)retVal=''; 
          
         return el.style[property] || retVal; 
      } 
      if (document.documentElement.currentStyle && MSIE){    
         var value = el.currentStyle ? el.currentStyle[property] : null; 
         return ( el.style[property] || value ); 
                                              
      } 
      return el.style[property];              
   } 
      
   function getTopPos_Horizontal(inputObj) 
   { 
   	var origInputObj = inputObj;
 
     var returnValue = inputObj.offsetTop; 
     if(inputObj.tagName=='LI' && inputObj.parentNode.className=='menuBlock1'){    
        var aTag = inputObj.getElementsByTagName('A')[0]; 
        if(aTag)returnValue += aTag.parentNode.offsetHeight; 
     } 
     var topOfMenuReached = false; 
     while((inputObj = inputObj.offsetParent) != null){ 
        if(inputObj.parentNode.id=='navigationh_menu')topOfMenuReached=true; 
        if(topOfMenuReached && !inputObj.className.match(/menuBlock/gi) || (!MSIE && origInputObj.parentNode.className=='menuBlock1')){ 
           var style = getStyle(inputObj,'position'); 
           if(style=='absolute' || style=='relative'){                
              return returnValue;            
           } 
        } 
          
        if (!MSIE){
	            returnValue += inputObj.offsetTop;          		
	        }
		else{
	        if (origInputObj.parentNode.className=='menuBlock1'){ //Top Level Menu in IE
	            returnValue += inputObj.offsetTop;          					
	        }else{ //2nd,3rd Level Menu IE
	            returnValue += inputObj.offsetTop - 0;          						        
	        }
		}


        //returnValue += inputObj.offsetTop;          
     } 

     return returnValue; 
   } 

   function getTopPos_Vertical(inputObj) 
   { 
   	var origInputObj = inputObj;
 
     var returnValue = inputObj.offsetTop; 
     if(inputObj.tagName=='LI' && inputObj.parentNode.className=='menuBlock1'){    
        var aTag = inputObj.getElementsByTagName('A')[0]; 
        if(aTag)returnValue += aTag.parentNode.offsetHeight; 
     } 
     var topOfMenuReached = false; 
     while((inputObj = inputObj.offsetParent) != null){ 
        if(inputObj.parentNode.id=='navigationv_menu')topOfMenuReached=true; 
        if(topOfMenuReached && !inputObj.className.match(/menuBlock/gi) || (!MSIE && origInputObj.parentNode.className=='menuBlock1')){ 
           var style = getStyle(inputObj,'position'); 
           if(style=='absolute' || style=='relative'){                
              return returnValue;            
           } 
        } 
        if (!MSIE){
	        if (origInputObj.parentNode.className=='menuBlock1'){ //Top Level Menu
	            returnValue += inputObj.offsetTop + 5;          		
	        }else{ //2nd,3rd Level Menu
	            returnValue += inputObj.offsetTop;
	        }
		}else{
	        if (origInputObj.parentNode.className=='menuBlock1'){ //Top Level Menu in IE
	            returnValue += inputObj.offsetTop + 1;          					
	        }else{ //2nd,3rd Level Menu IE
	            returnValue += inputObj.offsetTop - 0;          						        
	        }
		}

     } 

     return returnValue; 
   } 

    
   function getLeftPos_Horizontal(inputObj) 
   { 
     var returnValue = inputObj.offsetLeft; 
      
     var topOfMenuReached = false; 
     while((inputObj = inputObj.offsetParent) != null){ 
       if(inputObj.parentNode.id=='navigationh_menu')topOfMenuReached=true; 
        if(topOfMenuReached && !inputObj.className.match(/menuBlock/gi)){ 
           var style = getStyle(inputObj,'position'); 
           if(style=='absolute' || style=='relative')return returnValue; 
        } 
      
        returnValue += inputObj.offsetLeft; 
     } 
     return returnValue; 
   } 

   function getLeftPos_Vertical(inputObj) 
   { 
     var returnValue = inputObj.offsetLeft; 
	 var getDepth = inputObj.parentNode.getAttribute('currentDepth');
       
	if (getDepth <2){
	//returnValue += 196;
	returnValue += 186;
	}

     var topOfMenuReached = false; 
     while((inputObj = inputObj.offsetParent) != null){ 
       if(inputObj.parentNode.id=='navigationv_menu'){
			topOfMenuReached=true; 
	   }
        if(topOfMenuReached && !inputObj.className.match(/menuBlock/gi)){ 
           var style = getStyle(inputObj,'position'); 
           if(style=='absolute' || style=='relative')return returnValue; 
       } 
      
        returnValue += inputObj.offsetLeft; 
     } 
     return returnValue; 
   } 
    
   function showHideSub_Horizontal() 
   { 

      var attr = this.parentNode.getAttribute('currentDepth'); 
      if(navigator.userAgent.indexOf('Opera')>=0){ 
         attr = this.parentNode.currentDepth; 
      } 
        
	  if(this.className.indexOf("selected") >0){
	      this.className = 'currentDepth' + attr + 'selected'; 	  
	  }else{
	      this.className = 'currentDepth' + attr + 'over'; 	  
	  }

        
      if(activeMenuItem && activeMenuItem!=this){ 
         activeMenuItem.className=activeMenuItem.className.replace(/over/,''); 
      } 
      activeMenuItem = this; 
    
      var numericIdThis = this.id.replace(/[^0-9]/g,''); 
      var exceptionArray = new Array(); 
      // Showing sub item of this LI 
      var sub = document.getElementById('subOf' + numericIdThis); 
      if(sub){ 
         visibleMenus.push(sub); 
         sub.style.display=''; 
 	     //commented this out to remove the many 'overoverover' tags, not sure what is used for.
         //sub.parentNode.className = sub.parentNode.className + 'over'; 
		
         sub.parentNode.className = sub.parentNode.className; 
         exceptionArray[sub.id] = true; 
      }    
        
      // Showing parent items of this one 
        
      var parent = this.parentNode; 
      while(parent && parent.id && parent.tagName=='UL'){ 
         visibleMenus.push(parent); 
         exceptionArray[parent.id] = true; 
         parent.style.display=''; 
          
         var li = document.getElementById('navigationh_listItem' + parent.id.replace(/[^0-9]/g,'')); 
         if(li.className.indexOf('over')<0 && li.className.indexOf('selected')<=0)li.className = li.className + 'over'; 
         parent = li.parentNode; 
      } 

      hideMenuItems_Horizontal(exceptionArray); 
   } 

   function showHideSub_Vertical() 
   { 


      var attr = this.parentNode.getAttribute('currentDepth'); 
      if(navigator.userAgent.indexOf('Opera')>=0){ 
         attr = this.parentNode.currentDepth; 
      } 

	  if(this.className.indexOf("selected") >0){
	      this.className = 'currentDepth' + attr + 'selected'; 	  
	  }else{
	      this.className = 'currentDepth' + attr + 'over'; 	  
	  }

      if(activeMenuItem && activeMenuItem!=this){ 
         activeMenuItem.className=activeMenuItem.className.replace(/over/,''); 
      } 
      activeMenuItem = this; 
    
		//replace light arrow with dark arrow when submenus are displayed
   	  if (attr <2 && this.getElementsByTagName('IMG')[0] != null){
		  var img = document.createElement('IMG'); 
	      img.src = menu_arrow;
		  this.getElementsByTagName('IMG')[0].src=img.src;
      }


      var numericIdThis = this.id.replace(/[^0-9]/g,''); 
      var exceptionArray = new Array(); 
      // Showing sub item of this LI 
      var sub = document.getElementById('subOf' + numericIdThis); 
      if(sub){ 
         visibleMenus.push(sub); 
         sub.style.display=''; 

 	     //commented this out to remove the many 'overoverover' tags, not sure what is used for.
         //sub.parentNode.className = sub.parentNode.className + 'over'; 

         sub.parentNode.className = sub.parentNode.className; 

         exceptionArray[sub.id] = true; 
		 		 
      }    

      // Showing parent items of this one 
        
      var parent = this.parentNode; 
      while(parent && parent.id && parent.tagName=='UL'){ 
         visibleMenus.push(parent); 
         exceptionArray[parent.id] = true; 
         parent.style.display=''; 
         var li = document.getElementById('navigationv_listItem' + parent.id.replace(/[^0-9]/g,'')); 
         if(li.className.indexOf('over')<0 && li.className.indexOf('selected')<=0)li.className = li.className + 'over'; 
         parent = li.parentNode; 

      } 

      hideMenuItems_Vertical(exceptionArray); 
   } 


   function hideMenuItems_Horizontal(exceptionArray) 
   { 
      /* 
      Hiding visible menu items 
      */ 
      var newVisibleMenuArray = new Array(); 
      for(var no=0;no<visibleMenus.length;no++){ 
         if(visibleMenus[no].className!='menuBlock1' && visibleMenus[no].id){ 
            if(!exceptionArray[visibleMenus[no].id]){ 
               var el = visibleMenus[no].getElementsByTagName('A')[0]; 
               visibleMenus[no].style.display = 'none'; 
               var li = document.getElementById('navigationh_listItem' + visibleMenus[no].id.replace(/[^0-9]/g,'')); 
			   if (li != null ) {
				   if(li.className.indexOf('over')>0)li.className = li.className.replace(/over/,''); 			   
			   }               


            }else{              
               newVisibleMenuArray.push(visibleMenus[no]); 
            } 
         } 
      }        
      visibleMenus = newVisibleMenuArray;        
   } 

   function hideMenuItems_Vertical(exceptionArray) 
   { 
      /* 
      Hiding visible menu items 
      */ 
      var newVisibleMenuArray = new Array(); 
      for(var no=0;no<visibleMenus.length;no++){ 
         if(visibleMenus[no].className!='menuBlock1' && visibleMenus[no].id){ 
            if(!exceptionArray[visibleMenus[no].id]){ 
               var el = visibleMenus[no].getElementsByTagName('A')[0]; 
               visibleMenus[no].style.display = 'none'; 
               var li = document.getElementById('navigationv_listItem' + visibleMenus[no].id.replace(/[^0-9]/g,'')); 

				//replace dark arrow with light arrow when submenus are not displayed (only for base menu) except when 		
				//on the current page at menu item
				if (li != null){
					if (li.parentNode.getAttribute('currentDepth')<2 && li.className.indexOf("selected") <0 ){
							var img = document.createElement('IMG'); 
							img.src = menu_arrow; 
							li.getElementsByTagName('IMG')[0].src=img.src;
					}
			   if(li.className.indexOf('over')>0)li.className = li.className.replace(/over/,''); 
				}

			}else{              
			   newVisibleMenuArray.push(visibleMenus[no]); 
			} 
         } 
      }        
      visibleMenus = newVisibleMenuArray;        
   } 
    
    
    
   var menuActive_Horizontal = true; 
   var menuActive_Vertical = true; 

   var hideTimer_Horizontal = 0; 
   var hideTimer_Vertical = 0; 

   function mouseOverMenu_Horizontal() 
   { 
      menuActive_Horizontal = true;        
   } 
    
   function mouseOutMenu_Horizontal() 
   { 
      menuActive_Horizontal = false; 
      timerAutoHide_Horizontal();    
   } 
    
   function timerAutoHide_Horizontal() 
   { 
      if(menuActive_Horizontal){ 
         hideTimer_Horizontal = 0; 
         return; 
      } 
        
      if(hideTimer_Horizontal<timeBeforeAutoHide){ 
         hideTimer_Horizontal+=100; 
         setTimeout('timerAutoHide_Horizontal()',99); 
      }else{ 
         hideTimer_Horizontal = 0; 
         autohideMenuItems_Horizontal();    
      } 
   } 
    
   function autohideMenuItems_Horizontal() 
   { 
      if(!menuActive_Horizontal){ 
         hideMenuItems_Horizontal(new Array());    
         if(activeMenuItem)activeMenuItem.className=activeMenuItem.className.replace(/over/,'');        
      } 
   } 

   function mouseOverMenu_Vertical() 
   { 
      menuActive_Vertical = true;        
   } 
    
   function mouseOutMenu_Vertical() 
   { 
      menuActive_Vertical = false; 
      timerAutoHide_Vertical();    
   } 
    
   function timerAutoHide_Vertical() 
   { 
      if(menuActive_Vertical){ 
         hideTimer_Vertical = 0; 
         return; 
      } 
        
      if(hideTimer_Vertical<timeBeforeAutoHide){ 
         hideTimer_Vertical+=100; 
         setTimeout('timerAutoHide_Vertical()',99); 
      }else{ 
         hideTimer_Vertical = 0; 
         autohideMenuItems_Vertical();    
      } 
   } 

   function autohideMenuItems_Vertical() 
   { 
      if(!menuActive_Vertical){ 
         hideMenuItems_Vertical(new Array());    
         if(activeMenuItem)activeMenuItem.className=activeMenuItem.className.replace(/over/,'');        
      } 
   } 
    
    
   function initSubMenus_Horizontal(inputObj,initOffsetLeft,currentDepth) 
   {    
      var subUl = inputObj.getElementsByTagName('UL'); 
      if(subUl.length>0){ 
         var ul = subUl[0]; 
          
         ul.id = 'subOf' + inputObj.id.replace(/[^0-9]/g,''); 
         ul.setAttribute('currentDepth' ,currentDepth); 
         ul.currentDepth = currentDepth; 
         ul.className='menuBlock' + currentDepth; 
         ul.onmouseover = mouseOverMenu_Horizontal; 
         ul.onmouseout = mouseOutMenu_Horizontal; 
         currentZIndex+=1; 
         ul.style.zIndex = currentZIndex; 
         menuBlockArray.push(ul); 
         ul = navigationh_menuObj.appendChild(ul); 
         var topPos = getTopPos_Horizontal(inputObj); 
         var leftPos = getLeftPos_Horizontal(inputObj)/1 + initOffsetLeft/1;          
         
         ul.style.position = 'absolute'; 
         ul.style.left = leftPos + 'px'; 
         ul.style.top = topPos + 'px'; 
         var li = ul.getElementsByTagName('LI')[0]; 
         while(li){ 
            if(li.tagName=='LI'){    
			   if (li.className.indexOf('selected') > 0) {
				   li.className='currentDepth' + currentDepth + 'selected';                
			   }else{
				   li.className='currentDepth' + currentDepth;                			   
			   }
               li.id = 'navigationh_listItem' + liIndex; 
               liIndex++;              
               var uls = li.getElementsByTagName('UL'); 
               li.onmouseover = showHideSub_Horizontal; 

               if(uls.length>0){ 
                  var offsetToFunction = li.getElementsByTagName('A')[0].offsetWidth+2; 
                  if(navigatorVersion<6 && MSIE)offsetToFunction+=15;   // MSIE 5.x fix 
                  initSubMenus_Horizontal(li,offsetToFunction,(currentDepth+1)); 

               }    
               if(MSIE){ 
                  var a = li.getElementsByTagName('A')[0]; 
                  //a.style.width=li.offsetWidth+'px'; 
                  a.style.display='block'; 
                  //a.style.height='16px';  //get rid of white border on 2nd+ level menus
               }                
            } 
            li = li.nextSibling; 
         } 
         ul.style.display = 'none';    
         if(!document.all){ 
            //navigationh_menuObj.appendChild(ul); 
         } 
      }    
   } 

   function initSubMenus_Vertical(inputObj,initOffsetLeft,currentDepth) 
   {    
      var subUl = inputObj.getElementsByTagName('UL'); 
      if(subUl.length>0){ 
         var ul = subUl[0]; 
         ul.id = 'subOf' + inputObj.id.replace(/[^0-9]/g,''); 
         ul.setAttribute('currentDepth' ,currentDepth); 
         ul.currentDepth = currentDepth; 
         ul.className='menuBlock' + currentDepth; 
         ul.onmouseover = mouseOverMenu_Vertical; 
         ul.onmouseout = mouseOutMenu_Vertical; 
         currentZIndex+=1; 
         ul.style.zIndex = currentZIndex; 
         menuBlockArray.push(ul); 
         ul = navigationv_menuObj.appendChild(ul); 
		
 		 var topPos;
		 if (currentDepth <3){			//Adust 1st flyout menu to be on the same line as moused-over item
            if(MSIE){ 
         	    topPos = getTopPos_Vertical(inputObj)-28;
         	    //navigationv_menu_bottom_px=topPos; //IE Fix, moves address on left rail down below the Left Menu
            }else{
         	    topPos = getTopPos_Vertical(inputObj)-26;		 
            }

		 }else{
	        topPos = getTopPos_Vertical(inputObj);		 
		 }
         var leftPos = getLeftPos_Vertical(inputObj)/1 + initOffsetLeft/1;                   
         
         ul.style.position = 'absolute'; 
         ul.style.left = leftPos + 'px'; 
         ul.style.top = topPos + 'px'; 


         var li = ul.getElementsByTagName('LI')[0]; 
         while(li){ 
            if(li.tagName=='LI'){    
			   if (li.className.indexOf('selected') > 0) {
				   li.className='currentDepth' + currentDepth + 'selected';                
			   }else{
				   li.className='currentDepth' + currentDepth;                			   
			   }

               li.id = 'navigationv_listItem' + liIndex; 
               liIndex++;              
               var uls = li.getElementsByTagName('UL'); 
               li.onmouseover = showHideSub_Vertical; 

               if(uls.length>0){ 
                  var offsetToFunction = li.getElementsByTagName('A')[0].offsetWidth+2; 
                  if(navigatorVersion<6 && MSIE)offsetToFunction+=15;   // MSIE 5.x fix 
                  initSubMenus_Vertical(li,offsetToFunction,(currentDepth+1)); 

               }    
               if(MSIE){ 
                  var a = li.getElementsByTagName('A')[0]; 
				  //a.style.width=li.offsetWidth+'px'; 
                  a.style.display='block'; 
                  //a.style.height='16px';  //get rid of white border on 2nd+ level menus
	            }                
            } 
            li = li.nextSibling; 
         } 
         ul.style.display = 'none';    
         if(!document.all){ 
            //navigationv_menuObj.appendChild(ul); 
         } 
      }    
   } 


   function resizeMenu_Horizontal() 
   { 
      var offsetParent = getLeftPos_Horizontal(navigationh_menuObj); 
        
      for(var no=0;no<menuBlockArray.length;no++){ 
         var leftPos = menuBlockArray[no].style.left.replace('px','')/1; 
         menuBlockArray[no].style.left = leftPos + offsetParent - menuParentOffsetLeft + 'px'; 
      } 
      menuParentOffsetLeft = offsetParent; 
   } 
    
   function resizeMenu_Vertical() 
   { 
      var offsetParent = getLeftPos_Vertical(navigationv_menuObj); 
      for(var no=0;no<menuBlockArray.length;no++){ 
         var leftPos = menuBlockArray[no].style.left.replace('px','')/1; 
         menuBlockArray[no].style.left = leftPos + offsetParent - menuParentOffsetLeft + 'px'; 
      } 
      menuParentOffsetLeft = offsetParent; 
   } 

   /* 
   Initializing menu 
   */ 
   function initnavigation() 
   { 
   //check to see if navigation_h and navigation_v exist.
   if (document.getElementById('navigationh_menu'))
    {
		initnavigationMenu_Horizontal();		
    }
   if (document.getElementById('navigationv_menu'))
    {
		initnavigationMenu_Vertical();						
    }
   }

   function initnavigationMenu_Horizontal() 
   { 
      if (document.getElementById('navigationh_menu'))
    {
      navigationh_menuObj = document.getElementById('navigationh_menu'); 

      var aTags = navigationh_menuObj.getElementsByTagName('A'); 
      for(var no=0;no<aTags.length;no++){          

         var subUl = aTags[no].parentNode.getElementsByTagName('UL'); 
         if(subUl.length>0 && aTags[no].parentNode.parentNode.parentNode.id != 'navigationh_menu'){ 
            var img = document.createElement('IMG'); 
            img.src = menu_arrow; 
            aTags[no].appendChild(img);              
	      } 

      } 
              
      var mainMenu = navigationh_menuObj.getElementsByTagName('UL')[0]; 
      mainMenu.className='menuBlock1'; 
      mainMenu.style.zIndex = currentZIndex; 
      mainMenu.setAttribute('currentDepth' ,1); 
      mainMenu.currentDepth = '1'; 
      mainMenu.onmouseover = mouseOverMenu_Horizontal; 
      mainMenu.onmouseout = mouseOutMenu_Horizontal;        

      var mainMenuItemsArray = new Array(); 
      var mainMenuItem = mainMenu.getElementsByTagName('LI')[0]; 
      mainMenu.style.height = mainMenuItem.offsetHeight + 2 + 'px'; 
      while(mainMenuItem){ 
		 if(mainMenuItem.className != 'currentDepth1selected'){
			 mainMenuItem.className='currentDepth1';  //ClassName For 1st level menu can be set here
		 }else{
			 mainMenuItem.className='currentDepth1selected'; 
		 }
         mainMenuItem.id = 'navigationh_listItem' + liIndex; 
         mainMenuItem.onmouseover = showHideSub_Horizontal; 
         liIndex++;              

         if(mainMenuItem.tagName=='LI'){ 
            mainMenuItem.style.cssText = 'float:left;';    
            mainMenuItem.style.styleFloat = 'left'; 
            mainMenuItemsArray[mainMenuItemsArray.length] = mainMenuItem; 
            initSubMenus_Horizontal(mainMenuItem,0,2); 
         }          
          
         mainMenuItem = mainMenuItem.nextSibling; 
          
      } 

      for(var no=0;no<mainMenuItemsArray.length;no++){ 
         initSubMenus_Horizontal(mainMenuItemsArray[no],0,2);          
      } 
        
      menuParentOffsetLeft = getLeftPos_Horizontal(navigationh_menuObj);    
      window.onresize = resizeMenu_Horizontal;    
      navigationh_menuObj.style.visibility = 'visible';
      }    
   } 

   function initnavigationMenu_Vertical() 
   { 
      if (document.getElementById('navigationv_menu'))
    {
      navigationv_menuObj = document.getElementById('navigationv_menu'); 
        
      var aTags = navigationv_menuObj.getElementsByTagName('A'); 
      for(var no=0;no<aTags.length;no++){          

         var subUl = aTags[no].parentNode.getElementsByTagName('UL'); 
         if(subUl.length>0 && aTags[no].parentNode.parentNode.parentNode.id != 'navigationv_menu') { 
            var img = document.createElement('IMG'); 
            img.src = menu_arrow; 
            aTags[no].appendChild(img);              
         } else if(subUl.length>0 && aTags[no].parentNode.parentNode.parentNode.id == 'navigationv_menu'){
            var img = document.createElement('IMG'); 

			//if (aTags[no].parentNode.parentNode.parentNode.id == 'navigationv_menu'){  
			//Menu Item Highlighted dark blue needs dark arrow to match otherwise, use light arrow.
			//if (aTags[no].parentNode.className == 'currentDepth1selected'){  
			if (aTags[no].parentNode.className.indexOf("selected") >0 ){  
				img.src = menu_arrow; 			
			}else{
				img.src = menu_arrow; 			
			}
            aTags[no].appendChild(img);              
		 }
      } 
      var mainMenu = navigationv_menuObj.getElementsByTagName('UL')[0]; 
      mainMenu.className='menuBlock1'; 
      mainMenu.style.zIndex = currentZIndex; 
      mainMenu.setAttribute('currentDepth' ,1); 
      mainMenu.currentDepth = '1'; 
      mainMenu.onmouseover = mouseOverMenu_Vertical; 
      mainMenu.onmouseout = mouseOutMenu_Vertical;        

      var mainMenuItemsArray = new Array(); 
      var mainMenuItem = mainMenu.getElementsByTagName('LI')[0]; 
      mainMenu.style.height = mainMenuItem.offsetHeight + 2 + 'px'; 
      while(mainMenuItem){ 
	  	if(mainMenuItem.className != 'menu_header'){
			 if(mainMenuItem.className != 'currentDepth1selected'){
				 mainMenuItem.className='currentDepth1';  //ClassName For 1st level menu can be set here
			 }else{
				 mainMenuItem.className='currentDepth1selected'; 
			 }

			 mainMenuItem.id = 'navigationv_listItem' + liIndex; 
			 mainMenuItem.onmouseover = showHideSub_Vertical; 
			 liIndex++;              
	
			 if(mainMenuItem.tagName=='LI'){ 
				mainMenuItem.style.cssText = 'float:left;';    
				mainMenuItem.style.styleFloat = 'left'; 
				mainMenuItemsArray[mainMenuItemsArray.length] = mainMenuItem; 
				initSubMenus_Vertical(mainMenuItem,0,2); 
			 }        
			  
		
		}

			 mainMenuItem = mainMenuItem.nextSibling; 
          
      } 

      for(var no=0;no<mainMenuItemsArray.length;no++){ 
         initSubMenus_Vertical(mainMenuItemsArray[no],0,2);          
      } 
        
      menuParentOffsetLeft = getLeftPos_Vertical(navigationv_menuObj);    
      window.onresize = resizeMenu_Vertical;    
      navigationv_menuObj.style.visibility = 'visible';   
      } 
   } 

//    window.onload = initnavigation;
	
//    if (window.addEventListener)
//      window.addEventListener("load", initnavigation, false)
//    else if (window.attachEvent)
//      window.attachEvent("onload", initnavigation)
      
  
     $(document).ready(function(){
     initnavigation();
     });

    $(document).ready(function(){
			var version = deconcept.SWFObjectUtil.getPlayerVersion();
			if (document.getElementById && version["major"] < 8) {
			   if (document.getElementById('MediaWall'))
			    {
				document.getElementById('MediaWall').innerHTML = "<p><span class='required'>This content requires Flash.</span>To view this content, Javascript must be enabled and you need the latest version of the Adoble Flash Player.<span class='getflash'><a href='http://www.adobe.com/go/getflashplayer' target='_blank'>Download the free Flash Player now!</a></span></p>";
				document.getElementById('MediaWall').style.background = "url('')";
			    }
			}
   });

  