/* left_nav functions */
function fixMenu(ULNode,nav) {	
	
	if (ULNode) {
	
  //ie6 fix. This fixes the issue ie6 has with using hover by setting mouse events to change class name
  if (document.all&&document.getElementById) {
    for (i=0; i<ULNode.childNodes.length; i++) {
      node = ULNode.childNodes[i];
      if (node.nodeName=="LI") {
        node.onmouseover  = function() { this.className+=" over1"; }
        node.onmouseout   = function() { this.className=this.className.replace(" over1",""); }
        if (node.lastChild.nodeName=="UL") {
          for (j=0; j<node.lastChild.childNodes.length; j++) {
            level2Node = node.lastChild.childNodes[j];
            if (level2Node.nodeName=="LI") {
              level2Node.onmouseover  = function() { this.className+=" over2"; }
              level2Node.onmouseout   = function() { this.className=this.className.replace(" over2",""); }
              level2Node.background = "";
              if (level2Node.lastChild.nodeName=="UL") {
                for (k=0; k<level2Node.lastChild.childNodes.length; k++) {
                  level3Node = level2Node.lastChild.childNodes[k];
                  if (level3Node.nodeName=="LI") {
                    level3Node.onmouseover  = function() { this.className+=" over3"; this.style.background="#0693c6"; this.style.color="#ffffff"; }
                    level3Node.onmouseout   = function() { this.className=this.className.replace(" over3",""); this.style.background="#edeff0"; this.style.color="#3e4952"; }
                    level3Node.background = "";							
                  } //end if
                } //end for k
              } //end if lastChild										
            } //end if
          } //end for j
        } //end if lastChild
      } //end if node LI
    } //end for i
  } //end browser check
  } // end check for ULNode
} //end function
/* end of left_nav functions */

/* cookie functions */

