function searchCheck(frm) {
    if (frm.Keyword.value.length == 0)
    {
        window.alert('必须输入搜索关键词!');
        frm.Keyword.focus();
        return false;
    }
}

function showCalendar() {
    var cnWeekNames = ['<b style="color:red">日</b>', '一', '二', '三', '四', '五', '<b style="color:red">六</b>'];
    var date = new Date();
    document.write(date.getFullYear());
    document.write(' 年 ');
    document.write(date.getMonth() + 1);
    document.write(' 月 ');
    document.write(date.getDate());
    document.write(' 日  星期 ');
    document.write(cnWeekNames[date.getDay()]);
    date = null;
    delete date;
}

function QACheck(frm) {
    if (frm.QCName.value.length == 0)
    {
        window.alert('必须输入姓名!');
        frm.QCName.focus();
        return false;
    }

    if (frm.QSerialCode.value.length == 0)
    {
        window.alert('必须输入8位受理号！');
        frm.QSerialCode.focus();
        return false;
    }

    return true;
}

function showVImg(imgId, textBox) {
    var img = document.getElementById(imgId);
    if (img.getAttribute('loaded') === '0')
    {
        img.parentNode.style.display = 'inline';
        img.setAttribute('loaded', '1');
        img.src = '/VC.aspx';
        textBox.onfocus = null;
        refreshImg(img, '/VC.aspx'); //为了确保SESSION写入
    }

    img = null;
}

function refreshImg(img, imgUrl) {
    img.src = imgUrl + '?seed=' + Math.random().toString();
}

function addBookmark() {
    if (document.all)
    {
        window.external.addFavorite('http://www.zsciq.gov.cn/', '舟山出入境检验检疫局');
    }
    else if (window.sidebar)
    {
        window.sidebar.addPanel('舟山出入境检验检疫局', 'http://www.zsciq.gov.cn/', '');
    }
}