<!--
//***********默认设置定义.*********************
var tPopWait=50;		//停留tWait豪秒后显示提示。
var tPopShow=6000;		//显示tShow豪秒后关闭提示
var showPopStep=20;
var popOpacity=95;
var tfontcolor="#000000";
var tbgcolor="#ffffe1";
var tbordercolor="#666666";

//***************内部变量定义*****************
var sPop=null,curShow=null,tFadeOut=null,tFadeIn=null,tFadeWaiting=null;

document.write("<style type='text/css'id='defaultPopStyle'>");
document.write(".cPopText {  background-color: " + tbgcolor + ";color:" + tfontcolor + "; border: 1px " + tbordercolor + " solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}");
document.write("</style>");
document.write("<div id='dypopLayer' style='position:absolute;z-index:1000;' class='cPopText'></div>");

function showPopupText()
{
  var o=event.srcElement;
  MouseX=event.x;
  MouseY=event.y;
  if(o.alt!=null && o.alt!=""){o.dypop=o.alt;o.alt=""};
  //if(o.title!=null && o.title!=""){o.dypop=o.title;o.title=""};
  if(o.dypop!=sPop)
  {
    sPop=o.dypop;
    clearTimeout(curShow);
    clearTimeout(tFadeOut);
    clearTimeout(tFadeIn);
    clearTimeout(tFadeWaiting);  
    if(sPop==null || sPop=="")
    {
      dypopLayer.innerHTML="";
      dypopLayer.style.filter="Alpha()";
      dypopLayer.filters.Alpha.opacity=0;  
    }
    else
    {
      if(o.dyclass!=null) popStyle=o.dyclass 
      else popStyle="cPopText";
      curShow=setTimeout("showIt()",tPopWait);
    }
  }
}

function showIt()
{
  dypopLayer.className=popStyle;
  dypopLayer.innerHTML=sPop;
  popWidth=dypopLayer.clientWidth;
  popHeight=dypopLayer.clientHeight;
  if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
    else popLeftAdjust=0;
  if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
    else popTopAdjust=0;
  dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
  dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
  dypopLayer.style.filter="Alpha(Opacity=0)";
  fadeOut();
}

function fadeOut(){
  if(dypopLayer.filters.Alpha.opacity<popOpacity)
  {
    dypopLayer.filters.Alpha.opacity+=showPopStep;
    tFadeOut=setTimeout("fadeOut()",1);
  }
  else
  {
    dypopLayer.filters.Alpha.opacity=popOpacity;
    tFadeWaiting=setTimeout("fadeIn()",tPopShow);
  }
}

function fadeIn()
{
  if(dypopLayer.filters.Alpha.opacity>0)
  {
    dypopLayer.filters.Alpha.opacity-=1;
    tFadeIn=setTimeout("fadeIn()",1);
  }
}

document.onmouseover=showPopupText;

function login_true()
{
str=trim(document.login_frm.username.value)
if (str==""){alert("请输入您的 用户名称 ！"); document.login_frm.username.focus(); return false; }
if (keyword(str)){alert(" 用户名称 含有屏蔽字,请检查！"); document.login_frm.username.focus(); return false; }
str=trim(document.login_frm.password.value);
if (str==""){alert("请输入您的 登陆密码 ！"); document.login_frm.password.focus(); return false; }
document.login_frm.submit();
}
function disp_tr(meval)
{
  var left_n=eval(meval);
  if (left_n.style.display=="none")
  { eval(meval+".style.display='';"); }
  else
  { eval(meval+".style.display='none';"); }
}
function confrm(str)
{	
	var wind=window.confirm(str);
	return (wind);
}
function confrm_clear(str){
	if (confrm(str)==true){document.exit_frm.submit();}
}

function openwindow(url,name,width,height,scroll)
{
  var Left_size = (screen.width) ? (screen.width-width)/2 : 0;
  var Top_size = (screen.height) ? (screen.height-height)/2 : 0;
  var open_win=window.open(url,name,'width=' + width + ',height=' + height + ',left=' + Left_size + ',top=' + Top_size + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + scroll + ',resizable=no' );
}
//图片修改
function imgsize(str,w,h)
{
var img=str;
imgobj = new Image();
imgobj.src=img.src;
var a,b,c;
a=imgobj.width;
b=imgobj.height;
if (w>h) 
//表格宽大于高,以宽为标准
{
if (a>b)
//图片宽大于高,以图片宽为标准
{c=a/w;a=w;b=b/c;}
else
//图片高大于宽,以图片高为标准
{c=b/h;b=h;a=a/c;}
}
else
//表格高大于宽,以宽为标准
{
if (a>b)
//图片宽大于高,以图片宽为标准
{c=a/w;a=w;b=b/c;}
else
//图片高大于宽,以图片高为标准
{c=b/h;b=h;a=a/c;}
}
if (isNaN(a)){a=w;}
if (isNaN(b)){b=h;}
if (a>w)
//图宽大于表宽
{
a=imgobj.width;
b=imgobj.height;
c=a/w;a=w;b=a/c;
}
if (b>h)
//图宽大于表宽
{
a=imgobj.width;
b=imgobj.height;
c=b/h;b=h;a=a/c;
}
img.width=a;
img.height=b;
}
//去除左右空格
function trim(str)
{
var i,beg,end
var strlist=str.split(" ");
if (strlist.length==1){return str;}
for (i=0;i<strlist.length;i++)
{if (strlist[i]!="") {beg=i;break;}}
for (i=strlist.length-1;i>=0;i--)
{if (strlist[i]!="") {end=i;break;}}
str="";
for (i=beg;i<=end;i++)
{str=str+strlist[i]+" ";}
str=str.substring(0,str.length-1);
return str;
}
//中文识别
function checkIsChinese(str)
{//如果值为空，通过校验
if (str == "")
return true;
var pattern = /^([\u4E00-\u9FA5]|[\uFE30-\uFFA0])*$/gi;
if (pattern.test(str))
return true;
else
return false;
}
//返回字符串实际长度
function strlong(str){
var ii,i,temp;
i=0
for(ii=0;ii<str.length;ii++)
{
temp=str.substring(ii,ii+1);
if (checkIsChinese(temp)) 
{i=i+2;}
else
{i=i+1;}
}
return i;
}
//小写转换为大写
function smailchangebig(str){
str=str.replace()
	
}
