/* file: s_code.js */
/* SiteCatalyst code version: H.6.
Copyright 1997-2006 Omniture, Inc. 
More info available at http://www.omniture.com */
/* Specify the Report Suite ID(s) to track here */
var s_account="eonscom"
var s=s_gi(s_account)
/************************** CONFIG SECTION **************************/
s.trackDownloadLinks=true
s.linkDownloadFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls"
s.trackExternalLinks=true
s.linkInternalFilters="javascript:,eons.com"
s.trackInlineStats=true
s.linkLeaveQueryString=false
s.linkTrackVars="None"
s.linkTrackEvents="None"
s.cookieDomainPeriods=""
s.fpCookieDomainPeriods=""
s.currencyCode=""
s.charSet=""

/* WARNING: Changing the visitor namespace will cause drastic changes
to how your visitor data is collected.  Changes should only be made
when instructed to do so by your account manager.*/
s.visitorNamespace="eonsinc" 

/* Page Name Plugin Config */
s.siteID=""            // leftmost value in pagename
s.defaultPage="default"       // filename to add when none exists
s.queryVarsList=""     // query parameters to keep
s.pathExcludeDelim=";" // portion of the path to exclude
s.pathConcatDelim=""   // page name component separator
s.pathExcludeList=""   // elements to exclude from the path

/* Form Analysis Config */
s.formList="register"
s.trackFormList=true
s.trackPageName=false
s.useCommerce=true
s.varUsed="eVar8"
s.eventList="event10,event11,event12" //Abandon,Success,Error


/* Plugin Config */
s.usePlugins=true
function s_doPlugins(s) {
	/* Add calls to plugins here */
	/* Plugin Example: Form Analysis v.2.0 */
	s.setupFormAnalysis();
	
    try {
        if (window.form_errors) {
            var errors_split = form_errors.split("||");
            for (var i = 0; i < errors_split.length - 1; i++) {
                s.sendFormEvent('e', 'registration', 'registration', errors_split[i]);
            }
        }
    } catch(err) {
        // well there's no form_errors variable, so don't do anything with it
    }

    /* Count every registration with event1 */
    /* Only honor the r=1 if the referrer is a signup page or a registration page */
    if (s.getQueryParam('r') == '1' && document.referrer && document.referrer.match("eons") && (document.referrer.match("signup") || document.referrer.match("registration"))) {
		s.sendFormEvent('s', 'registration', 'registration');
        s.events=s.events?s.events+',event1':'event1';
    }

	/* Plugin Example: pageName v2.0 */
	if(!s.pageType && !s.pageName)
		s.pageName=s.getPageName();
	

	/* Plugin Example: linkHandler v0.5
	var url=s.linkHandler("name1~filer1|name2~filter2|filter3");
	if(url){
		s.prop1=url;
		s.linkTrackVars="prop1"
	}
	*/

	/* Plugin Example: exitLinkHandler v0.5
	var url=s.exitLinkHandler();
	if(url){
		if(url.indexOf('siteA.com')>-1)
			s.linkName="Partner Site A";
	}
	*/

	/* Plugin Example: downloadLinkHandler v0.5
	var url=s.downloadLinkHandler('pdf');
	if(url){
		s.linkName="PDF Download";
	}
	*/
	
	/* Count every page view with event4 */
	s.events=s.events?s.events+',event4':'event4';
	
}
s.doPlugins=s_doPlugins

/************************** PLUGINS SECTION *************************/
/*
 * Plugin: getQueryParam 2.0 - return query string parameter(s)
 */
s.getQueryParam=new Function("p","d","u",""
+"var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:''+s.wd.loc"
+"ation);u=u=='f'?''+s.gtfs().location:u;while(p){i=p.indexOf(',');i="
+"i<0?p.length:i;t=s.p_gpv(p.substring(0,i),u);if(t)v+=v?d+t:t;p=p.su"
+"bstring(i==p.length?i:i+1)}return v");
s.p_gpv=new Function("k","u",""
+"var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v"
+"=s.pt(q,'&','p_gvf',k)}return v");
s.p_gvf=new Function("t","k",""
+"if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T"
+"rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s."
+"epa(v)}return ''");
/*
 * Plugin: getPageName v2.0 - parse URL and return
 */
s.getPageName=new Function("u",""
+"var s=this,v=u?u:''+s.wd.location,x=v.indexOf(':'),y=v.indexOf('/',"
+"x+4),z=v.indexOf('?'),c=s.pathConcatDelim,e=s.pathExcludeDelim,g=s."
+"queryVarsList,d=s.siteID,n=d?d:'',q=z<0?'':v.substring(z+1),p=v.sub"
+"string(y+1,q?z:v.length);z=p.indexOf('#');p=z<0?p:s.fl(p,z);x=e?p.i"
+"ndexOf(e):-1;p=x<0?p:s.fl(p,x);p+=!p||p[p.length-1]=='/'?s.defaultP"
+"age:'';y=c?c:'/';while(p){x=p.indexOf('/');x=x<0?p.length:x;z=s.fl("
+"p,x);if(!s.pt(s.pathExcludeList,',','p_c',z))n+=n?y+z:z;p=p.substri"
+"ng(x+1)}y=c?c:'?';while(g){x=g.indexOf(',');x=x<0?g.length:x;z=s.fl"
+"(g,x);z=s.pt(q,'&','p_c',z);if(z){n+=n?y+z:z;y=c?c:'&'}g=g.substrin"
+"g(x+1)}return n");
s.p_c=new Function("v","c",""
+"var x=v.indexOf('=');return c.toLowerCase()==v.substring(0,x<0?v.le"
+"ngth:x).toLowerCase()?v:0");
/*
 * Plugin: linkHandler 0.5 - identify and report custom links
 */
s.linkHandler=new Function("p","t",""
+"var s=this,h=s.p_gh(),i,l;t=t?t:'o';if(!h||(s.linkType&&(h||s.linkN"
+"ame)))return '';i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h."
+"substring(0,i);l=s.pt(p,'|','p_gn',h.toLowerCase());if(l){s.linkNam"
+"e=l=='[['?'':l;s.linkType=t;return h;}return '';");
s.p_gn=new Function("t","h",""
+"var i=t?t.indexOf('~'):-1,n,x;if(t&&h){n=i<0?'':t.substring(0,i);x="
+"t.substring(i+1);if(h.indexOf(x.toLowerCase())>-1)return n?n:'[[';}"
+"return 0;");
/*
 * Plugin: exitLinkHandler 0.5 - identify and report exit links
 */
s.exitLinkHandler=new Function("p",""
+"var s=this,h=s.p_gh(),n='linkInternalFilters',i,t;if(!h||(s.linkTyp"
+"e&&(h||s.linkName)))return '';i=h.indexOf('?');t=s[n];s[n]=p?p:t;h="
+"s.linkLeaveQueryString||i<0?h:h.substring(0,i);if(s.lt(h)=='e')s.li"
+"nkType='e';else h='';s[n]=t;return h;");
/*
 * Plugin: downloadLinkHandler 0.5 - identify and report download links
 */
s.downloadLinkHandler=new Function("p",""
+"var s=this,h=s.p_gh(),n='linkDownloadFileTypes',i,t;if(!h||(s.linkT"
+"ype&&(h||s.linkName)))return '';i=h.indexOf('?');t=s[n];s[n]=p?p:t;"
+"if(s.lt(h)=='d')s.linkType='d';else h='';s[n]=t;return h;");
/*
 * Utility Function: p_gh
 */
s.p_gh=new Function(""
+"var s=this;if(!s.eo&&!s.lnk)return '';var o=s.eo?s.eo:s.lnk,y=s.ot("
+"o),n=s.oid(o),x=o.s_oidt;if(s.eo&&o==s.eo){while(o&&!n&&y!='BODY'){"
+"o=o.parentElement?o.parentElement:o.parentNode;if(!o)return '';y=s."
+"ot(o);n=s.oid(o);x=o.s_oidt}}return o.href?o.href:'';");

/*
 * Plugin: Form Analysis 2.0 (Success, Error, Abandonment)
 */
