function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

/******************************************
* Snow Effect Script- By Altan d.o.o. (http://www.altan.hr/snow/index.html)
* Visit Dynamic Drive DHTML code library (http://www.dynamicdrive.com/) for full source code
* Last updated Nov 9th, 05' by DD. This notice must stay intact for use
******************************************/
  
  //Configure below to change URL path to the snow image
  var snowsrc="images/fallingleaf.gif"
  // Configure below to change number of snow to render
  var no = 10;
  // Configure whether snow should disappear after x seconds (0=never):
  var hidesnowtime = 30;
  // Configure how much snow should drop down before fading ("windowheight" or "pageheight")
  var snowdistance = "pageheight";

///////////Stop Config//////////////////////////////////

  var ie4up = (document.all) ? 1 : 0;
  var ns6up = (document.getElementById&&!document.all) ? 1 : 0;

  function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
  }

  var dx, xp, yp;    // coordinate and position variables
  var am, stx, sty;  // amplitude and step variables
  var i, doc_width = 800, doc_height = 600; 
  
  //if (ns6up) {
  //  doc_width = self.innerWidth;
  //  doc_height = self.innerHeight;
  //} else if (ie4up) {
  //  doc_width = iecompattest().clientWidth;
  //  doc_height = iecompattest().clientHeight;
  //}

  dx = new Array();
  xp = new Array();
  yp = new Array();
  am = new Array();
  stx = new Array();
  sty = new Array();
  snowsrc=(snowsrc.indexOf("dynamicdrive.com")!=-1)? "snow.gif" : snowsrc
  for (i = 0; i < no; ++ i) {  
    dx[i] = 0;                        // set coordinate variables
    xp[i] = Math.random()*(doc_width-50);  // set position variables
    yp[i] = Math.random()*doc_height;
    am[i] = Math.random()*20;         // set amplitude variables
    stx[i] = 0.02 + Math.random()/10; // set step variables
    sty[i] = 0.7 + Math.random();     // set step variables
		if (ie4up||ns6up) {
      if (i == 0) {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: -15px; LEFT: -15px;\"><a href=\"www.envibum.com\"><img src='"+snowsrc+"' border=\"0\"><\/a><\/div>");
      } else {
        document.write("<div id=\"dot"+ i +"\" style=\"POSITION: absolute; Z-INDEX: "+ i +"; VISIBILITY: visible; TOP: -15px; LEFT: -15px;\"><img src='"+snowsrc+"' border=\"0\"><\/div>");
      }
    }
  }

  function snowIE_NS6() {  // IE and NS6 main animation function
    doc_width = ns6up?window.innerWidth-10 : iecompattest().clientWidth-10;
	doc_height=(window.innerHeight && snowdistance=="windowheight")? window.innerHeight : (ie4up && snowdistance=="windowheight")?  iecompattest().clientHeight : (ie4up && !window.opera && snowdistance=="pageheight")? iecompattest().scrollHeight : iecompattest().offsetHeight;
    for (i = 0; i < no; ++ i) {  // iterate for every dot
      yp[i] += sty[i];
      if (yp[i] > doc_height-50) {
        xp[i] = Math.random()*(doc_width-am[i]-30);
        yp[i] = 0;
        stx[i] = 0.02 + Math.random()/10;
        sty[i] = 0.7 + Math.random();
      }
      dx[i] += stx[i];
      document.getElementById("dot"+i).style.top=yp[i]+"px";
      document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+"px";  
    }
    snowtimer=setTimeout("snowIE_NS6()", 10);
  }

  function hidesnow(){
	if (window.snowtimer) clearTimeout(snowtimer)
		for (i=0; i<no; i++) document.getElementById("dot"+i).style.visibility="hidden"
  }

  if (ie4up||ns6up){
    //window.onload = snowIE_NS6();
	//setTimeout("snowIE_NS6()", 2000);
		if (hidesnowtime>0)
		setTimeout("hidesnow()", hidesnowtime*1000)
  }

<!--//
// Opacity and Fade in script.
// Script copyright (C) 2008 http://www.cryer.co.uk/.
// Script is free to use provided this copyright header is included.
function SetOpacity(object,opacityPct)
{
 try {
  // IE.
  object.style.filter = 'alpha(opacity=' + opacityPct + ')';
  // Old mozilla and firefox
  object.style.MozOpacity = opacityPct/100;
  // Everything else.
  object.style.opacity = opacityPct/100;
 } catch(err) {}
}

function ChangeOpacity(id,msDuration,msStart,fromO,toO)
{
 try { 
  var element=document.getElementById(id);
  var opacity = element.style.opacity * 100;
  var msNow = (new Date()).getTime();
  opacity = fromO + (toO - fromO) * (msNow - msStart) / msDuration;
  if (opacity<0) 
   SetOpacity(element,0)
  else if (opacity>100)
   SetOpacity(element,100)
  else
  {
   SetOpacity(element,opacity);
   element.timer = window.setTimeout("ChangeOpacity('" + id + "'," + msDuration + "," + msStart + "," + fromO + "," + toO + ")",1);
  }
 } catch(err) {}
}

function FadeIn(id)
{
 try {
  var element=document.getElementById(id);
  if (element.timer) window.clearTimeout(element.timer); 
  var startMS = (new Date()).getTime();
  element.timer = window.setTimeout("ChangeOpacity('" + id + "',1000," + startMS + ",0,100)",1);
 } catch(err) {}
}

function FadeOut(id)
{
 try {
  var element=document.getElementById(id);
  if (element.timer) window.clearTimeout(element.timer); 
  var startMS = (new Date()).getTime();
  element.timer = window.setTimeout("ChangeOpacity('" + id + "',1000," + startMS + ",100,0)",1);
 } catch(err) {}
}

function FadeInImage(foregroundID,newImage,backgroundID)
{
 try {
  var foreground=document.getElementById(foregroundID);
  if (backgroundID)
  {
   var background=document.getElementById(backgroundID);
   if (background)
   {
    background.style.backgroundImage = 'url(' + foreground.src + ')';
    background.style.backgroundRepeat = 'no-repeat';
   }
  }
  SetOpacity(foreground,0);
  foreground.src = newImage;
  if (foreground.timer) window.clearTimeout(foreground.timer); 
  var startMS = (new Date()).getTime();
  foreground.timer = window.setTimeout("ChangeOpacity('" + foregroundID + "',1000," + startMS + ",0,100)",10);
 } catch(err) {}
}

var changetext;
var changelink;
var changenewstext;
var changenewslink;
var c=0;
var t=0;
var tn=0;
var n=0;
var fadenum=0;
var imgnum=0;
var changenum=0;
var newsnum=0;
var timer_is_on=0;
var news_is_on=0;
var theswitch=0;
var initswitch=0;
var checkedCC1=0;
var checkedCC2=0;
var checkedCC3=0;
var checkedCC4=0;
var checkedCC5=0;
var checkedCC6=0;
var checkedCC7=0;
var checkedCC8=0;
var checkedCC9=0;
var checkedCC10=0;
var couponcodeswitch=0;
var thecovercolor1="";
var thecovercolor2="";
var thecovercolor3="";
var thecovercolor4="";
var thecolorval="";
var thepromo=0;
var c1=0;
var c2=0;
var c3=0;
var c4=0;
var c5=0;
var clueflag1=false;
var clueflag2=false;
var clueflag3=false;
var clueflag4=false;
var clueflag5=false;

