Event.observe(window, 'load', function() {
  
  if (Prototype.Browser.IE) {
    ['function','industry','administrative_area_code','location'].each(function(elt){
      if($(elt) != null) {
        $(elt).firstWidth = $(elt).getWidth();
        Event.observe($(elt), 'mousedown', function() {
          $(this).setStyle({width: 'auto'});
        });
        Event.observe($(elt), 'blur', function() {
          $(this).setStyle({width: $(this).firstWidth+"px"});
        });
      }
    });		
  };
	
	$$('.hideOnLoad').each(function(elt) {
    elt.hide();                           
		elt.removeClassName('hideOnLoad');
	});
  
  $$('a[rel="external"], area[rel="external"]').each(function(link){
    if(link.readAttribute('href') != '' && link.readAttribute('href') != '#'){
      link.writeAttribute('target','_blank');
    }
  });

});

function hideFrames() {
//  if (Prototype.Browser.IE || Prototype.Browser.WebKit) {
   $$('iframe').invoke('hide');
//  }
};

function restoreFrames() {
//  if (Prototype.Browser.IE || Prototype.Browser.WebKit) {
    $$('iframe').invoke('show');
//  }
};