s.setupFormAnalysis=new Function(""
+"var s=this;if(!s.fa){s.fa=new Object;var f=s.fa;f.ol=s.wd.onload;s."
+"wd.onload=s.faol;f.uc=s.useCommerce;f.vu=s.varUsed;f.vl=f.uc?s.even"
+"tList:'';f.tfl=s.trackFormList;f.fl=s.formList;f.va=new Array('',''"
+",'','')}");
s.sendFormEvent=new Function("t","pn","fn","en",""
+"var s=this,f=s.fa;t=t=='s'?t:'e';f.va[0]=pn;f.va[1]=fn;f.va[3]=t=='"
+"s'?'Success':en;s.fasl(t);f.va[1]='';f.va[3]='';");
s.faol=new Function("e",""
+"var s=s_c_il["+s._in+"],f=s.fa,r=true,fo,fn,i,en,t,tf;if(!e)e=s.wd."
+"event;f.os=new Array;if(f.ol)r=f.ol(e);if(s.d.forms&&s.d.forms.leng"
+"th>0){for(i=s.d.forms.length-1;i>=0;i--){fo=s.d.forms[i];fn=fo.name"
+";tf=f.tfl&&s.pt(f.fl,',','ee',fn)||!f.tfl&&!s.pt(f.fl,',','ee',fn);"
+"if(tf){f.os[fn]=fo.onsubmit;fo.onsubmit=s.faos;f.va[1]=fn;f.va[3]='"
+"No Data Entered';for(en=0;en<fo.elements.length;en++){el=fo.element"
+"s[en];t=el.type;if(t&&t.toUpperCase){t=t.toUpperCase();var md=el.on"
+"mousedown,kd=el.onkeydown,omd=md?md.toString():'',okd=kd?kd.toStrin"
+"g():'';if(omd.indexOf('.fam(')<0&&okd.indexOf('.fam(')<0){el.s_famd"
+"=md;el.s_fakd=kd;el.onmousedown=s.fam;el.onkeydown=s.fam}}}}}f.ul=s"
+".wd.onunload;s.wd.onunload=s.fasl;}return r;");
s.faos=new Function("e",""
+"var s=s_c_il["+s._in+"],f=s.fa,su;if(!e)e=s.wd.event;if(f.vu){s[f.v"
+"u]='';f.va[1]='';f.va[3]='';}su=f.os[this.name];return su?su(e):tru"
+"e;");
s.fasl=new Function("e",""
+"var s=s_c_il["+s._in+"],f=s.fa,a=f.va,l=s.wd.location,ip=s.trackPag"
+"eName,p=s.pageName;if(a[1]!=''&&a[3]!=''){a[0]=!p&&ip?l.host+l.path"
+"name:a[0]?a[0]:p;if(!f.uc&&a[3]!='No Data Entered'){if(e=='e')a[2]="
+"'Error';else if(e=='s')a[2]='Success';else a[2]='Abandon'}else a[2]"
+"='';var tp=ip?a[0]+':':'',t3=e!='s'?':('+a[3]+')':'',ym=!f.uc&&a[3]"
+"!='No Data Entered'?tp+a[1]+':'+a[2]+t3:tp+a[1]+t3,ltv=s.linkTrackV"
+"ars,lte=s.linkTrackEvents,up=s.usePlugins;if(f.uc){s.linkTrackVars="
+"ltv=='None'?f.vu+',events':ltv+',events,'+f.vu;s.linkTrackEvents=lt"
+"e=='None'?f.vl:lte+','+f.vl;f.cnt=-1;if(e=='e')s.events=s.pt(f.vl,'"
+",','fage',2);else if(e=='s')s.events=s.pt(f.vl,',','fage',1);else s"
+".events=s.pt(f.vl,',','fage',0)}else{s.linkTrackVars=ltv=='None'?f."
+"vu:ltv+','+f.vu}s[f.vu]=ym;s.usePlugins=false;s.tl(true,'o','Form A"
+"nalysis');s[f.vu]='';s.usePlugins=up}return f.ul&&e!='e'&&e!='s'?f."
+"ul(e):true;");
s.fam=new Function("e",""
+"var s=s_c_il["+s._in+"],f=s.fa;if(!e) e=s.wd.event;var o=s.trackLas"
+"tChanged,et=e.type.toUpperCase(),t=this.type.toUpperCase(),fn=this."
+"form.name,en=this.name,sc=false;if(document.layers){kp=e.which;b=e."
+"which}else{kp=e.keyCode;b=e.button}et=et=='MOUSEDOWN'?1:et=='KEYDOW"
+"N'?2:et;if(f.ce!=en||f.cf!=fn){if(et==1&&b!=2&&'BUTTONSUBMITRESETIM"
+"AGERADIOCHECKBOXSELECT-ONEFILE'.indexOf(t)>-1){f.va[1]=fn;f.va[3]=e"
+"n;sc=true}else if(et==1&&b==2&&'TEXTAREAPASSWORDFILE'.indexOf(t)>-1"
+"){f.va[1]=fn;f.va[3]=en;sc=true}else if(et==2&&kp!=9&&kp!=13){f.va["
+"1]=fn;f.va[3]=en;sc=true}if(sc){nface=en;nfacf=fn}}if(et==1&&this.s"
+"_famd)return this.s_famd(e);if(et==2&&this.s_fakd)return this.s_fak"
+"d(e);");
s.ee=new Function("e","n",""
+"return n&&n.toLowerCase?e.toLowerCase()==n.toLowerCase():false;");
s.fage=new Function("e","a",""
+"var s=this,f=s.fa,x=f.cnt;x=x?x+1:1;f.cnt=x;return x==a?e:'';");


s.vmk="453E31FF"

