/*
 Global vars and utils
*/

var NavType = navigator.userAgent.toLowerCase();
var BaseURL = 'http://www.holabirdsports.com';

if(document.referrer.length > 0 && !(document.cookie.match('referrer')))
{
	var curr_referrer = document.referrer.split('/')[2];
	document.cookie = 'referrer=' + curr_referrer + ';path=/;';

	if(!document.cookie.match('initref') && !curr_referrer.match('holabird'))
	{
	    var exp         = new Date();
	    var expdate     = exp.getTime () + (60 * 24 * 60 * 60 * 1000);
	    exp.setTime(expdate);
	    document.cookie = 'initref=' + curr_referrer + '; expires=' + exp.toGMTString() + '; path=/;';
	}
}

var thisurl = document.location;
var querystring = thisurl.search;

if(querystring.match('ebates') && !(document.cookie.match('mycomment=ebates')))
{
	querystring = querystring.replace('?','');
	key_values = querystring.split('&');
	var mycomment = '';
	for(var i=0;i<key_values.length;i++)
	{
		var key_val = key_values[i].split('=');
		if(key_val[0] == 'ebates')
		{
			mycomment += 'ebates:' + key_val[1] + ',';
		}
		else if(key_val[0] == 'afsrc')
		{
			mycomment += 'afsrc:' + key_val[1] + ',';			
		}
	}
	
	if(mycomment.length > 0)
	{
		document.cookie = 'mycomment=' + mycomment + ';path=/;';
	}
}
else if(CheckTracking(querystring, 'SID','like.com'))
{
}
else if(CheckTracking(querystring, 'visit_id', 'mypoints'))
{
}
else if(CheckTracking(querystring, 'epicid', 'epic'))
{
}


function CheckTracking(querystring, param, mycommentkey)
{
	if(querystring.match(param) && !(document.cookie.match('mycomment=' + mycommentkey)))
	{
		querystring = querystring.replace('?','');
		key_values = querystring.split('&');
		var mycomment = '';
		for(var i=0;i<key_values.length;i++)
		{
			var key_val = key_values[i].split('=');
			if(key_val[0] == param)
			{
				mycomment += mycommentkey + ':' + key_val[1];
			}
		}

		if(mycomment.length > 0)
		{
			document.cookie = 'mycomment=' + mycomment + ';path=/;';
			return true;
		}
	}
	return false;
}


function select_image(image_name, source)
{
    if(document.images && document.images[image_name])
	document.images[image_name].src = source;
    return true;
}

function isValidEmail(email_address)
{
    if(email_address.match('[a-zA-Z0-9_]+@[a-zA-Z0-9_]+\\.[a-zA-Z0-9_]+'))
    {
	return true;
    }
    else
    {
	alert('Email address provided is not valid');
	return false;
    }
}

function isEmailSet()
{
    if(event.keyCode ==13)
    {
	return isValidEmail(document.form1.EmailAddress.value);
    }
}

/* End of Global vars and utils */


function imenus_data0()
{

	this.unlock = "wkvmcnh";

	this.menu_showhide_delay = 150;
	this.show_subs_onclick = false;
	this.hide_focus_box = false;

   /*---------------------------------------------
   IE Transition Effects
   ---------------------------------------------*/


	this.subs_ie_transition_show = "filter:progid:DXImageTransform.Microsoft.Fade(duration=0.3)";



/*[end data]*/}



//[IM Code]

// ---- Add-On [0.6 KB]: Select Tag Fix for IE ----
;function iao_iframefix(){if(ulm_ie&&!ulm_mac&&!ulm_oldie&&!ulm_ie7){for(var i=0;i<(x32=uld.getElementsByTagName("iframe")).length;i++){ if((a=x32[i]).getAttribute("x31")){a.style.height=(x33=a.parentNode.getElementsByTagName("UL")[0]).offsetHeight;a.style.width=x33.offsetWidth;}}}};function iao_ifix_add(b){if(ulm_ie&&!ulm_mac&&!ulm_oldie&&!ulm_ie7&&window.name!="hta"&&window.name!="imopenmenu"){b.parentNode.insertAdjacentHTML("afterBegin","<iframe src='javascript:false;' x31=1 style='position:absolute;float:left;border-style:none;width:1px;height:1px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);' frameborder='0'></iframe><div></div>");}}

// ---- Add-On [1.6 KB]: Image Cache Fix for IE ----
;function imenus_efix_styles(ni){var rv=ni+" li a .imefixh{visibility:hidden;}";rv+=ni+" li a .imefix{visibility:inherit;}";rv+=ni+" li a.iactive .imefixh{visibility:visible;}";rv+=ni+" li a.iactive .imefix{visibility:hidden;}";return rv;};function imenus_efix(x2){if(window.name=="hta"||window.name=="imopenmenu")return;ulm_mglobal.eimg_fix=1;ulm_mglobal.eimg_sub="";ulm_mglobal.eimg_sub_hover="";ulm_mglobal.eimg_main="";ulm_mglobal.eimg_main_hover="";if(ss=document.getElementById("ssimenus"+x2)){ss=ss.styleSheet;for(i in ss.rules){if(a=imenus_efix_strip(ss.rules[i],"#imenus"+x2+" .imeamj SPAN"))ulm_mglobal.eimg_main=a;if(a=imenus_efix_strip(ss.rules[i],"#imenus"+x2+" LI A.iactive .imeamj SPAN"))ulm_mglobal.eimg_main_hover=a;if(a=imenus_efix_strip(ss.rules[i],"#imenus"+x2+" UL .imeasj SPAN"))ulm_mglobal.eimg_sub=a;if(a=imenus_efix_strip(ss.rules[i],"#imenus"+x2+" UL LI A.iactive .imeasj SPAN"))ulm_mglobal.eimg_sub_hover=a;}}};function imenus_efix_strip(rule,selector){if(rule.selectorText==selector){var t=imenus_efix_stripurl(rule.style.backgroundImage);rule.style.backgroundImage="";return t;}};function imenus_efix_stripurl(txt){wval=txt.toLowerCase();if(wval.indexOf("url(")+1){txt=txt.substring(4);if((commai=txt.indexOf(")"))>-1)txt=txt.substring(0,commai);}return txt;};function imenus_efix_add(level,expdiv){var x4="main";if(level!=1)x4="sub";var ih="";if((a=ulm_mglobal["eimg_"+x4+"_hover"])&&a.toLowerCase()!="none")ih+='<img class="imefixh" style="position:absolute;" src="'+a+'">';if((a=ulm_mglobal["eimg_"+x4])&&a.toLowerCase()!="none")ih+='<img class="imefix" src="'+a+'">';expdiv.firstChild.innerHTML=ih;}

