function alertDialog(strMsg,flag,width,height){
  var winwidth=420;
  var winheight=280;
  var strtemp="";
  var strMsg2=strMsg;
  var pos=0;
  var x=0;
  var y=1;

 return showModalDialog("/preveh/alertMsg.jsp?flag="+flag,strMsg,"scroll:no;status:0;help:0;resizable:0;dialogHeight:"+winheight+"px;dialogWidth:"+winwidth+"px;unadorne:0;edge:raised;")
}
//???????
function fCheckInputInt(){
  if (event.keyCode < 48 || event.keyCode > 57)
    event.returnValue = false;
}
function setformselectvalue(form)
{
  for(i=0;i<form.elements.length;i++)
  {
    if(form.elements[i].type=="select-one")
    {
      if(form.elements[i].options.selectedIndex<0)
      form.elements[i].options.selectedIndex=0;
    }
  }
}

//??????????
function closesubwin(){
  if(subwinname!=null&&isclosesubwin==1){
    subwinname.close();
  }
}
//????????
function closewin(){
	window.close();
}
//-------------------------------
//  ????????isNum(i_field,i_value)
//  ??????????????????????????????????
//  ??????????????????????????????
//  ??????  ??1-??????,0-??????
//-------------------------------
/*function isNum(i_field,i_value)
{
    re=new RegExp("[^0-9]");
    var s;
    if(s=i_value.match(re))
     {
        alertDialog("'"+i_field+"' ?????????????? '"+s+"' ??");
        return 0;
     }
    return 1;
}
*/
//????????????????????
function isDate(i_field,objdate)
{

 //  objdate.value=objdate.value.trim();
	//alert(objdate.value);
  if (objdate.value.indexOf("-")>0) changeDate("-",objdate);
  if (objdate.value.indexOf("/")>0) changeDate("/",objdate);
  if (objdate.value.indexOf(".")>0) changeDate(".",objdate);

  var thedate=objdate.value;
  if (thedate.length==8)//????8??
  {
  	objdate.value=thedate.substr(0,4)+"-"+thedate.substr(4,2)+"-"+thedate.substr(6,2);
  }
  if(thedate.length==6)/////????????
  {
    var theyear=parseInt(thedate.substr(0,2),10);
    if(theyear<=30)
    {
      objdate.value="20"+thedate.substr(0,2)+"-"+thedate.substr(2,2)+"-"+thedate.substr(4,2);
    }
    else
    {
       objdate.value="19"+thedate.substr(0,2)+"-"+thedate.substr(2,2)+"-"+thedate.substr(4,2);
    }
  }
   thedate=objdate.value;

    var reg = /^(\d{1,4})(-)(\d{1,2})\2(\d{1,2})$/;
    var r = thedate.match(reg);

     if (r==null)
    {
       alert("????????????'"+i_field+"' ??");
       objdate.focus();
       return 0;

    }
    var d= new Date(r[1],r[3]-1,r[4]);
    var newStr=d.getFullYear()+r[2]+(d.getMonth()+1)+r[2]+d.getDate()
    var newDate=r[1]+r[2]+(r[3]-0)+r[2]+(r[4]-0)
    //alert("----------r:"+r+" d:"+d+" newStr:"+newStr+" newDate:"+newDate);
    if (newStr==newDate)
         {
           //changeDate(objdate);
          return 1;
         }
     alert("'"+i_field+"'??????????????");
     objdate.focus();
     return 0;
}
//-------------------------------
//  ????????changeDate(thedate)
//  ??????????????yyyymmdd??????yyyy-mm-dd????
//  ??????????????????
//  ??????  ??0-??????1--??
//-------------------------------

