﻿// JScript 檔

function isDate(year, month, day){  
    var dateStr;  
    if (!month || !day) {  
        if (month == '') {  
            dateStr = year + "/1/1"  
        }else if (day == '') {  
            dateStr = year + '/' + month + '/1';  
        }  
        else {  
            dateStr = year.replace(/[.-]/g, '/');  
        }  
    }  
    else {  
        dateStr = year + '/' + month + '/' + day;  
    }  
    dateStr = dateStr.replace(/\/0+/g, '/');  
  
    var accDate = new Date(dateStr);  
    var tempDate = accDate.getFullYear() + "/";  
    tempDate += (accDate.getMonth() + 1) + "/";  
    tempDate += accDate.getDate();  
  
    if (dateStr == tempDate) {  
        return true;  
    }  
    return false;  
}  



var oEditer;
function FCKeditorValidate(source, arguments)  
{  
   var value = oEditer.GetXHTML(true);  
   if(value=="")  
   {  
      arguments.IsValid = false;       
   }  
   else   
   {   
      arguments.IsValid = true;   
   }   
}  
function FCKeditor_OnComplete( editorInstance )  
{   
   oEditer = editorInstance;  
}  
