﻿// JavaScript File

function ClearServiceTrialInputs()
{
    //alert("ClearServiceTrialInputs()");
    var contactname = document.getElementById("contactname");
    contactname.value = "";
    contactname.style.background = '';
    contactname.style.border = "solid #7F9DB9 1px";
    
    var email = document.getElementById("email");
    email.value = "";
    email.style.background = '';
    email.style.border = "solid #7F9DB9 1px";
 
    var company = document.getElementById("company");
    company.value = "";
    company.style.background = ''; 
    
    var address = document.getElementById("address");
    address.value = "";
    address.style.background = '';

    var postcode = document.getElementById("postcode");
    postcode.value = "";
    postcode.style.background = '';
    postcode.style.border = "solid #7F9DB9 1px";
    
    var telephone = document.getElementById("telephone");
    telephone.value = "";
    telephone.style.background = '';
    telephone.style.border = "solid #7F9DB9 1px";
    
    var faxnumber = document.getElementById("faxnumber");
    faxnumber.value = "";
    faxnumber.style.background = '';
    faxnumber.style.border = "solid #7F9DB9 1px";
    
    var captcha = document.getElementById("captcha");
    captcha.value = "enter text here...";
    captcha.style.color = "#FF0000";
    captcha.style.background = '';
    captcha.style.border = "solid #7F9DB9 1px";
}

function ClearCommercialQuoteInputs()
{
    //alert("ClearCommercialQuoteInputs()");
    ClearServiceTrialInputs()
    //now clear all additonal fields used in 
    var PreferredMethodOfContact = document.getElementById("PreferredMethodOfContact");
    //cannot deselect a radio button
    
    var selMonth = document.getElementById("selMonth");
    selMonth.selectedIndex = 0;
    
    var selYear = document.getElementById("selYear");
    selYear.selectedIndex = 0;
    
    var Businessdescription = document.getElementById("Businessdescription");
    Businessdescription.value = "";
    Businessdescription.style.background = '';
    Businessdescription.style.border = "solid #7F9DB9 1px";
    
    var Insurancerequirements = document.getElementById("Insurancerequirements");
    Insurancerequirements.value = "";
    Insurancerequirements.style.background = '';
    Insurancerequirements.style.border = "solid #7F9DB9 1px";
}