function changeDate(strformate,objdate)
{
   var theDate=objdate.value;
   var iIndex1=theDate.indexOf(strformate);
   var iIndex2=theDate.indexOf(strformate,iIndex1+1);
   var newYear = parseFloat(theDate.substring(0,iIndex1));
   var newMonth = parseFloat(theDate.substring(iIndex1+1,iIndex2));
   var newDate = parseFloat(theDate.substring(iIndex2+1));

   var newDay="";
   if (newYear<=30){
     newDay +=2000 + newYear;
   }else{
      if (newYear>30 && newYear<100){
        newDay +=1900 + newYear;
      }else{
        newDay += newYear;
      }
   }

   if (newMonth<10) {
   	newDay +="-" + "0" + newMonth;
   }else{
   	newDay +="-" + newMonth;
   }

   if (newDate<10) {
   	newDay +="-" + "0" + newDate;
   }else{
   	newDay +="-" + newDate;
   }

   objdate.value=newDay;

}
function isDate1(i_field,thedate)
{
  if(thedate.value.length==0||thedate.value==null){return 0;}
  if (!(thedate.value.length==8 || thedate.value.length==10))
   {    alert("'"+i_field+"'????????????,\n??????yyyy-mm-dd??");
     return 0;
   }
  if (thedate.value.length==8)
  {
  	thedate.value=thedate.value.substr(0,4)+"-"+thedate.value.substr(4,2)+"-"+thedate.value.substr(6,2);
  }

    var reg = /^(\d{1,4})(-)(\d{1,2})\2(\d{1,2})$/;
    var r = thedate.value.match(reg);

     if (!(r==null))
    {

    var d= new Date(r[1],r[3]-1,r[4]);
    var newStr=d.getFullYear()+r[2]+(d.getMonth()+1)+r[2]+d.getDate()
    var newDate=r[1]+r[2]+(r[3]-0)+r[2]+(r[4]-0)
    if (newStr==newDate)
         {
          return 1;
         }
     alert("'"+i_field+"'????????????,\n??????yyyymmdd??yyyy-mm-dd??");
     return 0;
    }
    return 0;

}
//????????????????????
function isDateTime(i_field,thedate){
 if(thedate.length==0||thedate==null){return 0;}
 if(thedate.length==16)
 {
   thedate=thedate+":00";
 }
  if (!(thedate.length==19))
   {    alertDialog("'"+i_field+"'????????,??????????????????yyyy-mm-dd hh24:mi??",2);
     return 0;
   }
  dateRegexp = new RegExp("^(\\d{4})[-](\\d{2})[-](\\d{2})[ ](\\d{2})[:](\\d{2})[:](\\d{2})$");
  var matched = dateRegexp.exec(thedate);
  if(matched != null) {
  if (!isTrueDateTime(matched[3], matched[2], matched[1],matched[4], matched[5], matched[6]))
  {
    alertDialog("'"+i_field+"'????????????????????????????yyyy-mm-dd hh24:mi??",2);
    return 0;
  }
  else{
    return 1;
  }
}
return 0;
}
//????????????????????
function sfzCheck(hm,obj)
{

      var w=new Array();
      var ll_sum;
      var ll_i;
      var ls_check;

      w[0]=7;
      w[1]=9;
      w[2]=10;
      w[3]=5;
      w[4]=8;
      w[5]=4;
      w[6]=2;
      w[7]=1;
      w[8]=6;
      w[9]=3;
      w[10]=7;
      w[11]=9;
      w[12]=10;
      w[13]=5;
      w[14]=8;
      w[15]=4;
      w[16]=2;
     ll_sum=0;

     for (ll_i=0;ll_i<=16;ll_i++)
     {   //alert("ll_i:"+ll_i+" "+hm.substr(ll_i,1)+"w[ll_i]:"+w[ll_i]+"  ll_sum:"+ll_sum);
        ll_sum=ll_sum+(hm.substr(ll_i,1)-0)*w[ll_i];

     }
     ll_sum=ll_sum % 11;


     switch (ll_sum)
      {
        case 0 :
            ls_check="1";
            break;
        case 1 :
            ls_check="0";
            break;
        case 2 :
            ls_check="X";
            break;
        case 3 :
            ls_check="9";
            break;
        case 4 :
            ls_check="8";
            break;
        case 5 :
            ls_check="7";
            break;
        case 6 :
            ls_check="6";
            break;
        case 7 :
            ls_check="5";
            break;
        case 8 :
            ls_check="4";
            break;
        case 9 :
            ls_check="3";
            break;
        case 10 :
            ls_check="2";
            break;
      }

      if (hm.substr(17,1) != ls_check)
      {
            alertDialog("????????????????------ ????????:"+ls_check+" ????:"+hm.substr(17,1),2);
            obj.focus();
           // obj.focus();
            return 0;
     }
return 1
}
function check_sfzh(zjhmObj) {
  var birthday = "";
  var zjhm1 = "";
  var zjhm2 = "";
  var s = "";
  var zjhm = zjhmObj.value;
    if (notNull("????????", zjhmObj) == 0) {
      return 0;
    }
    if (! (zjhm.length == 15 || zjhm.length == 18)) {
      alertDialog("??????????????,????????",2);
      zjhmObj.focus();
      //zjhmObj.focus();
      return 0;
    }
    zjhm1 = zjhm;
    if (zjhm.length == 18) {
      zjhm1 = zjhm.substr(0, 17);
      zjhm2 = zjhm.substr(17, 1);
    }

    re = new RegExp("[^0-9]");
    if (s = zjhm1.match(re)) {
      alertDialog("??????????????????????'" + s + "'????????",2);
      zjhmObj.focus();
      // zjhmObj.focus();
      return 0;
    }
    //??????????
    if (zjhm.length == 15) {
      birthday = "19" + zjhm.substr(6, 6);
    }
    else {
      re = new RegExp("[^0-9A-Z]");
      if (s = zjhm2.match(re)) { //18????????????????????????????
        alertDialog("??????????????????????'" + s + "'????????",2);
        zjhmObj.focus();
        //zjhmObj.focus();
        return 0;
      }
      birthday = zjhm.substr(6, 8);
    }
    birthday = birthday.substr(0, 4) + "-" + birthday.substr(4, 2) + "-" +
        birthday.substr(6, 2)
        //alert("birthday"+birthday)

        if (isDate("??????????????????", birthday) == 0) { //????????????????
        zjhmObj.focus();
      return 0;
    }

    //var nl=cal_years(birthday);//??????
    /*
             if (nl-0<18 || nl>70)
                {
                 alert("???????????? 18--70 ,???? "+nl+" ??");
                return 0;
               }*/
    if (zjhm.length == 18) {
      return (sfzCheck(zjhm, zjhmObj)); //??18????????????????????????
    }
    // else{
    //  zjhmObj.value=id15to18(zjhm);
    // }

  return 1;
}
function id15to18(zjhm) {
    var strJiaoYan = new Array("1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2");
    var intQuan = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2, 1);
    var ll_sum = 0;
    var i;
    var t;
    zjhm = zjhm.substr(0, 6) + "19" + zjhm.substr(6);
    for (i = 0; i < zjhm.length; i++) {
      ll_sum = ll_sum +
          parseInt(zjhm.substr(i,1)) * intQuan[i];
    }
    ll_sum = ll_sum % 11;
    zjhm = zjhm + strJiaoYan[ll_sum];
    return zjhm;

}