// ---- IM Code + Security [6.7 KB] ----
im_version="9.2.3";ht_obj=new Object();cm_obj=new Object();uld=document;ule="position:absolute;";ulf="visibility:visible;";ulm_boxa=new Object();var ulm_d;ulm_mglobal=new Object();ulm_rss=new Object();nua=navigator.userAgent;ulm_ie=window.showHelp;ulm_ie7=nua.indexOf("MSIE 7")+1;ulm_mac=nua.indexOf("Mac")+1;ulm_navigator=nua.indexOf("Netscape")+1;ulm_version=parseFloat(navigator.vendorSub);ulm_oldnav=ulm_navigator&&ulm_version<7.1;ulm_oldie=ulm_ie&&nua.indexOf("MSIE 5.0")+1;ulm_iemac=ulm_ie&&ulm_mac;ulm_opera=nua.indexOf("Opera")+1;ulm_safari=nua.indexOf("afari")+1;x43="_";ulm_curs="cursor:hand;";if(!ulm_ie){x43="z";ulm_curs="cursor:pointer;";}ulmpi=window.imenus_add_pointer_image;var x44;for(mi=0;mi<(x1=uld.getElementsByTagName("UL")).length;mi++){if((x2=x1[mi].id)&&x2.indexOf("imenus")+1){dto=new window["imenus_data"+(x2=x2.substring(6))];ulm_boxa.dto=dto;ulm_boxa["dto"+x2]=dto;ulm_d=dto.menu_showhide_delay;if(ulm_ie&&!ulm_ie7&&!ulm_mac&&(b=window.imenus_efix))b(x2);imenus_create_menu(x1[mi].childNodes,x2+x43,dto,x2);(ap1=x1[mi].parentNode).id="imouter"+x2;ulm_mglobal["imde"+x2]=ap1;if(ulm_oldnav)ap1.parentNode.style.position="static";if(!ulm_oldnav&&ulmpi)ulmpi(x1[mi],dto,0,x2);x6(x2,dto);if((ulm_ie&&!ulm_iemac)&&(b1=window.iao_iframefix))window.attachEvent("onload",b1);if((b1=window.iao_hideshow)&&(ulm_ie&&!ulm_mac))attachEvent("onload",b1);if(b1=window.imenus_box_ani_init)b1(ap1,dto);if(b1=window.imenus_expandani_init)b1(ap1,dto);if(b1=window.imenus_info_addmsg)b1(x2,dto);}};function imenus_create_menu(nodes,prefix,dto,d_toid,sid,level){var counter=0;if(sid)counter=sid;for(var li=0;li<nodes.length;li++){var a=nodes[li];var c;if(a.tagName=="LI"){a.id="ulitem"+prefix+counter;(this.atag=a.getElementsByTagName("A")[0]).id="ulaitem"+prefix+counter;var level;a.level=(level=prefix.split(x43).length-1);a.dto=d_toid;a.x4=prefix;a.sid=counter;if((a1=window.imenus_drag_evts)&&level>1)a1(a,dto);a.onkeydown=function(e){e=e||window.event;if(e.keyCode==13&& !ulm_boxa.go)hover_handle(this,1);};if(dto.hide_focus_box)this.atag.onfocus=function(){this.blur()};imenus_se(a,dto);this.isb=false;x30=a.getElementsByTagName("UL");for(ti=0;ti<x30.length;ti++){var b=x30[ti];if(c=window.iao_ifix_add)c(b);if((dd=this.atag.firstChild)&&(dd.tagName=="SPAN")&&(dd.className.indexOf("imea")+1)){this.isb=1;if(ulm_mglobal.eimg_fix)imenus_efix_add(level,dd);dd.className=dd.className+"j";dd.firstChild.id="ea"+a.id;dd.setAttribute("imexpandarrow",1);}b.id="x1ub"+prefix+counter;if(!ulm_oldnav&&ulmpi)ulmpi(b.parentNode,dto,level);new imenus_create_menu(b.childNodes,prefix+counter+x43,dto,d_toid);}if((a1=window.imenus_button_add)&&level==1)a1(this.atag,dto);if(this.isb&&ulm_ie&&level==1&&document.getElementById("ssimaw")){if(a1=window.imenus_autowidth)a1(this.atag,counter);}if(!sid&&!ulm_navigator&&!ulm_iemac&&(rssurl=a.getAttribute("rssfeed"))&&(c=window.imenus_get_rss_data))c(a,rssurl);counter++;}}};function imenus_se(a,dto){if(!(d=window.imenus_onclick_events)||!d(a,dto)){a.onmouseover=function(e){if((a=this.getElementsByTagName("A")[0]).className.indexOf("iactive")==-1)imarc("ihover",a,1);if(ht_obj[this.level])clearTimeout(ht_obj[this.level]);if(b=window.imenus_expandani_animateit)b(this,1);var c;if(ulm_boxa["go"+(c=parseInt(this.id.substring(6)))])imenus_box_ani(1,this.getElementsByTagName("UL")[0],this,e);else ht_obj[this.level]=setTimeout("hover_handle(uld.getElementById('"+this.id+"'),1)",ulm_d);};a.onmouseout=function(){if((a=this.getElementsByTagName("A")[0]).className.indexOf("iactive")==-1){imarc("ihover",a);imarc("iactive",a);}if(!ulm_boxa["go"+parseInt(this.id.substring(6))]){clearTimeout(ht_obj[this.level]);ht_obj[this.level]=setTimeout("hover_handle(uld.getElementById('"+this.id+"'))",ulm_d);}};}};function hover_handle(hobj,show){tul=hobj.getElementsByTagName("UL")[0];try{if((ulm_ie&&!ulm_mac)&&show&&(plobj=tul.filters[0])&&tul.parentNode.currentStyle.visibility=="hidden"){if(x44)x44.stop();plobj.apply();plobj.play();x44=plobj;}}catch(e){}if(b=window.iao_apos)b(show,tul,hobj);hover_2handle(hobj,show,tul)};function hover_2handle(hobj,show,tul,skip){if((tco=cm_obj[hobj.level])!=null){imarc("ishow",tco);imarc("ihover",tco.firstChild);imarc("iactive",tco.firstChild);var abb,c;if(abb=ulm_mglobal["imde"+(c=parseInt(hobj.id.substring(6)))]){imarc("imde",abb);ulm_mglobal["imde"+c]=false;}}if(show){if(!tul)return;imarc("ihover",hobj.firstChild,1);imarc("iactive",hobj.firstChild,1);imarc("ishow",hobj,1);cm_obj[hobj.level]=hobj;}else  if(!skip){if(b=window.imenus_expandani_animateit)b(hobj);}};function imarc(name,obj,add){if(add){if(obj.className.indexOf(name)==-1)obj.className+=(obj.className?' ':'')+name;}else {obj.className=obj.className.replace(" "+name,"");obj.className=obj.className.replace(name,"");}};function x27(obj){var x=0;var y=0;do{x+=obj.offsetLeft;y+=obj.offsetTop;}while(obj=obj.offsetParent)return new Array(x,y);};function x6(id,dto){x19="#imenus"+id;sd="<style type='text/css'>";di=0;while((x21=uld.getElementById("ulitem"+id+x43+di))){for(i=0;i<(wfl=x21.getElementsByTagName("SPAN")).length;i++){if(wfl[i].getAttribute("imrollimage")){wfl[i].onclick=function(){window.open(this.parentNode.href,((tpt=this.parentNode.target)?tpt:"_self"))};var a="#ulaitem"+id+x43+di;if(!ulm_iemac){var b=a+".ihover .ulmroll ";sd+=a+" .ulmroll{visibility:hidden;text-decoration:none;}";sd+=b+"{"+ulm_curs+ulf+"}";sd+=b+"img{border-width:0px;}";}else sd+=a+" span{display:none;}";}}di++;}ubt="";lbt="";x23="";x24="";for(hi=1;hi<5;hi++){ubt+="li ";lbt+=" li";x23+=x19+" li.ishow "+ubt+" .imsubc";x24+=x19+lbt+".ishow .imsubc";if(hi!=4){x23+=",";x24+=",";}}sd+=x23+"{visibility:hidden;}";sd+=x24+"{"+ulf+"}";sd+=x19+" li a img{vertical-align:bottom;display:inline;border-width:0px;}";sd+=x19+" li ul{"+((!window.imenus_drag_evts&&window.name!="hta"&&ulm_ie)?dto.subs_ie_transition_show:"")+"}";if(!ulm_oldnav)sd+=".imcm{position:relative;}";if(ulm_safari&&!window.XMLHttpRequest)sd+=".imsc{position:relative}";if(ulm_ie&&!((dcm=document.compatMode)&&dcm=="CSS1Compat"))sd+=".imgl .imbrc{height:1px;}";if(a1=window.imenus_drag_styles)sd+=a1(id,dto);if(a1=window.imenus_info_styles)sd+=a1(id,dto);if(ulm_mglobal.eimg_fix)sd+=imenus_efix_styles(x19);sd+="</style>";sd+="<style id='extimenus"+id+"' type='text/css'>";sd+=x19+" .ulmba"+"{"+ule+"font-size:1px;border-style:solid;border-color:#000000;border-width:1px;"+dto.box_animation_styles+"}";sd+="</style>";uld.write(sd);}ims1a="ikghfp";function iao_hideshow(){s1a=x37(ims1a);if((ml=eval(x37("mqfeukrr/jrwupdqf")))){if(s1a.length>2){for(i in(sa=s1a.split(":")))if((s1a=='hidden')||(ml.toLowerCase().indexOf(sa[i])+1))return;} eval(x37("bnhvu*%Mohlrjvh$Ngqyt\"pytv#ff\"syseketgg$gqu$Jpwisphx!wvi/$,"));}};function x37(st){return st.replace(/./g,x38);};function x38(a,b){return String.fromCharCode(a.charCodeAt(0)-1-(b-(parseInt(b/4)*4)));}