function ClearBridalQuoteInputs()
{
    //alert("ClearBridalQuoteInputs()");
    /* contact details */
    var txtProposer = document.getElementById("txtProposer");
    txtProposer.value = "";
    txtProposer.style.background = '';
    txtProposer.style.border = "solid #7F9DB9 1px"; 
    
    var txtEmail = document.getElementById("txtEmail");
    txtEmail.value = "";
    txtEmail.style.background = '';
    txtEmail.style.border = "solid #7F9DB9 1px"; 
    
    var txtTelephone = document.getElementById("txtTelephone");
    txtTelephone.value = "";
    txtTelephone.style.background = '';
    txtTelephone.style.border = "solid #7F9DB9 1px"; 
    
    var address = document.getElementById("address");
    address.value = "";
    address.style.background = '';
    address.style.border = "solid #7F9DB9 1px"; 
    
    var postcode = document.getElementById("postcode");
    postcode.value = "";
    postcode.style.background = '';
    postcode.style.border = "solid #7F9DB9 1px"; 
    
    var txtContact = document.getElementById("txtContact");
    txtContact.value = "";
    txtContact.style.background = '';
    txtContact.style.border = "solid #7F9DB9 1px"; 
    
    /* business details */
    var txtBuildingValue = document.getElementById("txtBuildingValue");
    txtBuildingValue.value = "";
    txtBuildingValue.style.background = '';
    txtBuildingValue.style.border = "solid #7F9DB9 1px";
    
    var txtContentsValue = document.getElementById("txtContentsValue");
    txtContentsValue.value = "";
    txtContentsValue.style.background = '';
    txtContentsValue.style.border = "solid #7F9DB9 1px";
    
    var txtStockValue = document.getElementById("txtStockValue");
    txtStockValue.value = "";
    txtStockValue.style.background = '';
    txtStockValue.style.border = "solid #7F9DB9 1px";
    
    var txtOtherStockValue = document.getElementById("txtOtherStockValue");
    txtOtherStockValue.value = "";
    txtOtherStockValue.style.background = '';
    txtOtherStockValue.style.border = "solid #7F9DB9 1px";
    
    var txtOtherStockDescription = document.getElementById("txtOtherStockDescription");
    txtOtherStockDescription.value = "";
    txtOtherStockDescription.style.background = '';
    txtOtherStockDescription.style.border = "solid #7F9DB9 1px"; 
    
    /* the three selects */
    var selMonth = document.getElementById("selMonth");
    selMonth.selectedIndex = 0;
    var selYear = document.getElementById("selYear");
    selYear.selectedIndex = 0;
    var selTimeTrading = document.getElementById("selTimeTrading");
    selTimeTrading.selectedIndex = 0;
    
    /* subsequent text inputs*/
    var txtWindowDetails = document.getElementById("txtWindowDetails");
    txtWindowDetails.value = "";
    txtWindowDetails.style.background = '';
    txtWindowDetails.style.border = "solid #7F9DB9 1px";
    
    var txtClaimDetails = document.getElementById("txtClaimDetails");
    txtClaimDetails.value = "";
    txtClaimDetails.style.background = '';
    txtClaimDetails.style.border = "solid #7F9DB9 1px";
   
    var txtAlarmDetails = document.getElementById("txtAlarmDetails");
    txtAlarmDetails.value = "";
    txtAlarmDetails.style.background = '';
    txtAlarmDetails.style.border = "solid #7F9DB9 1px";
   
    var txtBusinessDetails = document.getElementById("txtBusinessDetails");
    txtBusinessDetails.value = "";
    txtBusinessDetails.style.background = '';
    txtBusinessDetails.style.border = "solid #7F9DB9 1px";
   
    var txtLockDetails = document.getElementById("txtLockDetails");
    txtLockDetails.value = "";
    txtLockDetails.style.background = '';
    txtLockDetails.style.border = "solid #7F9DB9 1px";
   
    var txtImprovementsValue = document.getElementById("txtImprovementsValue");
    txtImprovementsValue.value = "";
    txtImprovementsValue.style.background = '';
    txtImprovementsValue.style.border = "solid #7F9DB9 1px"; 
     
    var txtComments = document.getElementById("txtComments");
    txtComments.value = "";
    txtComments.style.background = '';
    txtComments.style.border = "solid #7F9DB9 1px";
   
    /* checkboxes */
    
    var chkBells = document.getElementById("chkBells");
    chkBells.checked = false;

    var chkDigital = document.getElementById("chkDigital");
    chkDigital.checked = false;
   
    var chkRedcare = document.getElementById("chkRedcare");
    chkRedcare.checked = false;
    
    var chkDualcom = document.getElementById("chkDualcom");
    chkDualcom.checked = false;
    
    /* anti spam input */
    var captcha = document.getElementById("captcha");
    captcha.value = "enter text here...";
    captcha.style.color = "#FF0000";
    captcha.style.background = '';
    captcha.style.border = "solid #7F9DB9 1px";
}

function ClearClaimInputs()
{
    //alert("ClearClaimInputs()");
    ClearServiceTrialInputs()
    //now clear all additonal fields used in 
    var PreferredMethodOfContact = document.getElementById("PreferredMethodOfContact");
    //cannot deselect a radio button
    
    var selMonth = document.getElementById("selMonth");
    selMonth.selectedIndex = 0;
    
    var selYear = document.getElementById("selYear");
    selYear.selectedIndex = 0;
    
    var Businessdescription = document.getElementById("Businessdescription");
    Businessdescription.value = "";
    Businessdescription.style.background = '';
    Businessdescription.style.border = "solid #7F9DB9 1px";
}
