    //show / hide specs div on overview pages
function ShowHide(elementId) {
  var element = document.getElementById(elementId);
  if(element.style.display != "block") {
    element.style.display = "block";
  } else {
    element.style.display = "none";
  }
}
//
function UpdateText(element) {
  if(element.innerHTML.indexOf("show1") != -1) {
    element.innerHTML = "<div class='a8blu'>Show specifications</div>";
  } else {
    element.innerHTML = "<div class='a8blu' id='show1'>Hide specifications</div>";
  }
}
//
    //shows pic on select boat web parts page
function boatPic(s) {
  x = s.split("/");
  b = s.search("ttp:");
  if (b > 0) { mgd = x[5]; } else { mgd = x[3]; }
  document.images["bpic"].src = "/partspage/pics/" + mgd + ".jpg";
}
//
    //shows floating pic on parts page
function vpic(x) { document.images["pcx"].src = "/partspage/pcpics/" + x + ".jpg"; }

    //displays large parts pic
function vpiclg() {
  x = document.images['pcx'].src;
  px = x.replace('.jpg', '_lg.jpg');
  px = px.replace('pcpics/', 'pcpics/lg/');
  pg = '/cps/vlarge.php?' + px;
  dspwnd=window.open(pg,'lg','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=822,height=640');
}
//
    //shows seat differences on parts page
function v27seat() {
  var s = '/cps/27seat.html';
  dspwnd=window.open(s,'dw','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=650,height=295');
}
//
    //tells about pelican stainless hdw
function sst() {
  var s = '/cps/sst.html';
  dspwnd=window.open(s,'dw','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=650,height=225');
}
//
    //explains drop charge
function vdrop() {
  var s = '/cps/dropcharge.html';
  dspwnd=window.open(s,'dw','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=650,height=250');
}
//
    //explains retrofit motor kit
function vmotor() {
  var s = '/cps/motor.html';
  dspwnd=window.open(s,'dw','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,width=650,height=250');
}
//
    //???
function elec() {
  var s = '/parts/partdtl/1/llelec.html';
}
//
      //shows small parts pic on db
function dpic(x) {
  var w = '/empty.php?' + x;
  top.frames['pcpix'].location = w;
}
//
      //cookie testing
function are_cookies_enabled() {
  var cookieEnabled = (navigator.cookieEnabled) ? true : false;
  if (typeof navigator.cookieEnabled == "undefined" && !cookieEnabled) { 
    document.cookie = "testcookie";
    cookieEnabled = (document.cookie.indexOf("testcookie") != -1) ? true : false;
  }
  return (cookieEnabled);
}

function setCookie(c_name,value) {
  var exdate = new Date();
  var dm = top.location.host;
  exdate.setDate(exdate.getDate()+1);
  document.cookie = c_name + "=" + escape(value) + ";expires=" + exdate.toGMTString() + ";path=\/" + ";domain=." + dm;
}
//