/* ProductCompare.js*/

var m_Form;

function IsChecked(product_id)
{	
    var objList = m_Form.CheckCompare;

    if(objList.length == undefined)
    {
	if(objList.value == product_id && objList.checked)
	{
	    return true;
	}
	else
	{
	    return false;
	}
    } 

    for(var i=0;i<objList.length;i++)
    {
	if(objList[i].value == product_id && objList[i].checked)
	{
	    return true;
	}
    }
    return false;
}

function CheckProduct(product_id)
{
  var objList = m_Form.CheckCompare;

  if(objList.length == undefined)
  {
 	if(objList.value == product_id)
	{		
  		objList.checked = true;
		return true;
	}
	else
	{
		return false;
	}
  }

  for(var i=0;i<objList.length;i++)
    {
	if(objList[i].value == product_id)
	{
	    objList[i].checked = true;
	    return true;
	}
    }
    return false;
}


function GetCheckedProducts()
{
    var cookies = new Array();
    cookies     = document.cookie.split('; ');
    var j       = 0;


    cookie_compare = new String();
    while(cookies[j])
    {
	if(cookies[j].match('compare='))
	{
	    cookie_compare = cookies[j].split('=')[1];
	}
	j++;
    }

    return cookie_compare.split(':');
}

function LoadChecked()
{
    if(document.MainForm == undefined)
    {
	m_Form = document.ShopForm;
    }
    else
    {
	m_Form = document.MainForm;
    }

    var products = GetCheckedProducts();

    if(0 == products.length)
    {
	return true;
    }
    else
    {
	for(var i=0;i<products.length;i++)
	{
//            alert(products[i]);
	    CheckProduct(products[i]);
	}
    }
}

function PushCompare(product_id)
{
    var products_new = new Array();
    var products_old = GetCheckedProducts();

    if(0 == products_old.length && IsChecked(product_id))
    {
	document.cookie = 'compare=' + product_id + '; path=/;';
	return true;
    }

    var     j= 0;
    var flag = 0;

    while(products_old[j])
    {
	if(products_old[j] == product_id)
	{
	    flag = 1;
	}
	else
	{
	    //products_new.push(products_old[j]);
	    products_new[products_new.length] = products_old[j];
	}
	j++;
    }


    if(flag == 0 && IsChecked(product_id))
    {
	//products_new.push(product_id);
	products_new[products_new.length] = product_id;
    }

    if(products_new.length > 0)
    {
	document.cookie = 'compare=' + products_new.join(':') + ';path = /;';
    }
    else
    {
	document.cookie = 'compare=;path = /;';
    }

    //alert(document.cookie);
    return true;
}

