
<!--

function switchBetweenDivs(activetab,activediv)
{
  var elem, vis;
  
  var tab1 = "tab1";
  var tab2 = "tab2";
  var tab3 = "tab3";
  
  var div1 = "tabboxcnt1";
  var div2 = "tabboxcnt2";
  var div3 = "tabboxcnt3";
  
  if( document.getElementById ) // this is the way the standards work
  {
	tab1 = document.getElementById( tab1 );
	tab2 = document.getElementById( tab2 );
	tab3 = document.getElementById( tab3 );
	div1 = document.getElementById( div1 );
	div2 = document.getElementById( div2 );
	div3 = document.getElementById( div3 );
	
	activetab = document.getElementById( activetab );
	activediv = document.getElementById( activediv );
  }
  else if( document.all ) // this is the way old msie versions work
  {
	tab1 = document.all[tab1];
	tab2 = document.all[tab2];
	tab3 = document.all[tab3];
	div1 = document.all[div1];
	div2 = document.all[div2];
	div3 = document.all[div3];
	
	activetab = document.all[activetab];
	activediv = document.all[activediv];
  }
  else if( document.layers ) // this is the way nn4 works
  {
	tab1 = document.layers[tab1];
	tab2 = document.layers[tab2];
	tab3 = document.layers[tab3];
	div1 = document.layers[div1];
	div2 = document.layers[div2];
	div3 = document.layers[div3];
	
	activetab = document.layers[activetab];
	activediv = document.layers[activediv];
	
  }  
  if(activetab)
  {
     if(tab1)
     {
      tab1.className = '';
      }
      if(tab2)
      {
      tab2.className = '';
      }
      if(tab3)
      {
      tab3.className = '';
      }
      activetab.className = 'active';
  }
	
  if(activediv)
  {
     if(div1)
     {
     div1.style.display = 'none';
     }
     if(div2)
     {
     div2.style.display = 'none';
     }
     if(div3)
     {
     div3.style.display = 'none';
     }
     activediv.style.display = 'block';
  }
  	
}


// STRIPE TABLES

 // this function is need to work around 
  // a bug in IE related to element attributes
  function hasClass(obj) {
     var result = false;
     if (obj.getAttributeNode("class") != null) {
         result = obj.getAttributeNode("class").value;
     }
     return result;
  }   

 function stripe(id) {

    // the flag we'll use to keep track of 
    // whether the current row is odd or even
    var even = false;
  
    // if arguments are provided to specify the colours
    // of the even & odd rows, then use the them;
    // otherwise use the following defaults:
    var evenColor = arguments[1] ? arguments[1] : "#F0F0F0";
    var oddColor = arguments[2] ? arguments[2] : "#FFF";
  
    // obtain a reference to the desired table
    // if no such table exists, abort
    var table = document.getElementById(id);
    if (! table) { return; }
    
    // by definition, tables can have more than one tbody
    // element, so we'll have to get the list of child
    // &lt;tbody&gt;s 
    var tbodies = table.getElementsByTagName("tbody");

    // and iterate through them...
    for (var h = 0; h < tbodies.length; h++) {
    
     // find all the &lt;tr&gt; elements... 
      var trs = tbodies[h].getElementsByTagName("tr");
      
      // ... and iterate through them
      for (var i = 0; i < trs.length; i++) {

	    // avoid rows that have a class attribute
        // or backgroundColor style
	    if (!hasClass(trs[i]) && ! trs[i].style.backgroundColor) {
 
            var mytr = trs[i];

            // avoid cells that have a class attribute
            // or backgroundColor style
	        if (! hasClass(mytr) && ! mytr.style.backgroundColor) {
        
		      mytr.style.backgroundColor = even ? evenColor : oddColor;
              
            }

        }
        // flip from odd to even, or vice-versa
        even =  ! even;
      }
    }
  }
 
  
  function fPopupPicFindImageFromControl(oPopupImgPath, controlID) { 
  	//alert('test');
	var vImg = document.getElementById(controlID);
	var vImgName = vImg.src;
	
	
	vImgName = vImgName.substring(vImgName.lastIndexOf("/")+1);
	
	var img = new Image(); 
	//img.onerror = img_onError; 
	img.src = oPopupImgPath + vImgName; 
	
	//alert(img.width);
	if(img.width > 0)
	{
		fPopupPic(oPopupImgPath + vImgName);
	}
}

function img_onError(vError)
{
}



function NM_getElementById(id)
{
    var elem;
  if( document.getElementById ) // this is the way the standards work
  {
	elem = document.getElementById( id );
  }
  else if( document.all ) // this is the way old msie versions work
  {
	elem = document.all[id];
	
  }
  else if( document.layers ) // this is the way nn4 works
  {
	elem = document.layers[id];
  }
  
  return elem;
}

function NM_IsActiveImage(oImageId, oLinkPrefix, oLinkNr, oCheckImageStr,oClassIfTrue,oClassIfFalse) 
{ //v3.0
  var img = MM_findObj(oImageId);
  var vLink = MM_findObj(oLinkPrefix+oLinkNr);
  //alert(oLinkId);
  
  if(vLink != null)
  {
      if(img != null)
      {
        
        if(img.src.indexOf(oCheckImageStr) > -1)
        {
            vLink.className = oClassIfTrue;
            
            var i = 1;
            
            while(MM_findObj(oLinkPrefix+i)!=null)
            {
                //alert(i != oLinkNr);
                if(i != oLinkNr)
                {
                    MM_findObj(oLinkPrefix+i).className = oClassIfFalse;
                }
                i++;
            }
            return;
        }
      }
      
      vLink.className = oClassIfFalse;
  }
  
  
  
}


//-->