/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
var s_objectID;function s_c2fe(f){var x='',s=0,e,a,b,c;while(1){e=
f.indexOf('"',s);b=f.indexOf('\\',s);c=f.indexOf("\n",s);if(e<0||(b>=
0&&b<e))e=b;if(e<0||(c>=0&&c<e))e=c;if(e>=0){x+=(e>s?f.substring(s,e):
'')+(e==c?'\\n':'\\'+f.substring(e,e+1));s=e+1}else return x
+f.substring(s)}return f}function s_c2fa(f){var s=f.indexOf('(')+1,e=
f.indexOf(')'),a='',c;while(s>=0&&s<e){c=f.substring(s,s+1);if(c==',')
a+='","';else if(("\n\r\t ").indexOf(c)<0)a+=c;s++}return a?'"'+a+'"':
a}function s_c2f(cc){cc=''+cc;var fc='var f=new Function(',s=
cc.indexOf(';',cc.indexOf('{')),e=cc.lastIndexOf('}'),o,a,d,q,c,f,h,x
fc+=s_c2fa(cc)+',"var s=new Object;';c=cc.substring(s+1,e);s=
c.indexOf('function');while(s>=0){d=1;q='';x=0;f=c.substring(s);a=
s_c2fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(
q){if(h==q&&!x)q='';if(h=='\\')x=x?0:1;else x=0}else{if(h=='"'||h=="'"
)q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)
+'new Function('+(a?a+',':'')+'"'+s_c2fe(c.substring(o+1,e))+'")'
+c.substring(e+1);s=c.indexOf('function')}fc+=s_c2fe(c)+';return s");'
eval(fc);return f}function s_gi(un,pg,ss){var c="function s_c(un,pg,s"
+"s){var s=this;s.wd=window;if(!s.wd.s_c_in){s.wd.s_c_il=new Array;s."
+"wd.s_c_in=0;}s._il=s.wd.s_c_il;s._in=s.wd.s_c_in;s._il[s._in]=s;s.w"
+"d.s_c_in++;s.m=function(m){return (''+m).indexOf('{')<0};s.fl=funct"
+"ion(x,l){return x?(''+x).substring(0,l):x};s.co=function(o){if(!o)r"
+"eturn o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.i"
+"ndexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for"
+"(var p=0;p<x.length;p++)if(('0123456789').indexOf(x.substring(p,p+1"
+"))<0)return 0;return 1};s.rep=function(x,o,n){var i=x.indexOf(o),l="
+"n.length>0?n.length:1;while(x&&i>=0){x=x.substring(0,i)+n+x.substri"
+"ng(i+o.length);i=x.indexOf(o,i+l)}return x};s.ape=function(x){var s"
+"=this,i;x=x?s.rep(escape(''+x),'+','%2B'):x;if(x&&s.charSet&&s.em=="
+"1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>="
+"0){i++;if(('89ABCDEFabcdef').indexOf(x.substring(i,i+1))>=0)return "
+"x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}return x}"
+";s.epa=function(x){var s=this;return x?unescape(s.rep(''+x,'+',' ')"
+"):x};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.ind"
+"exOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s.m(f)?s[f](t,a):f(t,"
+"a);if(r)return r;z+=y+d.length;t=x.substring(z,x.length);t=z<x.leng"
+"th?t:''}return ''};s.isf=function(t,a){var c=a.indexOf(':');if(c>=0"
+")a=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);retu"
+"rn (t!=''&&t==a)};s.fsf=function(t,a){var s=this;if(s.pt(a,',','isf"
+"',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var s"
+"=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.c_d='';s.c_gdf=f"
+"unction(t,a){var s=this;if(!s.num(t))return 1;return 0};s.c_gd=func"
+"tion(){var s=this,d=s.wd.location.hostname,n=s.fpCookieDomainPeriod"
+"s,p;if(!n)n=s.cookieDomainPeriods;if(d&&!s.c_d){n=n?parseInt(n):2;n"
+"=n>2?n:2;p=d.lastIndexOf('.');while(p>=0&&n>1){p=d.lastIndexOf('.',"
+"p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}return s"
+".c_d};s.c_r=function(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,"
+"i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s.epa(c.su"
+"bstring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w"
+"=function(k,v,e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;"
+"l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NONE'){t=(v!=''"
+"?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*100"
+"0))}}if(k&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; pa"
+"th=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()+';':'')+(d?' do"
+"main='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f"
+"){var s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Arra"
+"y;l=s.ehl;for(i=0;i<l.length&&n<0;i++){if(l[i].o==o&&l[i].e==e)n=i}"
+"if(n<0){n=i;l[n]=new Object}x=l[n];x.o=o;x.e=e;f=r?x.b:f;if(r||f){x"
+".b=r?0:o[e];x.o[e]=f}if(x.b){x.o[b]=x.b;return b}return 0};s.cet=fu"
+"nction(f,a,t,o,b){var s=this,r;if(s.apv>=5&&(!s.isopera||s.apv>=7))"
+"eval('try{r=s.m(f)?s[f](a):f(a)}catch(e){r=s.m(t)?s[t](e):t(e)}');e"
+"lse{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s.m(b)?s[b](a):b(a);else"
+"{s.eh(s.wd,'onerror',0,o);r=s.m(f)?s[f](a):f(a);s.eh(s.wd,'onerror'"
+",1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfs"
+"oe=new Function('e','var s=s_c_il['+s._in+'];s.eh(window,\"onerror"
+"\",1);s.etfs=1;var c=s.t();if(c)s.d.write(c);s.etfs=0;return true')"
+";s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=this"
+",p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.ho"
+"st==l.host){s.tfs=p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=func"
+"tion(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet('gtf"
+"sf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.ca=function()"
+"{var s=this,imn='s_i_'+s.fun;if(s.d.images&&s.apv>=3&&(!s.isopera||"
+"s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){s.ios=1;if(!s.d.images[imn]&&(!s."
+"isns||(s.apv<4||s.apv>=5))){s.d.write('<im'+'g name=\"'+imn+'\" hei"
+"ght=1 width=1 border=0 alt=\"\" style=\"display:none\">');if(!s.d.images[imn])s.ios=0}}};s"
+".mr=function(sess,q,ta){var s=this,ns=s.visitorNamespace,unc=s.rep("
+"s.fun,'_','-'),imn='s_i_'+s.fun,im,b,e,rs='http'+(s.ssl?'s':'')+':/"
+"/'+(s.ssl?'metrics':'metric')+'.eons.com/b/ss/'+s.un+'/1/H.6-pdv-"
+"2/'+sess+'?[AQB]&ndh=1'+(q?q:'')+(s.q?s.q:'')+'&[AQE]';if(s.isie&&!"
+"s.ismac){if(s.apv>5.5)rs=s.fl(rs,4095);else rs=s.fl(rs,2047)}if(s.i"
+"os||s.ss){if (!s.ss)s.ca();im=s.wd[imn]?s.wd[imn]:s.d.images[imn];i"
+"f(!im)im=s.wd[imn]=new Image;im.src=rs;if(rs.indexOf('&pe=')>=0&&(!"
+"ta||ta=='_self'||ta=='_top'||(s.wd.name&&ta==s.wd.name))){b=e=new D"
+"ate;while(e.getTime()-b.getTime()<500)e=new Date}return ''}return '"
+"<im'+'g sr'+'c=\"'+rs+'\" width=1 height=1 border=0 alt=\"\">'};s.g"
+"g=function(v){var s=this;return s.wd['s_'+v]};s.glf=function(t,a){i"
+"f(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v"
+")s[t]=v};s.gl=function(v){var s=this;s.pt(v,',','glf',0)};s.gv=func"
+"tion(v){var s=this;return s['vpm_'+v]?s['vpv_'+v]:(s[v]?s[v]:'')};s"
+".havf=function(t,a){var s=this,b=t.substring(0,4),x=t.substring(4),"
+"n=parseInt(x),k='g_'+t,m='vpm_'+t,q=t,v=s.linkTrackVars,e=s.linkTra"
+"ckEvents;s[k]=s.gv(t);if(s.lnk||s.eo){v=v?v+','+s.vl_l:'';if(v&&!s."
+"pt(v,',','isf',t))s[k]='';if(t=='events'&&e)s[k]=s.fs(s[k],e)}s[m]="
+"0;if(t=='pageURL')q='g';else if(t=='referrer')q='r';else if(t=='vmk"
+"')q='vmt';else if(t=='charSet'){q='ce';if(s[k]&&s.em==2)s[k]='UTF-8"
+"'}else if(t=='visitorNamespace')q='ns';else if(t=='cookieDomainPeri"
+"ods')q='cdp';else if(t=='cookieLifetime')q='cl';else if(t=='variabl"
+"eProvider')q='vvp';else if(t=='currencyCode')q='cc';else if(t=='cha"
+"nnel')q='ch';else if(t=='campaign')q='v0';else if(s.num(x)) {if(b=="
+"'prop')q='c'+n;else if(b=='eVar')q='v'+n;else if(b=='hier'){q='h'+n"
+";s[k]=s.fl(s[k],255)}}if(s[k]&&t!='linkName'&&t!='linkType')s.qav+="
+"'&'+q+'='+s.ape(s[k]);return ''};s.hav=function(){var s=this;s.qav="
+"'';s.pt(s.vl_t,',','havf',0);return s.qav};s.lnf=function(t,h){t=t?"
+"t.toLowerCase():'';h=h?h.toLowerCase():'';var te=t.indexOf('=');if("
+"t&&te>0&&h.indexOf(t.substring(te+1))>=0)return t.substring(0,te);r"
+"eturn ''};s.ln=function(h){var s=this,n=s.linkNames;if(n)return s.p"
+"t(n,',','lnf',h);return ''};s.ltdf=function(t,h){t=t?t.toLowerCase("
+"):'';h=h?h.toLowerCase():'';var qi=h.indexOf('?');h=qi>=0?h.substri"
+"ng(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t)return 1"
+";return 0};s.ltef=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowe"
+"rCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h"
+"){var s=this,lft=s.linkDownloadFileTypes,lef=s.linkExternalFilters,"
+"lif=s.linkInternalFilters;lif=lif?lif:s.wd.location.hostname;h=h.to"
+"LowerCase();if(s.trackDownloadLinks&&lft&&s.pt(lft,',','ltdf',h))re"
+"turn 'd';if(s.trackExternalLinks&&(lef||lif)&&(!lef||s.pt(lef,',','"
+"ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';return ''};s."
+"lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick"
+"\");s.lnk=s.co(this);s.t();s.lnk=0;if(b)return this[b](e);return tr"
+"ue');s.bc=new Function('e','var s=s_c_il['+s._in+'],f;if(s.d&&s.d.a"
+"ll&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.targe"
+"t;eval(\"try{if(s.eo&&(s.eo.tagName||s.eo.parentElement||s.eo.paren"
+"tNode))s.t()}catch(f){}\");s.eo=0');s.ot=function(o){var a=o.type,b"
+"=o.tagName;return (a&&a.toUpperCase?a:b&&b.toUpperCase?b:o.href?'A'"
+":'').toUpperCase()};s.oid=function(o){var s=this,t=s.ot(o),p=o.prot"
+"ocol,c=o.onclick,n='',x=0;if(!o.s_oid){if(o.href&&(t=='A'||t=='AREA"
+"')&&(!c||!p||p.toLowerCase().indexOf('javascript')<0))n=o.href;else"
+" if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t"
+"\",''),' ','');x=2}else if(o.value&&(t=='INPUT'||t=='SUBMIT')){n=o."
+"value;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,10"
+"0);o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e=t."
+"indexOf('='),u=e>=0?','+t.substring(0,e)+',':'';return u&&u.indexOf"
+"(','+un+',')>=0?s.epa(t.substring(e+1)):''};s.rq=function(un){var s"
+"=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'"
+"&','rqf',un);return s.pt(un,',','rq',0)};s.sqp=function(t,a){var s="
+"this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';"
+"if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function"
+"(un,q){var s=this;s.squ[un]=q;return 0};s.sq=function(q){var s=this"
+",k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq["
+"q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.sq"
+"u)s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&"
+"s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq[x]+'='+s.ape(x);c++}retu"
+"rn s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r="
+"true,b=s.eh(s.wd,\"onload\"),i,o,oc;if(b)r=this[b](e);for(i=0;i<s.d"
+".links.length;i++){o=s.d.links[i];oc=o.onclick?\"\"+o.onclick:\"\";"
+"if((oc.indexOf(\"s_gs(\")<0||oc.indexOf(\".s_oc(\")>=0)&&oc.indexOf"
+"(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=function("
+"){var s=this;if(s.apv>3&&(!s.isie||!s.ismac||s.apv>=5)){if(s.b&&s.b"
+".attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEv"
+"entListener)s.b.addEventListener('click',s.bc,false);else s.eh(s.wd"
+",'onload',0,s.wdl)}};s.vs=function(x){var s=this,v=s.visitorSamplin"
+"g,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),"
+"e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=1"
+"00;if(!n){if(!s.c_w(k,x,e))return 0;n=x}if(n%10000>v)return 0}retur"
+"n 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;retur"
+"n 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if("
+"i>=0&&m){var n=t.substring(0,i),x=t.substring(i+1);if(s.pt(x,',','d"
+"yasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynami"
+"cAccountSelection,l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,"
+"i;s.un.toLowerCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLo"
+"werCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dy"
+"asf',m);if(n)s.un=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substri"
+"ng(0,i)};s.t=function(){var s=this,trk=1,tm=new Date,sed=Math&&Math"
+".random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess="
+"'s'+Math.floor(tm.getTime()/10800000)%10+sed,yr=tm.getYear(),vt=tm."
+"getDate()+'/'+tm.getMonth()+'/'+(yr<1900?yr+1900:yr)+' '+tm.getHour"
+"s()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm."
+"getTimezoneOffset(),tfs=s.gtfs(),ta='',q='',qs='';s.uns();if(!s.q){"
+"var tl=tfs.location,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w"
+"('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(s.apv>=4)x=screen."
+"width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){j='1.1';"
+"v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){j='1.2';c=screen.pixelDept"
+"h;bw=s.wd.innerWidth;bh=s.wd.innerHeight;if(s.apv>=4.06)j='1.3'}}s."
+"pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y'"
+":'N';j='1.2';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElemen"
+"t.offsetWidth;bh=s.d.documentElement.offsetHeight;j='1.3';if(!s.ism"
+"ac&&s.b){s.b.addBehavior('#default#homePage');hp=s.b.isHomePage(tl)"
+"?\"Y\":\"N\";s.b.addBehavior('#default#clientCaps');ct=s.b.connecti"
+"onType}}}else r=''}if(s.pl)while(pn<s.pl.length&&pn<30){ps=s.fl(s.p"
+"l[pn].name,100)+';';if(p.indexOf(ps)<0)p+=ps;pn++}s.q=(x?'&s='+s.ap"
+"e(x):'')+(c?'&c='+s.ape(c):'')+(j?'&j='+j:'')+(v?'&v='+v:'')+(k?'&k"
+"='+k:'')+(bw?'&bw='+bw:'')+(bh?'&bh='+bh:'')+(ct?'&ct='+s.ape(ct):'"
+"')+(hp?'&hp='+hp:'')+(p?'&p='+s.ape(p):'')}if(s.usePlugins)s.doPlug"
+"ins(s);var l=s.wd.location,r=tfs.document.referrer;if(!s.pageURL)s."
+"pageURL=s.fl(l?l:'',255);if(!s.referrer)s.referrer=s.fl(r?r:'',255)"
+";if(s.lnk||s.eo){var o=s.eo?s.eo:s.lnk;if(!o)return '';var p=s.gv('"
+"pageName'),w=1,t=s.ot(o),n=s.oid(o),x=o.s_oidt,h,l,i,oc;if(s.eo&&o="
+"=s.eo){while(o&&!n&&t!='BODY'){o=o.parentElement?o.parentElement:o."
+"parentNode;if(!o)return '';t=s.ot(o);n=s.oid(o);x=o.s_oidt}oc=o.onc"
+"lick?''+o.onclick:'';if((oc.indexOf(\"s_gs(\")>=0&&oc.indexOf(\".s_"
+"oc(\")<0)||oc.indexOf(\".tl(\")>=0)return ''}ta=n?o.target:1;h=o.hr"
+"ef?o.href:'';i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.sub"
+"string(0,i);l=s.linkName?s.linkName:s.ln(h);t=s.linkType?s.linkType"
+".toLowerCase():s.lt(h);if(t&&(h||l))q+='&pe=lnk_'+(t=='d'||t=='e'?s"
+".ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');else"
+" trk=0;if(s.trackInlineStats){if(!p){p=s.gv('pageURL');w=0}t=s.ot(o"
+");i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}i"
+"f(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s"
+".ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot='+s.ape(t)+(i?'&oi='+i:'')"
+"}}if(!trk&&!qs)return '';var code='';if(trk&&s.vs(sed))code=s.mr(se"
+"ss,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq(s.un)),ta);s.sq(tr"
+"k?'':qs);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID='';return"
+" code};s.tl=function(o,t,n){var s=this;s.lnk=s.co(o);s.linkType=t;s"
+".linkName=n;s.t()};s.ssl=(s.wd.location.protocol.toLowerCase().inde"
+"xOf('https')>=0);s.d=document;s.b=s.d.body;s.n=navigator;s.u=s.n.us"
+"erAgent;s.ns6=s.u.indexOf('Netscape6/');var apn=s.n.appName,v=s.n.a"
+"ppVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.inde"
+"xOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet E"
+"xplorer');s.isns=(apn=='Netscape');s.isopera=(apn=='Opera');s.ismac"
+"=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6)"
+");else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s.ap"
+"v=parseFloat(i)}else if(s.ns6>0)s.apv=parseFloat(s.u.substring(s.ns"
+"6+10));else s.apv=parseFloat(v);s.em=0;if(String.fromCharCode){i=es"
+"cape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i"
+"=='%U0100'?1:0))}s.un=un;s.uns();s.vl_l='vmk,charSet,visitorNamespa"
+"ce,cookieDomainPeriods,cookieLifetime,pageName,pageURL,referrer,cur"
+"rencyCode,purchaseID';s.vl_t=s.vl_l+',variableProvider,channel,serv"
+"er,pageType,campaign,state,zip,events,products,linkName,linkType';f"
+"or(var n=1;n<51;n++)s.vl_t+=',prop'+n+',eVar'+n+',hier'+n;s.vl_g=s."
+"vl_t+',trackDownloadLinks,trackExternalLinks,trackInlineStats,linkL"
+"eaveQueryString,linkDownloadFileTypes,linkExternalFilters,linkInter"
+"nalFilters,linkNames';if(pg)s.gl(s.vl_g);s.ss=ss;if(!ss){s.wds();s."
+"ca()}}",
l=window.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf(
'MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(l)for(i=0;i<l.length;i++){
s=l[i];s.uns();if(s.un==un)return s;else if(s.pt(s.un,',','isf',un)){
s=s.co(s);s.un=un;s.uns();return s}}if(e>0){a=parseInt(i=v.substring(e
+5));if(a>3)a=parseFloat(i)}else if(m>0)a=parseFloat(u.substring(m+10)
);else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf(
'Opera')<0){eval(c);return new s_c(un,pg,ss)}else s=s_c2f(c);return s(
un,pg,ss)}
/* file: functions.js */
// This was previously in js_hide.css, but we don't need to make a new connection for it
document.writeln('');
document.writeln('<style type="text/css">');
document.writeln('/*These are the style rules that execute if the browser  has javascript enabled.*/');
document.writeln('/*Eons ones*/');
document.writeln('.cranky_category_list, #cont-sharelist, .cont-setdate, #change_location, #f-attachphoto,  #addgoal,   #calendarpicker, #f-comments, #help-disambig  {');
document.writeln('	display: none;');
document.writeln('	}');
document.writeln('/*Eons non production ones?*/');
document.writeln('#sent, #f-cont-catforgoal {display:none}  ');
document.writeln('</style> ');

