changestyle.js
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:14k
源码类别:

OA系统

开发平台:

Java

  1. function mouseon(rowid,imagesid)
  2. {
  3.     rowid.className = "DataRowMouseOn";
  4.     eval("document.all." + imagesid + ".style.display=''");
  5. }
  6. function mouseout(rowid,imagesid,stylename)
  7. {
  8.     rowid.className = stylename;
  9.     eval("document.all." + imagesid + ".style.display='none'");
  10. }
  11. function mouseontd(rowid)
  12. {
  13.     rowid.className = "DataColsMouseOn";
  14. }
  15. function mouseouttd(rowid,stylename)
  16. {
  17.     rowid.className = stylename;
  18. }
  19. function uploadimage(ImageBox,ImagePic)
  20. {
  21.     var ImageSrc=window.showModalDialog("/UploadImg.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
  22.     if(ImageSrc!=null&&ImageSrc!="")
  23.     {
  24.         ImageBox.value=ImageSrc;
  25.         ImagePic.src=ImageSrc;
  26.     }
  27.     return false;
  28. }
  29. function uploadacc(FileBox)
  30. {
  31.     var FileSrc=window.showModalDialog("/UploadFile.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
  32.     if(FileSrc!=null&&FileSrc!="")
  33.     {
  34.         FileBox.value=FileSrc;
  35.     }
  36.     return false;
  37. }
  38. function selectDefaultValue(selectName,defaultValue)
  39. {
  40.     for(var i=0;i<selectName.length;i++)
  41.     {
  42.         if(selectName.options[i].value==defaultValue)
  43.         {
  44.             selectName.selectedIndex=i;
  45.         }
  46.     }
  47. }
  48. function openeditwindow(EditURL)
  49. {
  50.     window.showModalDialog(EditURL,"","status:yes; resizable: yes; help:no; dialogWidth:696px; dialogHeight:350px");
  51.     return false;
  52. }
  53. function hidden_top(hidden){
  54.   if (hidden){
  55.     switchPointTop.src="images/zjm03.gif";
  56.     window.top.document.all.rowsFrame.rows="0,0,9,*";
  57.   }
  58.   else{
  59.     switchPointTop.src="images/zjm03-1.gif";
  60.     window.top.document.all.rowsFrame.rows="0,73,9,*";
  61.   }
  62. }
  63. function hidden_top(){
  64.   if (switchPointTop.src.indexOf("images/zjm03-1.gif")>-1){
  65.     switchPointTop.src="images/zjm03.gif";
  66.     window.top.document.all.rowsFrame.rows="0,0,9,*";
  67.   }
  68.   else{
  69.    switchPointTop.src="images/zjm03-1.gif";
  70.     window.top.document.all.rowsFrame.rows="0,73,9,*";
  71.   }
  72. }
  73. function hidden_left(hidden){
  74.   if (hidden){
  75.     switchPointLeft.src="images/zjm07.gif";
  76.     window.top.document.all.colsFrame.cols="0,9,*";
  77.   }
  78.   else{
  79.     switchPointLeft.src="images/zjm07-1.gif";
  80.     window.top.document.all.colsFrame.cols="20%,9,*";
  81.   }
  82. }
  83. function hidden_left(){
  84.   if (switchPointLeft.src.indexOf("images/zjm07-1.gif")>-1){
  85.     switchPointLeft.src="images/zjm07.gif";
  86.     window.top.document.all.colsFrame.cols="0,9,*";
  87.   }
  88.   else{
  89.     switchPointLeft.src="images/zjm07-1.gif";
  90.     window.top.document.all.colsFrame.cols="20%,9,*";
  91.   }
  92. }
  93. function AddAccessories(AccessoriesList)
  94. {
  95.     var FileSrc=window.showModalDialog("/AddAccessory.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
  96.     if(FileSrc!=null&&FileSrc!="")
  97.     {
  98.       if(FileSrc.indexOf(",")>0)
  99.       {
  100.         var Accessories = new Array();
  101.         Accessories = FileSrc.split(",");
  102.         var oOption = document.createElement("OPTION");
  103.         AccessoriesList.options.add(oOption);
  104.         oOption.innerText = Accessories[1];
  105.         oOption.value = Accessories[0];
  106.       }
  107.     }
  108.     return false;
  109. }
  110. function DelAccessories(AccessoriesList)
  111. {
  112.   for(var i=0;i<AccessoriesList.options.length;i++)
  113.   {
  114.     if(AccessoriesList.options[i].selected)
  115.     {
  116.       AccessoriesList.options.remove(i)
  117.     }
  118.   }
  119. }
  120. function EditTextCopy(contentobject,contentvalue)
  121.   {
  122.     contentobject.value = contentvalue;
  123.   }
  124. function GetUserIDAndNames(useridsobject,usernameobject)
  125. {
  126.   //showx = event.screenX - event.offsetX;    // + deltaX;
  127.   //showy = event.screenY - event.offsetY+18; // + deltaY;
  128.   showx = (screen.width-280)/2;
  129.   showy = (screen.height-408)/2;
  130.   var FileSrc=window.showModalDialog("/SelectUser2.jsp",","+useridsobject.value+",","dialogWidth:280px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  131.   if(FileSrc==null)
  132.   {
  133.   }
  134.   else if(FileSrc=="")
  135.   {
  136.     useridsobject.value="";
  137.     usernameobject.value="";
  138.   }
  139.   else
  140.   {
  141.     var UserIDAndNames = new Array();
  142.     UserIDAndNames = FileSrc.split("|!|");
  143.     useridsobject.value=UserIDAndNames[0];
  144.     usernameobject.value=UserIDAndNames[1];
  145.   }
  146. }
  147. function GetUserNames(usernameobject)
  148. {
  149.   //showx = event.screenX - event.offsetX;    // + deltaX;
  150.   //showy = event.screenY - event.offsetY+18; // + deltaY;
  151.   showx = (screen.width-280)/2;
  152.   showy = (screen.height-408)/2;
  153.   var FileSrc=window.showModalDialog("/SelectUser2.jsp","","dialogWidth:280px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  154.   if(FileSrc==null)
  155.   {
  156.   }
  157.   else if(FileSrc=="")
  158.   {
  159.     usernameobject.value="";
  160.   }
  161.   else
  162.   {
  163.     var UserIDAndNames = new Array();
  164.     UserIDAndNames = FileSrc.split("|!|");
  165.     usernameobject.value=UserIDAndNames[1];
  166.   }
  167. }
  168. function GetDepartIDAndNames(departidsobject, departnameobject)
  169. {
  170.   //showx = event.screenX - event.offsetX;    // + deltaX;
  171.   //showy = event.screenY - event.offsetY+18; // + deltaY;
  172.   showx = (screen.width-280)/2;
  173.   showy = (screen.height-408)/2;
  174.   var FileSrc=window.showModalDialog("/SelectDepartment1.jsp",","+departidsobject.value+",","dialogWidth:280px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  175.   if(FileSrc==null)
  176.   {
  177.   }
  178.   else if(FileSrc=="")
  179.   {
  180.     departidsobject.value="";
  181.     departnameobject.value="";
  182.   }
  183.   else
  184.   {
  185.     var DepartIDAndNames = new Array();
  186.     DepartIDAndNames = FileSrc.split("|!|");
  187.     departidsobject.value=DepartIDAndNames[0];
  188.     departnameobject.value=DepartIDAndNames[1];
  189.   }
  190. }
  191. function GetAreaIDAndNames(areaidsobject,areanameobject)
  192. {
  193.   showx = (screen.width-280)/2;
  194.   showy = (screen.height-408)/2;
  195.   var FileSrc=window.showModalDialog("/SelectAreaIDAndName.jsp",","+areaidsobject.value+",","dialogWidth:280px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  196.   if(FileSrc==null)
  197.   {
  198.   }
  199.   else if(FileSrc=="")
  200.   {
  201.     areaidsobject.value="";
  202.     areanameobject.value="";
  203.   }
  204.   else
  205.   {
  206.     var UserIDAndNames = new Array();
  207.     UserIDAndNames = FileSrc.split("|!|");
  208.     areaidsobject.value=UserIDAndNames[0];
  209.     areanameobject.value=UserIDAndNames[1];
  210.   }
  211. }
  212. function GetCityIDAndNames(cityidsobject,citynameobject)
  213. {
  214.   showx = (screen.width-280)/2;
  215.   showy = (screen.height-408)/2;
  216.   var FileSrc=window.showModalDialog("/SelectCityIDAndName.jsp",","+cityidsobject.value+",","dialogWidth:280px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  217.   if(FileSrc==null)
  218.   {
  219.   }
  220.   else if(FileSrc=="")
  221.   {
  222.     cityidsobject.value="";
  223.     citynameobject.value="";
  224.   }
  225.   else
  226.   {
  227.     var UserIDAndNames = new Array();
  228.     UserIDAndNames = FileSrc.split("|!|");
  229.     cityidsobject.value=UserIDAndNames[0];
  230.     citynameobject.value=UserIDAndNames[1];
  231.   }
  232. }
  233. function GetBusIDAndCodes(busidsobject,buscodeobject)
  234. {
  235.   showx = 20/2;
  236.   showy = 40/2;
  237.   var FileSrc=window.showModalDialog("/SelectBusIDAndCode.jsp",","+ busidsobject.value+",","dialogWidth:" + (screen.width-20) + "px; dialogHeight:" + (screen.height-40) + "px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  238.   if(FileSrc==null)
  239.   {
  240.   }
  241.   else if(FileSrc=="")
  242.   {
  243.     busidsobject.value="";
  244.     buscodeobject.value="";
  245.   }
  246.   else
  247.   {
  248.     var BusIDAndCodes = new Array();
  249.     BusIDAndCodes = FileSrc.split("|!|");
  250.     busidsobject.value=BusIDAndCodes[0];
  251.     buscodeobject.value=BusIDAndCodes[1];
  252.   }
  253. }
  254. function GetTGIDAndNames(TGidsobject,TGnameobject)
  255. {
  256.   showx = 20/2;
  257.   showy = 40/2;
  258.   var FileSrc=window.showModalDialog("/SelectTGIDAndName.jsp",","+ TGidsobject.value+",","dialogWidth:" + (screen.width-20) + "px; dialogHeight:" + (screen.height-40) + "px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  259.   if(FileSrc==null)
  260.   {
  261.   }
  262.   else if(FileSrc=="")
  263.   {
  264.     TGidsobject.value="";
  265.     TGnameobject.value="";
  266.   }
  267.   else
  268.   {
  269.     var TGIDAndNmaes = new Array();
  270.     TGIDAndNmaes = FileSrc.split("|!|");
  271.     TGidsobject.value=TGIDAndNmaes[0];
  272.     TGnameobject.value=TGIDAndNmaes[1];
  273.   }
  274. }
  275. function GetHotelIDAndNames(Hotelidsobject,Hotelnameobject)
  276. {
  277.   showx = 20/2;
  278.   showy = 20/2;
  279.   var FileSrc=window.showModalDialog("/SelectHotelIDAndName.jsp",","+ Hotelidsobject.value+",","dialogWidth:" + (screen.width-20) + "px; dialogHeight:" + (screen.height-40) + "px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  280.   if(FileSrc==null)
  281.   {
  282.   }
  283.   else if(FileSrc=="")
  284.   {
  285.     Hotelidsobject.value="";
  286.     Hotelnameobject.value="";
  287.   }
  288.   else
  289.   {
  290.     var HotelIDAndNmaes = new Array();
  291.     HotelIDAndNmaes = FileSrc.split("|!|");
  292.     Hotelidsobject.value=HotelIDAndNmaes[0];
  293.     Hotelnameobject.value=HotelIDAndNmaes[1];
  294.   }
  295. }
  296. function GetTHIDAndNames(THidobject,THnameobject)
  297. {
  298.   showx = (screen.width-380)/2;
  299.   showy = (screen.height-408)/2;
  300.   var FileSrc=window.showModalDialog("/SelectTHNameAndID.jsp",","+ THidobject.value+",","dialogWidth:380px; dialogHeight:408px; dialogLeft:"+showx+"px; dialogTop:"+showy+"px; help:no; status:no; directories:no;scrollbars:yes;Resizable=yes; ");
  301.   if(FileSrc==null)
  302.   {
  303.   }
  304.   else if(FileSrc=="")
  305.   {
  306.     THidobject.value="";
  307.     THnameobject.value="";
  308.   }
  309.   else
  310.   {
  311.     var HotelIDAndNmaes = new Array();
  312.     HotelIDAndNmaes = FileSrc.split("|!|");
  313.     THidobject.value=HotelIDAndNmaes[0];
  314.     THnameobject.value=HotelIDAndNmaes[1];
  315.   }
  316. }
  317. function GetSceneryNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
  318. {
  319.   var FileSrc=window.open("/Acount/EditVisitorManageFrame.jsp?FaxID=" + FaxID + "&GuideID=" + GuideID + "&UnsignObject=" + UnsignObject + "&SignObject=" + SignObject + "&UnsignPriceObject=" + UnsignPriceObject,"EditScenery","menubar=no,addressbar=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight + "");
  320. }
  321. function listFrameShow(ListFrame,ListFrameButton,hidden){
  322.   if(hidden=="hidden")
  323.   {
  324.     ListFrame.style.display="none";
  325.     ListFrameButton.value="显示查看列表";
  326.   }
  327.   else if(hidden=="show")
  328.   {
  329.     ListFrame.style.display="";
  330.     ListFrameButton.value="隐藏查看列表";
  331.   }
  332.   else if (ListFrame.style.display!="none"){
  333.     ListFrame.style.display="none";
  334.     ListFrameButton.value="显示查看列表";
  335.   }
  336.   else{
  337.     ListFrame.style.display="";
  338.     ListFrameButton.value="隐藏查看列表";
  339.   }
  340. }
  341. function editFrameShow(EditFrame,EditFrameButton,hidden){
  342.   if(hidden=="hidden")
  343.   {
  344.     EditFrame.style.display="none";
  345.     EditFrameButton.value="显示修改页面";
  346.   }
  347.   else if(hidden=="show")
  348.   {
  349.     EditFrame.style.display="";
  350.     EditFrameButton.value="隐藏修改页面";
  351.   }
  352.   else if (EditFrame.style.display!="none"){
  353.     EditFrame.style.display="none";
  354.     EditFrameButton.value="显示修改页面";
  355.   }
  356.   else{
  357.     EditFrame.style.display="";
  358.     EditFrameButton.value="隐藏修改页面";
  359.   }
  360. }
  361. function GetHotelNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
  362. {
  363.   var FileSrc=window.open("/Acount/EditInnManageFrame.jsp?FaxID=" + FaxID + "&UnsignObject=" + UnsignObject + "&SignObject=" + SignObject + "&UnsignPriceObject=" + UnsignPriceObject + "&GuideID=" + GuideID,"EditHotel","menubar=no,addressbar=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight + "");
  364. }
  365. function GetRestaurantNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
  366. {
  367.   var FileSrc=window.open("/Acount/EditDiningManageFrame.jsp?FaxID=" + FaxID + "&UnsignObject=" + UnsignObject + "&SignObject=" + SignObject + "&UnsignPriceObject=" + UnsignPriceObject + "&GuideID=" + GuideID,"EditRestaurant","menubar=no,addressbar=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight + "");
  368. }
  369. function GetBusNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
  370. {
  371.   var FileSrc=window.open("/Acount/EditBusUsingManageFrame.jsp?FaxID=" + FaxID + "&UnsignObject=" + UnsignObject + "&SignObject=" + SignObject + "&UnsignPriceObject=" + UnsignPriceObject + "&GuideID=" + GuideID,"EditBus","menubar=no,addressbar=no,resizable=yes,left=0,top=0,width=" + screen.availWidth + ",height=" + screen.availHeight + "");
  372. }
  373. function MM_swapImage() { //v3.0
  374.   var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
  375.    if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
  376. }
  377. function MM_swapImgRestore() { //v3.0
  378.   var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
  379. }
  380. function MM_findObj(n, d) { //v4.01
  381.   var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
  382.     d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  383.   if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  384.   for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  385.   if(!x && d.getElementById) x=d.getElementById(n); return x;
  386. }
  387. function checkInputingIsNumber(inputObject)
  388. {
  389.   if(inputObject.value.length>0)
  390.   {
  391.      var src = inputObject.value;
  392.      var re = /((d{1,9})+[.]{0,1}(d{0,9}))/i;
  393.      var arr;
  394.       arr = re.exec(src);
  395.      if(arr == null || RegExp.$1 != src)
  396.       {
  397.         alert("请输入数字!");
  398.         inputObject.focus();
  399.         return false;
  400.       }
  401.   }
  402.   return true;
  403. }