function preview(ID){
	var w=window.open("about:blank");			//打开新窗口，并把句柄赋给变量w

	//往新窗口中写入内容

	w.document.write("<html>\n");
	w.document.write("<head>\n");
	w.document.write("<meta http-equiv=\"Content-Language\" content=\"zh-cn\">\n");
	w.document.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\n");
	w.document.write("<title>中国旅游售票网---内容预览</title>\n");
	w.document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"images/style.css\">\n");
	w.document.write("<style type=\"text/css\">\n");
	w.document.write("<!--\n");
	w.document.write(".style1 {\n");
	w.document.write("	color: #808080;\n");
	w.document.write("	font-weight: bold;\n");
	w.document.write("}\n");
	w.document.write("-->\n");
	w.document.write("</style>\n");
	w.document.write("</head>\n");
	w.document.write("<body topmargin=\"0\" leftmargin=\"0\">\n");
	w.document.write("<table border=\"0\" width=\"615\" id=\"table11\" style=\"border-collapse: collapse; color: #494949\" align=\"center\">\n");
	w.document.write("	<tr>\n");
	w.document.write("		<td>\n");
	
	var Obj = document.getElementById(ID);		//搜索当前网页中ID的值
	w.document.write(Obj.value);

	w.document.write("		</td>\n");
	w.document.write("	</tr>\n");
	w.document.write("</table>\n");
	w.document.write("</body>\n");
	w.document.write("</html>\n");

}

function text_number() {
//只允许数字,中文输入法下，都是229
	var key;
    key = window.event.keyCode;
	//if((key>95 && key<106)||(key>47 && key<59)||key==8||key==37||key==39||key==46||key==229||key==9||key==13) {
	if((key>95 && key<106)||(key>47 && key<58) || key==229 ||key==190||key==110||key==46||key==8||key==9||key==13) {
		//
		if (key==13) {
			event.keyCode = 9;
		}
	}
	else {
		return false;
	}
}


//检查是否为数字
function IsNumeric(num){
	var Letters="0123456789.";
	var i;
	var c;
	if (num=='')
	{
		return false;
	}
	for(i=0;i<num.length;i++){
		c=num.charAt(i);
		if(Letters.indexOf( c ) < 0)
			return false;
	}
	return true;
}

//不为数字的话让它等于0
function NotNumIsZero(num){
	if(!IsNumeric(num)){
		return 0;
	}
	else{
		return parseInt(num);
	}
}