function deleteCookie (name,path,domain) {
  if (getCookie(name)) document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

/* cookie functions */

/* rollover functions */
var NS4=(document.layers)?1:0;
var SF=(navigator.appVersion.toString().indexOf('Safari')!=-1)?1:0;

var cacheArray=new Array(0);
// Creates an array of button images and loads those images into browser cache.
// Array must be formatted as follows:
//   ('<1st img tag ID>|<path to 1st default image>|<path to 1st on-image>',
//    '<2nd img tag ID>|<path to 2nd default image>|<path to 2nd on-image>'...)
// Note that the ID and path are separated by the pipe "|" character.
function imageGroup(){
  if (this.total==null){
    this.add=imageGroup;
    if (!document.images) return;
    this.total=this.cached=this.rollovers=(SF?1:0);
    this.ids=new Array(0);
    this.urlsDef=new Array(0);
    this.urlsOn=new Array(0);
    this.count=new Array(0);
    this.imgDef=new Object();
    this.imgOn=new Object();
    this.index=cacheArray.length;
    cacheArray[this.index]=this;
    this.defURL='';
  }
  var a,j,k,args=arguments;
  for (j=0; j<args.length; j++){
    k=this.total;
    a=args[j].split('|');
    this.ids[k]=a[0];
    this.urlsDef[k]=this.defURL+a[1];
    this.urlsOn[k]=this.defURL+a[2];
    this.total++;
  }
}

function loadImages(){
  if (document.images){
    var j,c=cacheArray;
    for (j=0; j<c.length; j++)
      loadGroup(c[j]);
  }
}

// Used by loadImages() function.
function loadGroup(obj,pre){
  if (obj.loaded)
    return;
  obj.loaded=1;
  var k,imgDef,imgOn,stuff='';
  for (k=0; k<obj.total; k++){
    imgDef=obj.imgDef[obj.ids[k]]=new Image();
    imgOn=obj.imgOn[obj.ids[k]]=new Image();
    if (!NS4){
      imgDef.group=obj.index;
      imgOn.group=obj.index;
      imgDef.num=k;
      imgOn.num=k;
      imgDef.onload=countImg;
      imgOn.onload=countImg;
    } else {
      stuff +=
        '<IMG SRC="'+ obj.urlsDef[k] +'" BORDER="0" ONLOAD="countImg('+obj.index+','+k+');"/>' +
        '<IMG SRC="'+ obj.urlsOn[k] +'" BORDER="0" ONLOAD="countImg('+obj.index+','+k+');"/><BR/>';
    }
    imgDef.src=obj.urlsDef[k];
    imgOn.src=obj.urlsOn[k];
  }
  if (NS4){
    if (pre){
      document.newLayer('cacher'+obj.index,stuff,0);
    } else {
      var cacher=new Layer(0),c=cacher.document; c.write(stuff); c.close();
    }
  }
}

function countImg(n,k){
  if (!NS4){
    n=this.group; k=this.num;
  }
  var obj=cacheArray[n];
  if (obj.count[k]!=1){
    obj.count[k]=1;
    obj.cached++;
    if (obj.cached==obj.total){
      obj.rollovers=1;
      if (obj.onload) eval(obj.onload);
    }
  }
}

// Performs button rollover for images.
// obj = reference to imageGroup() array (i.e. obj=new imageGroup('<1st img tag ID>|<path to 1st default image>|<path to 1st on-image>',...) )
// idx = the id or the index of the obj array that is being used for the swap.
// imageId = (optional) alternate id for image that will use the obj's image.
// n = state to return button to: "1" for "on", "0" for "off".  For instance, you might specify "onmouseover" to n=1, and
//    "onmouseout" to n=0.  If you want the button to always display the "on" state (such as if this is the current
//    page), always specify n=1.
function swapImg(obj,idx,imageId,n) { 
  var img;
  if (typeof idx == "number"){
    if (SF) idx++;
    if (imageId != null && imageId.length > 0)
      img = document.getElementById( imageId );
    else
      img=document.getElementById( obj.ids[idx] );
    if ((obj.rollovers)&&(img)) 
      img.src = (n ? obj.imgOn[obj.ids[idx]].src : obj.imgDef[obj.ids[idx]].src);
    else
      return false;
    return true;
  } else {
    if (imageId != null && imageId.length > 0)
      img = document.getElementById( imageId );
    else
      img=document.getElementById( idx );
    if ((obj.rollovers)&&(img)) 
      img.src = (n ? obj.imgOn[idx].src : obj.imgDef[idx].src);
    else
      return false;
    return true;
  }
}

function imgOn(obj,idx) { return swapImg(obj, idx, '', 1); }
function imgOff(obj,idx) { return swapImg(obj, idx, '', 0); }

function imgIdOn(obj,idx,imageId) { return swapImg(obj, idx, imageId, 1); }
function imgIdOff(obj,idx,imageId) { return swapImg(obj, idx, imageId, 0); }

/* end of rollover functions */

/* flash functions */

/* REQUIRED MINIMUM FLASH VERSION */
var flash_version=8;

var MAC=(navigator.userAgent.indexOf('Mac')!=-1)?1:0;

var IE40WIN=((navigator.appVersion.toString().indexOf('MSIE 4')!=-1)&&!MAC)?1:0;

var IE45MAC=((navigator.appVersion.toString().indexOf('MSIE 4.5')!=-1)&&MAC)?1:0;
var IE50MAC=(navigator.userAgent.toString().indexOf('MSIE 5.0')!=-1&&MAC)?1:0;
var IE51MAC=(navigator.userAgent.toString().indexOf('MSIE 5.1')!=-1&&MAC)?1:0;

var NS4=(document.layers)?1:0;
var NS6=(navigator.userAgent.indexOf('Netscape/6')!=-1)?1:0;

var NOFLASHDHTML=(IE40WIN||IE45MAC||IE50MAC||IE51MAC||NS4||NS6)?1:0;

var SWF=0; 
var sfobj='ShockwaveFlash.ShockwaveFlash.'+eval(flash_version);
var VBS='<SCRIP'; 
VBS+='T LANGUAGE=VBScript\> \n'; 
VBS+='on error resume next \n'; 
VBS+='SWF=IsObject(CreateObject(sfobj)) \n'; 
VBS+='</S'; VBS+='CRIPT\> \n';

if (!MAC) document.write(VBS);

var plugin=(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]?navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin:0);
if (plugin) { 
  var clientFlashVersion = parseInt(plugin.description.substring(plugin.description.indexOf(".") - 1));
  if (clientFlashVersion < 1) {
    var clientFlashVersion = parseInt(plugin.description.substring(plugin.description.indexOf(".") - 2));
  }
  if (clientFlashVersion >= flash_version) { SWF=1; }
}