//hideshow any target ID 
function targetHideShow (contId,newStyle,oldStyle) {
    var styleObject = document.getElementById(contId).style;
	
	if (styleObject.display == newStyle) {
				styleObject.display = oldStyle;
			} 
		
			else {
				styleObject.display = newStyle; 
				 
			}  
			
}

// ----------------------------------------------------------------
// create pop-up window by giving your anchor tag class="popup" - no other action needed

function createPopupOpener(width,height) {
  return function() {
    window.open(this.href, "", "top=40,left=40,width="+width+",height="+height+",resizable=yes,scrollbars=yes,toolbar=yes");
    return false;
  } 
}

// ----------------------------------------------------------------
// a Toggle method that doesn't rely on prototype.js

function displayToggle(id) {
  var el = document.getElementById(id).style; 
  if(el.display == "none") {
    el.display = "block";  
  }
  else if(el.display == "block") {
    el.display = "none";
  }
}

// ----------------------------------------------------------------
// a Toggle method that doesn't rely on prototype.js

function visibilityToggle(id) {
 var el = document.getElementById(id).style;
 if(el.visibility == "hidden") {
 el.visibility = "visible";
 }
 else if(el.visibility == "visible") {
 el.visibility = "hidden";
 }
}


// this function needs to load before any window.onload assignments
// call it before each window.onload assignment in other scripts
function getOLs(){
if(typeof window.onload=='function'){ // test to see if onload has been set
if(typeof ol_ol=='undefined')ol_ol=new Array(); // test if array variable already exists
ol_ol.push(window.onload); // this captures any previous onload function
}
}


