
tempVersion='此系统由北京龙腾软件公司研制开发  version:4.0 ';

if (document.all.remote_user_name)
    {  tempName=document.all.remote_user_name.value
      if (tempName!="")
        {
         tempVersion=tempVersion+'            当前用户英文名：'+tempName
        }
      else
        {
         tempVersion=tempVersion+'           当前用户英文名：anonymous'
        }
    if (window.defaultStatus=="")
        {
       window.defaultStatus=tempVersion;
       window.status=tempVersion;
        } 
    }



if (document.all.remote_user_cname)
    {  tempName=document.all.remote_user_cname.value
      if (tempName!="")
     {
     tempVersion=tempVersion+" 中文名："+tempName
     }
      else
     {
     tempVersion=tempVersion+" 中文名：anonymous"
     }
    window.defaultStatus=tempVersion;
    window.status=tempVersion;
  }




tempTitle=""
//判断是否存在框架
if (document.title!="")
     {
     tempTitle=tempTitle+" -- "+document.title
     }
else
   {
   document.title=tempTitle
   }


//if (window.parent.Top.length!=0)
//   {
//    if (window.parent.Top.length!=4)
//     {
//window.parent.document.title=tempTitle}
//   }
//else
//  { 
//    if (window.defaultStatus=="")
//        {
//       window.defaultStatus=tempVersion;
//        window.status=tempVersion;
//        } 
   
//  }



//显示日期选择框
var gcToggle = "#ffff00";
var gcBG = "#CCCCFF";
function fPopUpCalendarDlg(ctrlobj)
{
	showx = event.screenX - event.offsetX - 4 - 210 ; // + deltaX;
	showy = event.screenY - event.offsetY + 18; // + deltaY;
	newWINwidth = 210 + 4 + 18;
        tt1="px; status:no; directories:yes;scrollbars:no;Resizable=no;"
        tt2="dialogWidth:197px; dialogHeight:210px; dialogLeft:"
	retval = window.showModalDialog("/wsbg/CalendarDlg.htm", "", tt2+showx+"px; dialogTop:"+showy+tt1);
	if( retval != null ){
		ctrlobj.value = retval;
	}else{

	}
}

function backOASystem()
{
if (window.parent.frames.length!=0)
    {
     if (window.parent.frames.length!=4)
          {
          //window.parent.location.reload()
          location="/database/ltnewscenter.nsf/mainquery?openagent"
          }
    }
else
    {
    location="http://"+location.host+""

    }
}


function testUserSystem()
{

var userBrowserName=window.navigator.appName
var MSIE=(userBrowserName.toLowerCase().indexOf("microsoft")!=-1)?true:false


tempAgent=window.navigator.userAgent
if ((!MSIE)||(tempAgent.indexOf("MSIE 5") == -1))
  {
   if (tempAgent.indexOf("MSIE 6") == -1)
     {
      alert("Please use MicroSoft Internet Explorer Version 5.5 or heigh Version")
      document.body.innerHTML="Please use MicroSoft Internet Explorer Version 5.5 or heigh Version"
      window.close()
     }
   }
/*
if (window.navigator)
   {
      var userLanguage=window.navigator.browserLanguage
      if (userLanguage.toLowerCase()!="zh-cn")
           {
           alert("You must use the Chinese Language to use this OA system !");
           document.body.innerHTML="You must use the Chinese Language to use this OA system !<br>Please install Chinese Language packet!"
           window.close()
           }
    }
*/
}
testUserSystem();
//删除前导空格。
function Ltrim(strvalue)
{
var value=strvalue
var tempValue=""
for (var i=0;i<value.length;i++)
   {
    
    if (value.charAt(i)!=" ")
       {
       tempValue=value.substring(i,value.length)
       break;
        }
    }
return tempValue
}
//判断是否都是空格.
function isSpaceChar(value)
{
tempResult=true
for (var i=0;i<value.length;i++)
   {
    if (value.charAt(i)!=" ")
       tempResult=false
    }
return tempResult
}
//显示人员选择窗口
function selectPerson(param)
{
dialogProperty1="dialogWidth:520px; dialogHeight:320px; center:yes"
selectPersonDialog="/database/ltlib.nsf/selectPerson?openform"+"&"+param
newWin=open(selectPersonDialog,"selectWindow","toolbar=no location=no menubar=no resizeable=no width=520 height=270 top=200 left=150")
}
function AddModule()
{
dialogProperty1="dialogWidth:520px; dialogHeight:320px; center:yes"
selectPersonDialog="/database/ltlib.nsf/AddModule?openform"
newWin=open(selectPersonDialog,"selectWindow","toolbar=no location=no menubar=no resizeable=no width=520 height=290 top=200 left=150")
}
//显示部门选择窗口
function selectDept(param)
{
dialogProperty1="dialogWidth:520px; dialogHeight:320px; center:yes"
selectPersonDialog="/database/ltlib.nsf/selectDept?openform"+"&"+param
newWin=open(selectPersonDialog,"selectWindow","toolbar=no location=no menubar=no resizeable=no width=520 height=230 top=200 left=150")
}

//显示人员选择窗口
function selectMailPerson()
{
selectPersonDialog="/database/ltlib.nsf/selectMailPerson?openform"
newWin=open(selectPersonDialog,"selectWindow","toolbar=no location=no menubar=no resizeable=no width=520 height=420 top=80 left=150")

}


function pleasewait()
{
var args=pleasewait.arguments;
var visible=args[0];
if  (visible=='show') visible='visible';
if  (visible=='hide') visible='hidden';
theObj=eval("document.all[\'"+args[1]+"\']");
if  (theObj) theObj.style.visibility=visible;
}
var ksdate="";
var jsdate="";
function userCar(tempdate)
{
if (ksdate=="")
   {
   ksdate=tempdate;
   return false;
   } 
if (jsdate=="")
   {
   jsdate=tempdate;
   } 

tempurl="/database/ltclgl.nsf/ycd?openform&ks="+ksdate+"&js="+jsdate
location=tempurl

}