function flash(src,color,width,height,noflash,underdhtml,forceie45mac,overwrite) { 
  var EC; 

  if (NOFLASHDHTML && SWF) gn_DHTML=0;
  if (forceie45mac&&IE45MAC) SWF=1;

  if (SWF||overwrite) { 
   EC='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ ((overwrite)?overwrite:flash_version) +',0,0,0" ID=themovie WIDTH='+width+' HEIGHT='+height+'>'+ ((underdhtml)?'<param name="wmode" value="transparent" />':'') + '<PARAM NAME=movie VALUE="'+src+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=menu VALUE=false> <PARAM NAME=bgcolor VALUE='+color+'> <PARAM NAME=autoplay VALUE=false> <EMBED NAME="themovie" SRC="'+src+'" menu=false autoplay=false quality=high bgcolor='+color+'  WIDTH='+width+' HEIGHT='+height+' TYPE="application/x-shockwave-flash" swLiveConnect="true" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"'+ ((underdhtml)?' WMODE="transparent"':'') + '></EMBED></OBJECT>'; 
  } else { 
    EC=noflash; 
  }
  document.write(EC); 
}

function flashStr(src,color,width,height,noflash,underdhtml,forceie45mac,overwrite) {
  var EC; 

  if (NOFLASHDHTML && SWF) gn_DHTML=0;
  if (forceie45mac&&IE45MAC) SWF=1;
	if ((is_mac) && (is_fx) && ((is_fx_ver) == "2")) SWF = 0; 
	
  if (SWF||overwrite) { 
    EC='<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ ((overwrite)?overwrite:flash_version) +',0,0,0" ID=themovie WIDTH='+width+' HEIGHT='+height+'>'+ ((underdhtml)?'<param name="wmode" value="transparent" />':'') + '<PARAM NAME=movie VALUE="'+src+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=menu VALUE=false> <PARAM NAME=bgcolor VALUE='+color+'> <PARAM NAME=autoplay VALUE=false> <EMBED NAME="themovie" SRC="'+src+'" menu=false autoplay=false quality=high bgcolor='+color+'  WIDTH='+width+' HEIGHT='+height+' TYPE="application/x-shockwave-flash" swLiveConnect="true" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"'+ ((underdhtml)?' WMODE="transparent"':'') + '></EMBED></OBJECT>'; 
  } else { 
    EC=noflash; 
  } 
  return EC;
	
	
}
/* end of flash functions */

/* header functions */
function getCookie(c_name) {
  if (document.cookie.length > 0){
    c_start=document.cookie.indexOf(c_name + "=");
    if (c_start!=-1) {
      c_start=c_start + c_name.length+1;
      c_end=document.cookie.indexOf(";",c_start);
      if (c_end==-1) c_end=document.cookie.length;
      return unescape(document.cookie.substring(c_start,c_end));
    }
  }
  return null;
}		

function setCookie(c_name,value,expiredays){
  var exdate=new Date();
  exdate.setDate(exdate.getDate()+expiredays);
  document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : ";expires="+exdate.toGMTString()) + "; path=/";
  var here = document.location.pathname + "";
  if (here == "/") here = "/action/home";
  if(c_name=="investorType" && value!="unknown") location.href = here + "?" + c_name + "=" + value;
}

var searchFieldClicked = false;

function clearSearchField(theField){
  if (!searchFieldClicked){
    theField.value = "";
    searchFieldClicked = true;
  }
}

function isParent(child, parent){
  var ie = ((document.all && document.getElementById)? true:false);
  if(ie == true){
    if(!child.offsetParent) return false;
    if(child.offsetParent.innerHTML == parent.innerHTML){
      return true;
    } else {
      return isParent(child.offsetParent, parent);
    }
  } else {
    if(child.tagName == "BODY") return false;
    if(child.parentNode.innerHTML == parent.innerHTML){
      return true;
    } else {
      return isParent(child.parentNode, parent);
    }
  }
}
      