function doPopups() {
  if (!document.getElementsByTagName) return false;
  var links=document.getElementsByTagName("a");
  linkRE = new RegExp(/popup(?:(\d+)x(\d+))?/);
  for (var i=0; i < links.length; i++) {   
    if (match = linkRE.exec(links[i].className)) {
      var width  = match[1] ? isNaN(match[1]) ? 500 : match[1] : 500
      var height = match[2] ? isNaN(match[2]) ? 625 : match[2] : 625
      var f = createPopupOpener(width,height)
      links[i].onclick=f
    } 
  } 
} 

getOLs();
window.onload=doPopups;

// document.onload=doPopups;

// You open the popup by assigning class="popup" to the anchor tag 
// like this:  <a href="http://www.gullbuy.com" class="popup">Search 
// By Name</a></li>
//
// To specify a different size, specify widthxheight after the word popup, e.g.
// class="popup300x200" will open up a popup window with a width of 300 pixels
// and a height of 200 pixels.

// END pop-up window script -------------------------------------------


// Start old Textarea character counter

    function countCharacters(textArea, counterField, maxLength){
		counterField = document.getElementById(counterField);
		textArea = document.getElementById(textArea);
      if(textArea !=null && textArea.value != null) {
            if (textArea.value.length > maxLength){
                    alert("Your message may not exceed " +  maxLength + " characters in length.");
                    textArea.value = textArea.value.substring( 0, maxLength);
            } else {
                    counterField.innerHTML = maxLength - textArea.value.length;
            }
    }
    }

//  Here is an example showing how to call this function in a textarea
// <textarea id="anyIDforTextarea" name="" onkeyup="countCharacters('anyIDforTextarea', 'anyIDforCounter',160)" 
// maxlength="160" wrap="physical"></textarea>
// <span class="textareacounter"><span id="anyIDforCounter">160</span> characters remaining</spsn>


//Start new Textarea character counter -------------------------------------
// TODO: make sure counter is set correctly initially once we can edit captions
		function countChars(textArea, counterField)
		{
			textArea = $(textArea);
			maxLength = parseInt(textArea.getAttribute('maxlength'));
			if (textArea.value.length > maxLength)
			{
				alert("Your message may not exceed " +  maxLength + " characters in length.");
				textArea.value = textArea.value.substring(0, maxLength);
			}
			$(counterField).innerHTML = maxLength - textArea.value.length;
		}
//	<textarea cols="60" id="description" maxlength="300" name="description" onkeyup="countChars(this, 'message-counter');" rows="5"></textarea>
// <span class="textareacounter"><span id="message-counter">300</span> characters remaining</span>


// Script to load flash movies without the object or embed tags (so the pages can validate)

/**
 * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",false);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;


// ---------------------------------------------------------------------
// to randomly change the logo on the pages every 30 seconds
/* ROTATING LOGOS ARE OUT!!! per trac # 8952 
getOLs();
window.onload=function() { rollImage(53); }

function pickRandom(range) 
{ 
	return num = Math.floor( Math.random() * (range + 1));
}

function rollImage( image_total_number ){
		var delay = 30000;
		var myimage = document.getElementById( 'eons-main-logo');
		if (myimage) { 
            var val =  pickRandom(image_total_number) ;
		    myimage.src = "/glb/g/logos/" + val + ".gif"; 
		    setTimeout( 'rollImage('+ image_total_number +')' , delay );
        }
}
*/

// ------------------------------------------------------------------------
// style sheet switcher

function setActiveStyleSheet(title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == title) a.disabled = false;
    }
  }
}

function getActiveStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") && !a.disabled) return a.getAttribute("title");
  }
  return null;
}

function getPreferredStyleSheet() {
  var i, a;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1
       && a.getAttribute("rel").indexOf("alt") == -1
       && a.getAttribute("title")
       ) return a.getAttribute("title");
  }
  return null;
}

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  domain_string = this.domain ? "; domain="+this.domain : ""; 
  document.cookie = name+"="+value+expires+"; path=/"+domain_string;
}

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,path,domain) {
    if (readCookie(name)) {
        document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
    }
}


// QUERY STRING PARSER
//  returns hash with key/value pairs
function parseQueryString ( myURL )
{
    var query = myURL.replace(/^[^\?]+\??/,'');
    var Params = new Object ();
    if ( ! query ) return Params; // return empty object
    var Pairs = query.split(/[;&]/);
    for ( var i = 0; i < Pairs.length; i++ ) {
        var KeyVal = Pairs[i].split('=');
        if ( ! KeyVal || KeyVal.length != 2 ) continue;
        var key = unescape( KeyVal[0] );
        var val = unescape( KeyVal[1] );
        val = val.replace(/\+/g, ' ');
        Params[key] = val;
    }
    return Params;
}


// BASE64 STUFF
// DON'T DELETE BASE64 STUFF - this is needed by the ad code. thanks! -chris
function urlDecode(str){
    str=str.replace(new RegExp('\\+','g'),' ');
    return unescape(str);
}
function urlEncode(str){
    str=escape(str);
    str=str.replace(new RegExp('\\+','g'),'%2B');
    return str.replace(new RegExp('%20','g'),'+');
}

var END_OF_INPUT = -1;

var base64Chars = new Array(
    'A','B','C','D','E','F','G','H',
    'I','J','K','L','M','N','O','P',
    'Q','R','S','T','U','V','W','X',
    'Y','Z','a','b','c','d','e','f',
    'g','h','i','j','k','l','m','n',
    'o','p','q','r','s','t','u','v',
    'w','x','y','z','0','1','2','3',
    '4','5','6','7','8','9','+','/'
);

var reverseBase64Chars = new Array();
for (var i=0; i < base64Chars.length; i++){
    reverseBase64Chars[base64Chars[i]] = i;
}

var base64Str;
var base64Count;
function setBase64Str(str){
    base64Str = str;
    base64Count = 0;
}
function readBase64(){    
    if (!base64Str) return END_OF_INPUT;
    if (base64Count >= base64Str.length) return END_OF_INPUT;
    var c = base64Str.charCodeAt(base64Count) & 0xff;
    base64Count++;
    return c;
}
function encodeBase64(str){
    setBase64Str(str);
    var result = '';
    var inBuffer = new Array(3);
    var lineCount = 0;
    var done = false;
    while (!done && (inBuffer[0] = readBase64()) != END_OF_INPUT){
        inBuffer[1] = readBase64();
        inBuffer[2] = readBase64();
        result += (base64Chars[ inBuffer[0] >> 2 ]);
        if (inBuffer[1] != END_OF_INPUT){
            result += (base64Chars [(( inBuffer[0] << 4 ) & 0x30) | (inBuffer[1] >> 4) ]);
            if (inBuffer[2] != END_OF_INPUT){
                result += (base64Chars [((inBuffer[1] << 2) & 0x3c) | (inBuffer[2] >> 6) ]);
                result += (base64Chars [inBuffer[2] & 0x3F]);
            } else {
                result += (base64Chars [((inBuffer[1] << 2) & 0x3c)]);
                result += ('=');
                done = true;
            }
        } else {
            result += (base64Chars [(( inBuffer[0] << 4 ) & 0x30)]);
            result += ('=');
            result += ('=');
            done = true;
        }
        lineCount += 4;
        if (lineCount >= 76){
            result += ('\n');
            lineCount = 0;
        }
    }
    return result;
}
function readReverseBase64(){   
    if (!base64Str) return END_OF_INPUT;
    while (true){      
        if (base64Count >= base64Str.length) return END_OF_INPUT;
        var nextCharacter = base64Str.charAt(base64Count);
        base64Count++;
        if (reverseBase64Chars[nextCharacter]){
            return reverseBase64Chars[nextCharacter];
        }
        if (nextCharacter == 'A') return 0;
    }
    return END_OF_INPUT;
}

function ntos(n){
    n=n.toString(16);
    if (n.length == 1) n="0"+n;
    n="%"+n;
    return unescape(n);
}

function decodeBase64(str){
    setBase64Str(str);
    var result = "";
    var inBuffer = new Array(4);
    var done = false;
    while (!done && (inBuffer[0] = readReverseBase64()) != END_OF_INPUT
        && (inBuffer[1] = readReverseBase64()) != END_OF_INPUT){
        inBuffer[2] = readReverseBase64();
        inBuffer[3] = readReverseBase64();
        result += ntos((((inBuffer[0] << 2) & 0xff)| inBuffer[1] >> 4));
        if (inBuffer[2] != END_OF_INPUT){
            result +=  ntos((((inBuffer[1] << 4) & 0xff)| inBuffer[2] >> 2));
            if (inBuffer[3] != END_OF_INPUT){
                result +=  ntos((((inBuffer[2] << 6)  & 0xff) | inBuffer[3]));
            } else {
                done = true;
            }
        } else {
            done = true;
        }
    }
    return result;
}

