function addLoadListener(fn)
{
	if (typeof window.addEventListener != 'undefined')
	{
		window.addEventListener('load', fn, false);
	}
 	else if (typeof document.addEventListener != 'undefined')
 	{
   	document.addEventListener('load', fn, false);
	}
 	else if (typeof window.attachEvent != 'undefined')
 	{
   	window.attachEvent('onload', fn);
 	}
 	else
 	{
   	var oldfn = window.onload;
   	if (typeof window.onload != 'function')
   	{
     window.onload = fn;
   	}
   	else
   	{
     window.onload = function()
     {
       oldfn();
       fn();
     };
   }
 }
}

/* jQuery function to get url variables */
$.extend({
  getUrlVars: function(){
    var vars = [], hash;
    var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
    for(var i = 0; i < hashes.length; i++)
    {
      hash = hashes[i].split('=');
      vars.push(hash[0]);
      vars[hash[0]] = hash[1];
    }
    return vars;
  },
  getUrlVar: function(name){
    return $.getUrlVars()[name];
  }
});

/* jQuery eQual Heights */
$.fn.equalHeights = function(minHeight, maxHeight) {
	tallest = (minHeight) ? minHeight : 0;
	this.each(function() {
		if($(this).height() > tallest) {
			tallest = $(this).height();
		}
	});
	if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
	return this.each(function() {
		//$(this).height(tallest);
		$(this).css('min-height',tallest);
	});
}


/* Add IDs to top level nav */
function append_nav_ids(){
	$("ul#nav").find("a.firstLevel").each(function(){
	  var newid = $(this).text();
	      newid = newid.replace(/ /gi,'_');
		  newid = newid.toLowerCase();
	  $(this).attr('id',newid);
	});
}
function show_left_heading(){
	$("#left_second_list").prev().css('display','block').attr('id','left_heading_visible');
	$("#left_nav a.left_firstLevel").not('#left_heading_visible').each(function(){
		$(this).parent().hide();
	});
}

function add_left_arrows(){
	$("#left_second_list a.left_secondLevel").each(function(){
	  if( $(this).next().is('ul#left_third_list') ){
		$(this).append('&nbsp;&nbsp;&nbsp;<img src="https://secure.heifer.org/atf/cf/{e384d2db-8638-47f3-a6db-68be45a16edc}/greenarrow_down.gif" align="absmiddle" border="0"/>');
	  }else{
		$(this).append('&nbsp;&nbsp;&nbsp;<img src="https://secure.heifer.org/atf/cf/{e384d2db-8638-47f3-a6db-68be45a16edc}/greenarrow_side.gif" align="absmiddle" border="0"/>');
	  }
	});
}

/* Scripts for Footer "Heifer Policies" link */
function show_policies(){
  jQuery("#footer_hplink").text('Heifer Policies [-]');
  jQuery("#policies_links").fadeIn("slow");
  jQuery("#footer_hplink").unbind("click").bind("click",hide_policies);
}
function hide_policies(){
  jQuery("#footer_hplink").text('Heifer Policies [+]');
  jQuery("#policies_links").fadeOut("slow");
  jQuery("#footer_hplink").unbind("click").bind("click",show_policies);
}

$(document).ready(function(){
	/* Add bottom corners to right boxes */
	$("#rightColumn .right_box_green").after('<div class="right_box_green_bottom"><img src="/atf/cf/{e384d2db-8638-47f3-a6db-68be45a16edc}/right_box_bottom.gif"  alt="" /></div>');

	/* Apply colorbox to specified links */
	$(".cb_iframe").each(function(){
		var cwidth,cheight;
		( $(this).attr('width') ) ? cwidth = $(this).attr('width') : cwidth = '550';
		( $(this).attr('height') ) ? cheight = $(this).attr('height') : cheight = '465';
		$(this).colorbox({width: cwidth+"px", height: cheight+"px", iframe:true});
	});

	/* Apply default banner if not applied exist */
	if( $("#mainBanner").html()==""){
		//$("#mainBanner").html('<img src=""/>');
	}

	/* Make sure columns are equal heights */
	$("#leftColumn,#webFeature,#rightColumn").addClass('equalH');
	$(".equalH").equalHeights();

	append_nav_ids();
	show_left_heading();
	add_left_arrows();
	jQuery("#footer_hplink").bind("click",show_policies);
});