function startTimer()
{
 try {
  t=setTimeout("timedCount()",5000);
 } catch(err) {}
}

function imgTimer(imgnum)
{
 try {
  if (imgnum>40) c=0;
  else c=imgnum+1;
  theswitch=1;
  t=setTimeout("timedCount()",5000);
 } catch(err) {}
}

function switchIt()
{
 try {
  if (theswitch==0) {
   c++;
   if (c==42) c=0;
   theswitch=1;
  }
 } catch(err) {}
}

function switchIt2()
{
 try {
  if (theswitch==0) {
   c++;
   if (c==42) c=0;
   theswitch=0;
  }
 } catch(err) {}
}

function imgFadePrev()
{
 try {
  if (theswitch==1||initswitch==0) {
   c--;
   theswitch=0;
   initswitch=1;
  }
  if (c<1) c=41;
  else c--;
  changeIt(c);
  FadeInImage('mainpic','images/img'+c+'.jpg','mainpicimage');
 } catch(err) {}
} 

function imgFadeNext()
{
 try {
  if (theswitch==0) {
   c++;
   theswitch=1;
  }
  if (initswitch==0) {
   c=1;
   initswitch=1;
  }
  if (c==41) {
   changeIt(c);
   FadeInImage('mainpic','images/img'+c+'.jpg','mainpicimage');
   c=0;
  }
  else if (c<41) {
   changeIt(c);
   FadeInImage('mainpic','images/img'+c+'.jpg','mainpicimage');
   c=c+1;
  }
 } catch(err) {}
} 

function imgFade(fadenum)
{
 try {
  stopCount();
  theswitch=0;
  changeIt(fadenum);
  FadeInImage('mainpic','images/img'+fadenum+'.jpg','mainpicimage');
 } catch(err) {}
} 
  
function timedCount()
{
 try {
  if (c<41) {
   changeIt(c);
   FadeInImage('mainpic','images/img'+c+'.jpg','mainpicimage');
   c=c+1;
   t=setTimeout("timedCount()",5000);
  }
  else if (c>40) {
   changeIt(c);
   FadeInImage('mainpic','images/img'+c+'.jpg','mainpicimage');
   c=0;
   t=setTimeout("timedCount()",5000);
  }
  else {
   stopCount();
  } 
 } catch(err) {}
}

function timedNews()
{
 try {
  if (n<19) {
   changeNews(n);
   n=n+1;
   tn=setTimeout("timedNews()",10000);
  }
  else if (n>18) {
   changeNews(n);
   n=0;
   tn=setTimeout("timedNews()",10000);
  }
  else {
   stopNews();
  } 
 } catch(err) {}
}

function stopNews()
{
 try {
  clearTimeout(tn);
  news_is_on=0;
 } catch(err) {}
}

function stopCount()
{
 try {
  clearTimeout(t);
  timer_is_on=0;
 } catch(err) {}
}

function doTimer()
{
 try {
  if (!timer_is_on)
  {
   timer_is_on=1;
   timedCount();
  }     
 } catch(err) {}
}

function doNews()
{
 try {
  if (!news_is_on)
  {
   news_is_on=1;
   timedNews();
  }     
 } catch(err) {}
}

function changeNews(newsnum) 
{
 try {  
  if (newsnum==0) {
   changenewstext = "<h2>envinews</h2>NEW edition color envi<span class=gowhite>white</span> diaper supporting Homes of Hope in Fiji and giving $2 for every one purchased!"
   changenewslink = "products.html#enviwhite";
  }
  else if (newsnum==1) {
   changenewstext = "<h2>envinews</h2>CONGRATS to all the envibaby photo submissions, you are ALL winners and will be receiving a free envibum bumbag!!!"
   changenewslink = "reviews.html";
  }
  else if (newsnum==2) {
   changenewstext = "<h2>envinews</h2>NEW edition color envi<span class=goyellow>yellow</span> diaper supporting Helping Hands in Africa and giving $2 for every one purchased!"
   changenewslink = "products.html#enviyellow";
  }
  else if (newsnum==3) {
   changenewstext = "<h2>envinews</h2>We have just reduced our diaper prices! envibums now include a new thin, quick dry cotton absorbency - its like getting a free pad!"
   changenewslink = "products.html";
  } 
  else if (newsnum==4) {
   changenewstext = "<h2>envinews</h2>Our new reviews page is now up! Send us a comment or review along with a picture of your little envibaby and we will be sure to add it!"
   changenewslink = "reviews.html";
  } 
  else if (newsnum==5) {
   changenewstext = "<h2>envinews</h2>The mom4mom <span class=gopink>pink</span> diaper cover is now available! We are offering a pink version of our mom4mom cover from all your requests."
   changenewslink = "products.html#mom4mompink";
  } 
  else if (newsnum==6) {
   changenewstext = "<h2>envinews</h2>Our newest organizations we are supporting and new diaper colors are now available! envi<span class=goaqua>aqua</span> and envi<span class=gopink>pink</span>."
   changenewslink = "products.html";
  } 
  else if (newsnum==7) {
   changenewstext = "<h2>envinews</h2>envibum was reviewed on The Cloth Diaper Report. Click here to read the review on the envibum diaper and mom4mom cover."
   changenewslink = "http://www.theclothdiaperreport.com/2010/03/envibum-one-size-diaper-cover-review.html";
  }
  else if (newsnum==8) {
   changenewstext = "<h2>envinews</h2>envibum was reviewed on All About Cloth Diapers. Click here to read the review on the envibum diaper and mom4mom cover."
   changenewslink = "http://allaboutclothdiapers.com/a-review-of-envibum-cloth-diapers/";
  } 
  else if (newsnum==9) {
   changenewstext = "<h2>envinews</h2>envibum was reviewed on Passionate Homemaking. Click here to read the review on the envibum diaper and mom4mom cover."
   changenewslink = "http://www.passionatehomemaking.com/2010/02/envibum-a-creative-cloth-diaper-solution.html";
  } 
  else if (newsnum==10) {
   changenewstext = "<h2>envinews</h2>Check out our new blog <span class=undie>www.envibaby.com</span>!<br>The place for great tips, latest envibum diaper info, and contest information."
   changenewslink = "http://www.envibaby.com";
  } 
  else if (newsnum==11) {
   changenewstext = "<h2>envinews</h2>NEW edition color envi<span class=gopink>pink</span> diaper supporting crisis pregnancy center giving $2 for every one purchased!"
   changenewslink = "products.html#envipink";
  }
  else if (newsnum==12) {
   changenewstext = "<h2>envinews</h2>NEW edition color envi<span class=goaqua>aqua</span> diaper supporting clean drinking water giving $2 for every one purchased!"
   changenewslink = "products.html#envired";
  } 
  else if (newsnum==13) {
   changenewstext = "<h2>envinews</h2>envibum's new patent pending closable compartment allows access to adjust the absorbency for the phase, not the day!"
   changenewslink = "products.html#envigreen";
  }
  else if (newsnum==14) {
   changenewstext = "<h2>envinews</h2>Compliant with the Consumer Product Safety Act (CPSA) - no lead or choking hazards (snaps) to worry about in our products."
   changenewslink = "products.html";
  }  
  else if (newsnum==15) {
   changenewstext = "<h2>envinews</h2>For every envi<span class=gogreen>green</span> cloth diaper purchased, two dollars is donated to Food For The Hungry. Buy a diaper - help others grow!"
   changenewslink = "products.html#envigreen";
  } 
  else if (newsnum==16) {
   changenewstext = "<h2>envinews</h2>For every mom4mom diaper cover purchased, another mom4mom cover is donated to a mom and baby that are in need."
   changenewslink = "products.html#mom4mom";
  } 
  else if (newsnum==17) {
   changenewstext = "<h2>envinews</h2>envibum - a new and better kind of diaper!<br><br>re-envisioned.<br>re-designed.<br>re-engineered."
   changenewslink = "products.html#envigreen";
  } 
  else if (newsnum==18) {
   changenewstext = "<h2>envinews</h2>Tired of stink, stain, or falling apart with other diapers?  envibum is the right place for premium lasting fabrics and fabrication."
   changenewslink = "products.html";
  }    
  document.getElementById('newstext').innerHTML=changenewstext;
  document.getElementById('newstext').href=changenewslink;
  if (newsnum==7 || newsnum==8 || newsnum==9 || newsnum==10) {
   document.getElementById('newstext').target="_blank";
  }
  else {
   document.getElementById('newstext').target="_self";
  }
 } catch(err) {}
}

