﻿function tnc()
{
    var txt1 = document.getElementById('TextBox1').value;
    var txt6 = document.getElementById('TextBox6').value;
    var txt2 = document.getElementById('TextBox2').value;
    var txt4 = document.getElementById('TextBox4').value;
    var txt3 = document.getElementById('TextBox3').value;
    var txt9 = document.getElementById('TextBox9').value;
    var txt5 = document.getElementById('TextBox5').value;
    var txt8 = document.getElementById('TextBox8').value;
    var teamname = document.getElementById('txtteamname').value;
    var chkbx = document.getElementById('CheckBox1');
    
    if(txt1 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox1').focus();
        document.getElementById('TextBox1').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox1').style.borderColor = 'red';
        document.getElementById('TextBox1').style.borderWidth = '2px';
        document.getElementById('TextBox1').style.color = 'white';
        return false;
    }
    else if(txt6 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox6').focus();
        document.getElementById('TextBox6').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox6').style.borderColor = 'red';
        document.getElementById('TextBox6').style.borderWidth = '2px';
        document.getElementById('TextBox6').style.color = 'white';
        return false;
    }
    else if(txt2 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox2').focus();
        document.getElementById('TextBox2').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox2').style.borderColor = 'red';
        document.getElementById('TextBox2').style.borderWidth = '2px';
        document.getElementById('TextBox2').style.color = 'white';
        return false;
    }
    else if(txt4 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox4').focus();
        document.getElementById('TextBox4').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox4').style.borderColor = 'red';
        document.getElementById('TextBox4').style.borderWidth = '2px';
        document.getElementById('TextBox4').style.color = 'white';
        return false;
    }
    else if(txt3 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox3').focus();
        document.getElementById('TextBox3').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox3').style.borderColor = 'red';
        document.getElementById('TextBox3').style.borderWidth = '2px';
        document.getElementById('TextBox3').style.color = 'white';
        return false;
    }
    else if(txt9 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox9').focus();
        document.getElementById('TextBox9').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox9').style.borderColor = 'red';
        document.getElementById('TextBox9').style.borderWidth = '2px';
        document.getElementById('TextBox9').style.color = 'white';
        return false;
    }
    else if(txt5 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox5').focus();
        document.getElementById('TextBox5').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox5').style.borderColor = 'red';
        document.getElementById('TextBox5').style.borderWidth = '2px';
        document.getElementById('TextBox5').style.color = 'white';
        return false;
    }
    else if(txt8 == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('TextBox8').focus();
        document.getElementById('TextBox8').style.backgroundColor = '#ff9d9d';
        document.getElementById('TextBox8').style.borderColor = 'red';
        document.getElementById('TextBox8').style.borderWidth = '2px';
        document.getElementById('TextBox8').style.color = 'white';
        return false;
    }
    else if(teamname == "")
    {
        alert('Please fill the requried field(s)');
        document.getElementById('txtteamname').focus();
        document.getElementById('txtteamname').style.backgroundColor = '#ff9d9d';
        document.getElementById('txtteamname').style.borderColor = 'red';
        document.getElementById('txtteamname').style.borderWidth = '2px';
        document.getElementById('txtteamname').style.color = 'white';
        return false;
    }
    else if(chkbx.checked != true)//checked="checked"
    {
        alert('Accept terms and conditions before submission');
        document.getElementById('CheckBox1').focus();
        document.getElementById('CheckBox1').style.backgroundColor = '#ff9d9d';
        document.getElementById('CheckBox1').style.borderColor = 'red';
        document.getElementById('CheckBox1').style.borderWidth = '2px';
        document.getElementById('CheckBox1').style.color = 'white';
        return false;
    }
}
function ddl1_click()
{
    var ddl1 = document.getElementById('DropDownList1');
    var rd1 = document.getElementById('RadioButton1');
    rd1.checked = true;
}
function ddl2_click()
{
    var ddl2 = document.getElementById('DropDownList2');
    var rd3 = document.getElementById('RadioButton3');
    rd3.checked = true;
}
function ddl3_click()
{
    var ddl3 = document.getElementById('DropDownList3');
    var rd2 = document.getElementById('RadioButton2');
    rd2.checked = true;
}
function ddl4_click()
{
    var ddl4 = document.getElementById('DropDownList4');
    var rd4 = document.getElementById('RadioButton4');
    rd4.checked = true;
}

