if(typeof sIFR == "function"){

  //sIFR.replaceElement(named({sSelector:"#center #box .menu a", sFlashSrc:"/swf/futura2-14.swf", sColor:"#FFFFFF", sLinkColor:"#FFFFFF", sBgColor:"#FFFFFF", sHoverColor:"#FFFFFF", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=center&offsetTop=0"}));

  //sIFR.replaceElement(named({sSelector:"#center #box #content .static h1", sFlashSrc:"/swf/futura2-16.swf", sColor:"#9A1C15", sLinkColor:"#9A1C15", sBgColor:"#FFFFFF", sHoverColor:"#9A1C15", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
    
  sIFR.replaceElement(named({sSelector:"#center #box .product_detail h1", sFlashSrc:"/swf/futura2-16.swf", sColor:"#9A1C15", sLinkColor:"#9A1C15", sBgColor:"#FFFFFF", sHoverColor:"#9A1C15", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
  
  sIFR.replaceElement(named({sSelector:"#center #box .highlight h1", sFlashSrc:"/swf/futura2-16.swf", sColor:"#333333", sLinkColor:"#333333", sBgColor:"#FFFFFF", sHoverColor:"#333333", sWmode:"transparent", nPaddingTop:0, nPaddingBottom:0, sFlashVars:"textalign=left&offsetTop=0"}));
  
}
var myrules = {
  '#center #box .header .home' : function(el){
    el.onclick = function(){
      window.location='/';
    }
  },
  '#center #box .highlight .i' : function(el){
    element.onfocus = function(){
      if(this.type == 'text' || this.type == 'password'){
        this.style.border='1px solid #9A1C15';
        this.style.color='#9A1C15';
        this.style.fontWeight='bold';
      }
    }
    element.onblur = function(){
      if(this.type == 'text' || this.type == 'password'){
        this.style.border='1px solid #333333';
        this.style.color='#333333';
        this.style.fontWeight='normal';
      }
    }
  },
  '#center #box #content ul.product_listing li a .image img' : function(el){
    el.onclick = function(){
      window.location=el.parentNode.parentNode.href;
    }
  }, 
  '.rxEntryForm input' : function(el){
    el.onblur = function(){ updateElement(el); }
  },
  'input.common' : function(el){
    el.onblur = function(){
      removeProblem(el.id, 1);  
      removeProblem(el.id, 2);  
          
      validateCommon(); 
    }
  }
};
Behaviour.register(myrules);

/** 
* Used to size the height of div rows to be the same in providers area
*/
function promo(name, size){
  maxHeight = 0;
  for(i=1; i<=size; i++){
  if(Element.getHeight(name + i) > maxHeight)
    maxHeight = Element.getHeight(name + i);
  if((i%2)==0){
    $(name + (i-1)).style.height = maxHeight + 'px';  
    $(name + i).style.height = maxHeight + 'px';  
    maxHeight = 0;
  }
  }

}

/**
* Script used to toggle advanced and basic search
*/ 
function toggleSearch(){
  if($F('advancedSearch') == 1){
    $('advancedSearch').value = 2;
  }else{
    $('advancedSearch').value = 1;
  }

}

function changeSearch(){
  if($F('advancedSearch') == 1){
    Element.hide('advanced_search_text');
    Element.show('basic_search_text');
    Effect.BlindDown('advanced_search_box');

  }else{
    Element.hide('basic_search_text');
    Element.show('advanced_search_text');
    Effect.BlindUp('advanced_search_box');    
  }
  toggleSearch();
  return false;
}