//--------------------------------------------------------
//common init
//--------------------------------------------------------
var misversion = "苏州天泽 MISTaxi V3.2";
window.status = misversion;
var miscopyright = "版权所有：2004-2007 苏州市城市客运交通管理处 & 苏州天泽信息科技有限公司 V3.2版本";
//var miscopyright = "版权所有：2004-2007 苏州天泽信息科技有限公司 苏州天泽GPS客运出租车运营管理系统软件 V3.2版本";
var miswelcome = "欢迎使用 MIS3.2 服务系统";

//--------------------------------------------------------
//common function
//--------------------------------------------------------
function setPageScroll()
{  
		parent.document.all(self.name).height = document.body.scrollHeight + 20;
}

function replaceString(str){
   var r, re;                    //Declare variables.
   r="";
   re = / /g;             //Create regular expression pattern.
   if(str!=""){
	r = str.replace(re, "");    //Replace "A" with "The".
   }
   return(r);                   //Return string with replacement made.

}
//表格style相关
function onmouseoverFunc(elementid){
	var targetobj = eval("document.all."+elementid);
	targetobj.style.backgroundColor = "#9999FF";
	targetobj.style.cursor = "hand";
}

function onmouseoutFunc(elementid,oldcolor){
	var targetobj = eval("document.all."+elementid);
	targetobj.style.backgroundColor = oldcolor;
}

function onkeydowns()
{
    try{
        if(event.keyCode==13)
        {
            if(document.activeElement.type=="password"||document.activeElement.type=="text"||document.activeElement.type=="select-one"||document.activeElement.type=="checkbox"||document.activeElement.type=="radio")
            {
                 event.keyCode=9;
			}
         }
	}
   catch(Exception){}

}

function printReport(){
	printBase();
	//window.print();
	factory.printing.Preview();
}

function maxWin()
{
         var aw = screen.availWidth;
         var ah = screen.availHeight;
         window.moveTo(0, 0);
         window.resizeTo(aw, ah);
}

function clsWin()
{
         window.close();
}

function mOvr(src,clrOver) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand'; src.bgColor = clrOver; 
	}
}
function mOut(src,clrIn) { 
	if (!src.contains(event.toElement)) { 
		src.style.cursor = 'default'; src.bgColor = clrIn; 
	}
} 
function mClk(src) { 
	if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
	} 
}

function MM_openBrWindow(theURL,winName,features) 
{ 
  window.open(theURL,winName,features);
}
function out(tag)
{
   	tag.style.color="RED"
}
function over(tag)
{
   	tag.style.color="BLUE"
}
function key_num_press()
{
	if(event.keyCode>=48 && event.keyCode<=57 || event.keyCode==8  )
	{
		return true;
	}
	else
	{
		event.keyCode=0
		return false
	}
}