function changeIt(changenum)
{
 try {
  if (changenum==0) {
   changetext = "envibums soft Minkee keeps baby dry & protected";
   changelink = "products.html";
  }    
  else if (changenum==1) {
   changetext = "envibums will make your photos pop with color";
   changelink = "products.html";
  }
  else if (changenum==2) {
   changetext = "many great envibum colors and prints to choose from";
   changelink = "products.html";
  }  
  else if (changenum==3) {
   changetext = "have fun with your envibums";
   changelink = "products.html";
  }
  else if (changenum==4) {
   changetext = "spring has sprung envipurple";
   changelink = "products.html#envipurple";
  }
  else if (changenum==5) {
   changetext = "even nature loves envibum";
   changelink = "products.html";
  }
  else if (changenum==6) {
   changetext = "NEW envi<span class=gogreen>polka</span> premium affordable cloth diaper";
   changelink = "products.html#envipolka";
  }  
  else if (changenum==7) {
   changetext = "NEW envi<span class=gocherry>cherry</span> premium affordable cloth diaper";
   changelink = "products.html#envicherry";
  }  
  else if (changenum==8) {
   changetext = "NEW envi<span class=goblackck>checkered</span> premium affordable cloth diaper";
   changelink = "products.html#envicheckerblack";
  }
  else if (changenum==9) {
   changetext = "NEW envi<span class=gopinkck>checkered</span> premium affordable cloth diaper";
   changelink = "products.html#envicheckerpink";
  }
  else if (changenum==10) {
   changetext = "NEW envi<span class=gobrown>brown</span> premium affordable cloth diaper";
   changelink = "products.html#envibrown";
  }
  else if (changenum==11) {
   changetext = "NEW envi<span class=gopurple>purple</span> premium affordable cloth diaper";
   changelink = "products.html#envipurple";
  }
  else if (changenum==12) {
   changetext = "envi<span class=gogreen>green</span> premium affordable cloth diaper";
   changelink = "products.html#envigreen";
  }  
  else if (changenum==13) {
   changetext = "envi<span class=goaqua>aqua</span> premium affordable cloth diaper";
   changelink = "products.html#enviaqua";
  }    
  else if (changenum==14) {
   changetext = "envi<span class=goyellow>yellow</span> premium affordable cloth diaper";
   changelink = "products.html#enviyellow";
  }
  else if (changenum==15) {
   changetext = "envi<span class=gored>red</span> premium affordable cloth diaper";
   changelink = "products.html#envired";
  }  
  else if (changenum==16) {
   changetext = "envi<span class=gopink>pink</span> premium affordable cloth diaper";
   changelink = "products.html#envipink";
  }   
  else if (changenum==17) {
   changetext = "envi<span class=gowhite>white</span> premium affordable cloth diaper";
   changelink = "products.html#enviwhite";
  }
  else if (changenum==18) {
   changetext = "mom4mom covers grow to fit most babies 8 - 40 lbs.";
   changelink = "products.html#mom4mom";
  }
  else if (changenum==19) {
   changetext = "our diaper covers work with almost any absorbency";
   changelink = "products.html#mom4mom";
  }
  else if (changenum==20) {
   changetext = "mom4mom covers inspired by nature loved by moms";
   changelink = "products.html";
  }  
  else if (changenum==21) {
   changetext = "fun colors for fun times";
   changelink = "products.html";
  }    
  else if (changenum==22) {
   changetext = "envibabies know their cute";
   changelink = "products.html";
  }
  else if (changenum==23) {
   changetext = "mom4mom covers are berry sweet";
   changelink = "products.html";
  }  
  else if (changenum==24) {
   changetext = "perfect fit everytime";
   changelink = "products.html";
  }   
  else if (changenum==25) {
   changetext = "coordinate your favorite colors";
   changelink = "products.html";
  }
  else if (changenum==26) {
   changetext = "waterproof on the outside too";
   changelink = "products.html";
  }
  else if (changenum==27) {
   changetext = "auto adjusting waist and legs fit newborns and up";
   changelink = "products.html";
  }
  else if (changenum==28) {
   changetext = "rockin the envipurple";
   changelink = "products.html";
  }
  else if (changenum==29) {
   changetext = "NEW envi<span class=gogreen>leaf</span> luvies now available!";
   changelink = "products.html#envileaf";
  }  
  else if (changenum==30) {
   changetext = "envibum diapers grow to fit most babies 8 - 40 lbs.";
   changelink = "products.html";
  }
  else if (changenum==31) {
   changetext = "create your own envibum garden nursery";
   changelink = "products.html";
  }
  else if (changenum==32) {
   changetext = "our streamline fit allows for lots of play";
   changelink = "products.html";
  }
  else if (changenum==33) {
   changetext = "cuddle with nature - envi<span class=gogreen>leaf</span> luvie";
   changelink = "products.html";
  }
  else if (changenum==34) {
   changetext = "T-shape liners fresh out of the oven";
   changelink = "products.html#liners";
  }
  else if (changenum==35) {
   changetext = "gender neutral envileaf <span class=gogreen>green</span> color";
   changelink = "products.html";
  }
  else if (changenum==36) {
   changetext = "two great ways to diaper your babies";
   changelink = "products.html";
  }  
  else if (changenum==37) {
   changetext = "customizable T-shape liner absorbs without the bulk";
   changelink = "products.html#liners";
  }  
  else if (changenum==38) {
   changetext = "thin 100% cotton absorbency pads";
   changelink = "products.html#pads";
  }
  else if (changenum==39) {
   changetext = "envibum diaper overview";
   changelink = "products.html";
  }
  else if (changenum==40) {
   changetext = "envibum diaper with flip out pad";
   changelink = "products.html";
  }
  else if (changenum==41) {
   changetext = "super soft Minkee fabric that you & your baby will love!";
   changelink = "products.html";
  } 
  document.getElementById('prodtext').innerHTML=changetext;
  document.getElementById('prodtext').href=changelink;
  document.getElementById('prodtext').target="_self";
 } catch(err) {}
}

function popupCenter(url,thewidth,theheight) 
{
 var width  = thewidth;
 var height = theheight;
 var left   = (screen.width  - width)/2;
 var top    = (screen.height - height)/2;
 var params = 'width='+width+', height='+height;
 params += ', top='+top+', left='+left;
 params += ', directories=no';
 params += ', location=no';
 params += ', menubar=no';
 params += ', resizable=no';
 params += ', scrollbars=no';
 params += ', status=no';
 params += ', toolbar=no';
 newwin=window.open(url,'windowname5', params);
 if (window.focus) {newwin.focus()}
 return false;
}

