document.write("<style type='text/css'>.fe{ padding: 1px; border: 1px solid #c6c6c6; margin: .5em 0 .5em 0 !important; clear: both;} .fe a{ color: #3F87BB !important; border: 0 !important; text-decoration: none !important;} .fe a:hover{ color: #165d91 !important; border: 0 !important; text-decoration: none !important;} .fe_header{ font-size: .9em; font-weight: bold; position: relative;} .fe_header_text{ background: #f4f4f4 !important; padding: 1em 1em 1em 1em !important;} .fe_header_toggle{ display: block; position: absolute; top: 1em; right: 1em; _right: 3.5em; font-weight: bold; cursor: pointer;} .fe_header_get{ display: block; position: absolute; top: 1em; right: 1em; _right: 3.5em; font-weight: bold; cursor: pointer;} .fe_subheader{ padding: .5em .5em .5em .5em !important; border: 0 !important; margin: 0 !important; font-size: 1.2em !important; background: #f4f4f4 !important; font-weight: bold;} .fe_subheader_title{ font-weight: bold; padding: .5em .5em .5em .5em !important; border: 0 !important; margin: 0 !important; font-size: 1.0em !important; background: #f4f4f4 !important; font-weight: bold;} .fe_subcontent{ font-size: 0.75em; line-height: 0.8em !important; margin: .1em 0 .1em 0 !important; padding: .3em !important; background: white !important; border-top: 2px solid #f4f4f4 !important; border-bottom: 2px solid #f9f9f9 !important; overflow: hidden; height: auto;} .fe_subcontent p{ margin: .25em .05em .25em .05em !important; padding: 0 !important;} .fe_subcontent_left{ float: right !important; margin: 0 0 .5em .5em !important;} .fe img{ max-width: 150px !important; max-height: 150px !important; border: 0 !important; padding: 0 !important;} .fe img:hover, .fe_subcontent_left a:hover{ border: 0 !important;} .fe_subcontent_right{ } .fe_subcontent table{ width: auto !important;} .fe_subcontent td{ padding: .15em !important; vertical-align: top !important;} .fe_subcontent .td_left{ width: 40px !important; font-weight: bold !important;} .fe_footer{ padding: .8em !important; font-size: .9em !important; text-align: right !important; background: #f9f9f9 !important;} .fe_footer a{ font-weight: bold;  } .fe_brand_list { font-weight: normal; color:#3F87BB} .fe_product_list a { font-weight: bold; font-size: 0.9em; text-decoration: underline; } .fe_subcontent .td_VariableRed{ vertical-align: top; color:red !important; text-align: center; } .fe_subcontent .td_VariableAmber{ color:orange !important; text-align: center; } .fe_subcontent .td_VariableGreen{ color:green !important; text-align: center; } .fe_subcontent .td_nutrient{ text-align: center;  } </style>");

function fe_toggle(start)
{
  var date = new Date();
  date.setTime(date.getTime()+(30*24*60*60*1000));
  var expires = "; expires="+date.toGMTString();

  var content = getNextSibling(start.parentNode);
  var header_text = getNextSibling(start);

  if(start.innerHTML == 'maximize')
  {
    content.style.display = 'block';
    start.innerHTML = 'minimize';
		header_text.style.display = 'none';
    document.cookie = "fe_widget=true"+expires+"; path=/";
  }
  else
  {
    content.style.display = 'none';
    start.innerHTML = 'maximize';
		header_text.style.display = 'block';
    document.cookie = "fe_widget=false"+expires+"; path=/";
  }
}

function getNextSibling(n){	
  var x=n.nextSibling;
  while(x.nodeType!=1){
    x=x.nextSibling;
  }
  return x;
}

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;
}

var fe_widget = readCookie('fe_widget');
if(fe_widget == 'false')
{
  document.write('<style type=\"text/css\"> .fe_content { display: none; } </style>');
}
else
{
  document.write('<style type=\"text/css\"> .fe_header_text { display: none; } </style>' + '<a href="http://www.foodessentials.com/getwidget" class="fe_header_get">get widget</a>');
}