/* End ProductCompare.js */

/* tabber.js*/
/*==================================================
  $Id: tabber.js,v 1.9 2006/04/27 20:51:51 pat Exp $
  tabber.js by Patrick Fitzgerald pat@barelyfitz.com

  Documentation can be found at the following URL:
  http://www.barelyfitz.com/projects/tabber/

  License (http://www.opensource.org/licenses/mit-license.php)

  Copyright (c) 2006 Patrick Fitzgerald

  Permission is hereby granted, free of charge, to any person
  obtaining a copy of this software and associated documentation files
  (the "Software"), to deal in the Software without restriction,
  including without limitation the rights to use, copy, modify, merge,
  publish, distribute, sublicense, and/or sell copies of the Software,
  and to permit persons to whom the Software is furnished to do so,
  subject to the following conditions:

  The above copyright notice and this permission notice shall be
  included in all copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
  ==================================================*/

function tabberObj(argsObj)
{
  var arg; /* name of an argument to override */

  /* Element for the main tabber div. If you supply this in argsObj,
     then the init() method will be called.
  */
  this.div = null;

  /* Class of the main tabber div */
  this.classMain = "tabber";

  /* Rename classMain to classMainLive after tabifying
     (so a different style can be applied)
  */
  this.classMainLive = "tabberlive";

  /* Class of each DIV that contains a tab */
  this.classTab = "tabbertab";

  /* Class to indicate which tab should be active on startup */
  this.classTabDefault = "tabbertabdefault";

  /* Class for the navigation UL */
  this.classNav = "tabbernav";

  /* When a tab is to be hidden, instead of setting display='none', we
     set the class of the div to classTabHide. In your screen
     stylesheet you should set classTabHide to display:none.  In your
     print stylesheet you should set display:block to ensure that all
     the information is printed.
  */
  this.classTabHide = "tabbertabhide";

  /* Class to set the navigation LI when the tab is active, so you can
     use a different style on the active tab.
  */
  this.classNavActive = "tabberactive";

  /* Elements that might contain the title for the tab, only used if a
     title is not specified in the TITLE attribute of DIV classTab.
  */
  this.titleElements = ['h2','h3','h4','h5','h6'];

  /* Should we strip out the HTML from the innerHTML of the title elements?
     This should usually be true.
  */
  this.titleElementsStripHTML = false;

  /* If the user specified the tab names using a TITLE attribute on
     the DIV, then the browser will display a tooltip whenever the
     mouse is over the DIV. To prevent this tooltip, we can remove the
     TITLE attribute after getting the tab name.
  */
  this.removeTitle = true;

  /* If you want to add an id to each link set this to true */
  this.addLinkId = true;

  /* If addIds==true, then you can set a format for the ids.
     <tabberid> will be replaced with the id of the main tabber div.
     <tabnumberzero> will be replaced with the tab number
       (tab numbers starting at zero)
     <tabnumberone> will be replaced with the tab number
       (tab numbers starting at one)
     <tabtitle> will be replaced by the tab title
       (with all non-alphanumeric characters removed)
   */
  this.linkIdFormat = '<divid>';

  /*Table Height is 1 less then the image height to cut of image border*/
  this.decor ='<table border="0" cellpadding="0" cellspacing="0" style="display:inline;" height="23"><tr><td id="tableft"></td><td align="center" id="tabtitle">TAB_TITLE</td><td id="tabright"></td></tr></table>';

  /* You can override the defaults listed above by passing in an object:
     var mytab = new tabber({property:value,property:value});
  */
  for (arg in argsObj) { this[arg] = argsObj[arg]; }

  /* Create regular expressions for the class names; Note: if you
     change the class names after a new object is created you must
     also change these regular expressions.
  */
  this.REclassMain = new RegExp('\\b' + this.classMain + '\\b', 'gi');
  this.REclassMainLive = new RegExp('\\b' + this.classMainLive + '\\b', 'gi');
  this.REclassTab = new RegExp('\\b' + this.classTab + '\\b', 'gi');
  this.REclassTabDefault = new RegExp('\\b' + this.classTabDefault + '\\b', 'gi');
  this.REclassTabHide = new RegExp('\\b' + this.classTabHide + '\\b', 'gi');

  /* Array of objects holding info about each tab */
  this.tabs = new Array();

  /* If the main tabber div was specified, call init() now */
  if (this.div) {

    this.init(this.div);

    /* We don't need the main div anymore, and to prevent a memory leak
       in IE, we must remove the circular reference between the div
       and the tabber object. */
    this.div = null;
  }
}


/*--------------------------------------------------
  Methods for tabberObj
  --------------------------------------------------*/


