function bcheck(formname) {
    if (formname.value=='' || formname.value==null) {
        return true;
     }
     return false;
}


function idcheck(str) {
    if (str.search(/[^0-9a-zA-Z_\-]/) ==-1) {
        return true;
    }
    return false;
}

function dcheck(str) {
    if (str.search(/[^0-9]/) ==-1) {
        return true;
    }
    return false;
}

function alfocus(formname,alertmsg) {
    alert(alertmsg);
    if (formname.type.search(/text|password/i) != -1) {
            formname.focus();
    }
    return false;
}


function is_leap_year(strng) {
    if(!is_valid_number(strng)) return false;
    if(strng%4==0) {
        if(strng%100==0) {
            if(strng%400) return true;
            else return false;
        } else return true;
    } else return false;
}

function is_valid_number(strng) { 
    if (strng.length==0 || isNaN(strng)) return false;
    return true;
}