//验证表单数据
function Check(obj){
	//发团周期
	var tag=false;
	for (var i=0;i<obj.Week.length ;i++ )
	{
		if (obj.Week[i].checked)
		{
			//至少选择了一个
			tag=true;
			break;
		}
	}
	if (!tag)
	{
		alert('发团周期至少得选择一个');
		obj.Week[0].focus();
		return false;
	}
	//出团日期之前几天
	if (!IsNumeric(obj.BeforeDay.value))
	{
		alert('出团日期之前几天截止收客不能为空，只能为数字');
		obj.BeforeDay.focus();
		return false;
	}
	//线路名称
	if (obj.LineName.value=='')
	{
		alert('线路名称不能为空');
		obj.LineName.focus();
		return false;
	}
	//线路类型
	if (obj.LineType.options[obj.LineType.selectedIndex].value=='')
	{
		alert('线路类型至少要选择一个');
		obj.LineType.focus();
		return false;
	}
	//发布范围
	if (obj.FaBuFanWei.options[obj.FaBuFanWei.selectedIndex].value=='指定省区')
	{
		var N=0;
		for (var i=0;i<obj.FaBuCity.length ;i++ )
		{
			if (obj.FaBuCity[i].checked)
			{
				N++;
			}
		}
		if (N==0)
		{
			alert('您选择的是指定省区，至少要选择一个省市');
			obj.FaBuFanWei.focus();
			return false;
		}
	}

	//旅游天数
	if (!IsNumeric(obj.DayNum.value))
	{
		alert('旅游天数不能为空，并且只能为数字');
		obj.DayNum.focus();
		return false;
	}
	//意外保险

	if (!IsNumeric(obj.SafePrice.value))
	{
		alert('意外保险不能为空，并且只能为数字');
		obj.SafePrice.focus();
		return false;
	}
	//组团人数
	if (obj.GroupNum.value==0)
	{
		alert('组团人数不能为零');
		obj.GroupNum.focus();
		return false;
	}
	//票价
	//人数
	if (!IsNumeric(obj.ANum.value) || !IsNumeric(obj.BNum.value) || !IsNumeric(obj.CNum.value))
	{
		alert('A、B、C票价人数只能为数字，不能为空或其它字符');
		obj.ANum.focus();
		return false;
	}
	//市场价
	if (!IsNumeric(obj.SalePrice1.value) || !IsNumeric(obj.SalePrice2.value) || !IsNumeric(obj.SalePrice3.value))
	{
		alert('A、B、C票市场价格只能为数字，不能为空或其它字符');
		obj.SalePrice1.focus();
		return false;
	}
	//会员价
	if (!IsNumeric(obj.UserPrice1.value) || !IsNumeric(obj.UserPrice2.value) || !IsNumeric(obj.UserPrice2.value))
	{
		alert('A、B、C票会员价格只能为数字，不能为空或其它字符');
		obj.UserPrice1.focus();
		return false;
	}
	//同业价
	if (!IsNumeric(obj.AgentPrice1.value) || !IsNumeric(obj.AgentPrice2.value) || !IsNumeric(obj.AgentPrice3.value))
	{
		alert('A、B、C票同业价格只能为数字，不能为空或其它字符');
		obj.AgentPrice1.focus();
		return false;
	}
	//差价
	if (!IsNumeric(obj.ChaJia.value))
	{
		alert('差价只能为数字，不能为空或其它字符');
		obj.ChaJia.focus();
		return false;
	}
	//送团人员
	if (obj.STRenYuan.value=='')
	{
		alert('送团人员不能为空');
		obj.STRenYuan.focus();
		return false;
	}
	//送团联系电话
	if (obj.STLianXiDianHua.value=='')
	{
		alert('送团联系电话不能为空');
		obj.STLianXiDianHua.focus();
		return false;
	}
	//送团标志
	if (obj.STBiaoZhi.value=='')
	{
		alert('送团标志不能为空');
		obj.STBiaoZhi.focus();
		return false;
	}
	//书写内容
	if (obj.STShuXieNeiRong.value=='')
	{
		alert('书写内容不能为空');
		obj.STShuXieNeiRong.focus();
		return false;
	}
	//集合时间
	if (obj.JiHeShiJian.value=='')
	{
		alert('集合时间不能为空');
		obj.JiHeShiJian.focus();
		return false;
	}
	//集合地点
	if (obj.JiHeDiDian.value=='')
	{
		alert('集合地点不能为空');
		obj.JiHeDiDian.focus();
		return false;
	}
	//送团信息
	if (obj.STXinXi.value=='')
	{
		alert('送团信息不能为空');
		obj.STXinXi.focus();
		return false;
	}
	//接团人员
	if (obj.JTRenYuan.value=='')
	{
		alert('接团人员不能为空');
		obj.JTRenYuan.focus();
		return false;
	}
	//接团联系电话
	if (obj.JTLianXiDianHua.value=='')
	{
		alert('接团联系电话不能为空');
		obj.JTLianXiDianHua.focus();
		return false;
	}
	//接团标志
	if (obj.JTBiaoZhi.value=='')
	{
		alert('接团标志不能为空');
		obj.JTBiaoZhi.focus();
		return false;
	}
	//书写内容
	if (obj.JTShuXieNeiRong.value=='')
	{
		alert('书写内容不能为空');
		obj.JTShuXieNeiRong.focus();
		return false;
	}
	//接团地点
	if (obj.JTDiDian.value=='')
	{
		alert('接团地点不能为空');
		obj.JTDiDian.focus();
		return false;
	}
	//接团信息
	if (obj.JTXinXi.value=='')
	{
		alert('接团信息不能为空');
		obj.JTXinXi.focus();
		return false;
	}
	//注意事项
	if (obj.ZhuYiShiXiang.value=='')
	{
		alert('注意事项不能为空');
		obj.ZhuYiShiXiang.focus();
		return false;
	}
	return true;
}

