function Homepage() {
    document.location.href=".";
}

function Item(ID,Action) {
    var ItemID = ID.replace(/image_wrap_holder/g, "");
    if (Action == 'Click') {
        document.location.href="?pageName=details&id="+ItemID;
    }
    if (Action == 'On') {
        document.getElementById("image_wrap2_holder"+ItemID).style.background="#CFC7C7";
    }
    if (Action == 'Off') {
        document.getElementById("image_wrap2_holder"+ItemID).style.background="#DEDDDA";
    }
}

function ImageSwap(Image, Action) {   
    if (Action == 'On') { 
        document.getElementById("mainimage").src="images/items/"+Image;
    } else {
        document.getElementById("mainimage").src="images/items/"+Action;
    }
}


function HomepageSwitch(On) {
    document.getElementById("HomeImage").src="images/items/"+On;
}

 function Highlight(ID,Action) {
          var ThisID = document.getElementById(ID).value;
            if (Action == 'On') {
              if (ThisID == '###-###-####' || ThisID == '(Two Character Abbrevation)' || ThisID == 'Include dimensions and price you are expecting to pay'  ) {
                document.getElementById(ID).value="";
                document.submitForm.cDescribe.value="";
              }
              document.getElementById(ID).style.background="#FFFFFF";
              document.getElementById(ID).style.fontWeight="bold";
            } else {
              document.getElementById(ID).style.background="#DDDDDD";
              document.getElementById(ID).style.fontWeight="normal";
              }
          }
  
          function Required() {
          
          
            if (document.getElementById("cNumber1").value=="###-###-####") {
              document.getElementById("cNumber1").value="";
             }
            
               document.getElementById("cFirstN").value = document.getElementById("cFirstN").value.replace(/-/g, "");            
               document.getElementById("cZip").value = document.getElementById("cZip").value.replace(/-/g, "");
            
            var warning = "The following fields are required: "+"\n";
            
            if (document.submitForm.cFirstN.value=="") {
            warning = warning + " - First Name"+"\n";
            }
            
            if (document.submitForm.cLastN.value=="") {
            warning = warning + " - Last Name"+"\n";
            }
            
            if (document.submitForm.cEmail.value=="") {
            warning = warning + " - E-mail Address"+"\n";
            }
            
            if (document.submitForm.cEmail2.value=="") {
            warning = warning + " - Confirm E-mail Address"+"\n";
            }
            
            if (document.submitForm.cNumber1.value=="") {
            warning = warning + " - Telephone Number"+"\n";
            }
            
            if (document.submitForm.cDescribe.value=="") {
            warning = warning + " - What are you looking for?"+"\n";
            }
            
              if (warning == "The following fields are required: "+"\n") {
                if (document.getElementById("cEmail").value==document.getElementById("cEmail2").value) {
                  document.submitForm.submit();
                } else {
                  alert("Your email address does not match");
                }
              } else {
                alert(warning);
                return false;
               }            
          }
          
          
          function RequiredContUs() {
          
                     
            
            var warning = "The following fields are required: "+"\n";
            
            if (document.submitForm.cFirstN.value=="") {
            warning = warning + " - First Name"+"\n";
            }
            
            if (document.submitForm.cLastN.value=="") {
            warning = warning + " - Last Name"+"\n";
            }
            
            if (document.submitForm.cEmail.value=="") {
            warning = warning + " - E-mail Address"+"\n";
            }
            
            if (document.submitForm.cEmail2.value=="") {
            warning = warning + " - Confirm E-mail Address"+"\n";
            }
            
            if (document.submitForm.cDescribe.value=="") {
            warning = warning + " - Comments or Questions?"+"\n";
            }
            
              if (warning == "The following fields are required: "+"\n") {
                if (document.getElementById("cEmail").value==document.getElementById("cEmail2").value) {
                  document.submitForm.submit();
                } else {
                  alert("Your email address does not match");
                }
              } else {
                alert(warning);
                return false;
               }            
          }
        
