function changeTab(b){
$(".tabs").css("display","none");
$("#Tab"+b).css("display","block");
}

function checkquestionform()
{
  if(document.askquestion.name.value.length==0)
  {
   alert('Please enter your name');
   document.askquestion.name.focus();
   return;
  }
  if(document.askquestion.email.value.length==0)
  {
   alert('Please enter your email address');
   document.askquestion.email.focus();
   return;
  }
  if(document.askquestion.message.value.length==0)
  {
   alert('Please enter your inquiry');
   document.askquestion.message.focus();
   return;
  }
document.askquestion.submit();
}

function checkquoteform()
{
  if(document.quoteForm.quotename.value.length==0)
  {
   alert('Please enter your name');
   document.quoteForm.quotename.focus();
   return;
  }
  if(document.quoteForm.quoteemail.value.length==0)
  {
   alert('Please enter your email address');
   document.quoteForm.quoteemail.focus();
   return;
  }
  if(document.quoteForm.quoteorganization.value.length==0)
  {
   alert('Please enter your organization name');
   document.quoteForm.quoteorganization.focus();
   return;
  }

var selectCount = $(".formInput select").length;
$(".getQuoteTable").before("<input type=\"hidden\" value=\""+selectCount+"\" name=\"optionCount\" />");

var selectvalue;
var selectname;

for(i=0; i<selectCount; i++)
{
selectvalue = $(".formInput select:eq("+i+")").val();
$(".getQuoteTable").before("<input type=\"hidden\" value=\""+selectvalue+"\" name=\"selectvalue"+i+"\" />");

selectname = $(".formInput select:eq("+i+")").attr("name");
$(".getQuoteTable").before("<input type=\"hidden\" value=\""+selectname+"\" name=\"selectname"+i+"\" />");
}

document.quoteForm.submit();
}



function accessoryCartSubmit()
{
$(".accCheckTD input").attr("checked", "checked");

var bundlePrice = 0;
var discountAmount = 0;

for(i=0; i<priceArr.length; i++)
{
bundlePrice = bundlePrice + priceArr[i];
}

//discountAmount = pricediscount;
discountAmount = pricediscount.toFixed(2);

$(".orderSubmitTable").before("<input type=\"hidden\" name=\"vwattr0_Bundle Discount\" value=\"Bundle Discount(-"+discountAmount+")\">");

document.theOrderForm.submit();
}



function check()
{
  if(document.thecontactform.name.value.length==0)
  {
   alert('Please enter your name');
   document.thecontactform.name.focus();
   return;
  }
  if(document.thecontactform.email.value.length==0)
  {
   alert('Please enter your email address');
   document.thecontactform.email.focus();
   return;
  }
  if(document.thecontactform.subject.value.length==0)
  {
   alert('Please enter a subject for the email');
   document.thecontactform.subject.focus();
   return;
  }
  if(document.thecontactform.message.value.length==0)
  {
   alert('Please enter your inquiry');
   document.thecontactform.message.focus();
   return;
  }
document.thecontactform.submit();
}

function switch2(idee,tab)
{
if(tab==1)
{
$("#right-"+idee).hide();
$("#left-"+idee).show();
$("#LeftTab-"+idee).removeClass("disabledTab");
$("#LeftTab-"+idee).addClass("highlightTab");
$("#RightTab-"+idee).removeClass("highlightTab");
$("#RightTab-"+idee).addClass("disabledTab");
}
if(tab==2)
{
$("#right-"+idee).show();
$("#left-"+idee).hide();
$("#RightTab-"+idee).removeClass("disabledTab");
$("#RightTab-"+idee).addClass("highlightTab");
$("#LeftTab-"+idee).removeClass("highlightTab");
$("#LeftTab-"+idee).addClass("disabledTab");
}
}