function isTrueDateTime(day, month, year,hour,min,second) {
      if (month < 1 || month > 12) {
          return false;
          }
      if (day < 1 || day > 31) {
          return false;
          }
      if ((month == 4 || month == 6 || month == 9 || month == 11) &&
          (day == 31)) {
          return false;
          }
      if (month == 2) {
          var leap = (year % 4 == 0 &&
         (year % 100 != 0 || year % 400 == 0));
          if (day>29 || (day == 29 && !leap)) {
          return false;
          }
         }
      if(hour<0||hour>23){
         return false;
         }
      if(min<0||min>59){
         return false;
         }
      if(second<0||second>59){
         return false;
         }
      return true;
}

//????????????
function displayInfo(strinfo,flag)
{
  if(strinfo==null) strinfo="";
  while(strinfo.indexOf("A~A~")>0) {
	  strinfo = strinfo.replace("A~A~", "\n");
  }
  if(flag!=null)
    alertDialog(strinfo,flag);
  else
    alertDialog(strinfo,1);
}
//????form?????? 0-???? 1-???????? disabled 2-????????readonly
function changeformstate(form,iZt){
  switch (iZt){
    case 0:
      for(i=0;i<form.elements.length;i++)
        form.elements[i].disabled = false;
      break;
    case 1:
      for(i=0;i<form.elements.length;i++){
        form.elements[i].disabled = true;
      }
      break;
    case 2:
      for(j=0;j<form.elements.length;j++)
      {
        if(form.elements[j].type=="select-one"&&form.elements[j].size<=1){
          if(form.elements[j].options.selectedIndex>=0){
            sValue = form.elements[j].value;
            sCaption = form.elements[j].options[form.elements[j].options.selectedIndex].innerText;
            //clearFieldOptions(form.elements[j]);
            form.elements[j].innerHTML = "";
            changecomboxvalue(form.elements[j],sValue,sCaption);
          }else{
            //clearFieldOptions(form.elements[j]);
            form.elements[j].innerHTML = "";
          }
        }else if(form.elements[j].type=="checkbox"||form.elements[j].type=="radio"){
          form.elements[j].disabled = true;
        }else if(form.elements[j].type=="button"){
          form.elements[j].style.visibility = 'hidden';
        }else{
          form.elements[j].readOnly = true;
        }
      }
      break;
  }

}

