/************************************By Zheng Han Lin*****************************\
| 名称：纯JavaScript日历
| 功能：提供日期选择
| 显示日历：Calendar.display(this,toObject) toObject为被赋值的控件名称，注意如果有form要带上
| 作者：郑汉林
| 创建日期：2004年05月18日
| 帮助请参考calendar.htm
| 不同系统内应用时，可能需要修改calendar.htm的路径 
| 修改者：郑汉林
| 修改时间：2004年09月05日
\*********************************************************************************/

function Calendar(){}

function opennew(newurl,windowName,width,height,scrollbars)
{
var theLeft,theTop
theLeft=(screen.width-width)/2-2
theTop=(screen.height-height)/2
window.open(newurl,windowName,'width='+width+',height='+height+',scrollbars='+scrollbars+',status=0,toolbar=0,resizable=0,left='+theLeft+',top='+theTop+'').focus();
//return true;
}

var calendar_toObject = null;
function Calendar.display(fromObject,toObject)
{
	calendar_toObject = eval(toObject);
//	var b = window.showModalDialog("/include/calendar.htm",a,"dialogWidth:126pt;dialogLeft:200pt;dialogHeight:160pt;dialogTop:200pt;help:no;resizable:no;status:no;scroll:no;center:yes");
//	if(!(b==null || b==undefined))
//		eval(toObject).value = b;
	opennew("images/calendar_window.htm","calendar",160,188,0);
}