﻿// JScript File

function sendMail(){
    if (Page_ClientValidate()==true){
    var strName = document.getElementById('ctl00_MainSite_strName').value
    var strEmail = document.getElementById('ctl00_MainSite_strEmail').value
    var strEnquiry = document.getElementById('ctl00_MainSite_strEnquiry').value
    $("#ContactForm").html("<img src='images/ajax.gif' alt=''> Sending...")
    $.ajax({
    type: "GET",
    url: "AJAX/SendEmail.ashx",
    data: "name=" + strName + "&email=" + strEmail + "&enquiry=" + strEnquiry,
    success: function(html){
        $("#ContactForm").html(html)
    }
    });
    //else do nothing
    };
}

function updateVariable(ID,Value){
    $("#" + ID + "Confirm").html("<img src='../images/ajax.gif' alt='Updating...'>")
    $.ajax({
    type: "GET",
    url: "../AJAX/UpdateVariable.ashx",
    data: "ID=" + ID + "&Value=" + Value ,
    success: function(html){
        $("#" + ID + "Confirm").html("<img src='../images/tick.png' alt='Updated...'>")
    }
    });

}