function setformtextvalue(form,value){
  for(i=0;i<form.elements.length;i++)
    if(form.elements[i].type=="text"||form.elements[i].type=="select-one"||form.elements[i].type=="hidden")
    	form.elements[i].value = value;
}

function invalidLetter(m_fields,obj,strLetter){
   // alert("aaaaa");
    var m_Value=obj.value;
    var i, c;
    for (i = 0; i < m_Value.length; i++) {
      c = m_Value.charAt(i); //??????s????????
      if (strLetter.indexOf(c) == -1) {
        alert(m_fields + "??????????????" + c + "??!");
        obj.focus();
        return false;
      }
    }
    return true;
}
//????A~A~??'\n'
function replaceEnter(strinfo)
{
  if(strinfo==null) strinfo="";
  while(strinfo.indexOf("A~A~")>=0) {
	  strinfo = strinfo.replace("A~A~", "\r\n");
  }
  return strinfo;
}

//??????????????????
function strlen(str)
{
var len;
var i;
len = 0;
for (i=0;i<str.length;i++)
{
if (str.charCodeAt(i)>255) len+=2; else len++;
}
return len;
}

//??????????????????????
function check1(b_width, Str){
      t_Str = "";
      if(b_width <Str.length){
              t_Str = "<font color =#00B5B5 style='font-size: 9pt'><a title = '"+Str+"'>"
              t_Str = t_Str + Str.substr(0,b_width);
              t_Str = t_Str+"</a></font>"
      }else{
      t_Str = "<font style='font-size: 9pt'>" + Str +"</font>";
      }
      document.write(t_Str.fontsize('-1'));
}


function getMonthLastDate(iYear,iMonth){
	var dateArray= new Array(31,28,31,30,31,30,31,31,30,31,30,31);
	var days=dateArray[iMonth-1];
	if ((((iYear % 4 == 0) && (iYear % 100 != 0)) || (iYear % 400 == 0)) && iMonth==2){
		days=29;
	}
	return days;
}

function DateAddMonth(strDate,iMonths){
   var thisYear = parseFloat(strDate.substring(0,4));
   var thisMonth = parseFloat(strDate.substring(5,7));
   var thisDate = parseFloat(strDate.substring(8,10));
   var d =thisYear *12 + thisMonth + parseFloat(iMonths);

   var newMonth = d % 12;
   if (newMonth==0) {
   	newMonth=12;
   }
   var newYear = (d - newMonth) /12;
   var newDate = thisDate;
   var iMonthLastDate=getMonthLastDate(newYear,newMonth)
   if (newDate>iMonthLastDate) newDate=iMonthLastDate;
   var newDay="";

   newDay += newYear;
   if (newMonth<10) {
   	newDay +="-" + "0" + newMonth;
   }else{
   	newDay +="-" + newMonth;
   }

   if (newDate<10) {
   	newDay +="-" + "0" + newDate;
   }else{
   	newDay +="-" + newDate;
   }
   return(newDay);                                // ??????????
}