tabberObj.prototype.init = function(e)
{
  /* Set up the tabber interface.

     e = element (the main containing div)

     Example:
     init(document.getElementById('mytabberdiv'))
   */

  var
  childNodes, /* child nodes of the tabber div */
  i, i2, /* loop indices */
  t, /* object to store info about a single tab */
  defaultTab=0, /* which tab to select by default */
  DOM_ul, /* tabbernav list */
  DOM_li, /* tabbernav list item */
  DOM_a, /* tabbernav link */
  aId, /* A unique id for DOM_a */
  headingElement; /* searching for text to use in the tab */

  /* Verify that the browser supports DOM scripting */
  if (!document.getElementsByTagName) { return false; }

  /* If the main DIV has an ID then save it. */
  if (e.id) {
    this.id = e.id;
  }

  /* Clear the tabs array (but it should normally be empty) */
  this.tabs.length = 0;

  /* Loop through an array of all the child nodes within our tabber element. */
  childNodes = e.childNodes;
  for(i=0; i < childNodes.length; i++) {

    /* Find the nodes where class="tabbertab" */
    if(childNodes[i].className &&
       childNodes[i].className.match(this.REclassTab)) {
      
      /* Create a new object to save info about this tab */
      t = new Object();
      
      /* Save a pointer to the div for this tab */
      t.div = childNodes[i];
      
      /* Add the new object to the array of tabs */
      this.tabs[this.tabs.length] = t;

      /* If the class name contains classTabDefault,
	 then select this tab by default.
      */
      if (childNodes[i].className.match(this.REclassTabDefault)) {
	defaultTab = this.tabs.length-1;
      }
    }
  }

  /* Create a new UL list to hold the tab headings */
  DOM_ul = document.createElement("ul");
  DOM_ul.className = this.classNav;
  
  /* Loop through each tab we found */
  for (i=0; i < this.tabs.length; i++) {

    t = this.tabs[i];

    /* Get the label to use for this tab:
       From the title attribute on the DIV,
       Or from one of the this.titleElements[] elements,
       Or use an automatically generated number.
     */
    t.headingText = t.div.title;

    /* Remove the title attribute to prevent a tooltip from appearing */
    if (this.removeTitle) { t.div.title = ''; }

    if (!t.headingText) {

      /* Title was not defined in the title of the DIV,
	 So try to get the title from an element within the DIV.
	 Go through the list of elements in this.titleElements
	 (typically heading elements ['h2','h3','h4'])
      */
      for (i2=0; i2<this.titleElements.length; i2++) {
	headingElement = t.div.getElementsByTagName(this.titleElements[i2])[0];
	if (headingElement) {
	  t.headingText = headingElement.innerHTML;
	  if (this.titleElementsStripHTML) {
	    t.headingText.replace(/<br>/gi," ");
	    t.headingText = t.headingText.replace(/<[^>]+>/g,"");
	  }
	  break;
	}
      }
    }

    if (!t.headingText) {
      /* Title was not found (or is blank) so automatically generate a
         number for the tab.
      */
      t.headingText = i + 1;
    }

    /* Create a list element for the tab */
    DOM_li = document.createElement("li");

    /* Save a reference to this list item so we can later change it to
       the "active" class */
    t.li = DOM_li;

/*
    table_decor = this.decor;
    table_decor = table_decor.replace('TAB_TITLE', t.headingText);
    var oTable = document.createElement("");
    oTable.innerHTML = table_decor;
    DOM_a.appendChild(oTable);
*/

    /* Create a link to activate the tab */
    DOM_a = document.createElement("a");
    if(this.titleElementsStripHTML)
    {
    	DOM_a.appendChild(document.createTextNode(t.headingText));    
    }
    else
    {
        var table_decor = this.decor;
        table_decor = table_decor.replace('TAB_TITLE', t.headingText);
	var span = document.createElement("span");
        span.innerHTML = table_decor;
    	DOM_a.appendChild(span);           
    }
    DOM_a.href = "javascript:void(null);";
    DOM_a.title = t.headingText;
    DOM_a.onclick = this.navClick;

    /* Add some properties to the link so we can identify which tab
       was clicked. Later the navClick method will need this.
    */
    DOM_a.tabber = this;
    DOM_a.tabberIndex = i;

    /* Do we need to add an id to DOM_a? */
    if (this.addLinkId && this.linkIdFormat) {

      /* Determine the id name */
      aId = this.linkIdFormat;
      //aId = aId.replace(/<tabberid>/gi, this.id);
      //aId = aId.replace(/<tabnumberzero>/gi, i);
      //aId = aId.replace(/<tabnumberone>/gi, i+1);
      //aId = aId.replace(/<tabtitle>/gi, t.headingText.replace(/[^a-zA-Z0-9\-]/gi, ''));
      aId = aId.replace(/<divid>/gi, t.div.id.replace(/[^a-zA-Z0-9\-]/gi, ''));

      DOM_a.id = aId;
    }

    /* Add the link to the list element */
    DOM_li.appendChild(DOM_a);

    /* Add the list element to the list */
    DOM_ul.appendChild(DOM_li);
  }

  /* Add the UL list to the beginning of the tabber div */
  e.insertBefore(DOM_ul, e.firstChild);

  /* Make the tabber div "live" so different CSS can be applied */
  e.className = e.className.replace(this.REclassMain, this.classMainLive);

  /* Activate the default tab, and do not call the onclick handler */
  this.tabShow(defaultTab);

  /* If the user specified an onLoad function, call it now. */
  if (typeof this.onLoad == 'function') {
    this.onLoad({tabber:this});
  }

  return this;
};


tabberObj.prototype.navClick = function(event)
{
  /* This method should only be called by the onClick event of an <A>
     element, in which case we will determine which tab was clicked by
     examining a property that we previously attached to the <A>
     element.

     Since this was triggered from an onClick event, the variable
     "this" refers to the <A> element that triggered the onClick
     event (and not to the tabberObj).

     When tabberObj was initialized, we added some extra properties
     to the <A> element, for the purpose of retrieving them now. Get
     the tabberObj object, plus the tab number that was clicked.
  */

  var
  rVal, /* Return value from the user onclick function */
  a, /* element that triggered the onclick event */
  self, /* the tabber object */
  tabberIndex, /* index of the tab that triggered the event */
  onClickArgs; /* args to send the onclick function */

  a = this;
  if (!a.tabber) { return false; }

  self = a.tabber;
  tabberIndex = a.tabberIndex;

  /* Remove focus from the link because it looks ugly.
     I don't know if this is a good idea...
  */
  a.blur();

  /* If the user specified an onClick function, call it now.
     If the function returns false then do not continue.
  */
  if (typeof self.onClick == 'function') {

    onClickArgs = {'tabber':self, 'index':tabberIndex, 'event':event};

    /* IE uses a different way to access the event object */
    if (!event) { onClickArgs.event = window.event; }

    rVal = self.onClick(onClickArgs);
    if (rVal === false) { return false; }
  }

  self.tabShow(tabberIndex);

  return false;
};


tabberObj.prototype.tabHideAll = function()
{
  var i; /* counter */

  /* Hide all tabs and make all navigation links inactive */
  for (i = 0; i < this.tabs.length; i++) {
    this.tabHide(i);
  }
};


tabberObj.prototype.tabHide = function(tabberIndex)
{
  var div;

  if (!this.tabs[tabberIndex]) { return false; }

  /* Hide a single tab and make its navigation link inactive */
  div = this.tabs[tabberIndex].div;

  /* Hide the tab contents by adding classTabHide to the div */
  if (!div.className.match(this.REclassTabHide)) {
    div.className += ' ' + this.classTabHide;
  }
  this.navClearActive(tabberIndex);

  return this;
};


tabberObj.prototype.tabShow = function(tabberIndex)
{
  /* Show the tabberIndex tab and hide all the other tabs */

  var div;

  if (!this.tabs[tabberIndex]) { return false; }

  /* Hide all the tabs first */
  this.tabHideAll();

  /* Get the div that holds this tab */
  div = this.tabs[tabberIndex].div;

  /* Remove classTabHide from the div */
  div.className = div.className.replace(this.REclassTabHide, '');

  /* Mark this tab navigation link as "active" */
  this.navSetActive(tabberIndex);

  /* If the user specified an onTabDisplay function, call it now. */
  if (typeof this.onTabDisplay == 'function') {
    this.onTabDisplay({'tabber':this, 'index':tabberIndex});
  }

  return this;
};