var digitArray = new Array('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');
function toHex(n){
    var result = ''
    var start = true;
    for (var i=32; i>0;){
        i-=4;
        var digit = (n>>i) & 0xf;
        if (!start || digit != 0){
            start = false;
            result += digitArray[digit];
        }
    }
    return (result==''?'0':result);
}

function pad(str, len, pad){
    var result = str;
    for (var i=str.length; i<len; i++){
        result = pad + result;
    }
    return result;
}

function encodeHex(str){
    var result = "";
    for (var i=0; i<str.length; i++){
        result += pad(toHex(str.charCodeAt(i)&0xff),2,'0');
    }
    return result;
}

function decodeHex(str){
    str = str.replace(new RegExp("s/[^0-9a-zA-Z]//g"));
    var result = "";
    var nextchar = "";
    for (var i=0; i<str.length; i++){
        nextchar += str.charAt(i);
        if (nextchar.length == 2){
            result += ntos(eval('0x'+nextchar));
            nextchar = "";
        }
    }
    return result;
    
}
// END BASE64 STUFF
 

// display 'online' now graphic
function online_icon(uid) {
	if (typeof( window['online_members'] ) != "undefined" ) {
	    if (online_members.match(","+uid+",")) {
	        return ' <img src="/glb/g/online.gif" alt="Online" title="Online" class="online" /> ';
		}
    }
	return '';
}

// js approximation of Rails' function via Typo
function distance_of_time_in_words(minutes) {
	if (minutes.isNaN) return "";
	minutes = Math.abs(minutes);
	if (minutes < 1) return ('less than a minute');
	if (minutes < 2) return ('1 minute');
	if (minutes < 50) return (minutes + ' minutes');
	if (minutes < 90) return ('about 1 hour');
	if (minutes < 1080) return (Math.round(minutes / 60) + ' hours');
	if (minutes < 1440) return ('1 day');
	if (minutes < 2880) return ('about 1 day');
	else return (Math.round(minutes / 1440) + ' days')
}

// used by js_distance_of_time_in_words
function get_local_time_for_date(time) {
  system_date = new Date(time);
  user_date = new Date();
  delta_minutes = Math.floor((user_date - system_date) / (60 * 1000));
  if (Math.abs(delta_minutes) <= (52*7*24*60)) { // 1 year
    distance = distance_of_time_in_words(delta_minutes);
    if (delta_minutes < 0) {
      return distance + ' from now';
    } else {
      return distance + ' ago';
    }
  } else {
    return 'on ' + system_date.toLocaleDateString();
  }
}

// TERSE VERSION of js approximation of Rails' function via Typo
function distance_of_time_in_words_terse(minutes) {
	if (minutes.isNaN) return "";
	minutes = Math.abs(minutes);
	if (minutes < 1) return ('< 1 min.');
	if (minutes < 2) return ('1 minute');
	if (minutes < 50) return (minutes + ' mins.');
	if (minutes < 90) return ('> 1 hour');
	if (minutes < 1080) return (Math.round(minutes / 60) + ' hrs.');
	if (minutes < 1440) return ('1 day');
	if (minutes < 2880) return ('> 1 day');
	else return (Math.round(minutes / 1440) + ' days')
}

// TERSE VERSION used by js_distance_of_time_in_words
function get_local_time_for_date_terse(time) {
  system_date = new Date(time);
  user_date = new Date();
  delta_minutes = Math.floor((user_date - system_date) / (60 * 1000));
  if (Math.abs(delta_minutes) <= (52*7*24*60)) { // 1 year
    distance = distance_of_time_in_words_terse(delta_minutes);
    if (delta_minutes < 0) {
      return distance + ' from now';
    } else {
      return distance + ' ago';
    }
  } else {
    return 'on ' + system_date.toLocaleDateString();
  }
}

// more time goodness from Typo
function show_dates_as_local_time() {
  var spans = document.getElementsByTagName('span');
  for (var i=0; i<spans.length; i++) {
    if (spans[i].className.match(/\bcontent_date\b/i)) {
      spans[i].innerHTML = get_local_time_for_date(spans[i].title);
    }
  }
}

function trkr(server) {
  o_trk = readCookie('trk');
  t_trk = new Date().getTime();
  trk_d = 0;
  if (o_trk != null) {
    trk_d = t_trk - o_trk;
  }
  if (o_trk == null || trk_d > 300000) { //  5*60*1000 = 300000 = 5 mins //
    r = Math.round(10000*Math.random());
    createCookie('trk', t_trk)
    document.write('<script type="text/javascript" src="'+server+'/trk/o?'+r+'"><\/script>');
  }
}

function updateAllSpansFirstLinkText(spanName, newText) {
  $$('span.'+spanName).each(function(x){
    Element.firstDescendant(x).innerHTML=newText;
  });
}

function flashAllSpans(spanName) {
  $$('span.'+spanName).each(function(x){
    new Effect.Highlight(x);
  });
}


function getXMLHttpRequest(){
  try { return new XMLHttpRequest(); } catch (e) {}
  try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch (e) {}
  try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch (e) {}
  return null;
}

function sendXMLHttpRequest(url, message, method, async){
  var request = getXMLHttpRequest();
  if (!request) return false;
  if (!url) return false;
  if (!message) message = null;
  if (!method) method = "GET"
  if (!async) async = false;
  try {
    request.open(method, url, async);
    if (method == "POST") 
      request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    request.send(message);
    return true;
  } catch (e) {
    return false;
  }
}

// cranky searchbar: change textr on submit button depedning on what is chosen 

getOLs();
window.onload=function(){
  if (document.getElementById("search_web")) {
    document.getElementById("search_web").onclick=function() {	
      document.getElementById('search_button').value='Search the Web';
    }
  }
  if (document.getElementById("search_eons")) {
    document.getElementById("search_eons").onclick=function() {
      document.getElementById('search_button').value='Search Eons';
    }
  }
}

// HACK: Create empty handler to prevent last one from being knocked off.
getOLs();
window.onload=function(){
}



/*

Tabbed content (non-prototype version)

*/


getOLs();
window.onload=function(){
  if( document.getElementById &&
    document.getElementsByTagName ){
      if( document.getElementsByTagName('ul') ){
        my_tabs = document.getElementsByTagName('ul');
        for( var i=0; i < my_tabs.length; i++ ){
          if (my_tabs[i].className == 'tabs'){
            var links = my_tabs[i].getElementsByTagName( 'a' );
            for( var j=0; j < links.length; j++ ){
              links[j].onclick = function(){
                var tab_group = this.parentNode.parentNode.getElementsByTagName('a');
                for( var k=0; k < tab_group.length; k++){
                  if (tab_group[k].className == 'active'){
                    tab_content = document.getElementById(tab_group[k].href.split('#')[1]);
                    tab_content.style.display = 'none';
                    tab_group[k].className = '';
                  }
                };
                this.className = 'active';
                document.getElementById(this.href.split('#')[1]).style.display = '';
                return false;
              };
            };
          };
        };
      };
      post_hash = document.location.href.split('#')[1];
      if( post_hash ){
        select_tab = document.getElementById(post_hash);
        if( select_tab ){
          select_tab.style.display = ''; /* show it */
          /* now we look at the sibling parents to the left of the tree */
          if( select_tab.previousSibling ){
            previous = select_tab.previousSibling;
            while( previous.className != "tabs" && previous.previousSibling ){
              previous=previous.previousSibling;
            }
            /* did we find some tabs? */
            if( previous && previous.className == "tabs"){
              var tab_group = previous.getElementsByTagName('a');
              for( var k=0; k < tab_group.length; k++){
                if (tab_group[k].className == 'active'){
                  tab_content = document.getElementById(tab_group[k].href.split('#')[1]);
                  tab_content.style.display = 'none';
                  tab_group[k].className = '';
                }
                if( tab_group[k].href.split('#')[1] == post_hash ){
                  tab_group[k].className = 'active';
                }
              };
              return false;
            }
          }
        }
      }
  };
}

/*

end of tabbed content

*/


function go_rate(uid) {
	var x = document.getElementById('tabs');
	if (x != null) {
	  tabs = x.getElementsByTagName('li');
	  for( var i=0; i < tabs.length; i++ ){
	    if (tabs[i].childNodes[0].className == 'active'){
	      return_url = encodeURIComponent(tabs[i].childNodes[0].href);
	    }
	  }
	}else {
		return_url = encodeURI(document.location);
	}
	document.location = community+'/toprated/rate/'+uid+'?type=thumbup&return_url='+return_url;
}
/* file: metrics.js */