function getNyr(date)
{
  if(date.length==10)//????2005-02-01
  {
    return date.substring(0,4)+"??"+date.substring(5,7)+"??"+date.substring(8,10)+"??";
  }else if(date.length==16)//????2005-02-01 01:01
  {
    return date.substring(0,4)+"??"+date.substring(5,7)+"??"+date.substring(8,10)+"??"+date.substring(11,13)+"??"+date.substring(14,16)+"??";
  }else if(date.length==18)//18??????????
  {
    return date.substring(6,10)+"??"+date.substring(10,12)+"??"+date.substring(12,14)+"??";
  }else if(date.length==15)//15??????????
  {
    return "19"+date.substring(6,8)+"??"+date.substring(8,10)+"??"+date.substring(10,12)+"??";
  }else
  {
    return "";
  }
}

//????????
function riqi(rq){
 // alert('????????');
  gfPop.fPopCalendar(document.all[rq]);
  return false;
}

function formatMm(mm){
  var month=mm;
  if(month.length<2) {
    month="0" + month;
  }
     return month;
}

function getStatsBeginDay2(iStartDay){
  var today = new Date();
  var day=today.getDate();
//  today.setDate(day-10);
  day = today.getDate();
  var month=today.getMonth() + 1;
  var year=today.getFullYear();
  if(day>=iStartDay){
    if(month>=2){
      if(month<10)
         r = year + "-0" + (month - 1) + "-" + iStartDay;
      else
         r = year + "-" + (month - 1) + "-" + iStartDay;
    }else{
          r = (year-1) + "-" + "12" + "-" + iStartDay;
    }
  }
  //????????21??
  else{
    //????????????2??
     if(month>=3){
        if(month-1<10)
          r = year + "-0" + (month-2) + "-" + iStartDay;
    	else
          r = year + "-" + (month-2) + "-" + iStartDay;
       }else{//????????1??
          if(month==1) r = (year-1) + "-" + "11" + "-" + iStartDay;
          else r = (year-1) + "-" + "12" + "-" + iStartDay;
      }
    }
  return r;
}
function getStatsEndDay2(iStartDay){
  var today = new Date();
  var day=today.getDate();
  day = day - 10;
  today.setDate(day);
  var month=today.getMonth() + 1;
  day=today.getDate();
  if(month<10) sMonth="0" + month;
  else sMonth = month;

  if((day<iStartDay-1&&day>10)||day>iStartDay) day = iStartDay-1;
  else day = day +10;
  if(day<10) sDay="0" + day;
  else sDay = day;
  r = today.getFullYear() + "-" + sMonth + "-" + sDay;
  return r;
}


//??????
  function echo() {
    var a, t = document.getElementById("scrollbar");
    t.wrap = 'off';
    a = t.offsetHeight;
    t.wrap = 'soft';
    a -= t.offsetHeight;
    a ? a : 0;
    return a
  }

//????????????????????
function fCheckInputLow(){
  if(event.keyCode>=65 && event.keyCode<=90)
    event.keyCode=event.keyCode+32;
}
/*
????????????????????
*/
function file_title(title){
var s="";
s+='<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center">';
s+='	<tr>';
s+='		<td>';
s+='			<div style="font:0px;line-height:normal;font-weight:normal;height:8px;"></div>';
s+='			<table width="100%" border="0" cellpadding="0" cellspacing="0">';
s+='				<tr>';
s+='					<td width="6" background="../image/panel_1.gif"><span style="font:1px;line-height:normal;font-weight:normal;">&nbsp;</span></td>';
s+='					<td height="27" background="../image/panel_2.gif" style="font:12px;color:white;font-weight:bold;">&nbsp;'+title+'</td>';
s+='					<td width="6" background="../image/panel_3.gif"><span style="font:1px;line-height:normal;font-weight:normal;">&nbsp;</span></td>';
s+='				</tr>';
s+='			</table>';
s+='			<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#F5F5F5" style="border: 1px solid #CFCFCF;">';
s+='				<tr>';
s+='					<td align="center" style="font:12px;padding:6px 9px 6px 9px">';
document.write(s);
}

function file_down(){
var s="";
s+='					</td>';
s+='				</tr>';
s+='			</table>';
s+='		</td>';
s+='	</tr>';
s+='</table>';
document.write(s);
}