//验证修改表单数据
function CheckModi(obj){

	if (obj.ModiIDs.value=='')
	{
		alert('至少得选择一个要修改的线路');
		document.LineList.List.ID[0].focus();
		return false;
	}
	//出团日期之前几天
	if (!IsNumeric(obj.BeforeDay.value))
	{
		alert('出团日期之前几天截止收客不能为空，只能为数字');
		obj.BeforeDay.focus();
		return false;
	}
	//线路名称
	if (obj.LineName.value=='')
	{
		alert('线路名称不能为空');
		obj.LineName.focus();
		return false;
	}
	//线路类型
	if (obj.LineType.options[obj.LineType.selectedIndex].value=='')
	{
		alert('线路类型至少要选择一个');
		obj.LineType.focus();
		return false;
	}

	//发布范围
	if (obj.FaBuFanWei.options[obj.FaBuFanWei.selectedIndex].value=='指定省区')
	{
		var N=0;
		for (var i=0;i<obj.FaBuCity.length ;i++ )
		{
			if (obj.FaBuCity[i].checked)
			{
				N++;
			}
		}
		if (N==0)
		{
			alert('您选择的是指定省区，至少要选择一个省市');
			obj.FaBuFanWei.focus();
			return false;
		}
	}

	//旅游天数
	if (!IsNumeric(obj.DayNum.value))
	{
		alert('旅游天数不能为空，并且只能为数字');
		obj.DayNum.focus();
		return false;
	}
	//意外保险

	if (!IsNumeric(obj.SafePrice.value))
	{
		alert('意外保险不能为空，并且只能为数字');
		obj.SafePrice.focus();
		return false;
	}
	//组团人数
	if (obj.GroupNum.value==0)
	{
		alert('组团人数不能为零');
		obj.GroupNum.focus();
		return false;
	}
	//票价
	//人数
	if (!IsNumeric(obj.ANum.value) || !IsNumeric(obj.BNum.value) || !IsNumeric(obj.CNum.value))
	{
		alert('A、B、C票价人数只能为数字，不能为空或其它字符');
		obj.ANum.focus();
		return false;
	}
	//市场价
	if (!IsNumeric(obj.SalePrice1.value) || !IsNumeric(obj.SalePrice2.value) || !IsNumeric(obj.SalePrice3.value))
	{
		alert('A、B、C票市场价格只能为数字，不能为空或其它字符');
		obj.SalePrice1.focus();
		return false;
	}
	//会员价
	if (!IsNumeric(obj.UserPrice1.value) || !IsNumeric(obj.UserPrice2.value) || !IsNumeric(obj.UserPrice2.value))
	{
		alert('A、B、C票会员价格只能为数字，不能为空或其它字符');
		obj.UserPrice1.focus();
		return false;
	}
	//同业价
	if (!IsNumeric(obj.AgentPrice1.value) || !IsNumeric(obj.AgentPrice2.value) || !IsNumeric(obj.AgentPrice3.value))
	{
		alert('A、B、C票同业价格只能为数字，不能为空或其它字符');
		obj.AgentPrice1.focus();
		return false;
	}
	//差价
	if (!IsNumeric(obj.ChaJia.value))
	{
		alert('差价只能为数字，不能为空或其它字符');
		obj.ChaJia.focus();
		return false;
	}
	//送团人员
	if (obj.STRenYuan.value=='')
	{
		alert('送团人员不能为空');
		obj.STRenYuan.focus();
		return false;
	}
	//送团联系电话
	if (obj.STLianXiDianHua.value=='')
	{
		alert('送团联系电话不能为空');
		obj.STLianXiDianHua.focus();
		return false;
	}
	//送团标志
	if (obj.STBiaoZhi.value=='')
	{
		alert('送团标志不能为空');
		obj.STBiaoZhi.focus();
		return false;
	}
	//书写内容
	if (obj.STShuXieNeiRong.value=='')
	{
		alert('书写内容不能为空');
		obj.STShuXieNeiRong.focus();
		return false;
	}
	//集合时间
	if (obj.JiHeShiJian.value=='')
	{
		alert('集合时间不能为空');
		obj.JiHeShiJian.focus();
		return false;
	}
	//集合地点
	if (obj.JiHeDiDian.value=='')
	{
		alert('集合地点不能为空');
		obj.JiHeDiDian.focus();
		return false;
	}
	//送团信息
	if (obj.STXinXi.value=='')
	{
		alert('送团信息不能为空');
		obj.STXinXi.focus();
		return false;
	}
	//接团人员
	if (obj.JTRenYuan.value=='')
	{
		alert('接团人员不能为空');
		obj.JTRenYuan.focus();
		return false;
	}
	//接团联系电话
	if (obj.JTLianXiDianHua.value=='')
	{
		alert('接团联系电话不能为空');
		obj.JTLianXiDianHua.focus();
		return false;
	}
	//接团标志
	if (obj.JTBiaoZhi.value=='')
	{
		alert('接团标志不能为空');
		obj.JTBiaoZhi.focus();
		return false;
	}
	//书写内容
	if (obj.JTShuXieNeiRong.value=='')
	{
		alert('书写内容不能为空');
		obj.JTShuXieNeiRong.focus();
		return false;
	}
	//接团地点
	if (obj.JTDiDian.value=='')
	{
		alert('接团地点不能为空');
		obj.JTDiDian.focus();
		return false;
	}
	//接团信息
	if (obj.JTXinXi.value=='')
	{
		alert('接团信息不能为空');
		obj.JTXinXi.focus();
		return false;
	}
	//注意事项
	if (obj.ZhuYiShiXiang.value=='')
	{
		alert('注意事项不能为空');
		obj.ZhuYiShiXiang.focus();
		return false;
	}
	return true;
}


