function contactFocus(wow) {
    if (wow.value == 'First Name') {
        return wow.value = '';
    }
    if (wow.value == 'Last Name') {
        return wow.value = '';
    }
    if (wow.value == 'Company') {
        return wow.value = '';
    }
    if (wow.value == 'Phone Number') {
        return wow.value = '';
    }
    if (wow.value == 'Email Address') {
        return wow.value = '';
    }
    if (wow.value == 'Type your message here.') {
        return wow.value = '';
    }
}
function contactFill() {
    try {
        var myContactForm = new Array();
        myContactForm[0] = $("input.txtFName").get(0);
        myContactForm[1] = $("input.txtLName").get(0);
        myContactForm[2] = $("input.txtCompany").get(0);
        myContactForm[3] = $("input.txtWorkPhone").get(0);
        myContactForm[4] = $("input.txtEmail").get(0);
        myContactForm[5] = $("textarea.txtBackgroup").get(0);

        if (myContactForm[0].value == '' || myContactForm[0].value == null) {
            myContactForm[0].value = 'First Name'
        }
        if (myContactForm[1].value == '' || myContactForm[1].value == null) {
            myContactForm[1].value = 'Last Name'
        }
        if (myContactForm[2].value == '' || myContactForm[2].value == null) {
            myContactForm[2].value = 'Company'
        }
        if (myContactForm[3].value == '' || myContactForm[3].value == null) {
            myContactForm[3].value = 'Phone Number'
        }
        if (myContactForm[4].value == '' || myContactForm[4].value == null) {
            myContactForm[4].value = 'Email Address'
        }
        
        if (myContactForm[5].value == '' || myContactForm[5].value == null) {
            $("textarea.txtBackgroup").val('Type your message here.');

        }
    }
    catch (err) {
        //fillMyContactForm2();
    }
}
function clearAll() {
    try {
        var myContactForm = new Array();
        myContactForm[0] = $("input.txtFName").get(0);
        myContactForm[1] = $("input.txtLName").get(0);
        myContactForm[2] = $("input.txtCompany").get(0);
        myContactForm[3] = $("input.txtWorkPhone").get(0);
        myContactForm[4] = $("input.txtEmail").get(0);
        myContactForm[5] = $("textarea.txtBackgroup").get(0);

        if (myContactForm[0].value == 'First Name') {
            myContactForm[0].value = '';
        }
        if (myContactForm[1].value == 'Last Name') {
            myContactForm[1].value = '';
        }
        if (myContactForm[2].value == 'Company') {
            myContactForm[2].value = '';
        }
        if (myContactForm[3].value == 'Phone Number') {
            myContactForm[3].value = '';
        }
        if (myContactForm[4].value == 'Email Address') {
            myContactForm[4].value = '';
        }
        if (myContactForm[5].value == 'Type your message here.') {
            myContactForm[5].value = '';
        }
    }
    catch (err) {
        //fillMyContactForm2();
    }
}
function fillMyContactForm() {
	contactFill();
	
    try {
        var myContactForm = new Array();
        myContactForm[0] = $("input.txtFName").get(0);
        myContactForm[1] = $("input.txtLName").get(0);
        myContactForm[2] = $("input.txtCompany").get(0);
        myContactForm[3] = $("input.txtWorkPhone").get(0);
        myContactForm[4] = $("input.txtEmail").get(0);
        myContactForm[5] = $("textarea.txtBackgroup").get(0);

	$("#aspnetForm").bind("submit", function() {

	clearAll()
	
	}
);

        for (i = 0; i <= 5; i++) {
            myContactForm[i].setAttribute('onblur', 'contactFill();');
            myContactForm[i].setAttribute('onfocus', 'contactFocus(this);');
        }
    }
    catch (err) {
        //fillMyContactForm2();
    }
	
}