// JavaScript Document
window.onload = function() {	
	//arrows();
}

sfHover = function() {
	// Support the standard nav without a class of nav.
	var el = document.getElementById("nav");
	if(!/\bnav\b/.test(el.className) && el.tagName == "UL")
		setHover(el);
	// Find all unordered lists.
	var ieNavs = document.getElementsByTagName('ul');
	for(i=0; i<ieNavs.length; i++) {
		var ul = ieNavs[i];
		// If they have a class of nav add the menu hover.
		if(/\bnav\b/.test(ul.className))
			setHover(ul);
	}
}

function setHover(nav) {
	var ieULs = nav.getElementsByTagName('ul');
	if (navigator.appVersion.substr(22,3)!="5.0") {
		// IE script to cover <select> elements with <iframe>s
		for (j=0; j<ieULs.length; j++) {
			var ieMat=document.createElement('iframe');
			if(document.location.protocol == "https:")
				ieMat.src="https://www.kintera.org/site/n.gif";
			else if(window.opera != "undefined")
				ieMat.src="";
			else
				ieMat.src="javascript:false";
			ieMat.scrolling="no";
			ieMat.frameBorder="0";
			ieMat.style.width=ieULs[j].offsetWidth+"px";
			ieMat.style.height=ieULs[j].offsetHeight+"px";
			ieMat.style.zIndex="-1";
			ieULs[j].insertBefore(ieMat, ieULs[j].childNodes[0]);
			ieULs[j].style.zIndex="101";
		}

		// IE script to change class on mouseover
		var ieLIs = nav.getElementsByTagName('li');
		for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
			// Add a sfhover class to the li.
			ieLIs[i].onmouseover=function() {
				if(!/\bsfhover\b/.test(this.className))
					this.className+=" sfhover";
			}
			ieLIs[i].onmouseout=function() {
				if(!this.contains(event.toElement))
					this.className= "";
			}
		}
	} else {
		// IE 5.0 doesn't support iframes so hide the select statements on hover and show on mouse out.
		// IE script to change class on mouseover
		var ieLIs = document.getElementById('nav').getElementsByTagName('li');
		for (var i=0; i<ieLIs.length; i++) if (ieLIs[i]) {
			ieLIs[i].onmouseover=function() {this.className+=" sfhover";hideSelects();}
			ieLIs[i].onmouseout=function() {this.className=this.className.replace(' sfhover', '');showSelects()}
		}
	}
}

// If IE 5.0 hide and show the select statements.

function hideSelects(){
	var oSelects=document.getElementsByTagName("select");
	for(var i=0;i<oSelects.length;i++)
		oSelects[i].className+=" hide";
}

function showSelects(){
	var oSelects=document.getElementsByTagName("select");
	for(var i=0;i<oSelects.length;i++)
		oSelects[i].className=oSelects[i].className.replace(" hide","");
}

// Run this only for IE.
if (navigator.appName == 'Microsoft Internet Explorer') {
	if (window.attachEvent) window.attachEvent('onload', sfHover);
}

function arrows () {
	//Define HTML for arrow here
	var arrowCode = ' >>';
	//Do Not Edit Below Here
	var links = document.getElementById("nav").getElementsByTagName("a");
	for (i=0;i<links.length; i++) {
		if (links[i].className.indexOf("firstLevel") < 0) {
			if(links[i].nextSibling!=null && links[i].nextSibling.nodeName=="UL" && links[i].innerHTML.substring(0,4).toLowerCase()!="<img"){
				links[i].innerHTML += arrowCode;
			}
		}
	}
}