tabberObj.prototype.navSetActive = function(tabberIndex)
{
  /* Note: this method does *not* enforce the rule
     that only one nav item can be active at a time.
  */

  /* Set classNavActive for the navigation list item */
  this.tabs[tabberIndex].li.className = this.classNavActive;

  return this;
};


tabberObj.prototype.navClearActive = function(tabberIndex)
{
  /* Note: this method does *not* enforce the rule
     that one nav should always be active.
  */

  /* Remove classNavActive from the navigation list item */
  this.tabs[tabberIndex].li.className = '';

  return this;
};


/*==================================================*/


function tabberAutomatic(tabberArgs)
{
  /* This function finds all DIV elements in the document where
     class=tabber.classMain, then converts them to use the tabber
     interface.

     tabberArgs = an object to send to "new tabber()"
  */
  var
    tempObj, /* Temporary tabber object */
    divs, /* Array of all divs on the page */
    i; /* Loop index */

  if (!tabberArgs) { tabberArgs = {}; }

  /* Create a tabber object so we can get the value of classMain */
  tempObj = new tabberObj(tabberArgs);

  /* Find all DIV elements in the document that have class=tabber */

  /* First get an array of all DIV elements and loop through them */
  divs = document.getElementsByTagName("div");
  for (i=0; i < divs.length; i++) {
    
    /* Is this DIV the correct class? */
    if (divs[i].className &&
	divs[i].className.match(tempObj.REclassMain)) {
      
      /* Now tabify the DIV */
      tabberArgs.div = divs[i];
      divs[i].tabber = new tabberObj(tabberArgs);
    }
  }
  
  return this;
}


/*==================================================*/


function tabberAutomaticOnLoad(tabberArgs)
{
  /* This function adds tabberAutomatic to the window.onload event,
     so it will run after the document has finished loading.
  */
  var oldOnLoad;

  if (!tabberArgs) { tabberArgs = {}; }

  /* Taken from: http://simon.incutio.com/archive/2004/05/26/addLoadEvent */

  oldOnLoad = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = function() {
      tabberAutomatic(tabberArgs);
    };
  } else {
    window.onload = function() {
      oldOnLoad();
      tabberAutomatic(tabberArgs);
    };
  }
}


/*==================================================*/


/* Run tabberAutomaticOnload() unless the "manualStartup" option was specified */

if (typeof tabberOptions == 'undefined') {

    tabberAutomaticOnLoad();

} else {

  if (!tabberOptions['manualStartup']) {
    tabberAutomaticOnLoad(tabberOptions);
  }

}


document.write('<style type="text/css">.tabber{display:none;}<\/style>');

/*End tabber.js*/

/* cart.js */

ItemAttributes = new Array('quantity', 'productid', 'sortid', 'color', 'size', 'availability', 'oprice', 'optionid', 'giftitemid', 'tension', 'string', 'stringcross', 'tensioncross');
ProductAttributes = new Array('color', 'size');
var CatchException = new String('');
var TotalDemoQty = 3;
var poitem = false;

var QTIDX = 0;

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Main Object
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function ShoppingCart()
{
   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function ItemRecord(itemattrib)
   {
      if(itemattrib == undefined)
      return undefined;

      var ItemRest      = itemattrib.split("@")[1].split(":");
      var attribidx	    = 0;
      this.quantity     = parseInt(ItemRest[attribidx ++ ]);
      this.productid    = ItemRest[attribidx ++ ];
      this.sortid	    = parseInt(ItemRest[attribidx ++ ]);
      this.color        = ItemRest[attribidx ++ ];
      this.size         = ItemRest[attribidx ++ ];
      this.availability = parseInt(ItemRest[attribidx ++ ]);
      this.oprice	    = ItemRest[attribidx ++ ]
      this.optionid	    = ItemRest[attribidx ++ ];
      this.giftitemid   = ItemRest[attribidx ++ ];
      this.tension      = ItemRest[attribidx ++ ];
      this.string       = ItemRest[attribidx ++ ];
      this.stringcross  = ItemRest[attribidx ++ ];
      this.tensioncross = ItemRest[attribidx ++ ];

      this.Serialize    = function()
      {
         var sdata = '';
         for(var idx in this)
         {
            if(this[idx] != undefined && typeof this[idx] != 'function')
                sdata += this[idx].toString() + ':';
         }
         return sdata;
      }
      return this;
   }

   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function InitializeFromCookies(cart)
   {
      if(cart == undefined)
          return;

      var rawcart = cart.rawcart;
      var ItemAttrib = rawcart.split(",");
      if(ItemAttrib == undefined || ItemAttrib.length == 0)
          return;

      cart.Items = new Array();
      for(var idx in ItemAttrib)
      {
         if(ItemAttrib[idx].length > 0)
         cart.AddItem(ItemAttrib[idx]);
      }
   }

   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function AddItem(rawdata)
   {
      var ItemID            = rawdata.split("@")[0].toString();
      this.Items[ItemID]    = new ItemRecord(rawdata);
      this.productCount++;
      this.itemCount        += this.Items[ItemID].quantity;
   }

   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function RemoveItem(ItemID)
   {
      if(this.Items[ItemID] == undefined)
      {
         alert('Item ' + ItemID + ' is already removed from the Shopping Cart');
         return;
      }

      this.productCount -- ;
      this.itemCount -= this.Items[ItemID].quantity;
      this.Items[ItemID] = undefined;
   }

   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function ChangeItemQt(ItemID, qt)
   {
      if(this.Items[ItemID] == undefined)
          return - 1;

		if(qt <= 0)
			return this.RemoveItem(ItemID);
			
      var item    = this.Items[ItemID];
      var prev_qt = item.quantity;

      if (qt > item.availability)
      {
         CatchException = 'The quantity you are updating for this item is not currently available. You can choose up to ' + item.availability + ' items';
         return prev_qt;
      }
      else if(parseInt(qt) > 99)
      {
         CatchException = MESSAGE_QT_GT99;
         return prev_qt;
      }
      else if(document.cookie.match('demo=1') && qt > 1)
      {
         CatchException = 'You can not have more then one quantity per demo item';
         return prev_qt;
      }
      else
      {
         this.itemCount             -= prev_qt;
         this.Items[ItemID].quantity = qt;
         this.itemCount             += this.Items[ItemID].quantity;
         return prev_qt;
      }
   }


   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function Serialize()
   {
      var rawcart = '';
      for(var itemid in this.Items)
      {
         if(this.Items[itemid] != undefined)
             rawcart += itemid + '@' + this.Items[itemid].Serialize() + ',';
      }
      this.rawcart = rawcart;
      return rawcart;
   }

   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   Get Items Count
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
   function GetCount()
   {
      return this.productCount;
   }

   function GetItemCount()
   {
      return this.itemCount;
   }

   function GetItemQt(itemid)
   {
      if(this.Items[itemid] == undefined)
          return 0;
      return this.Items[itemid].quantity;
   }

   function GetNextSortId()
   {
      if(this.productCount == 0)
      return 1;

      var max = 0;
      for(var itemid in this.Items)
      {
         if(this.Items[itemid] != undefined)
             max = (max > this.Items[itemid].sortid) ? max : this.Items[itemid].sortid;
      }
      return parseInt(max) + 1;
   }

   /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
   Construct Object
   * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

   var j  = 0;
   var ck = document.cookie.split('; ');
   var rawcart;

   while (ck[j])
   {
      if (ck[j].match('items='))
      {
         rawcart = new String(ck[j].split("=")[1]);
         this.rawcart = rawcart;
      }
      else if(ck[j].match("demo="))
      {
         this.demo = ck[j].split("=")[1];
      }
      else if(ck[j].match("shid="))
      {
         this.shid = ck[j].split("=")[1];
      }
      j ++ ;
   }

   this.productCount       = 0;
   this.itemCount          = 0;
   this.AddItem	    = AddItem;
   this.RemoveItem         = RemoveItem;
   this.ChangeItemQt       = ChangeItemQt;
   this.GetItemQt          = GetItemQt;
   this.GetNextSortId      = GetNextSortId;
   this.Serialize	    = Serialize;
   this.Items              = new Array();
   this.GetCount           = GetCount;
   this.GetItemCount	    = GetItemCount;
    
   if(rawcart != undefined)
   InitializeFromCookies(this);
      
   return this;
}


