﻿function ShowDateTime()
{
	var enabled = 0; today = new Date();
    var day; var date;
    if(today.getDay()==0) day = "星期天"
    if(today.getDay()==1) day = "星期一"
    if(today.getDay()==2) day = "星期二"
    if(today.getDay()==3) day = "星期三"
    if(today.getDay()==4) day = "星期四"
    if(today.getDay()==5) day = "星期五"
    if(today.getDay()==6) day = "星期六"
    document.fgColor = "000000";
    date = (today.getYear()) +'年'+(today.getMonth() + 1 )+'月'+today.getDate()+'日 '+day ;
    document.write(date);
}
//=========================================================================================
//  代码描述：打开一个新的没有状态栏、工具栏、菜单栏、定位栏，不能改变大小，且位置居中的新窗口 think           2005/04/11             创建
//=========================================================================================
function OpenWindow(pageURL, innerWidth, innerHeight)
{	
	var ScreenWidth = screen.availWidth
	var ScreenHeight = screen.availHeight
	var StartX = (ScreenWidth - innerWidth) / 2
	var StartY = (ScreenHeight - innerHeight) / 2
	if(innerWidth==null&&innerHeight==null)
		window.open(pageURL)
	else
		window.open(pageURL, '', 'left='+ StartX + ', top='+ StartY + ', Width=' + innerWidth +', height=' + innerHeight + ', resizable=yes, scrollbars=yes, status=no, toolbar=no, menubar=no, location=no')
}
function OpenPage(pageURL)
{
	window.location.href=pageURL;
}
//=======================================================================================================================================
// 代码描述：实现DataGrid控件中，鼠标移到某一行时的背景色、字体色的设置，进行一些颜色交替变换 编写：chensheng
//=======================================================================================================================================
function MouseOut(obj)   
{   
	if(obj.style.backgroundColor=="#999999")
		obj.style.backgroundColor="#999999";
	else
	{
		obj.style.backgroundColor=obj.getAttribute('BKC');
		obj.style.backgroundColor='';
	}
	
} 
function MouseOver(obj)   
{   
	if(obj.style.backgroundColor=="#999999")
		obj.setAttribute('BKC',"#999999");
	else
	{
		obj.setAttribute('BKC',obj.style.backgroundColor);
		obj.style.backgroundColor='#B0EDFF';
	}
}
//==========================================================================================
// 代码描述：按钮SHU标移入移出图片背景色变换,1表示移入，2移出
//==========================================================================================
function ButtomBgMouse(obj,type,oldbg,newbg)
{
	if(type=="1")
		obj.style.background="url("+newbg+")";
	else
		obj.style.background="url("+oldbg+")";
}
//==========================================================================================
// 代码描述：下级菜单的显示隐藏
//==========================================================================================
function ClickByParent(id) 
{
	try
	{
		trdisplay=document.all(id).style.display;
		if (trdisplay=="block") 
		{
			document.all(id).style.display="none";
		}
		else 
		{
			document.all(id).style.display="block";
		}
	}
	catch(e)
	{
	}
}