function go_newsletter(){
  var thisform = $("#enews_form").get(0); 
  var inp = $("#email_address").val();
  if(inp==""){
    alert("A valid email address is required");
    return false;
  }else if(validEmail(inp, "A valid email address is required") == false){
    thisform.email_address.focus();
    return false;
  }else{
    window.location = 'http://sphere.heifer.org/site/c.edJRKQNiFiG/b.6478789/apps/ka/ct/contactus.asp?c=edJRKQNiFiG&b=6478789&email_address='+inp;
    return false;
  }
}




function createCookie(name,value,minutes) {
    if (minutes) {
        var date = new Date();
        date.setTime(date.getTime()+(minutes*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";

    cookieStr = name+"="+value+expires+"; path=/; domain=.heifer.org";
    document.cookie = cookieStr;

}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

function eraseCookie(name) {
    var d = new Date();
    document.cookie = name+"=1;expires=" + d.toGMTString() + ";" + ";";
}

function getQueryVariable(variable) { var query = window.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { return pair[1]; } } return '' }

var msource = getQueryVariable('msource');

if( msource ) {
	// Setting for 20 mins
	createCookie( 'msource', msource, 20 );
}


function onLoadFunction() {
	var msource = readCookie('msource');
	if( msource ) {
		var links = document.links;
		for(var i = 0; i < links.length; i++) {
		    if( links[i] ) {
		    	var link = links[i].href;
		    	if( link.indexOf('mailto:') == -1 && link.indexOf('javascript:') == -1 && unescape(link).indexOf('return false') == -1 && link.indexOf('#') == -1 ) {
					if( link.indexOf('heifer.org') > -1 || link.indexOf('http://') != 0 && link.indexOf('mailto:') > 0) {
						var s = new Array;
						var newLink = link;
						if( link.indexOf('?') > -1 ) {
							var d = link.substring(0, link.indexOf('?') );
							var l = link.substring( link.indexOf('?')+1, link.length);
							var s = l.split('&');
							for(j=0;j<s.length;j++){
								if(s[j].indexOf('msource')>-1){
									s[j] = 'msource='+msource;
									var changed = 1;
								}
							}
							if(changed!=1){
								s[s.length] = 'msource='+msource;
							}
							newLink = d+'?'+s.join('&');
							changed = 0;
							delete changed;
							delete s;
							delete j;
						} else {
							newLink = link+'?msource='+msource;
						}
						links[i].href = newLink;
					}
				}
			}			
		}
		
		var forms = document.forms;
		
		for(var i = 0; i < forms.length; i++) {
		    if( forms[i] ) {
				var link = forms[i].action;
		    	if( link.indexOf('mailto:') == -1 && link.indexOf('javascript:') == -1 && unescape(link).indexOf('return false') == -1 ) {
					var s = new Array;
					var newLink = link;
					var newLink = link;
					if( link.indexOf('?') > -1 ) {
						var d = link.substring(0, link.indexOf('?') );
						var l = link.substring( link.indexOf('?')+1, link.length);
						var s = l.split('&');
						for(j=0;j<s.length;j++){
							if(s[j].indexOf('msource')>-1){
								s[j] = 'msource='+msource;
								var changed = 1;
							}
						}
						if(changed!=1){
							s[s.length] = 'msource='+msource;
						}
						newLink = d+'?'+s.join('&');
						changed = 0;
						delete changed;
						delete s;
						delete j;
					} else {
						newLink = link+'?msource='+msource;
					}
					forms[i].action = newLink;
				}
			}			
		}

	}
}

addLoadListener(onLoadFunction);




/*	ColorBox v1.3.6 */
(function(c){function r(b,d){d=d==="x"?m.width():m.height();return typeof b==="string"?Math.round(b.match(/%/)?d/100*parseInt(b,10):parseInt(b,10)):b}function M(b){b=c.isFunction(b)?b.call(i):b;return a.photo||b.match(/\.(gif|png|jpg|jpeg|bmp)(?:\?([^#]*))?(?:#(\.*))?$/i)}function Y(){for(var b in a)if(c.isFunction(a[b])&&b.substring(0,2)!=="on")a[b]=a[b].call(i);a.rel=a.rel||i.rel;a.href=a.href||i.href;a.title=a.title||i.title}function Z(b){i=b;a=c.extend({},c(i).data(q));Y();if(a.rel&&a.rel!=="nofollow"){g= c(".cboxElement").filter(function(){return(c(this).data(q).rel||this.rel)===a.rel});j=g.index(i);if(j<0){g=g.add(i);j=g.length-1}}else{g=c(i);j=0}if(!B){C=B=n;N=i;N.blur();c(document).bind("keydown.cbox_close",function(d){if(d.keyCode===27){d.preventDefault();e.close()}}).bind("keydown.cbox_arrows",function(d){if(g.length>1)if(d.keyCode===37){d.preventDefault();D.click()}else if(d.keyCode===39){d.preventDefault();E.click()}});a.overlayClose&&s.css({cursor:"pointer"}).one("click",e.close);c.event.trigger(aa); a.onOpen&&a.onOpen.call(i);s.css({opacity:a.opacity}).show();a.w=r(a.initialWidth,"x");a.h=r(a.initialHeight,"y");e.position(0);O&&m.bind("resize.cboxie6 scroll.cboxie6",function(){s.css({width:m.width(),height:m.height(),top:m.scrollTop(),left:m.scrollLeft()})}).trigger("scroll.cboxie6")}P.add(D).add(E).add(t).add(Q).hide();R.html(a.close).show();e.slideshow();e.load()}var q="colorbox",F="hover",n=true,e,x=c.browser.msie&&!c.support.opacity,O=x&&c.browser.version<7,aa="cbox_open",H="cbox_load",S= "cbox_complete",T="resize.cbox_resize",s,k,u,p,U,V,W,X,g,m,l,I,J,K,Q,P,t,E,D,R,y,z,v,w,i,N,j,a,B,C,$={transition:"elastic",speed:350,width:false,height:false,innerWidth:false,innerHeight:false,initialWidth:"400",initialHeight:"400",maxWidth:false,maxHeight:false,scalePhotos:n,scrolling:n,inline:false,html:false,iframe:false,photo:false,href:false,title:false,rel:false,opacity:0.9,preloading:n,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:false,overlayClose:n, slideshow:false,slideshowAuto:n,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:false,onLoad:false,onComplete:false,onCleanup:false,onClosed:false};e=c.fn.colorbox=function(b,d){var h=this;if(!h.length)if(h.selector===""){h=c("<a/>");b.open=n}else return this;h.each(function(){var f=c.extend({},c(this).data(q)?c(this).data(q):$,b);c(this).data(q,f).addClass("cboxElement");if(d)c(this).data(q).onComplete=d});b&&b.open&&Z(h);return this};e.init=function(){function b(d){return c('<div id="cbox'+ d+'"/>')}m=c(window);k=c('<div id="colorbox"/>');s=b("Overlay").hide();u=b("Wrapper");p=b("Content").append(l=b("LoadedContent").css({width:0,height:0}),J=b("LoadingOverlay"),K=b("LoadingGraphic"),Q=b("Title"),P=b("Current"),t=b("Slideshow"),E=b("Next"),D=b("Previous"),R=b("Close"));u.append(c("<div/>").append(b("TopLeft"),U=b("TopCenter"),b("TopRight")),c("<div/>").append(V=b("MiddleLeft"),p,W=b("MiddleRight")),c("<div/>").append(b("BottomLeft"),X=b("BottomCenter"),b("BottomRight"))).children().children().css({"float":"left"}); I=c("<div style='position:absolute; top:0; left:0; width:9999px; height:0;'/>");c("body").prepend(s,k.append(u,I));if(x){k.addClass("cboxIE");O&&s.css("position","absolute")}p.children().bind("mouseover mouseout",function(){c(this).toggleClass(F)}).addClass(F);y=U.height()+X.height()+p.outerHeight(n)-p.height();z=V.width()+W.width()+p.outerWidth(n)-p.width();v=l.outerHeight(n);w=l.outerWidth(n);k.css({"padding-bottom":y,"padding-right":z}).hide();E.click(e.next);D.click(e.prev);R.click(e.close);p.children().removeClass(F); c(".cboxElement").live("click",function(d){if(d.button!==0&&typeof d.button!=="undefined")return n;else{Z(this);return false}})};e.position=function(b,d){function h(A){U[0].style.width=X[0].style.width=p[0].style.width=A.style.width;K[0].style.height=J[0].style.height=p[0].style.height=V[0].style.height=W[0].style.height=A.style.height}var f=m.height();f=Math.max(f-a.h-v-y,0)/2+m.scrollTop();var o=Math.max(document.documentElement.clientWidth-a.w-w-z,0)/2+m.scrollLeft();b=k.width()===a.w+w&&k.height()=== a.h+v?0:b;u[0].style.width=u[0].style.height="9999px";k.dequeue().animate({width:a.w+w,height:a.h+v,top:f,left:o},{duration:b,complete:function(){h(this);C=false;u[0].style.width=a.w+w+z+"px";u[0].style.height=a.h+v+y+"px";d&&d()},step:function(){h(this)}})};e.resize=function(b){function d(){a.w=a.w||l.width();a.w=a.mw&&a.mw<a.w?a.mw:a.w;return a.w}function h(){a.h=a.h||l.height();a.h=a.mh&&a.mh<a.h?a.mh:a.h;return a.h}function f(G){e.position(G,function(){if(B){if(x){A&&l.fadeIn(100);k[0].style.removeAttribute("filter")}if(a.iframe)l.append("<iframe id='cboxIframe'"+ (a.scrolling?" ":"scrolling='no'")+" name='iframe_"+(new Date).getTime()+"' frameborder=0 src='"+a.href+"' "+(x?"allowtransparency='true'":"")+" />");l.show();Q.show().html(a.title);if(g.length>1){P.html(a.current.replace(/\{current\}/,j+1).replace(/\{total\}/,g.length)).show();E.html(a.next).show();D.html(a.previous).show();a.slideshow&&t.show()}J.hide();K.hide();c.event.trigger(S);a.onComplete&&a.onComplete.call(i);a.transition==="fade"&&k.fadeTo(L,1,function(){x&&k[0].style.removeAttribute("filter")}); m.bind(T,function(){e.position(0)})}})}if(B){var o,A,L=a.transition==="none"?0:a.speed;m.unbind(T);if(b){l.remove();l=c('<div id="cboxLoadedContent"/>').html(b);l.hide().appendTo(I).css({width:d(),overflow:a.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(p);c("#cboxPhoto").css({cssFloat:"none"});O&&c("select:not(#colorbox select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("cbox_cleanup",function(){this.style.visibility="inherit"});a.transition=== "fade"&&k.fadeTo(L,0,function(){f(0)})||f(L);if(a.preloading&&g.length>1){b=j>0?g[j-1]:g[g.length-1];o=j<g.length-1?g[j+1]:g[0];o=c(o).data(q).href||o.href;b=c(b).data(q).href||b.href;M(o)&&c("<img />").attr("src",o);M(b)&&c("<img />").attr("src",b)}}else setTimeout(function(){var G=l.wrapInner("<div style='overflow:auto'></div>").children();a.h=G.height();l.css({height:a.h});G.replaceWith(G.children());e.position(L)},1)}};e.load=function(){var b,d,h,f=e.resize;C=n;i=g[j];a=c.extend({},c(i).data(q)); Y();c.event.trigger(H);a.onLoad&&a.onLoad.call(i);a.h=a.height?r(a.height,"y")-v-y:a.innerHeight?r(a.innerHeight,"y"):false;a.w=a.width?r(a.width,"x")-w-z:a.innerWidth?r(a.innerWidth,"x"):false;a.mw=a.w;a.mh=a.h;if(a.maxWidth){a.mw=r(a.maxWidth,"x")-w-z;a.mw=a.w&&a.w<a.mw?a.w:a.mw}if(a.maxHeight){a.mh=r(a.maxHeight,"y")-v-y;a.mh=a.h&&a.h<a.mh?a.h:a.mh}b=a.href;J.show();K.show();if(a.inline){c('<div id="cboxInlineTemp" />').hide().insertBefore(c(b)[0]).bind(H+" cbox_cleanup",function(){c(this).replaceWith(l.children())}); f(c(b))}else if(a.iframe)f(" ");else if(a.html)f(a.html);else if(M(b)){d=new Image;d.onload=function(){var o;d.onload=null;d.id="cboxPhoto";c(d).css({margin:"auto",border:"none",display:"block",cssFloat:"left"});if(a.scalePhotos){h=function(){d.height-=d.height*o;d.width-=d.width*o};if(a.mw&&d.width>a.mw){o=(d.width-a.mw)/d.width;h()}if(a.mh&&d.height>a.mh){o=(d.height-a.mh)/d.height;h()}}if(a.h)d.style.marginTop=Math.max(a.h-d.height,0)/2+"px";f(d);g.length>1&&c(d).css({cursor:"pointer"}).click(e.next); if(x)d.style.msInterpolationMode="bicubic"};d.src=b}else c("<div />").appendTo(I).load(b,function(o,A){A==="success"?f(this):f(c("<p>Request unsuccessful.</p>"))})};e.next=function(){if(!C){j=j<g.length-1?j+1:0;e.load()}};e.prev=function(){if(!C){j=j>0?j-1:g.length-1;e.load()}};e.slideshow=function(){function b(){t.text(a.slideshowStop).bind(S,function(){h=setTimeout(e.next,a.slideshowSpeed)}).bind(H,function(){clearTimeout(h)}).one("click",function(){d();c(this).removeClass(F)});k.removeClass(f+ "off").addClass(f+"on")}var d,h,f="cboxSlideshow_";t.bind("cbox_closed",function(){t.unbind();clearTimeout(h);k.removeClass(f+"off "+f+"on")});d=function(){clearTimeout(h);t.text(a.slideshowStart).unbind(S+" "+H).one("click",function(){b();h=setTimeout(e.next,a.slideshowSpeed);c(this).removeClass(F)});k.removeClass(f+"on").addClass(f+"off")};if(a.slideshow&&g.length>1)a.slideshowAuto?b():d()};e.close=function(){c.event.trigger("cbox_cleanup");a.onCleanup&&a.onCleanup.call(i);B=false;c(document).unbind("keydown.cbox_close keydown.cbox_arrows"); m.unbind(T+" resize.cboxie6 scroll.cboxie6");s.css({cursor:"auto"}).fadeOut("fast");k.stop(n,false).fadeOut("fast",function(){c("#colorbox iframe").attr("src","about:blank");l.remove();k.css({opacity:1});try{N.focus()}catch(b){}c.event.trigger("cbox_closed");a.onClosed&&a.onClosed.call(i)})};e.element=function(){return c(i)};e.settings=$;c(e.init)})(jQuery);

/* Get the value of a cookie with the given name. */
jQuery.cookie = function(name, value, options) {
    if (typeof value != 'undefined') { // name and value given, set cookie
        options = options || {};
        if (value === null) {
            value = '';
            options.expires = -1;
        }
        var expires = '';
        if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
            var date;
            if (typeof options.expires == 'number') {
                date = new Date();
                date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
            } else {
                date = options.expires;
            }
            expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
        }
		options.domain = ".heifer.org";
		// CAUTION: Needed to parenthesize options.path and options.domain
        // in the following expressions, otherwise they evaluate to undefined
        // in the packed version for some reason...
        var path = options.path ? '; path=' + (options.path) : '';
        var domain = options.domain ? '; domain=' + (options.domain) : '';
        var secure = options.secure ? '; secure' : '';
        document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
    } else { // only name given, get cookie
        var cookieValue = null;
        if (document.cookie && document.cookie != '') {
            var cookies = document.cookie.split(';');
            for (var i = 0; i < cookies.length; i++) {
                var cookie = jQuery.trim(cookies[i]);

                if (cookie.substring(0, name.length + 1) == (name + '=')) {
                    cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
                    break;
                }
            }
        }
        return cookieValue;
    }
};
