﻿//=========================================================================================
//  代码描述：打开一个新的没有状态栏、工具栏、菜单栏、定位栏，不能改变大小，且位置居中的新窗口 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';
	}
}
//==========================================================================================
// 代码描述：下级菜单的显示隐藏
//==========================================================================================
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)
	{
	}
}
//==========================================================================================
// 代码描述：图片的SHU标移入移出背景色变换效果
//==========================================================================================
function ImageMouse(obj,type)   
{   
	if(type=="1")
		obj.style.backgroundColor='';
	else
		obj.style.backgroundColor="#FFCC00";
}