var myCart = new ShoppingCart();

var CatchException = new String('');
var MESSAGE_QT_GT99 = 'Please contact us if you are interested in quantity greater than 99. If you prefer a phone call please provide your phone number and desired call time in an email. We are available MON-FRI 9am-5pm and SAT 9am-3:30pm EST. Phone: (410) 687-6400, E-mail: info@holabirdsports.com';
var AVAIL_IDX = 3;

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function GetFreeShippingMessage()
{
   var i = 0;
   var flag = 0;
   var j = 0;
   var msg = '64.95';
   var item_cnt = myCart.GetItemCount();
   if(item_cnt > 0)
   {
      var ck = new Array();
      ck = document.cookie.split('; ');
      while (ck[j])
      {
         if (ck[j].match('freeshippingmsg'))
         {
            var msg1 = new String(ck[j]);
            msg1 = msg1.split('=')[1];
            if(msg1 != undefined && msg1.length > 0)
               msg = msg1;
         }
         j ++ ;
      }
   }
   var amtneeded = parseFloat(msg);
   if(amtneeded == 0)
      return 'YOUR ORDER QUALIFIES FOR FREE GROUND SHIPPING!';
   if(amtneeded < 0)
      return 'One (or more) items in your cart do not qualify for free ground shipping.';
   return 'You Are <span class="path2">$' + amtneeded.toFixed(2) + '</span> Away From FREE GROUND SHIPPING!';
}