function ee1()
{
 try {
  snowIE_NS6();
  popupCenter("z1eefs.html",541,375);
 } catch(err) {}
} 

function ee2()
{
 try {
  snowIE_NS6();
  popupCenter("zwlee2.html",541,375);
 } catch(err) {}
} 

function ee3()
{
 try {
  snowIE_NS6();
  popupCenter("znvee3.html",541,375);
 } catch(err) {}
} 

function ee4()
{
 try {
  snowIE_NS6();
  popupCenter("zee4br.html",541,375);
 } catch(err) {}
} 

function ee5()
{
 try {
  snowIE_NS6();
  popupCenter("zee5af.html",541,375);
 } catch(err) {}
} 

function addLoadEvent2(func) {
 var oldonload = window.onload;
 if (typeof window.onload != 'function') {
	window.onload = func;
 } 
 else {
	window.onload = function() {
	if (oldonload) {
	 oldonload();
	}
	func();
  }
 }
}

//addLoadEvent2(doClues);

function doClues()
{
 try {
  checkClue();
 } catch(err) {}
} 

function clue1()
{
 try {
  alert("Easter Egg Hunt Clue #1\n\nCute and fluffy and sneaky too...");
  clearTimeout(c1);
  createCookie2('easterclue1','easterclue1',3);
  c2=setTimeout("clue2()",900000);
 } catch(err) {}
}

function clue2()
{
 try {
  alert("Easter Egg Hunt Clue #2\n\nNo syrup on the waffles please...");
  clearTimeout(c2);
  createCookie2('easterclue2','easterclue2',3);
  c3=setTimeout("clue3()",900000);
 } catch(err) {}
} 

function clue3()
{
 try {
  alert("Easter Egg Hunt Clue #3\n\nComing soon...");
  clearTimeout(c3);
  createCookie2('easterclue3','easterclue3',3);
  c4=setTimeout("clue4()",900000);
 } catch(err) {}
} 

function clue4()
{
 try {
  alert("Easter Egg Hunt Clue #4\n\nWhere it all started...");
  clearTimeout(c4);
  createCookie2('easterclue4','easterclue4',3);
  c5=setTimeout("clue5()",900000);
 } catch(err) {}
} 

function clue5()
{
 try {
  alert("Easter Egg Hunt Clue #5\n\nMy heart is there...");
  clearTimeout(c5);
  createCookie2('easterclue5','easterclue5',3);
 } catch(err) {}
} 

function checkLeafColor()
{
 try {
  var flag = false; 
  var theleafval=document.getElementsByName("leafval");
  for (var i=0; i < theleafval.length; i++) {
   if (theleafval[i].checked) {
    theleafcolor=theleafval[i].value;
	flag = true;
   }
  }
  if (flag == false) {
   alert("Please select a envileaf color first.");
   document.getElementById('envileaflink').href="javascript:void(0);";
   document.getElementById('envileaflink2').href="javascript:void(0);";
   this.event.returnValue = false;
  }
 } catch(err) {}
}

function noColor()
{
 try {
  document.getElementById('mom4momlink').href="javascript:void(0);";
  document.getElementById('mom4momlink2').href="javascript:void(0);";
  document.getElementById('mom4momsyslink').href="javascript:void(0);";
  document.getElementById('mom4momsyslink2').href="javascript:void(0);";
  this.event.returnValue = false;
 } catch(err) {}
}

function resetColor()
{
 try {
  var thecolorval=document.getElementsByName("colorval");
  for (var i=0; i < thecolorval.length; i++) {
   if (thecolorval[i].checked==true) {
    thecolorval[i].checked=false;
   }
  }
 } catch(err) {}
}

function checkforColor()
{
 try {
  if (thecovercolor1=="" || thecovercolor2=="") {
   alert("Please select the INSIDE and OUTSIDE color for a cover first.");
   noColor();
  }
  else {
   checkCode2();
  }
 } catch(err) {}
}

function checkfor2Color()
{
 try {
  if (thecovercolor1=="" || thecovercolor2=="" || thecovercolor3=="" || thecovercolor4=="") {
   alert("Please select the INSIDE and OUTSIDE color for 2 covers first.");
   noColor();
  }
  else {
   checkCode2();
  }
 } catch(err) {}
}

function checkCoverColor()
{
 try {
  if (thecovercolor1=="") addColor1();
  else if (thecovercolor2=="") addColor2();
  else if (thecovercolor3=="") addColor3();
  else if (thecovercolor4=="") addColor4();
  else addColor4();
 } catch(err) {}
}

function addColor1()
{
 try {
  var thecolorval=document.getElementsByName("colorval");
  for (var i=0; i < thecolorval.length; i++) {
   if (thecolorval[i].checked) {
    thecovercolor1=thecolorval[i].value;
   }
  } 
  if(confirm("You selected INSIDE color "+thecovercolor1+".\n\nClick OK and select the OUTSIDE color, or click Cancel to re-choose your color.")) {
   resetColor();
  }
  else {
   thecovercolor1="";
   resetColor();
   noColor();
  }
 } catch(err) {}
}

function addColor2()
{
 try {
  var thecolorval=document.getElementsByName("colorval");
  for (var i=0; i < thecolorval.length; i++) {
   if (thecolorval[i].checked) {
    thecovercolor2=thecolorval[i].value;
   }
  }  
  if(confirm("You selected OUTSIDE color "+thecovercolor2+".\n\nClick OK and be sure to choose your quantity and click add to cart, or click Cancel to re-choose your color.")) {
   resetColor();
  }
  else {
   thecovercolor2="";
   resetColor();
   noColor();
  }
 } catch(err) {}
}

function addColor3()
{
 try {
  var thecolorval=document.getElementsByName("colorval");
  for (var i=0; i < thecolorval.length; i++) {
   if (thecolorval[i].checked) {
    thecovercolor3=thecolorval[i].value;
   }
  }  
  if(confirm("You selected INSIDE color "+thecovercolor3+" for the second cover.\n\nClick OK and select the OUTSIDE color, or click Cancel to re-choose your color.")) {
   resetColor();
  }
  else {
   thecovercolor3="";
   resetColor();
   noColor();
  }
 } catch(err) {}
}

function addColor4()
{
 try {
  var thecolorval=document.getElementsByName("colorval");
  for (var i=0; i < thecolorval.length; i++) {
   if (thecolorval[i].checked) {
    thecovercolor4=thecolorval[i].value;
   }
  }  
  if(confirm("You selected OUTSIDE color "+thecovercolor4+" for the second cover.\n\nClick OK and be sure to choose your quantity and click add to cart, or click Cancel to re-choose your color.")) {
   resetColor();
  }
  else {
   thecovercolor4="";
   resetColor();
   noColor();
  }
 } catch(err) {}
}

