﻿// JScript File

function CheckExpirence()
{
    document.Registration.Prof.disabled=true;
    document.Registration.YofExp.disabled=true;
    document.Registration.AddComment.disabled=true;
    document.Registration.Prof.value='';
    document.Registration.YofExp.value='';
    document.Registration.AddComment.value='';
}
function UnCheckExpirence()
{
    document.Registration.Prof.disabled=false;
    document.Registration.YofExp.disabled=false;
    document.Registration.AddComment.disabled=false;
}
function fnprofessionno()
{
    document.Registration.WhatIKnow.disabled=true;
}
function fnprofessionyes()
{

    document.Registration.WhatIKnow.disabled=false;
}



function keyRestrict(e, validchars)
 { // v3.0
        var key='', keychar='';
        key = getKeyCode(e);
        if (key == null) return true;
        keychar = String.fromCharCode(key);
        keychar = keychar.toLowerCase();
        validchars = validchars.toLowerCase();
        if (validchars.indexOf(keychar) != -1)
                return true;
        if ( key==null || key==0 || key==8 || key==9 || key==13 || key==27 )
                return true;
        return false;
}
function getKeyCode(e)// v1.0
{
        if (window.event)
           return window.event.keyCode;
        else if (e)
           return e.which;
        else
           return null;
}

function SetColor(ControlId)
{
    document.getElementById(ControlId).style.backgroundColor='#fefad0';
}
function ResetColor(ControlId)
{
    document.getElementById(ControlId).style.backgroundColor='white';
}

function picturecheck()
    { 
        if(document.form1.password.value.toUpperCase() != "TWBISGOOD" )
        {
           alert('Please check for the value for the Picture Identification field.');
            return false;
        }
        return true;
    }
