<!--
  var strcss = " border-style:groove;background-color:#FFFFFF;font-size:12px;display:none;position:absolute; ";
  var pos = null;
  var chidwin = null;
  var bgcolor= null;
   
function key13(e){
  if (e) {   var keycode = e.keyCode; }
  else {  var keycode = e.which; }
  
  if (keycode ==13) {return true;}
  else { return false ;}
}

function newopen(url,title,width,height){
   var w = width+width*0.05;
   var h = height+height*0.05;	
   var x =parseInt((screen.width-w) / 2);	
   var y = parseInt((screen.height-h)/ 2);	
   var cond = "top="+y+",left="+x+",width="+w+",height="+h;
   cond = cond+",scrollbars=yes,toolbar=no,status=no,menubar=no,directories=no";  
   cond = cond+",location=no,resizable=yes,titlebar=no";  
   chidwin=window.open(url,title,cond);
   chidwin.focus();
 }

 function overcolor(obj){ 
   bgcolor = obj.style.backgroundColor;
   obj.style.backgroundColor ="#FFFF77";
   return;
  }

 function outcolor(obj) { 
  obj.style.backgroundColor = bgcolor; 
  return; 
 }
 
 
  function getMousePos(e){
   pos = new Array();
   if (e) {  // IE
      pos[0]= e.clientX+document.documentElement.scrollLeft; 
      pos[1]= e.clientY+document.documentElement.scrollTop+20; 
   } else {  // FF
      pos[0] = e.layerX+window.pageXOffset+10; 
      pos[1]= e.layerY+window.pageYOffset+10; 
   }
//   if (document.getElementsByName("popwin")[0]) {
//    document.getElementsByName("popwin")[0].style.left = pos[0] ;
//    document.getElementsByName("popwin")[0].style.top =  pos[1] ;
//   } 
   return pos;
 }
 
  function openCalendar(id){
    var app = navigator.appName;
    if (app.match("Internet Explorer")) { // IE
      x = event.screenX;
      y = event.screenY+20;
    } else { //FF
      x = pos[0];
      y = pos[1];
    }  

   var cond = "top="+y+",left="+x+",width=200,height=180";
   cond = cond+",scrollbars=no,toolbar=no,status=no,menubar=no,directories=no";  
   cond = cond+",location=no,resizeable=no,titlebar=no";  

    calwin=window.open("/calendar.aspx?adate="+id+"&kind=0","calendar",cond);  // kind='' 西元年 kind='0' 民國年
    calwin.moveTo(x,y);
    calwin.focus();
}

function isLeapYear(yy){
  return (((0 == yy % 4) && (0 != (yy % 100))) ||(0 == yy % 400)) ? true : false;
}

 function checkDate(sender,args)     // useing for .net customervalidate  to check date format on client 
 {
    args.IsValid = isDate(args.Value);
    return;
 }
 
 function isDate(sDate){
  var aDate = new Date();
  var daysofMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
  
  if (sDate =="") { return false;}
   sDate = sDate.replace(".","/").replace("-","/");
   var aryDate = new Array(3);
   aryDate = sDate.split("/");
   if (aryDate[0] == undefined || aryDate[1] == undefined || aryDate[2] ==undefined)  { return false;}
   
   try
    {

     var yy = eval(aryDate[0]);
     var mm = eval(aryDate[1]);
     var dd = eval(aryDate[2]);
     
     
     if (isLeapYear(yy)) { daysofMonth[1] =29; } 
     if (mm < 1 || mm > 12 || dd < 1) {  return false;}
     if (dd > daysofMonth[mm-1] ) { return false;}
     
       aDate.setFullYear(yy);  
       aDate.setMonth(mm-1);  
       aDate.setDate(dd);
       return true;
   }  
   catch (e) {
     return false; 
   }
 }

function ResizeIframe(objId) {
    
   ifm = parent.document.getElementById(objId);
   ifm.height = document.body.scrollHeight;
   ifm.width = document.body.scrollWidth;
}


function radioValue(obj)
{
  var r = "";
  for(var i=0; i < obj.length; i++)  
   { 
     if (obj[i].checked) { return obj[i].value; };
   }
  return r;
}

function showError(errText,br)
{
  return br + "&nbsp;<font style='font-size:12px; background-color:#ffffff; color:red'>" + errText +"</font>";
}

//-->