function addCart()
{
 try {  
  var polkacart=document.getElementById("polkaquan").value;
  var cherrycart=document.getElementById("cherryquan").value;
  var blackckcart=document.getElementById("blackckquan").value;
  var pinkckcart=document.getElementById("pinkckquan").value;
  var browncart=document.getElementById("brownquan").value;
  var purplecart=document.getElementById("purplequan").value;
  var greencart=document.getElementById("greenquan").value;
  var aquacart=document.getElementById("aquaquan").value;
  var yellowcart=document.getElementById("yellowquan").value;
  var redcart=document.getElementById("redquan").value;
  var pinkcart=document.getElementById("pinkquan").value;
  var whitecart=document.getElementById("whitequan").value;
  var padcart=document.getElementById("padquan").value;
  var pad6cart=document.getElementById("6padquan").value;
  var pad12cart=document.getElementById("12padquan").value;
  var pad18cart=document.getElementById("18padquan").value;
  var pad24cart=document.getElementById("24padquan").value;
  var covercart=document.getElementById("coverquan").value;
  var syscovercart=document.getElementById("syscoverquan").value;
  var linercart=document.getElementById("linerquan").value;
  //var syscover2cart=document.getElementById("syscover2quan").value;
  var leafcart=document.getElementById("leafquan").value;  
  var bookcart=document.getElementById("bookquan").value;  
  
  var theleafcolor = "";
  var theleafval=document.getElementsByName("leafval");
  for (var i=0; i < theleafval.length; i++) {
   if (theleafval[i].checked) {
    theleafcolor=theleafval[i].value;
   }
  }
  
  document.getElementById('polkalink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipolka diaper&amount=22.99&quantity="+polkacart+"&item_number=envipolka";  
  document.getElementById('cherrylink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicherry diaper&amount=22.99&quantity="+cherrycart+"&item_number=envicherry"; 
  document.getElementById('blackcklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered black diaper&amount=22.99&quantity="+blackckcart+"&item_number=enviblackck"; 
  document.getElementById('pinkcklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered pink diaper&amount=22.99&quantity="+pinkckcart+"&item_number=envipinkck";
  document.getElementById('brownlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibrown diaper&amount=22.99&quantity="+browncart+"&item_number=envibrown";
  document.getElementById('purplelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipurple diaper&amount=22.99&quantity="+purplecart+"&item_number=envipurple";
  document.getElementById('greenlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envigreen diaper&amount=22.99&quantity="+greencart+"&item_number=envigreen";
  document.getElementById('aqualink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviaqua diaper&amount=22.99&quantity="+aquacart+"&item_number=enviaqua";
  document.getElementById('yellowlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviyellow diaper&amount=22.99&quantity="+yellowcart+"&item_number=enviyellow";
  document.getElementById('redlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envired diaper&amount=22.99&quantity="+redcart+"&item_number=envired";
  document.getElementById('pinklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipink diaper&amount=22.99&quantity="+pinkcart+"&item_number=envipink";
  document.getElementById('whitelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviwhite diaper&amount=22.99&quantity="+whitecart+"&item_number=enviwhite";  
  document.getElementById('padlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=absorbency pad&amount=2.99&quantity="+padcart+"&item_number=pad";
  document.getElementById('6padlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=6 pack absorbency pads&amount=17.05&quantity="+pad6cart+"&item_number=6pkpads";
  document.getElementById('12padlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=12 pack absorbency pads&amount=32.30&quantity="+pad12cart+"&item_number=12pkpads";
  document.getElementById('18padlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=18 pack absorbency pads&amount=47.37&quantity="+pad18cart+"&item_number=18pkpads";
  document.getElementById('24padlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=24 pack absorbency pads&amount=61.00&quantity="+pad24cart+"&item_number=24pkpads";
  document.getElementById('mom4momlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=mom4mom diaper cover ("+thecovercolor1+"/"+thecovercolor2+")&amount=12.99&quantity="+covercart+"&item_number=mom4mom";
  document.getElementById('mom4momsyslink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners&amount=119.99&quantity="+syscovercart+"&item_number=mom4mom12pk";
  document.getElementById('linerlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=T-shape liner&amount=9.99&quantity="+linercart+"&item_number=liner";
  document.getElementById('envileaflink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envileaf luvie ("+theleafcolor+")&amount=4.99&quantity="+leafcart+"&item_number=envileaf";  
  document.getElementById('booklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibaby book&amount=7.99&quantity="+bookcart+"&item_number=envibaby";  
  document.getElementById('polkalink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipolka diaper&amount=22.99&quantity="+polkacart+"&item_number=envipolka";  
  document.getElementById('cherrylink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicherry diaper&amount=22.99&quantity="+cherrycart+"&item_number=envicherry"; 
  document.getElementById('blackcklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered black diaper&amount=22.99&quantity="+blackckcart+"&item_number=enviblackck"; 
  document.getElementById('pinkcklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered pink diaper&amount=22.99&quantity="+pinkckcart+"&item_number=envipinkck";
  document.getElementById('brownlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibrown diaper&amount=22.99&quantity="+browncart+"&item_number=envibrown";
  document.getElementById('purplelink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipurple diaper&amount=22.99&quantity="+purplecart+"&item_number=envipurple";
  document.getElementById('greenlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envigreen diaper&amount=22.99&quantity="+greencart+"&item_number=envigreen";
  document.getElementById('aqualink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviaqua diaper&amount=22.99&quantity="+aquacart+"&item_number=enviaqua";
  document.getElementById('yellowlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviyellow diaper&amount=22.99&quantity="+yellowcart+"&item_number=enviyellow";
  document.getElementById('redlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envired diaper&amount=22.99&quantity="+redcart+"&item_number=envired";
  document.getElementById('pinklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipink diaper&amount=22.99&quantity="+pinkcart+"&item_number=envipink";
  document.getElementById('whitelink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviwhite diaper&amount=22.99&quantity="+whitecart+"&item_number=enviwhite";  
  document.getElementById('padlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=absorbency pad&amount=2.99&quantity="+padcart+"&item_number=pad";
  document.getElementById('6padlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=6 pack absorbency pads&amount=17.05&quantity="+pad6cart+"&item_number=6pkpads";
  document.getElementById('12padlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=12 pack absorbency pads&amount=32.30&quantity="+pad12cart+"&item_number=12pkpads";
  document.getElementById('18padlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=18 pack absorbency pads&amount=47.37&quantity="+pad18cart+"&item_number=18pkpads";
  document.getElementById('24padlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=24 pack absorbency pads&amount=61.00&quantity="+pad24cart+"&item_number=24pkpads";
  document.getElementById('mom4momlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=mom4mom diaper cover ("+thecovercolor1+"/"+thecovercolor2+")&amount=12.99&quantity="+covercart+"&item_number=mom4mom";
  document.getElementById('mom4momsyslink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners&amount=119.99&quantity="+syscovercart+"&item_number=mom4mom12pk";
  document.getElementById('linerlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=T-shape liner&amount=9.99&quantity="+linercart+"&item_number=liner";
  //document.getElementById('mom4momsyslink3').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners&amount=119.99&quantity="+syscover2cart+"&item_number=mom4mom12pk";
  //document.getElementById('mom4momsyslink4').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners&amount=119.99&quantity="+syscover2cart+"&item_number=mom4mom12pk";
  document.getElementById('envileaflink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envileaf luvie ("+theleafcolor+")&amount=4.99&quantity="+leafcart+"&item_number=envileaf";
  document.getElementById('booklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibaby book&amount=7.99&quantity="+bookcart+"&item_number=envibaby";  
 } catch(err) {}
}

function checkPackage()
{
 try {
  var polkaval=document.getElementById("polkanum").selectedIndex;
  var cherryval=document.getElementById("cherrynum").selectedIndex;
  var blackckval=document.getElementById("blackcknum").selectedIndex;
  var pinkckval=document.getElementById("pinkcknum").selectedIndex;
  var brownval=document.getElementById("brownnum").selectedIndex;
  var purpleval=document.getElementById("purplenum").selectedIndex;
  var greenval=document.getElementById("greennum").selectedIndex;
  var aquaval=document.getElementById("aquanum").selectedIndex;
  var yellowval=document.getElementById("yellownum").selectedIndex;
  var redval=document.getElementById("rednum").selectedIndex;
  var pinkval=document.getElementById("pinknum").selectedIndex;
  var whiteval=document.getElementById("whitenum").selectedIndex;
  var newval=polkaval+cherryval+blackckval+pinkckval+brownval+purpleval+greenval+aquaval+yellowval+redval+pinkval+whiteval;
  var temppolkaval="";
  var tempcherryval="";
  var tempblackckval="";
  var temppinkckval="";
  var tempbrownval="";
  var temppurpleval="";
  var tempgreenval="";
  var tempaquaval="";
  var tempyellowval="";
  var tempredval="";
  var temppinkval="";
  var tempwhiteval="";
  var passval="";
  if (polkaval!=0) {
   temppolkaval = polkaval + " polka";
   if (passval=="") passval = temppolkaval;
   else passval = passval + "/" + temppolkaval;
  }
  if (cherryval!=0) {
   tempcherryval = cherryval + " cherry";
   if (passval=="") passval = tempcherryval;
   else passval = passval + "/" + tempcherryval;
  }
  if (blackckval!=0) {
   tempblackckval = blackckval + " checker bl.";
   if (passval=="") passval = tempblackckval;
   else passval = passval + "/" + tempblackckval;
  }
  if (pinkckval!=0) {
   temppinkckval = pinkckval + " checker pk.";
   if (passval=="") passval = temppinkckval;
   else passval = passval + "/" + temppinkckval;
  }
  if (brownval!=0) {
   tempbrownval = brownval + " brown";
   if (passval=="") passval = tempbrownval;
   else passval = passval + "/" + tempbrownval;
  }
  if (purpleval!=0) {
   temppurpleval = purpleval + " purple";
   if (passval=="") passval = temppurpleval;
   else passval = passval + "/" + temppurpleval;
  }
  if (greenval!=0) {
   tempgreenval = greenval + " green";
   if (passval=="") passval = tempgreenval;
   else passval = passval + "/" + tempgreenval;
  }
  if (aquaval!=0) {
   tempaquaval = aquaval + " aqua";
   if (passval=="") passval = tempaquaval;
   else passval = passval + "/" + tempaquaval;
  }
  if (yellowval!=0) {
   tempyellowval = yellowval + " yellow";
   if (passval=="") passval = tempyellowval;
   else passval = passval + "/" + tempyellowval;
  }
  if (redval!=0) {
   tempredval = redval + " red";
   if (passval=="") passval = tempredval;
   else passval = passval + "/" + tempredval;
  }
  if (pinkval!=0) {
   temppinkval = pinkval + " pink";
   if (passval=="") passval = temppinkval;
   else passval = passval + "/" + temppinkval;
  }
  if (whiteval!=0) {
   tempwhiteval = whiteval + " white";
   if (passval=="") passval = tempwhiteval;
   else passval = passval + "/" + tempwhiteval;
  }
  if (newval==6) {
   document.getElementById('packagelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GTX6HCTGB69PU&item_name=6 pack diapers ("+passval+")";   
  }
  else if (newval==12) {
   document.getElementById('packagelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KVGB4MLM77HHC&item_name=12 pack diapers ("+passval+")";   
  }
  else if (newval==18) {
   document.getElementById('packagelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QFL6UM7REZ2TU&item_name=18 pack diapers ("+passval+")";   
  }
  else if (newval==24) {
   document.getElementById('packagelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GDATEHW2PRX3Y&item_name=24 pack diapers ("+passval+")";   
  }
  else {
   alert("Sorry, you selected "+newval+" as the total color choices for your diaper package.\n\nPlease select a total of 6, 12, 18, or 24 color diapers.");
   document.getElementById('packagelink').href="javascript:void(0);";
   this.event.returnValue = false;
  }
 } catch(err) {}
}

function buildIt(disvalue)
{
 try {
  var polkacart=document.getElementById("polkaquan").value;
  var cherrycart=document.getElementById("cherryquan").value;
  var blackckcart=document.getElementById("blackckquan").value;
  var pinkckcart=document.getElementById("pinkckquan").value;
  var browncart=document.getElementById("brownquan").value;
  var purplecart=document.getElementById("purplequan").value;
  var greencart=document.getElementById("greenquan").value;
  var aquacart=document.getElementById("aquaquan").value;
  var yellowcart=document.getElementById("yellowquan").value;
  var redcart=document.getElementById("redquan").value;
  var pinkcart=document.getElementById("pinkquan").value;
  var whitecart=document.getElementById("whitequan").value;
  var padcart=document.getElementById("padquan").value;
  var covercart=document.getElementById("coverquan").value;
  var syscovercart=document.getElementById("syscoverquan").value;
  var linercart=document.getElementById("linerquan").value;
  //var syscover2cart=document.getElementById("syscover2quan").value;
  var leafcart=document.getElementById("leafquan").value;
  var bookcart=document.getElementById("bookquan").value;
  
  var theleafcolor = "";
  var theleafval=document.getElementsByName("leafval");
  for (var i=0; i < theleafval.length; i++) {
   if (theleafval[i].checked) {
    theleafcolor=theleafval[i].value;
   }
  }
   
  document.getElementById('polkalink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipolka diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+polkacart+"&item_number=envipolka"+disvalue+"%";
  document.getElementById('cherrylink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicherry diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+cherrycart+"&item_number=envicherry"+disvalue+"%";
  document.getElementById('blackcklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered black diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+blackckcart+"&item_number=enviblackck"+disvalue+"%";
  document.getElementById('pinkcklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered pink diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+pinkckcart+"&item_number=envipinkck"+disvalue+"%";
  document.getElementById('brownlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibrown diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+browncart+"&item_number=envibrown"+disvalue+"%";
  document.getElementById('purplelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipurple diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+purplecart+"&item_number=envipurple"+disvalue+"%";
  document.getElementById('greenlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envigreen diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+greencart+"&item_number=envigreen"+disvalue+"%";
  document.getElementById('aqualink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviaqua diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+aquacart+"&item_number=enviaqua"+disvalue+"%";
  document.getElementById('yellowlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviyellow diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+yellowcart+"&item_number=enviyellow"+disvalue+"%";
  document.getElementById('redlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envired diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+redcart+"&item_number=envired"+disvalue+"%";
  document.getElementById('pinklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipink diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+pinkcart+"&item_number=envipink"+disvalue+"%";
  document.getElementById('whitelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviwhite diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+whitecart+"&item_number=enviwhite"+disvalue+"%";
  document.getElementById('padlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=absorbency pad ("+disvalue+"%25 discount)&amount=2.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+padcart+"&item_number=pad"+disvalue+"%";
  document.getElementById('mom4momlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=mom4mom diaper cover ("+thecovercolor1+"/"+thecovercolor2+") ("+disvalue+"%25 discount)&amount=12.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+covercart+"&item_number=mom4mom"+disvalue+"%";
  document.getElementById('mom4momsyslink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners ("+disvalue+"%25 discount)&amount=119.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+syscovercart+"&item_number=mom4mom12pk"+disvalue+"%";
  document.getElementById('linerlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=T-shape liner ("+disvalue+"%25 discount)&amount=9.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+linercart+"&item_number=liner"+disvalue+"%";
  document.getElementById('envileaflink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envileaf luvie ("+theleafcolor+") ("+disvalue+"%25 discount)&amount=4.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+leafcart+"&item_number=envileaf"+disvalue+"%";
  document.getElementById('booklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibaby book ("+disvalue+"%25 discount)&amount=7.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+bookcart+"&item_number=envibaby"+disvalue+"%";
  document.getElementById('polkalink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipolka diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+polkacart+"&item_number=envipolka"+disvalue+"%";
  document.getElementById('cherrylink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicherry diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+cherrycart+"&item_number=envicherry"+disvalue+"%";
  document.getElementById('blackcklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered black diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+blackckcart+"&item_number=enviblackck"+disvalue+"%";
  document.getElementById('pinkcklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered pink diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+pinkckcart+"&item_number=envipinkck"+disvalue+"%";
  document.getElementById('brownlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibrown diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+browncart+"&item_number=envibrown"+disvalue+"%";
  document.getElementById('purplelink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipurple diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+purplecart+"&item_number=envipurple"+disvalue+"%";
  document.getElementById('greenlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envigreen diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+greencart+"&item_number=envigreen"+disvalue+"%";
  document.getElementById('aqualink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviaqua diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+aquacart+"&item_number=enviaqua"+disvalue+"%";
  document.getElementById('yellowlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviyellow diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+yellowcart+"&item_number=enviyellow"+disvalue+"%";
  document.getElementById('redlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envired diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+redcart+"&item_number=envired"+disvalue+"%";
  document.getElementById('pinklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipink diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+pinkcart+"&item_number=envipink"+disvalue+"%";
  document.getElementById('whitelink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviwhite diaper ("+disvalue+"%25 discount)&amount=22.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+whitecart+"&item_number=enviwhite"+disvalue+"%";
  document.getElementById('padlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=absorbency pad ("+disvalue+"%25 discount)&amount=2.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+padcart+"&item_number=pad"+disvalue+"%";
  document.getElementById('mom4momlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=mom4mom diaper cover ("+thecovercolor1+"/"+thecovercolor2+") ("+disvalue+"%25 discount)&amount=12.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+covercart+"&item_number=mom4mom"+disvalue+"%";
  document.getElementById('mom4momsyslink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners ("+disvalue+"%25 discount)&amount=119.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+syscovercart+"&item_number=mom4mom12pk"+disvalue+"%";
  document.getElementById('linerlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=T-shape liner ("+disvalue+"%25 discount)&amount=9.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+linercart+"&item_number=liner"+disvalue+"%";
  //document.getElementById('mom4momsyslink3').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners ("+disvalue+"%25 discount)&amount=119.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+syscover2cart+"&item_number=mom4mom12pk"+disvalue+"%";
  //document.getElementById('mom4momsyslink4').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=2 mom4mom covers ("+thecovercolor1+"/"+thecovercolor2+")("+thecovercolor3+"/"+thecovercolor4+") plus 12 T-shape liners ("+disvalue+"%25 discount)&amount=119.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+syscover2cart+"&item_number=mom4mom12pk"+disvalue+"%";
  document.getElementById('envileaflink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envileaf luvie ("+theleafcolor+") ("+disvalue+"%25 discount)&amount=4.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+leafcart+"&item_number=envileaf"+disvalue+"%";
  document.getElementById('booklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibaby book ("+disvalue+"%25 discount)&amount=7.99&discount_rate="+disvalue+"&discount_rate2="+disvalue+"&quantity="+bookcart+"&item_number=envibaby"+disvalue+"%";
 } catch(err) {}
}

function buildDiscount(disvalue,disamount)
{
 try {
  var polkacart=document.getElementById("polkaquan").value;
  var cherrycart=document.getElementById("cherryquan").value;
  var blackckcart=document.getElementById("blackckquan").value;
  var pinkckcart=document.getElementById("pinkckquan").value;
  var browncart=document.getElementById("brownquan").value;
  var purplecart=document.getElementById("purplequan").value;
  var greencart=document.getElementById("greenquan").value;
  var aquacart=document.getElementById("aquaquan").value;
  var yellowcart=document.getElementById("yellowquan").value;
  var redcart=document.getElementById("redquan").value;
  var pinkcart=document.getElementById("pinkquan").value;
  var whitecart=document.getElementById("whitequan").value;
  var padcart=document.getElementById("padquan").value;
  var covercart=document.getElementById("coverquan").value;
  var syscovercart=document.getElementById("syscoverquan").value;
  var linercart=document.getElementById("linerquan").value;
  //var syscover2cart=document.getElementById("syscover2quan").value;
  var leafcart=document.getElementById("leafquan").value;
  var bookcart=document.getElementById("bookquan").value;
  
  var theleafcolor = "";
  var theleafval=document.getElementsByName("leafval");
  for (var i=0; i < theleafval.length; i++) {
   if (theleafval[i].checked) {
    theleafcolor=theleafval[i].value;
   }
  }
    
  document.getElementById('polkalink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipolka diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_num=3&undefined_quantity=1&quantity="+polkacart+"&item_number=envipolka"+disvalue;
  document.getElementById('cherrylink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicherry diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_num=3&undefined_quantity=1&quantity="+cherrycart+"&item_number=envicherry"+disvalue;
  document.getElementById('blackcklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered black diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+blackckcart+"&item_number=enviblackck"+disvalue;
  document.getElementById('pinkcklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered pink diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+pinkckcart+"&item_number=envipinkck"+disvalue;
  document.getElementById('brownlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibrown diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+browncart+"&item_number=envibrown"+disvalue;
  document.getElementById('purplelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipurple diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+purplecart+"&item_number=envipurple"+disvalue;
  document.getElementById('greenlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envigreen diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+greencart+"&item_number=envigreen"+disvalue;
  document.getElementById('aqualink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviaqua diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+aquacart+"&item_number=enviaqua"+disvalue;
  document.getElementById('yellowlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviyellow diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+yellowcart+"&item_number=enviyellow"+disvalue;
  document.getElementById('redlink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envired diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+redcart+"&item_number=envired"+disvalue;
  document.getElementById('pinklink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipink diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+pinkcart+"&item_number=envipink"+disvalue;
  document.getElementById('whitelink').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviwhite diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+whitecart+"&item_number=enviwhite"+disvalue;
  document.getElementById('polkalink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipolka diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+polkacart+"&item_number=envipolka"+disvalue;
  document.getElementById('cherrylink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicherry diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+cherrycart+"&item_number=envicherry"+disvalue;
  document.getElementById('blackcklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered black diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+blackckcart+"&item_number=enviblackck"+disvalue;
  document.getElementById('pinkcklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envicheckered pink diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+pinkckcart+"&item_number=envipinkck"+disvalue;
  document.getElementById('brownlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envibrown diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+browncart+"&item_number=envibrown"+disvalue;
  document.getElementById('purplelink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipurple diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+purplecart+"&item_number=envipurple"+disvalue;
  document.getElementById('greenlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envigreen diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+greencart+"&item_number=envigreen"+disvalue;
  document.getElementById('aqualink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviaqua diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+aquacart+"&item_number=enviaqua"+disvalue;
  document.getElementById('yellowlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviyellow diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+yellowcart+"&item_number=enviyellow"+disvalue;
  document.getElementById('redlink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envired diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+redcart+"&item_number=envired"+disvalue;
  document.getElementById('pinklink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=envipink diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+pinkcart+"&item_number=envipink"+disvalue;
  document.getElementById('whitelink2').href="https://www.paypal.com/cgi-bin/webscr?cmd=_cart&add=1&business=envibum@gmail.com&item_name=enviwhite diaper ("+disvalue+" easter code)&amount=22.99&discount_amount="+disamount+"&discount_amount2=0&quantity="+whitecart+"&item_number=enviwhite"+disvalue;
  createCookie2('eastercart3','eastercart3',1);
 } catch(err) {}
}

function checkCode(resetval)
{
 try {
  var CC1="THANKU";
  var CC2="FB1011";
  var CC3="BB2011";
  var CC4="RS2511";
  var CC5="WS3011";
  var CC6="ECOGLO";
  var CC7="WAFL2S";
  var CC8="NVBABY";
  var CC9="4BRAEE";
  var CC10="5EEAFR";
  var CE=document.getElementById("couponcode");
  
  if (resetval==1) {
   checkedCC1=0;
   checkedCC2=0;
   checkedCC3=0;
   checkedCC4=0;
   checkedCC5=0;
   checkedCC6=0;
   checkedCC7=0;
   checkedCC8=0;
   checkedCC9=0;
   checkedCC10=0;
   couponcodeswitch=0;
  }
  
  if (CE.value==CC1 || CE.value==CC2 || CE.value==CC3 || CE.value==CC4 || CE.value==CC5 || CE.value==CC6 || CE.value==CC7 || CE.value==CC8 || CE.value==CC9 || CE.value==CC10) couponcodeswitch=1;
  else couponcodeswitch=0;
  
  if (CE.value==CC7 || CE.value==CC8 || CE.value==CC9 || CE.value==CC10) {
   //checkCookie2();
   alert("Sorry, all the easter eggs for this promotion have been claimed.\n\nThank you to everyone for playing!\n\nStay tuned for more fun and giveaways coming soon!");
   this.event.returnValue = false;
   return false;
  }
  
  if (CE.value==CC1 || checkedCC1==1 && couponcodeswitch!=0) {
   if (checkedCC1==0) {
    alert("Coupon Code THANKU is now appied to all products that are added to your cart with a 5% discount savings!\n\nPlease note that it does not apply to any current package deals.\n\nThanks and happy diapering! :)");
    checkedCC1=1;
   }
   buildIt(5);
  }
  else if (CE.value==CC2 || checkedCC2==1 && couponcodeswitch!=0) {
   if (checkedCC2==0) {
    alert("Coupon Code FB1011 is now appied to all products that are added to your cart with a 10% discount savings!\n\nPlease note that it does not apply to any current package deals.\n\nThanks and happy diapering! :)");
    checkedCC2=1;
   }
   buildIt(10);
  }
  else if (CE.value==CC3 || checkedCC3==1 && couponcodeswitch!=0) {
   if (checkedCC3==0) {
    alert("Coupon Code BB2011 is now appied to all products that are added to your cart with a 20% discount savings!\n\nPlease note that typical minimums for this code is 25 unless otherwise stated and does not apply to any current package deals.\n\nThanks and happy diapering! :)");
    checkedCC3=1;
   }
   buildIt(20);
  }
  else if (CE.value==CC4 || checkedCC4==1 && couponcodeswitch!=0) {
   if (checkedCC4==0) {
    alert("Coupon Code RS2511 is now appied to all products that are added to your cart with a 25% discount savings!\n\nPlease note that typical minimums for this code is 25 unless otherwise stated and does not apply to any current package deals.\n\nThanks and happy diapering! :)");
    checkedCC4=1;
   }
   buildIt(25);
  }
  else if (CE.value==CC5 || checkedCC5==1 && couponcodeswitch!=0) {
   if (checkedCC5==0) {
    alert("Coupon Code WS3011 is now appied to all products that are added to your cart with a 30% discount savings!\n\nPlease note that typical minimums for this code is 50 unless otherwise stated and does not apply to any current package deals.\n\nThanks and happy diapering! :)");
    checkedCC5=1;
   }
   buildIt(30);
  }
  else if (CE.value==CC6 || checkedCC6==1 && couponcodeswitch!=0) {
   if (checkedCC6==0) {
	alert("Coupon Code ECOGLO is now appied to all products that are added to your cart with a $130.00 discount savings!\n\nThanks Kimberly and happy diapering! :)");
    checkedCC6=1;
   }
   //else if (thecookie2!="eastercart3") {
   buildDiscount("ECOGLO",130);
   //}
  }
  else if (CE.value==CC7 || checkedCC7==1 && couponcodeswitch!=0) {
   if (checkedCC7==0 && thecookie2!="eastercart3") {
    alert("Sorry that easter egg coupon has been already claimed today.");
    checkedCC7=1;
   }
   else if (thecookie2!="eastercart3") {
    //buildEaster("WAFL2S");
   }
  }
  else if (CE.value==CC8 || checkedCC8==1 && couponcodeswitch!=0) {
   if (checkedCC8==0 && thecookie2!="eastercart3") {
    alert("Sorry that easter egg coupon has been already claimed today.");
    checkedCC8=1;
   }
   else if (thecookie2!="eastercart3") {
    //buildEaster("NVBABY");
   }
  }
  else if (CE.value==CC9 || checkedCC9==1 && couponcodeswitch!=0) {
   if (checkedCC9==0 && thecookie2!="eastercart3") {
    alert("Sorry that easter egg coupon has been already claimed today.");
    checkedCC9=1;
   }
   else if (thecookie2!="eastercart3") {
    //buildEaster("4BRAEE");
   }
  }
  else if (CE.value==CC10 || checkedCC10==1 && couponcodeswitch!=0) {
   if (checkedCC10==0 && thecookie2!="eastercart3") {
    alert("Sorry that easter egg coupon has been already claimed today.");
    checkedCC10=1;
   }
   else if (thecookie2!="eastercart3") {
    //buildEaster("5EEAFR");
   }
  }
  else {
   if (CE.value=="") {
    alert("Please enter a coupon code.");
   }
   else {
    alert("Sorry, that coupon code is invalid or has expired.\n\nBut check us out on Facebook/Twitter or our blog envibaby.com for updates on specials and coupon codes.");
	document.getElementById("couponcode").value="";
    addCart();
    checkedCC1=0;
    checkedCC2=0;
    checkedCC3=0;
    checkedCC4=0;
    checkedCC5=0;
    checkedCC6=0;
    checkedCC7=0;
    checkedCC8=0;
    checkedCC9=0;
    checkedCC10=0;
    couponcodeswitch=0;  
   }
  }
 } catch(err) {}
}

function checkCode2()
{
 try {
  if (couponcodeswitch==1) checkCode(0);
  else addCart();
 } catch(err) {}
}

if (navigator.appVersion.indexOf("MSIE")!=-1) 
{
 var bName = 'MSIE';
 var temp = navigator.appVersion.split("MSIE");
 var bVer = parseFloat(temp[1]);
} else {
 var bName = navigator.appName;
 var bVer = parseFloat(navigator.appVersion);
}
//-->
