var HasSample = 0;
var x = 0;

function gobrandall(brandall) {
var myindex=brandall.branddesall.selectedIndex
parent.location.href=(brandall.branddesall.options[myindex].value); }

function gobrandh(brandsh) {
var myindex=brandsh.branddesth.selectedIndex
parent.location.href=(brandsh.branddesth.options[myindex].value); }

function gocath(catsh) {
var myindex=catsh.catsdesth.selectedIndex
parent.location.href=(catsh.catsdesth.options[myindex].value); }

function gotypeh(typesh) {
var myindex=typesh.typedesth.selectedIndex
parent.location.href=(typesh.typedesth.options[myindex].value); }

function getfragfree(field3) {
  if (field3.indexOf("FragranceFree") > -1) {
  document.write("<span class=\"fragfree\">Fragrance-Free<br></span>");
  ++x; }
return x; }

function getglutfree(field3) {
   if (field3.indexOf("GlutenFree") > -1) {
   document.write("<span class=\"glutenfree\">Gluten-Free<br></span>");
   ++x; }
return x; }

function getvegan(field3) {
  if (field3.indexOf("Vegan") > -1) {
  document.write("<span class=\"vegan\">Vegan</span>");
  ++x; }
return x; }

function blnkimg() {
document.write("<img src=\"media\/blank.gif\" width=80 height=1 alt=\"\">"); }

function getffnew(field3) {
  if (field3.indexOf("FragranceFree") > -1) {
  document.write("<img src=\"media/ffnew.gif\" width=\"24\" height=\"13\" border=\"0\" alt=\"Fragrance Free\" title=\"Fragrance Free\">");
  ++x; }
return x; }

function getgfnew(field3) {
   if (field3.indexOf("GlutenFree") > -1) {
   document.write("<img src=\"media/gfnew.gif\" width=\"24\" height=\"13\" border=\"0\" alt=\"Gluten Free\" title=\"Gluten Free\">");
   ++x; }
return x; }

function getvgnew(field3) {
  if (field3.indexOf("Vegan") > -1) {
  document.write("<img src=\"media/vgnew.gif\" width=\"36\" height=\"13\" border=\"0\" alt=\"Vegan\" title=\"Vegan\">");
  ++x; }
return x; }

function gethtml(field3) {
  if (field3.indexOf("html") > -1)
  {
  HasSample = 1;
  }
x = 0; }

function samplebutton(field3,color1) {
  if (field3.indexOf("|") > -1) {
  fieldarray = field3.split("|");
  var n = fieldarray.length;
  var y = 1;
    while (y <= n) {
     if (fieldarray[y].indexOf("html") > -1) {
     document.write("<a href=\"http:\/\/www.whiterabbitbeauty.com\/" + fieldarray[y] + "\" onClick=\"window.open(\'http:\/\/www.whiterabbitbeauty.com\/" + fieldarray[y] + "\','PurchaseSamplePage','left=30,top=30,width=720,height=500,directories=no,location=no,menubar=no,status=no,toolbar=no,scrollbars,resizable'); return false;\"><img src=\"media\/purchase_sample.gif\" width=\"68\" height=\"18\" border=\"0\" alt=\"Purchase Sample\" title=\"Purchase Sample\"><\/a>");
     break;
     }
    y++;
    }
  }
  else {
  document.write("<a href=\"http:\/\/www.whiterabbitbeauty.com\/" + field3 + "\" onClick=\"window.open(\'http:\/\/www.whiterabbitbeauty.com\/" + field3 + "\','PurchaseSamplePage','left=30,top=30,width=720,height=500,directories=no,location=no,menubar=no,status=no,toolbar=no,scrollbars,resizable'); return false;\"><img src=\"media\/purchase_sample.gif\" width=\"68\" height=\"18\" border=\"0\" alt=\"Purchase Sample\" title=\"Purchase Sample\"><\/a>");
  }
document.write("<img src=\"media\/blank.gif\" width=10 height=1 alt=\"\">");
HasSample = 0; }

