

function AccountAlert() {
    alert("Please Login");
}

function callLogon(){
tempproviderno=ltrim(document.logon.int_provider_no.value);
tempproviderno=rtrim(document.logon.int_provider_no.value);
if(tempproviderno=="" || isNaN(tempproviderno)){
    window.alert("Enter Provider Number");
    document.logon.int_provider_no.focus();
    return;
}

temppassword=ltrim(document.logon.str_password.value);
temppassword=rtrim(document.logon.str_password.value);
if(temppassword==""){
    window.alert("Enter Password");
    document.logon.str_password.focus();
    return;
}
document.logon.action="onlineMarketing.php";
document.logon.submit();
return;
}
function callValidate(){

tempcontactname=ltrim(document.user.str_contact_name.value);
tempcontactname=rtrim(document.user.str_contact_name.value);
if(tempcontactname==""){
    window.alert("Enter Contact Name");
    document.user.str_contact_name.focus();
    return;
}

tempoccupation=ltrim(document.user.str_occupation.value);
tempoccupation=rtrim(document.user.str_occupation.value);
if(tempoccupation==""){
    window.alert("Enter Occupation");
    document.user.str_occupation.focus();
    return;
}

temporganization=ltrim(document.user.str_organization.value);
temporganization=rtrim(document.user.str_organization.value);
if(temporganization==""){
    window.alert("Enter Organization");
    document.user.str_organization.focus();
    return;
}

tempaddress1=ltrim(document.user.str_address1.value);
tempaddress1=rtrim(document.user.str_address1.value);
if(tempaddress1==""){
    window.alert("Enter Address");
    document.user.str_address1.focus();
    return;
}

tempcity=ltrim(document.user.str_city.value);
tempcity=rtrim(document.user.str_city.value);
if(tempcity==""){
    window.alert("Enter City");
    document.user.str_city.focus();
    return;
}

tempzipcode=ltrim(document.user.str_zipcode.value);
tempzipcode=rtrim(document.user.str_zipcode.value);
if(tempzipcode==""){
    window.alert("Enter zipcode");
    document.user.str_zipcode.focus();
    return;
}

tempemail=ltrim(document.user.str_email.value);
tempemail=rtrim(document.user.str_email.value);
if(tempemail=="" || !check_mailid(tempemail)){
    window.alert("Enter a valid Email Id");
    document.user.str_email.focus();
    return;
}

tempphone1=ltrim(document.user.str_phone1.value);
tempphone1=rtrim(document.user.str_phone1.value);
if(tempphone1=="" || isNaN(tempphone1) || tempphone1.length!=3){
    window.alert("Enter a valid Phone Number 1");
    document.user.str_phone1.focus();
    return;
}

tempphone2=ltrim(document.user.str_phone2.value);
tempphone2=rtrim(document.user.str_phone2.value);
if(tempphone2=="" || isNaN(tempphone2) || tempphone2.length!=3){
    window.alert("Enter a valid Phone Number 2");
    document.user.str_phone2.focus();
    return;
}

tempphone3=ltrim(document.user.str_phone3.value);
tempphone3=rtrim(document.user.str_phone3.value);
if(tempphone3=="" || isNaN(tempphone3) || tempphone3.length!=4 ){
    window.alert("Enter a valid Phone Number 3");
    document.user.str_phone3.focus();
    return;
}
document.user.action="onlineMarketing.php";
document.user.submit();
return;
}