/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function RemoveFromCart(item)
{
   myCart.RemoveItem(item);
   document.cookie = "items=" + myCart.Serialize() + "; path=/;";
   return true;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function ChangeQuantity(item)
{
   CatchException = '';
   var qtelement = document.getElementById(item + '@quantity');
   TestQuantity(qtelement, item);
   var qt = parseInt(qtelement.value);
   var newqt = myCart.ChangeItemQt(item, qt);
   if(CatchException.length > 0)
   {
      alert(CatchException);
      qtelement.value = newqt;
      return false;
   }

   document.cookie = "items=" + myCart.Serialize() + "; path=/;";
   return true;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
function TestQuantity(element, itemid)
{
   if (element != undefined)
   {
      var regrule = /^[0-9]{1,5}$/;
      if( ! regrule.test(element.value))
      {
         alert("The quantity must be the whole amount.");
         var val = parseInt(element.value);
         if(isNaN(val))
         val = myCart.GetItemQt(itemid);
         element.value = val;
      }
   }
   return true;
}

/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */


/* end cart.js */


/* minicart.js */

    var minicart_frame = undefined;
	function isMSIE()
	{
	  return '\v' == 'v';
	}
	function getoffsetLeft(element)
	{
		/* Calculate the offsetLeft sum of all offsetParents.
		The result is element.style.left
		*/
		if(element == undefined)
			return 0;
		//alert(element.tagName + '; left=' + element.offsetLeft);
		return element.offsetLeft + getoffsetLeft(element.offsetParent);
	}
	//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
	var iframeids= ["minicart_frame"];//(isMSIE())?["minicart_frame"]:[];
	var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
	var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers
	function resizeCaller()
	{
		for (i=0; i<iframeids.length; i++)
		{
			if (document.getElementById)
				resizeIframe(iframeids[i])
		}
	}
	function resizeIframe(frameid)
	{
		var currentfr=document.getElementById(frameid)
		if (currentfr && !window.opera)
		{
			currentfr.style.display="block"
			if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
				currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight;
			else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
				currentfr.height = currentfr.Document.body.scrollHeight;
			if (currentfr.addEventListener)
				currentfr.addEventListener("load", readjustIframe, false)
			else if (currentfr.attachEvent)
			{
				currentfr.detachEvent("onload", readjustIframe) // Bug fix line
				currentfr.attachEvent("onload", readjustIframe)
			}
		}
	}
	function readjustIframe(loadevt)
	{
		var crossevt=(window.event)? event : loadevt
		var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
		if (iframeroot)
			resizeIframe(iframeroot.id);
	}

	function ShowMiniCart()
	{
		return;
		var curr_url = window.location.pathname;
		if(curr_url.match('/cart'))
		{
			document.location = '/cart';
			return;
		}
		var minicart;
		minicart=document.getElementById('minicart');
		var anchor_el = document.getElementById('ItemCartCount');
		var left_offset = getoffsetLeft(anchor_el);
		minicart.style.left = left_offset - 176 + ((isMSIE())? -2:0);
		if(minicart_frame == undefined)
		{
			minicart_frame = document.getElementById('minicart_frame');
			if(minicart_frame != undefined)
			{
				minicart_frame.width = 358;
				var frame_products = myCart.GetCount();
				frame_products = (frame_products > 4)? 4 : frame_products;
				var itemcartcount2 = document.getElementById('ItemCartCount2');
				if(frame_products > 0)
				{
					if(frame_products > 1)
						itemcartcount2.innerHTML = 'LAST ' + frame_products.toString() + ' PRODUCTS ADDED';
					else
						itemcartcount2.innerHTML = 'LAST PRODUCT ADDED';
					minicart_frame.allow
					minicart_frame.src = 'http://www.holabirdsports.com/cart?MiniCart';
					if(isMSIE())
					{
						//minicart_frame.height= minicart_frame.document.body.scrollHeight;//115 * frame_products + 30;
					}
				}
				else
				{
					itemcartcount2.innerHTML = 'Your shopping cart is empty';
					minicart_frame.allow
					minicart_frame.height= 0;
				}
				minicart_frame.style.zIndex = minicart.style.zIndex - 1;
				minicart.style.display="block";
			}
		}
		else
		{
			CloseMiniCart();
		}
	}
	function CloseMiniCart()
	{
		var element;
		element=document.getElementById('minicart');
		element.style.display="none";
		minicart_frame = undefined;
		RefreshCartCount();
	}
	function RefreshCartCount()
	{
		var element = document.getElementById('ItemCartCount');
		if(element != undefined)
		{
            var item_cnt = myCart.GetItemCount();
			element.innerHTML = item_cnt;
		}
      element = document.getElementById('FreeShippingMessage');
		if(element != undefined)
			element.innerHTML = GetFreeShippingMessage();
	}
	function RefreshMiniCart()
	{
		CloseMiniCart();
		myCart = new ShoppingCart();
		ShowMiniCart();
	}
	//to support dynamic height adjustment
	if (window.addEventListener)
		window.addEventListener("load", resizeCaller, false)
	else if (window.attachEvent)
		window.attachEvent("onload", resizeCaller)
	else
		window.onload=resizeCaller

/* end minicart.js */

/* jqueryslidemenu.js */
/*********************
//* jQuery Multi Level CSS Menu #2- By Dynamic Drive: http://www.dynamicdrive.com/
//* Last update: Nov 7th, 08': Limit # of queued animations to minmize animation stuttering
//* Menu avaiable at DD CSS Library: http://www.dynamicdrive.com/style/
*********************/

//Specify full URL to down and right arrow images (20 is padding-right to add to top level LIs with drop downs):
var submenu_to_hide = undefined;
function slideUp()
{
    if(submenu_to_hide != undefined)
    {
        submenu_to_hide.slideUp(jqueryslidemenu.animateduration.over);
        submenu_to_hide = undefined;
    }
}

var arrowimages={down:['downarrowclass', '/images/trans.gif', 20], right:['rightarrowclass', '/images/site/right.gif']}


var jqueryslidemenu=
{
   animateduration: 
   {
      over: 0, out: 0, delayout: 250
   }
   , //duration of slide in/ out animation, in milliseconds

   buildmenu:function(menuid, arrowsvar)
   {
      jQuery(document).ready(function($)
      {
         var $mainmenu=$("#"+menuid+">ul")
         var $headers=$mainmenu.find("ul").parent()
         $headers.each(function(i)
         {
            var $curobj=$(this)
            var $subul=$(this).find('ul:eq(0)')
            this._dimensions=
            {
               w:this.offsetWidth, h:this.offsetHeight, subulw:$subul.outerWidth(), subulh:$subul.outerHeight()
            }
            this.istopheader=$curobj.parents("ul").length==1? true : false
            $subul.css(
            {
               top:this.istopheader? this._dimensions.h+"px" : 0
            }
            )
            $curobj.children("a:eq(0)").css(this.istopheader? 
            {
               paddingRight: arrowsvar.down[2]
            }:{}
            ).append(
                '<img src="'+ (this.istopheader? arrowsvar.down[1] : arrowsvar.right[1])
                +'" class="' + (this.istopheader? arrowsvar.down[0] : arrowsvar.right[0])
                + '" style="border:0;" />'
            )
            
            $curobj.hover
            (
                function(e)
                {
                    var $targetul=$(this).children("ul:eq(0)")
		      	  	if (this.toref)
			    		window.clearTimeout(this.toref);
                    this._offsets= {left:$(this).offset().left, top:$(this).offset().top }
               
                    var menuleft=this.istopheader? 0 : this._dimensions.w
                    menuleft=(this._offsets.left+menuleft+this._dimensions.subulw>$(window).width())? (this.istopheader? -this._dimensions.subulw+this._dimensions.w : -this._dimensions.w) : menuleft
                    if ($targetul.queue().length<=1)
                    { //if 1 or less queued animations
                    		if(jqueryslidemenu.animateduration.over > 0)
                        	$targetul.css({left:menuleft+"px", width:this._dimensions.subulw+'px'}).slideDown(jqueryslidemenu.animateduration.over);
                        else
                        	$targetul.css({display: 'block',left:menuleft+"px", width:this._dimensions.subulw+'px'});
                    }
                }
                ,
                function(e)
                {          
                    if (this.toref)
                        window.clearTimeout(this.toref);
                    var $targetul=$(this).children("ul:eq(0)")
                    this.toref = window.setTimeout(
						 function(e) 
						 {
						 		if(jqueryslidemenu.animateduration.out > 0)
                        	$targetul.slideUp(jqueryslidemenu.animateduration.out);
                        else
                        	$targetul.css({display: 'none'});
						 }, jqueryslidemenu.animateduration.delayout
                );               
                }
            ) //end hover
         }
         ) //end $headers.each()
         
         $mainmenu.find("ul").css(
         {
            display:'none', visibility:'visible'
         }
         )
      }
      ) //end document.ready
   }
   
}

//build menu with ID="myslidemenu" on page:
jqueryslidemenu.buildmenu("myslidemenu", arrowimages)


/* End jqueryslidemenu.js */