/*
??????????????????????????
fi=file inside
*/
function fi_top(title){
var s="";
s+='<fieldset style="width:98%; border-width :thin;">';
s+='<legend><b>'+title+'</b></legend>';
s+='<table border="0" cellspacing="0" cellpadding="0"><tr><td height="2"></td></tr></table>';
document.write(s);
}
function fi_mid(title){
var s="";
//s+='<table border="0" cellspacing="0" cellpadding="0"><tr><td height="3"></td></tr></table>';
//s+='</fieldset>';
s+='<table border="0" cellspacing="0" cellpadding="0">';
s+='<tr><td height="8"></td></tr></table>';
s+='<fieldset style="width:98%; border-width :thin;">';
s+='<legend><b>'+title+'</b></legend>';
s+='<table border="0" cellspacing="0" cellpadding="0"><tr><td height="6"></td></tr></table>';
document.write(s);
}
function fi_down(){
var s="";
s+='<table border="0" cellspacing="0" cellpadding="0"><tr><td height="9"></td></tr></table>';
s+='</fieldset>';
document.write(s);
}
//
var pos=0,count=0;
var u=location.href;
while(count<4){
	pos=u.indexOf('/',pos+1);
	count++;}
u=location.href.substr(0,pos)+"/";
document.write('<style type=text/css>');
document.write('.sub_image { background: url('+u+'../image/submit.gif);BORDER-TOP-WIDTH:0px; background-position:0px 0px;BORDER-LEFT-WIDTH:0px;border-bottom-width:0px;width:75px;color:#464646;line-height:17px;border-right-width:0px;font-size: 12px;color: #FFFFFF;	text-decoration: none;');
document.write('}');
document.write('</style>');

//????????????????????????????????????
function onMouseOverShow(obj)
{
	with (document.all.div_show)
 	{
  	  innerText ="????:"+obj+"";
	  if (innerText.length > 0)
	  {
	   innerText = " " + innerText + "  ";
	   style.display = "block";
	   style.left = event.clientX+5;
	   style.top = event.clientY+10;
	   style.zIndex="1000";
	  }
 	}
}

//select ????????????????????    
function onMouseOutShow(obj)
{
 with (document.all.div_show)
 {
  style.display = "none"
 }
} 

//????????????????
  var oldBK;
  function mouse_over(obj)
  {
    oldBK=obj.style.backgroundColor;
    obj.style.backgroundColor="#ffffcc"
    obj.style.cursor="hand";
  }

  function mouse_out(obj)
  {
   // obj.style.backgroundColor="#e8e8ff"
    //var aaa=(obj.sectionRowIndex%2==0)? '#BFCCE1':'#F0F0F0';
    // obj.style.backgroundColor=aaa;
     obj.style.backgroundColor=oldBK;
  }
  //????????
  function open_win(url,name)
{
   window.open(url,name,"width=1020,height=600, top=50, left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=none, location=no, status=yes")
   //window.location=url;
}
	function newWindow(mypage,myname,w,h,scroll){//注意高度和宽度
		LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
		TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
		settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable=no';
		win = window.open(mypage,myname,settings);
		win.focus();
	}
	//????????????????????
function truncStr(s){
		s=s.substring(s.indexOf(":")+1,s.length);

		document.write(s);

	}
		//????????????????????
function truncDate(s){
		s=s.substring(0,16);

		document.write(s);

	}
	
	//var text='正在查询中，请稍候......';
	var theCurrentLength;
	var theCharacterTimeout;
    var theNewsTimeout;
    
	function startTicker(){
		theCharacterTimeout = 50;//字符间隔时间
		theNewsTimeout = 200;//新闻间隔时间
		theCurrentLength=0;
		theNewsState=1;
		runTicker();
	}

	function runTicker(){
		if(theCurrentLength != text.length){
		   drawNews();
		}else{
		   closeNews();
		}
	}

	// --- 滚动新闻
	function drawNews(){
		document.all.ticker.innerHTML =  text.substring(0,theCurrentLength);
	    theCurrentLength++;
	    setTimeout("runTicker()", theCharacterTimeout);
	}
	// --- 结束新闻循环
	function closeNews(){
	    document.all.ticker.innerHTML =  text ;
	    theCurrentLength = 0;
	    setTimeout("runTicker()", theNewsTimeout);
	}
  
  function truncDate(d){
  	d=d.substring(0,19);
  	document.write(d);
  }