//以下为日历选择
//★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★   
//★                                                              ★   
//★ 日期控件 Version 1.0                                         ★   
//★                                                              ★   
//★ Code by Chris.J(黄嘉隆)                                      ★   
//★                                                              ★   
//★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★   
  
function PopupCalendar(InstanceName)   
{   
    ///Global Tag   
    this.instanceName=InstanceName;   
    ///Properties   
    this.separator="-"  
    this.oBtnTodayTitle="Today"  
    this.oBtnCancelTitle="Cancel"  
    this.weekDaySting=new Array("S","M","T","W","T","F","S");   
    this.monthSting=new Array("January","February","March","April","May","June","July","August","September","October","November","December");   
    this.Width=200;   
    this.currDate=new Date();   
    this.today=new Date();   
    this.startYear=1970;   
    this.endYear=2099;   
    ///Css   
    this.normalfontColor="#666666";   
    this.selectedfontColor="red";   
    this.divBorderCss="1px solid #BCD0DE";   
    this.titleTableBgColor="#98B8CD";   
    this.tableBorderColor="#CCCCCC"  
    ///Method   
    this.Init=CalendarInit;   
    this.Fill=CalendarFill;   
    this.Refresh=CalendarRefresh;   
    this.Restore=CalendarRestore;   
    ///HTMLObject   
    this.oTaget=null;   
    this.oPreviousCell=null;   
    this.sDIVID=InstanceName+"_Div";   
    this.sTABLEID=InstanceName+"_Table";   
    this.sMONTHID=InstanceName+"_Month";   
    this.sYEARID=InstanceName+"_Year";   
    this.sTODAYBTNID=InstanceName+"_TODAYBTN";   
       
}   
function CalendarInit()             ///Create panel   
{   
    var sMonth,sYear   
    sMonth=this.currDate.getMonth();   
    sYear=this.currDate.getYear();   
    htmlAll="<div id='"+this.sDIVID+"' style='display:none;position:absolute;width:"+this.Width+";border:"+this.divBorderCss+";padding:2px;background-color:#FFFFFF'>";   
    htmlAll+="<div align='center'>";   
    /// Month   
    htmloMonth="<select id='"+this.sMONTHID+"' onchange=CalendarMonthChange("+this.instanceName+") style='width:50%'>";   
    for(i=0;i<12;i++)   
    {              
        htmloMonth+="<option value='"+i+"'>"+this.monthSting[i]+"</option>";   
    }   
    htmloMonth+="</select>";   
    /// Year   
    htmloYear="<select id='"+this.sYEARID+"' onchange=CalendarYearChange("+this.instanceName+") style='width:50%'>";   
    for(i=this.startYear;i<=this.endYear;i++)   
    {   
        htmloYear+="<option value='"+i+"'>"+i+"</option>";   
    }   
    htmloYear+="</select></div>";   
    /// Day   
    htmloDayTable="<table id='"+this.sTABLEID+"' width='100%' border=0 cellpadding=0 cellspacing=1 bgcolor='"+this.tableBorderColor+"'>";   
    htmloDayTable+="<tbody bgcolor='#ffffff'style='font-size:13px'>";   
    for(i=0;i<=6;i++)   
    {   
        if(i==0)   
            htmloDayTable+="<tr bgcolor='" + this.titleTableBgColor + "'>";   
        else  
            htmloDayTable+="<tr>";   
        for(j=0;j<7;j++)   
        {   
  
            if(i==0)   
            {   
                htmloDayTable+="<td height='20' align='center' valign='middle' style='cursor:hand'>";   
                htmloDayTable+=this.weekDaySting[j]+"</td>"  
            }   
            else  
            {   
                htmloDayTable+="<td height='20' align='center' valign='middle' style='cursor:hand'";   
                htmloDayTable+=" onmouseover=CalendarCellsMsOver("+this.instanceName+")";   
                htmloDayTable+=" onmouseout=CalendarCellsMsOut("+this.instanceName+")";   
                htmloDayTable+=" onclick=CalendarCellsClick(this,"+this.instanceName+")>";   
                htmloDayTable+="&nbsp;</td>"  
            }   
        }   
        htmloDayTable+="</tr>";      
    }   
    htmloDayTable+="</tbody></table>";   
    /// Today Button   
    htmloButton="<div align='center' style='padding:3px'>"  
    htmloButton+="<button id='"+this.sTODAYBTNID+"' style='width:40%;border:1px solid #BCD0DE;background-color:#eeeeee;cursor:hand'"  
    htmloButton+=" onclick=CalendarTodayClick("+this.instanceName+")>"+this.oBtnTodayTitle+"</button>&nbsp;"  
    htmloButton+="<button style='width:40%;border:1px solid #BCD0DE;background-color:#eeeeee;cursor:hand'"  
    htmloButton+=" onclick=CalendarCancel("+this.instanceName+")>"+this.oBtnCancelTitle+"</button> "  
    htmloButton+="</div>"  
    /// All   
    htmlAll=htmlAll+htmloMonth+htmloYear+htmloDayTable+htmloButton+"</div>";   
    document.write(htmlAll);   
    this.Fill();       
}   
function CalendarFill()         ///   
{   
    var sMonth,sYear,sWeekDay,sToday,oTable,currRow,MaxDay,iDaySn,sIndex,rowIndex,cellIndex,oSelectMonth,oSelectYear   
    sMonth=this.currDate.getMonth();   
    sYear=this.currDate.getYear();   
    sWeekDay=(new Date(sYear,sMonth,1)).getDay();   
    sToday=this.currDate.getDate();   
    iDaySn=1   
    oTable=document.all[this.sTABLEID];   
    currRow=oTable.rows[1];   
    MaxDay=CalendarGetMaxDay(sYear,sMonth);   
       
    oSelectMonth=document.all[this.sMONTHID]   
    oSelectMonth.selectedIndex=sMonth;   
    oSelectYear=document.all[this.sYEARID]   
    for(i=0;i<oSelectYear.length;i++)   
    {   
        if(parseInt(oSelectYear.options[i].value)==sYear)oSelectYear.selectedIndex=i;   
    }   
    ////   
    for(rowIndex=1;rowIndex<=6;rowIndex++)   
    {   
        if(iDaySn>MaxDay)break;   
        currRow = oTable.rows[rowIndex];   
        cellIndex = 0;   
        if(rowIndex==1)cellIndex = sWeekDay;   
        for(;cellIndex<currRow.cells.length;cellIndex++)   
        {   
            if(iDaySn==sToday)   
            {   
                currRow.cells[cellIndex].innerHTML="<font color='"+this.selectedfontColor+"'><i><b>"+iDaySn+"</b></i></font>";   
                this.oPreviousCell=currRow.cells[cellIndex];   
            }   
            else  
            {   
                currRow.cells[cellIndex].innerHTML=iDaySn;     
                currRow.cells[cellIndex].style.color=this.normalfontColor;   
            }   
            CalendarCellSetCss(0,currRow.cells[cellIndex]);   
            iDaySn++;   
            if(iDaySn>MaxDay)break;     
        }   
    }   
}   
function CalendarRestore()                  /// Clear Data   
{      
    var i,j,oTable   
    oTable=document.all[this.sTABLEID]   
    for(i=1;i<oTable.rows.length;i++)   
    {   
        for(j=0;j<oTable.rows[i].cells.length;j++)   
        {   
            CalendarCellSetCss(0,oTable.rows[i].cells[j]);   
            oTable.rows[i].cells[j].innerHTML="&nbsp;";   
        }   
    }      
}   
function CalendarRefresh(newDate)                   ///   
{   
    this.currDate=newDate;   
    this.Restore();    
    this.Fill();       
}   
function CalendarCellsMsOver(oInstance)             /// Cell MouseOver   
{   
    var myCell = event.srcElement;   
    CalendarCellSetCss(0,oInstance.oPreviousCell);   
    if(myCell)   
    {   
        CalendarCellSetCss(1,myCell);   
        oInstance.oPreviousCell=myCell;   
    }   
}   
function CalendarCellsMsOut(oInstance)              ////// Cell MouseOut   
{   
    var myCell = event.srcElement;   
    CalendarCellSetCss(0,myCell);      
}   
function CalendarYearChange(oInstance)              /// Year Change   
{   
    var sDay,sMonth,sYear,newDate   
    sDay=oInstance.currDate.getDate();   
    sMonth=oInstance.currDate.getMonth();   
    sYear=document.all[oInstance.sYEARID].value   
    newDate=new Date(sYear,sMonth,sDay);   
    oInstance.Refresh(newDate);   
}   
function CalendarMonthChange(oInstance)             /// Month Change   
{   
    var sDay,sMonth,sYear,newDate   
    sDay=oInstance.currDate.getDate();   
    sMonth=document.all[oInstance.sMONTHID].value   
    sYear=oInstance.currDate.getYear();   
    newDate=new Date(sYear,sMonth,sDay);   
    oInstance.Refresh(newDate);    
}   
function CalendarCellsClick(oCell,oInstance)   
{   
    var sDay,sMonth,sYear,newDate   
    sYear=oInstance.currDate.getFullYear();   
    sMonth=oInstance.currDate.getMonth();   
    sDay=oInstance.currDate.getDate();   
    if(oCell.innerText!=" ")   
    {   
        sDay=parseInt(oCell.innerText);   
        if(sDay!=oInstance.currDate.getDate())   
        {   
            newDate=new Date(sYear,sMonth,sDay);   
            oInstance.Refresh(newDate);   
        }   
    }   
    sDateString=sYear+oInstance.separator+CalendarDblNum(sMonth+1)+oInstance.separator+CalendarDblNum(sDay);        ///return sDateString   
    if(oInstance.oTaget.tagName.toLowerCase()=="input")oInstance.oTaget.value = sDateString;   
    CalendarCancel(oInstance);   
    return sDateString;   
}   
function CalendarTodayClick(oInstance)              /// "Today" button Change   
{      
    oInstance.Refresh(new Date());         
}   
function getDateString(oInputSrc,oInstance)   
{   
    if(oInputSrc&&oInstance)    
    {   
        var CalendarDiv=document.all[oInstance.sDIVID];   
        oInstance.oTaget=oInputSrc;   
        CalendarDiv.style.pixelLeft=CalendargetPos(oInputSrc,"Left");   
        CalendarDiv.style.pixelTop=CalendargetPos(oInputSrc,"Top") + oInputSrc.offsetHeight;   
        CalendarDiv.style.display=(CalendarDiv.style.display=="none")?"":"none";       
    }      
}   
function CalendarCellSetCss(sMode,oCell)            /// Set Cell Css   
{   
    // sMode   
    // 0: OnMouserOut 1: OnMouseOver    
    if(sMode)   
    {   
        oCell.style.border="1px solid #5589AA";   
        oCell.style.backgroundColor="#BCD0DE";   
    }   
    else  
    {   
        oCell.style.border="1px solid #FFFFFF";   
        oCell.style.backgroundColor="#FFFFFF";   
    }      
}   
function CalendarGetMaxDay(nowYear,nowMonth)            /// Get MaxDay of current month   
{   
    var nextMonth,nextYear,currDate,nextDate,theMaxDay   
    nextMonth=nowMonth+1;   
    if(nextMonth>11)   
    {   
        nextYear=nowYear+1;   
        nextMonth=0;   
    }   
    else       
    {   
        nextYear=nowYear;      
    }   
    currDate=new Date(nowYear,nowMonth,1);   
    nextDate=new Date(nextYear,nextMonth,1);   
    theMaxDay=(nextDate-currDate)/(24*60*60*1000);   
    return theMaxDay;   
}   
function CalendargetPos(el,ePro)                /// Get Absolute Position   
{   
    var ePos=0;   
    while(el!=null)   
    {          
        ePos+=el["offset"+ePro];   
        el=el.offsetParent;   
    }   
    return ePos;   
}   
function CalendarDblNum(num)   
{   
    if(num < 10)    
        return "0"+num;   
    else  
        return num;   
}   
function CalendarCancel(oInstance)          ///Cancel   
{   
    var CalendarDiv=document.all[oInstance.sDIVID];   
    CalendarDiv.style.display="none";          
}  





var oCalendarEn=new PopupCalendar("oCalendarEn"); //初始化控件时,请给出实例名称如:oCalendarEn
oCalendarEn.Init();

var oCalendarChs=new PopupCalendar("oCalendarChs"); //初始化控件时,请给出实例名称:oCalendarChs
oCalendarChs.weekDaySting=new Array("日","一","二","三","四","五","六");
oCalendarChs.monthSting=new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
oCalendarChs.oBtnTodayTitle="今天";
oCalendarChs.oBtnCancelTitle="取消";
oCalendarChs.Init();


//getDateString(this,oCalendarChs)