// QUERY STRING PARSER
//  returns hash with key/value pairs
// This should be included in functions.js above this file, but for some reason campaigns don't always get set
function parseQueryString ( myURL )
{
    var query = myURL.replace(/^[^\?]+\??/,'');
    var Params = new Object ();
    if ( ! query ) return Params; // return empty object
    var Pairs = query.split(/[;&]/);
    for ( var i = 0; i < Pairs.length; i++ ) {
        var KeyVal = Pairs[i].split('=');
        if ( ! KeyVal || KeyVal.length != 2 ) continue;
        var key = unescape( KeyVal[0] );
        var val = unescape( KeyVal[1] );
        val = val.replace(/\+/g, ' ');
        Params[key] = val;
    }
    return Params;
}

// Same thing applies to createCookie
function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = "; expires="+date.toGMTString();
  }
  else expires = "";
  domain_string = this.domain ? "; domain="+this.domain : ""; 
  document.cookie = name+"="+value+expires+"; path=/"+domain_string;
}

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,path,domain) {
    if (readCookie(name)) {
        document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
    }
}


/* SiteCatalyst Code 
Copyright 1997-2005 Omniture, Inc. 
More info available at http://www.omniture.com */
/* SiteCatalyst Variables */

var prop_map=new Array();
prop_map["page_name"]=			"pageName";	// Omniture sets default to URL
prop_map["channel"]=			"channel";	// default set to server portion of domain
prop_map["server"]=				"server"; 	// not used
prop_map["page_type"]=			"pageType";	// not used
prop_map["sub_channel_1"]=		"prop1";	
prop_map["sub_channel_2"]=		"prop2";
prop_map["sub_channel_3"]=		"prop3";
prop_map["cms_author"]=			"prop4";
prop_map["cms_article"]=		"prop5";
prop_map["user_id"]=			"prop6";	// default set to data from cookie
prop_map["partner"]=			"prop7";
prop_map["logged_in"]=			"prop8";
prop_map["uuid"]=			    "prop9";
prop_map["account_type"]=		"prop10";
prop_map["hierarchy"]=			"hier1";	// default set to channel and sub_channels
prop_map["campaign"]=			"campaign";
prop_map["internal_campaign"]=	"eVar1";
prop_map["search_term"]=		"eVar2";
prop_map["tool_use"]=			"eVar3";
prop_map["user_id_eVar"]=		"eVar4";
prop_map["new_return_visitor"]=	"eVar5";
prop_map["question"]=			"eVar6";
prop_map["game"]=				"eVar7";
prop_map["form_analysis"]=		"eVar8";
prop_map["uuid_eVar"]=		    "eVar9";
prop_map["account_type_eVar"]=	"eVar10";

var event_map=new Array();
event_map["registration_event"]=	"event1";
event_map["email_registration_event"]= "event2";
event_map["subscription_event"]=	"event3";
event_map["page_view_event"]=		"event4"; 	// Omniture sets
event_map["tool_use_event"]=		"event5";
event_map["keep_logged_in_event"]= 	"event6";
event_map["answered_question_event"]= 	"event7";
event_map["skipped_question_event"]="event8";
event_map["asked_question_event"]= 	"event9";
event_map["form_abandon"]= 			"event10";
event_map["form_success"]= 			"event11";
event_map["form_error"]= 			"event12";


// set a prop via <script type="text/javascript">set_metrics_prop("name", "value");</script>
function set_metrics_prop(name, value)
{
	var js = '<script type="text/javascript">s["'+prop_map[name]+'"]="'+value+'";</script>';
	document.write(js);
}

// metrics_hash is formated as <name>=<value>;
// metrics_events is formatted as <event_name>,
function metrics_props(metrics_hash, metrics_events)
{
	metrics(null, metrics_hash, metrics_events);
}

// allow compatibility with initial implementation with just channel param
function metrics(channel, metrics_hash, metrics_events)
{
	try
	{
		var accountID = null;
		var accountType = null;
		var uuid = null;
		try {
			json = unescape(readCookie('prefs'));
			if (json != "null")
			{
				json = decodeBase64(json);
				//alert("json?:"+json);
				account=eval("("+json+")");
				if (account)
				{
    				accountID = account.account_id;
    				accountType = account.acct_type ? account.acct_type : 'Member';
				}
			}
			var xeons = readCookie("x_eons_token");
			uuid = readCookie("x_eons_uuid");
		} catch(e) {
			// don't read cookies if we don't have functions.js
		}
		s[prop_map["channel"]] = channel ?  channel : document.domain.split('.')[0];
		s[prop_map["user_id"]] = accountID;
		s[prop_map["user_id_eVar"]] = accountID;
		s[prop_map["account_type"]] = accountType;
		s[prop_map["account_type_eVar"]] = accountType;
		s[prop_map["uuid"]] = uuid;
		s[prop_map["uuid_eVar"]] = uuid;
		s[prop_map["logged_in"]] = xeons ? "LoggedIn" : "NotLoggedIn";
		
        // if there are campaign cookies, do something
		try {
        	var campaign = unescape(readCookie("campaign"));
			var query_params = parseQueryString(window.location.href);
			
        	if (campaign != "null") {
                var registered = false;
	            var splitCampaign = campaign.split(",");
	            if (splitCampaign.length > 4 && splitCampaign[4] == "registered") {
                    registered = true;
                } else {
                    //campaign cookie wasn't updated, but maybe they're registred anyway.
                    
                    if (query_params['r'] == '1') {
                        registered = true;
                    }
                }
                if (registered) {
	                var campaign_prop_name = prop_map["campaign"];
	                s[campaign_prop_name] = splitCampaign[0];
	                // delete cookie here, the registration event is complete
	                if (location.href.match(/build\.eons\.dev/)) {
	                    eraseCookie("campaign","/",".build.eons.dev");
	                } else if (location.href.match(/qa\.eons\.dev/)) {
	                    eraseCookie("campaign","/",".qa.eons.dev");
	                } else {
	                    // if there are more servers, put them here
	                    eraseCookie("campaign","/",".eons.com");
	                }
	            }
			} else {
				// no campaign cookie, see if they should get one
				
				/* Plugin Example: getQueryParam v2.0 */
			    if (query_params['cid'] != undefined && query_params['cid'] != '') {
				    s[prop_map["campaign"]]=query_params['cid'];
		            affiliate = query_params['aid']
		            creative = query_params['crid']
		            date = new Date();
		            now = date.getTime();
					if (affiliate == undefined) { affiliate = '' }
					if (creative == undefined) { creative = '' }
		            value = s.campaign+","+creative+","+affiliate+","+date;
		            createCookie('campaign',value,7300);
		        }
		        if (query_params['cid'] == 'MyPointsMay0701') {
		            var visit_id = query_params['myptsID'];
		            createCookie('mypoints',visit_id,30);
		        }
	        }
		} catch(e) {
			// If we don't load functions, we can't read, set, and erase cookies
			//alert('caught: ' + e);
		}
		
		if (metrics_hash)
		{
			var prop_pairs = metrics_hash.split(';');
			for(var i=0; i<prop_pairs.length; i++)
			{
				var prop = prop_pairs[i].split('=');
				if (prop.length == 2)
				{
					var prop_name_mapped = prop_map[prop[0]];
					s[prop_name_mapped] = prop[1];
				}
			}
		}
		
		if (metrics_events)
		{
			var events = metrics_events.split(",");
			for (var e=0; e<events.length; e++)
			{
				var event_name = event_map[events[e]];
				if (event_name)
				{ 
					0==e ? s.events = event_name : s.events += "," + event_name
				}
			}
		}
	}
	catch (e)
	{
		//alert(e)
	}
	/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
	var s_code=s.t();if(s_code)document.write(s_code);
    /************* DO NOT ALTER ANYTHING ABOVE THIS LINE ! **************/
}

function send_metrics_event(variable, variable_value, event)
{
	var var_name = prop_map[variable];
	var event_name = event_map[event];
	var trackVarsString = "";
	var s=s_gi(s_account);
	
	if (var_name)
	{
		s[var_name] = variable_value;
		trackVarsString += trackVarsString ? ","+var_name : var_name;
	}
	if (event_name)
	{
		trackVarsString += trackVarsString ? ",events" : "events";
		s.linkTrackEvents=event_name;
		s.events=event_name;
	}
	
	s.linkTrackVars = trackVarsString; 
	
	var s_code = s.tl(this,'o','LinkName');
}
/* file: ad.js */
var ord = Math.floor(Math.random()*100000000);
ad_debug=false
// DOUBLECLICK (DART) VARIABLES
var site="";
var zone="";
var passed_hash=""
var all_hash="";
var provider="";
var all_hash_set=false;
// END DOUBLECLICK (DART) VARIABLES