function hideBubble(element){
  if(element) element.style.display="none";
}
      
function showBubble(){
  if(bubble) bubble.style.display="block";
}
    
function findMouse(e){
  if(!e) var e = window.event;
  if(e.toElement){
    var toElement = e.toElement;
  } else {
    var toElement = e.relatedTarget;
  }
  if((toElement.id != 'fp_link') && (!isParent(toElement, bubble))) hideBubble(bubble);
}
/* end of header functions */

/* DHTML functions */

function toggleDisplay( elementId ) {
  objElement = document.getElementById( elementId );
  objElement.style.display = (objElement.style.display == "block") ? "none" : "block";
}

/* end of DHTML functions */

/* Investor Materials functions */
var agt = navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie6 = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );

var current_category="";
/* array holds the ids of div for each category;
   the order affects what title displays for each category */
var categories=new Array('prospectus','factsheet','category_basics','etn_information');

function showCategory(cat){
  if(cat==current_category) return;
  var container=document.getElementById('container');
  var initial_view=document.getElementById('initial_view');
  var display_area=document.getElementById('display_area');
  if(!display_area || !initial_view || !container) return;
  initial_view.style.display="none";
  container.style.padding="0 0 10px 0";/* IE hack */
  
  display_area.style.display="inline";  
  var TITLE_HEIGHT=40;
  for(var i=0;i<categories.length;i++){
    if(categories[i]==cat){
      var div=document.getElementById(cat);
      var label=document.getElementById(cat+'_label');
      var title=document.getElementById('category_title');
      if(!div || !label || !title) return;
      title.style.backgroundPosition="0px " + (0 - (TITLE_HEIGHT * i)) + "px";
      div.style.display="block";
      label.className="category activecategory";
      current_category=cat;
    } else {
      var div=document.getElementById(categories[i]);
      var label=document.getElementById(categories[i]+'_label');
      if(!div || !label) return;
      div.style.display="none";
      label.className="category";
    }
  }
}
function toggleTwisty(twisty){
  var twisty_on='/images/investor_materials/twisty_on.gif';
  var twisty_off='/images/investor_materials/twisty_off.gif';
  var element=document.getElementById(twisty);
  var image=document[twisty];
  var container=document.getElementById('container');
  if(!element || !image) return;
  if(!container && is_ie6) return;
  if(element.className=="twisty twisty_off"){
    element.className="twisty";
    image.src=twisty_on;
    if(twisty=="category_alternatives" && is_ie6){
      container.style.height=(container.offsetHeight - 90) + "px";
      container.style.overflow="hidden";
    } else if(twisty!="category_alternatives" && is_ie6){
      container.style.height="auto";
      container.style.overflow="auto";
    }
  } else {
    element.className="twisty twisty_off";
    image.src=twisty_off;
    if(is_ie6){
      container.style.height="auto";
      container.style.overflow="auto";
    }
  }
}
function toggleLabel(cat,on){
  if(!cat) return;
  if(on==true){
    cat.className="category activecategory";
  } else if(on==false && (current_category=="" || cat.id.indexOf(current_category) <= -1)) {
    cat.className="category";
  }
}
/* end of Investor Materials functions */

/* Education Center functions */

var active_section='';
function showSection(section){
  var sections=new Array('left','center','right');
  for(var i=0;i<sections.length;i++){
    if(sections[i]==section){
      var box=document.getElementById(section+'box');
      var arrow=document.getElementById(section+'arrow');
      var header=document.getElementById(section+'hdr');
      var content=document.getElementById(section+'content');
      if(!box || !arrow || !header || !content) continue;
      active_section=section;
      box.className="activebox";
      arrow.style.display="none";
      header.style.backgroundPosition="bottom left";
      content.style.display="block";
    } else {
      var box=document.getElementById(sections[i]+'box');
      var arrow=document.getElementById(sections[i]+'arrow');
      var header=document.getElementById(sections[i]+'hdr');
      var content=document.getElementById(sections[i]+'content');
      if(!box || !arrow || !header || !content) continue;
      box.className="box";
      arrow.style.display="block";
      header.style.backgroundPosition="";
      content.style.display="none";
    }
  }
}
function changeHeader(header,on){
  if(header==active_section) return;
  var header=document.getElementById(header+'hdr');
  if(!header) return;
  if(on=='true'){
    header.style.backgroundPosition="bottom left";
  } else {
    header.style.backgroundPosition="top left";
  }
}
/* end of Education Center functions */

