function getDate()
{
var enabled = 0; today = new Date();
var day; var date;
if(today.getDay()==0) day = "星期日"
if(today.getDay()==1) day = "星期一"
if(today.getDay()==2) day = "星期二"
if(today.getDay()==3) day = "星期三"
if(today.getDay()==4) day = "星期四"
if(today.getDay()==5) day = "星期五"
if(today.getDay()==6) day = "星期六"
date = "" + (today.getYear()) + "年" + (today.getMonth() + 1 ) + "月" + today.getDate() + "日  " + day +"";
document.write("<font color=#000000>" + date + "</font>");	
}

   function dlpopup(addr, name)
   {
        window.open(addr, name, "toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,top=50,left=50,width=660,height=500");
   }
   function v_open(addr, name)
   {
        window.open(addr, name, "toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,top=50,left=50,width=788,height=500");
   }
   function CheckAll(form)
   {
       for (var i=0; i<form.elements.length; i++)
       {
           var e = form.elements[i];
           if (e.name.substr(0, 3) == 'chk')
           e.checked = chkall.checked;
       }
   }
   

function trim(s)
{
    return s.replace(/(^\s*)|(\s*$)/g, "");
}

function empty(s)
{
   return s.match("^[ 　]{0,}$");

}
function checkdate(){
var d1 = new Date(document.getElementById("bdate").value.replace(/-/g,"/"));
var d2 = new Date(document.getElementById("edate").value.replace(/-/g,"/"));
var flag = (d1<d2) ? true : false;
alert(flag);
}

function survote(theForm)
{
    if (theForm.ID.value == 0) return(false);

    for (var i=0; i<theForm.elements.length; i++)
    {
        var e = theForm.elements[i];
        if (e.name.substr(0, 5) == 'score' && e.checked == true) {
            score = e.value;
        }
    }
    href="survote.php?ID=" + theForm.ID.value + "&score=" + score;

    dlpopup(href, "survey");
}

function surview(theForm)
{
    if (theForm.ID.value == 0) return(false);

    href="surview.php?ID=" + theForm.ID.value;

    dlpopup(href, "survey");

}