function confirmation(val)
{
	var answer = confirm(val+'?');
	if(answer)
		return true;
	else
		return false;
}
function AllowOnlyNumeric()
{
    // Get the ASCII value of the key that the user entered
    var key = window.event.keyCode;

    // Verify if the key entered was a numeric character (0-9) or a decimal (.) or space
    if ( (key > 47 && key < 58) || key == 46 || key == 47 || key == 37 || key == 32)
        // If it was, then allow the entry to continue
        return;
    else
        // If it was not, then dispose the key and continue with entry
        window.event.returnValue = null;
}
function chk_others()
{
	var others = document.getElementById('others_id').checked;
	if(others == true)	{document.getElementById('div_others_details').style.display = 'block';}
	else if(others == false)
	{
		document.getElementById('div_others_details').style.display = 'none';
		document.getElementById('others_details').value = '';
	}
}
function valid_jobs()
{
	var errors = '';
	var fn = document.getElementById('fname_id').value;
	var ln = document.getElementById('lname_id').value;
	var contact = document.getElementById('contact_id').value;
	var email = document.getElementById('email_id').value;
	var state = document.getElementById('state_id').value;
	var others = document.getElementById('others_id').checked;
	var others_details = document.getElementById('others_details_id').value;
	
	if(fn == '') { errors += 'Please enter your First Name.\n'; document.getElementById('fname_id').style.backgroundImage='url(images/textfield_bg_150_err.gif)'; }
	else {document.getElementById('fname_id').style.backgroundImage='url(images/textfield_bg_150.gif)'; }
	if(ln == '') { errors += 'Please enter your Last Name.\n'; document.getElementById('lname_id').style.backgroundImage='url(images/textfield_bg_150_err.gif)'; }
	else {document.getElementById('lname_id').style.backgroundImage='url(images/textfield_bg_150.gif)'; }
	if(contact == '') { errors += 'Please enter your Contact number.\n'; document.getElementById('contact_id').style.backgroundImage='url(images/textfield_bg_150_err.gif)'; }
	else {document.getElementById('contact_id').style.backgroundImage='url(images/textfield_bg_150.gif)'; }
	if(email == '') { errors += 'Please enter your Email.\n'; document.getElementById('email_id').style.backgroundImage='url(images/textfield_bg_300_err.gif)'; }
	else {document.getElementById('email_id').style.backgroundImage='url(images/textfield_bg_300.gif)'; }
	if(state <= 0) { errors += 'Please select your State.\n'; document.getElementById('state_id').style.background= "#ff0000";}
	else {document.getElementById('state_id').style.background= "#ffffff";}
	if(others == true && others_details == '') { errors += 'Please specify your other specialties.\n'; document.getElementById('others_details_id').style.background= "#ff0000";}
	else {document.getElementById('others_details_id').style.background= "#ffffff";}
	
	if(errors != '')
	{
		alert(errors);
		return false;
	}
	else
		return true;
}