/* FF2/Mac sniffer for Flash */

  var agt=navigator.userAgent.toLowerCase();

  var is_mac = (agt.indexOf("mac")!=-1);

  var is_konq = false;
  var kqPos   = agt.indexOf('konqueror');
  if (kqPos !=-1) {
     is_konq  = true;
     is_minor = parseFloat(agt.substring(kqPos+10,agt.indexOf(';',kqPos)));
     is_major = parseInt(is_minor);
  }

  var is_getElementById   = (document.getElementById) ? "true" : "false";
  var is_getElementsByTagName = (document.getElementsByTagName) ? "true" : "false";
  var is_documentElement = (document.documentElement) ? "true" : "false";

  var is_safari = ((agt.indexOf('safari')!=-1)&&(agt.indexOf('mac')!=-1))?true:false;
  var is_khtml  = (is_safari || is_konq);

  var is_gecko = ((!is_khtml)&&(navigator.product)&&(navigator.product.toLowerCase()=="gecko"))?true:false;
  var is_gver  = 0;
  if (is_gecko) is_gver=navigator.productSub;

  var is_fb = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
               (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
               (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
               (is_gecko) && (navigator.vendor=="Firebird"));
  var is_fx = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
               (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
               (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
               (is_gecko) && ((navigator.vendor=="Firefox")||(agt.indexOf('firefox')!=-1)));
  var is_moz   = ((agt.indexOf('mozilla/5')!=-1) && (agt.indexOf('spoofer')==-1) &&
                  (agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)  &&
                  (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1)     &&
                  (is_gecko) && (!is_fb) && (!is_fx) &&
                  ((navigator.vendor=="")||(navigator.vendor=="Mozilla")||(navigator.vendor=="Debian")));
  if ((is_moz)||(is_fb)||(is_fx)) {
     var is_moz_ver = (navigator.vendorSub)?navigator.vendorSub:0;
     if(is_fx&&!is_moz_ver) {
         is_moz_ver = agt.indexOf('firefox/');
         is_moz_ver = agt.substring(is_moz_ver+8);
         is_moz_ver = parseFloat(is_moz_ver);
     }
     if(!(is_moz_ver)) {
         is_moz_ver = agt.indexOf('rv:');
         is_moz_ver = agt.substring(is_moz_ver+3);
         is_paren   = is_moz_ver.indexOf(')');
         is_moz_ver = is_moz_ver.substring(0,is_paren);
     }
     is_minor = is_moz_ver;
     is_major = parseInt(is_moz_ver);
  }
  var is_fx_ver = is_moz_ver;

  var is_mac    = (agt.indexOf("mac")!=-1);	

/* End FF2/Mac sniffer for Flash */
	


/* Origami functions */

var de=document.documentElement;
var screenWidth=window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var screenHeight=window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;

function showAd(ad,swf,width,height,noflash){
  var object=document.getElementById(ad);
  var curtain=document.getElementById("greyout");
  var close=document.getElementById("close");
  var content=document.getElementById('content');
    
  if(!object || !curtain || !close || !content) return;

  content.style.position="static";
    
  currentAd=ad;
  curtain.style.top=0;
  curtain.style.left=0;
  curtain.style.width=(screenWidth + scrollX) + "px";
  curtain.style.height=(screenHeight + scrollY) + "px";
  curtain.style.zIndex=2147480000;
  curtain.style.visibility="visible";
  var position=centerObject(object);

  flashalt='<img src="' + noflash + '"/>';
  object.innerHTML=flashStr(swf+'?clickTag1=#&clickTag2=#&clickTag3=#&clickTag4=#','#ffffff',width,height,flashalt,1,1,0);
  object.style.zIndex=2147483647;
  object.style.visibility="visible";

  close.style.zIndex=2147483647;
  close.style.visibility="visible";
}
function hideAd(){
  var object=document.getElementById(currentAd);
  var curtain=document.getElementById("greyout");
  var close=document.getElementById("close");
  var content=document.getElementById('content');
  
  if(!object || !curtain || !close || !content) return;
  content.style.zIndex=0;
  object.style.visibility="hidden";
  close.style.visibility="hidden";
  curtain.style.visibility="hidden";
}
function centerObject(object){
  var close=document.getElementById("close");
  if(!object || !close) return;
  var objectWidth=object.offsetWidth;
  var objectHeight=object.offsetHeight;
  findScrollbars();
  var top=(screenHeight/2)-(objectHeight/2)+scrollY;
  if(top < (close.offsetHeight + scrollY)) top=close.offsetHeight + scrollY;
  var left=(screenWidth/2)-(objectWidth/2)+scrollX;
  if(left < scrollX) left=scrollX;
  object.style.top=top + "px";
  object.style.left=left + "px";
  close.style.top=(top-close.offsetHeight) + "px";
  close.style.left=(left+(object.offsetWidth-close.offsetWidth)) + "px";
}
function findScrollbars(){
  if(de && (de.scrollLeft || de.scrollTop)){
    scrollX=de.scrollLeft;
    scrollY=de.scrollTop;
  } else if(document.body && (document.body.scrollLeft || document.body.scrollTop)){
    scrollX=document.body.scrollLeft;
    scrollY=document.body.scrollTop;
  } else if( typeof(window.pageXOffset)=="number" && typeof(window.pageYOffset)=="number"){
    scrollX=window.pageXOffset;
    scrollY=window.pageYOffset;
  }
}
function moveAds(){
  if(currentAd==''){
    findScrollbars();
    return;
  }
  var object=document.getElementById(currentAd);
  if(!object) return;
  centerObject(object);
  var curtain=document.getElementById("greyout");
  if(!curtain) return;
  curtain.style.height=screenHeight+scrollY + "px";
  curtain.style.width=screenWidth+scrollX + "px";
}

/* end of Origami functions */

/* Miscellaneous functions */
function emailPage(){
  var emailPageWindow =
  window.open( '/emailPage.jsp?path='+document.location,'emailPage','height=525,width=436,toolbar=no,directories=no,status=yes,menubar=no,location=no,scrollbars=yes,resizable=yes');
}

function openWindow(newUrl,width,height){
  var newWindow = window.open(newUrl,'newWindow','height='+height+',width='+width+',toolbar=no,directories=no,status=yes,menubar=no,location=no,scrollbars=yes,resizable=yes');
}

function getXmlHttpRequestObject()
{
  var xmlHttp;
  try {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
  } catch (e) {
    // Internet Explorer
    try {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        alert("Your browser does not support AJAX!");
        return false;
      }
    }
  }
  return xmlHttp;
}

function ajaxFunction(objHttpRequest, strURL, objFunction)
{

  objHttpRequest.open("GET", strURL+'&rnd='+Math.random(), true);

  objHttpRequest.onreadystatechange=objFunction;

  objHttpRequest.send(null);
}
/* end of Miscellaneous functions */

var headerNav=new imageGroup(
  'about|/image/navigation/nav-top-about-out.gif|/image/navigation/nav-top-about-in.gif',
  'product|/image/navigation/nav-top-prod-info-out.gif|/image/navigation/nav-top-prod-info-in.gif',
  'materials|/image/navigation/nav-top-materials-out.gif|/image/navigation/nav-top-materials-in.gif',
  'education|/image/navigation/nav-top-edu-center-out.gif|/image/navigation/nav-top-edu-center-in.gif',
  '|/images/bg_badge-bubble.gif|/images/bg_badge-bubble.gif');
loadImages();


$(window).load(function(){

  $("a.investor-bubble-link").bind('mouseover', function() {  
    if ($("#investor-bubble").hasClass("not-visible")) {
      	$("#investor-bubble").removeClass("not-visible").addClass("is-visible");
    }
    return false;
  });
  
  $("#investor-bubble").bind('mouseleave', function() {  
    if ($("#investor-bubble").hasClass("is-visible")) {
      	$("#investor-bubble").removeClass("is-visible").addClass("not-visible");
    }
  });  
  
});