window.addEvent('domready', function() {
  if ( $$('a.navigation-tips') ) {
    $$('a.navigation-tips').each(function(element,index) {
      var content = element.get('title').split('::');
      var id = element.get('id');
      element.store('tip:title', content[0]);
      element.store('tip:text', content[1]);
      element.store('tip:id', id);
    });

    //create the tooltips
    var tips = new Tips('.navigation-tips',{
      className: 'tips',
      fixed: true,
      hideDelay: 50,
      showDelay: 50
    });
  }
});

function confirmContactSubmission()
{
  var captcha = prompt( 'Please enter the verification code next to the submit button to confirm your submission.' );
  if ( captcha && 'null' != captcha && 'undefined' != captcha && '' != captcha) {
    $('contact-form').captcha.value = captcha;
  } else {
    alert( 'You must enter the verification code shown on the page to submit your message.' );
    return false ;
  }
}

var min=8;
var max=18;

function setFontSize(value,keyword) {
  var container = $('home-link');
  if ( container ) container.setStyle('backgroundImage', 'url(/images/shared/bg_text_' + keyword + '.gif)');

  // update p elements
  $$('#body-text p').each( function(element, index) {
    element.setStyle('fontSize',value);
  } );

  // update p elements
  $$('#body-text li').each( function(element, index) {
    element.setStyle('fontSize',value);
  } );
}