// GOOGLE VARIABLES -- DEFAULTS
var google_ad_client = "pub-7893828636899382";
var google_alternate_ad_url_template = "http://ad.doubleclick.net/adi/eons.google/google;sz=widthxheight;ord="+ord+"?";
var google_ad_width = 728;
var google_ad_height = 90;
var google_ad_format = "728x90_as"
var google_ad_type = "text";
var google_ad_channel ="8674095514";

var channel_map=new Array();
channel_map["love"]=			"9455188386";
channel_map["body"]=			"8674095514";
channel_map["bodyhealthology"]=	"4342072021";
channel_map["eons100"]=			"5864210607";
channel_map["fun"]=				"4328971621";
channel_map["funuclick"]=		"3213544646";
channel_map["funreal"]=			"3698226618";
channel_map["homepage"]=		"2259880777";
channel_map["jobs"]=			"6551633179";
channel_map["money"]=			"5669882036";
channel_map["obits"]=			"9590164840";

// END GOOGLE VARIABLES

function render_dart_js(site,zone,hash,size,ptile,ord)
{
    // for now, AMP doesn't support secure calls, so go right to doubleclick
    if (location.href.match(/^https/)) {
        server = "https://ad.doubleclick.net";
    } else {
        server = "http://a.collective-media.net";
    }

    if  (hash!="" && hash.match(/;$/)==null) // TRAC 5911, don't add ';' to empty hash
    {
        hash=hash+";";  // make sure the hash ends with a ;
    }
    var js = '<script src="' + server + '/adj/'+site+'/'+zone+';'+hash+'sz='+size+';tile='+ptile+';ord='+ord+'?"><\/script>';
    if (ad_debug==true)
    {
        alert(js);
    }
    document.write(js);
}

function render_google_adsense_js(channel,width,height)
{
	return render_google_js(channel,"as",width,height)
}

function alert_google_variables()
{
	var s= "google_ad_channel:\t"+google_ad_channel+"\n";
	s+= "google_ad_width:\t"+google_ad_width+"\n";
	s+= "google_ad_height:\t"+google_ad_height+"\n";
	s+= "google_ad_format:\t"+google_ad_format+"\n";
	s+= "google_alternate_ad_url_template:\t"+google_alternate_ad_url_template+"\n";
	alert(s);
}

function render_google_js(channel,format,width,height)
{
	if (channel.match(/^[0-9]+$/)==null) // if the channel is a name (not all numbers), look it up in the hash to get the right channel id
	{
		channel=channel_map[channel]
	}
	google_ad_channel=channel;
	google_ad_width=width;
	google_ad_height=height;
	google_ad_format = width+"x"+height+"_"+format;
	tmp=google_alternate_ad_url_template.replace(/width/,width);
	google_alternate_ad_url=tmp.replace(/height/,height);
	if (ad_debug==true)
	{
		alert_google_variables();
	}
    var protocol = 'http';
    if (location.href.match(/^https/)) {
        protocol = 'https';
    }
	var js = '<script src="' + protocol + '://pagead2.googlesyndication.com/pagead/show_ads.js"><\/script>';
	document.write(js);	
}

function adjust_size(size)
{
       new_size=size;
       if (size=="120x60")
       {
               new_size="125x125";
       }
       return new_size;
}


function dart(_site,_zone,_hash,_provider,size,ptile)
{
	site=_site;
	zone=_zone;
	//site="usmf.cont.mainpage"
	//zone="mainpage"
	provider=_provider;
	if (site=="")
	{
		return;
	}
	// handle erroneous calls with no hash provided.
	if (_hash == null)
	{
		all_hash = "";
	}
	else
	{
		all_hash = _hash;
	}
//	if (all_hashset==false)
	{
		// only populate it once per page
		try
		{
			json = unescape(readCookie('prefs'));
			json = decodeBase64(json);
			//alert("json?:"+json);
			account=eval("("+json+")");
			var values=new Array(account.gender,account.age,account.country,account.zipcode,provider);
			var keys=new Array("g","a","country","zip","prov");
			for (var i=0;i<values.length;i++)
			{
				if (values[i]!=null && values[i]!="")
				{
					
					all_hash+=keys[i]+"="+values[i]+";";
				}
			}
		}
		catch (e)
		{
			//alert(e)
		}
	}
	size=adjust_size(size);
	render_dart_js(site,zone,all_hash,size,ptile,ord);
}

function dart1(site,zone,hash,provider,size) 
{
	passed_hash=hash;
	dart(site,zone,"dcopt=ist;"+hash,provider,size,1);
}

function dartN(_site,_zone,_hash,_provider,_size, _ptile) 
{
	if (_site==null || _site=="") {
		_site = site;
	}
	if (_zone==null || _zone=="") {
		_zone = zone;
	}
	if (_provider==null || _provider=="") {
		_provider  = provider;
	}
	if (_ptile==null || _ptile=="") {
		_ptile = 7;	// this was default for google_lb
	}
	dart(_site,_zone,_hash+passed_hash,_provider,_size,_ptile);
}

function dartBottom(_zone, ptile)
{
	if (_zone== null || _zone=="") {
		_zone = "bottom";	// default zone for bottom banner ad
	}
	dart(site,"bottom",passed_hash,provider,"728x90",ptile);
}

function dart2(size) 
{
	dart(site,zone,passed_hash,provider,size,2);
}

function dart3(size) 
{
	dart(site,zone,passed_hash,provider,size,3);
}

function dart4(size)
{
        dart(site,zone,passed_hash,provider,size,4);
}

function dart5(size)
{
        dart(site,zone,passed_hash,provider,size,5);
}

function dart6(size)
{
        dart(site,zone,passed_hash,provider,size,6);
}

function dart7(size)
{
        dart(site,zone,passed_hash,provider,size,7);
}

function dart10(size)
{
		dart(site,zone,"loc=1;"+passed_hash,provider,size,10)
}

function dart11(size)
{
		dart(site,zone,"loc=2;"+passed_hash,provider,size,11)
}

function dart12(size)
{
		dart(site,zone,"loc=3;"+passed_hash,provider,size,12)
}

function dart13(site,zone,hash,provider,size) 
{
		dart(site,zone,"loc=3;"+passed_hash,provider,size,12)
}


function eons_picks()
{
	document.write("<h3>Eons Picks</h3>");
	dart14("1x5");
	dart15("1x5");
	dart16("1x5");
}

function dart14(size) 
{
		dart(site,zone,"loc=1;"+passed_hash,provider,size,13);
}

function dart15(size) 
{
		dart(site,zone,"loc=2;"+passed_hash,provider,size,14);
}

function dart16(size) 
{
		dart(site,zone,"loc=3;"+passed_hash,provider,size,15);
}




/*
bodyhealthology= dartsite: "eons.body" dartzone: "bottomhealthology"

eons100: dartsite= "eons.eons100" dartzone: "bottom"

fun: dartsite= "eons.fun" dartzone: "bottom"

funuclick: dartsite= "eons.fun" dartzone: "bottomuclick"

funreal: dartsite= "eons.fun" dartzone: "bottomreal"
*/

function translate_google_channel_to_dart_zone(channel)
{
	zone="bottom"
    // jjn added this
	if (channel=="lifepath")
	{
		zone="lifepath_bottom";
        return zone;
	}
    // end jjn added
	if (channel.match(/^[0-9]+$/)==null) // if the channel is a name (not all numbers), look it up in the hash to get the right channel id
	{
		channel=channel_map[channel]
	}
	if (channel=="healthology")
	{
		zone="bottomhealthology"
	}
	if (channel=="funuclick")
	{
		zone="bottomuclick"
	}
	if (channel=="funreal")
	{
		zone="bottomreal"
	}
	return zone;
}

function google_mu(channel)
{
	zone=translate_google_channel_to_dart_zone(channel);
	dart(site,zone,passed_hash,provider,"300x250",6);
//	render_google_adsense_js(channel,300,250);
}

function google_lb(channel,hash)
{
	passed_hash=hash;
	zone=translate_google_channel_to_dart_zone(channel);
	dart(site,zone,passed_hash,provider,"728x90",7)
//	render_google_adsense_js(channel,728,90);
}



//		var js = '<script src="http://ad.doubleclick.net/adj/usmf.cont.mainpage/mainpage;dcopt=ist;pos=top;seg=v;src=;sz=728x90;ptile=1;ord=5?"><\/script>';
/*
var js = 
"<script>document.write \
	('<script language=\"JavaScript\" \
	type=\"text/javascript\" \
	src=\"http://ad.doubleclick.net/adj/usmf.cont.mainpage/mainpage;dcopt=ist;pos=top;seg=v;src=;sz=728x90;ptile=1;ord=' \
	+ Math.floor(Math.random()*100000000) +'?\"><\/script>');</script>";
*/





