changestyle.js
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:14k
源码类别:
OA系统
开发平台:
Java
- function mouseon(rowid,imagesid)
- {
- rowid.className = "DataRowMouseOn";
- eval("document.all." + imagesid + ".style.display=''");
- }
- function mouseout(rowid,imagesid,stylename)
- {
- rowid.className = stylename;
- eval("document.all." + imagesid + ".style.display='none'");
- }
- function mouseontd(rowid)
- {
- rowid.className = "DataColsMouseOn";
- }
- function mouseouttd(rowid,stylename)
- {
- rowid.className = stylename;
- }
- function uploadimage(ImageBox,ImagePic)
- {
- var ImageSrc=window.showModalDialog("/UploadImg.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
- if(ImageSrc!=null&&ImageSrc!="")
- {
- ImageBox.value=ImageSrc;
- ImagePic.src=ImageSrc;
- }
- return false;
- }
- function uploadacc(FileBox)
- {
- var FileSrc=window.showModalDialog("/UploadFile.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
- if(FileSrc!=null&&FileSrc!="")
- {
- FileBox.value=FileSrc;
- }
- return false;
- }
- function selectDefaultValue(selectName,defaultValue)
- {
- for(var i=0;i<selectName.length;i++)
- {
- if(selectName.options[i].value==defaultValue)
- {
- selectName.selectedIndex=i;
- }
- }
- }
- function openeditwindow(EditURL)
- {
- window.showModalDialog(EditURL,"","status:yes; resizable: yes; help:no; dialogWidth:696px; dialogHeight:350px");
- return false;
- }
- function hidden_top(hidden){
- if (hidden){
- switchPointTop.src="images/zjm03.gif";
- window.top.document.all.rowsFrame.rows="0,0,9,*";
- }
- else{
- switchPointTop.src="images/zjm03-1.gif";
- window.top.document.all.rowsFrame.rows="0,73,9,*";
- }
- }
- function hidden_top(){
- if (switchPointTop.src.indexOf("images/zjm03-1.gif")>-1){
- switchPointTop.src="images/zjm03.gif";
- window.top.document.all.rowsFrame.rows="0,0,9,*";
- }
- else{
- switchPointTop.src="images/zjm03-1.gif";
- window.top.document.all.rowsFrame.rows="0,73,9,*";
- }
- }
- function hidden_left(hidden){
- if (hidden){
- switchPointLeft.src="images/zjm07.gif";
- window.top.document.all.colsFrame.cols="0,9,*";
- }
- else{
- switchPointLeft.src="images/zjm07-1.gif";
- window.top.document.all.colsFrame.cols="20%,9,*";
- }
- }
- function hidden_left(){
- if (switchPointLeft.src.indexOf("images/zjm07-1.gif")>-1){
- switchPointLeft.src="images/zjm07.gif";
- window.top.document.all.colsFrame.cols="0,9,*";
- }
- else{
- switchPointLeft.src="images/zjm07-1.gif";
- window.top.document.all.colsFrame.cols="20%,9,*";
- }
- }
- function AddAccessories(AccessoriesList)
- {
- var FileSrc=window.showModalDialog("/AddAccessory.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
- if(FileSrc!=null&&FileSrc!="")
- {
- if(FileSrc.indexOf(",")>0)
- {
- var Accessories = new Array();
- Accessories = FileSrc.split(",");
- var oOption = document.createElement("OPTION");
- AccessoriesList.options.add(oOption);
- oOption.innerText = Accessories[1];
- oOption.value = Accessories[0];
- }
- }
- return false;
- }
- function DelAccessories(AccessoriesList)
- {
- for(var i=0;i<AccessoriesList.options.length;i++)
- {
- if(AccessoriesList.options[i].selected)
- {
- AccessoriesList.options.remove(i)
- }
- }
- }
- function EditTextCopy(contentobject,contentvalue)
- {
- contentobject.value = contentvalue;
- }
- function GetUserIDAndNames(useridsobject,usernameobject)
- {
- //showx = event.screenX - event.offsetX; // + deltaX;
- //showy = event.screenY - event.offsetY+18; // + deltaY;
- showx = (screen.width-280)/2;
- showy = (screen.height-408)/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- useridsobject.value="";
- usernameobject.value="";
- }
- else
- {
- var UserIDAndNames = new Array();
- UserIDAndNames = FileSrc.split("|!|");
- useridsobject.value=UserIDAndNames[0];
- usernameobject.value=UserIDAndNames[1];
- }
- }
- function GetUserNames(usernameobject)
- {
- //showx = event.screenX - event.offsetX; // + deltaX;
- //showy = event.screenY - event.offsetY+18; // + deltaY;
- showx = (screen.width-280)/2;
- showy = (screen.height-408)/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- usernameobject.value="";
- }
- else
- {
- var UserIDAndNames = new Array();
- UserIDAndNames = FileSrc.split("|!|");
- usernameobject.value=UserIDAndNames[1];
- }
- }
- function GetDepartIDAndNames(departidsobject, departnameobject)
- {
- //showx = event.screenX - event.offsetX; // + deltaX;
- //showy = event.screenY - event.offsetY+18; // + deltaY;
- showx = (screen.width-280)/2;
- showy = (screen.height-408)/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- departidsobject.value="";
- departnameobject.value="";
- }
- else
- {
- var DepartIDAndNames = new Array();
- DepartIDAndNames = FileSrc.split("|!|");
- departidsobject.value=DepartIDAndNames[0];
- departnameobject.value=DepartIDAndNames[1];
- }
- }
- function GetAreaIDAndNames(areaidsobject,areanameobject)
- {
- showx = (screen.width-280)/2;
- showy = (screen.height-408)/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- areaidsobject.value="";
- areanameobject.value="";
- }
- else
- {
- var UserIDAndNames = new Array();
- UserIDAndNames = FileSrc.split("|!|");
- areaidsobject.value=UserIDAndNames[0];
- areanameobject.value=UserIDAndNames[1];
- }
- }
- function GetCityIDAndNames(cityidsobject,citynameobject)
- {
- showx = (screen.width-280)/2;
- showy = (screen.height-408)/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- cityidsobject.value="";
- citynameobject.value="";
- }
- else
- {
- var UserIDAndNames = new Array();
- UserIDAndNames = FileSrc.split("|!|");
- cityidsobject.value=UserIDAndNames[0];
- citynameobject.value=UserIDAndNames[1];
- }
- }
- function GetBusIDAndCodes(busidsobject,buscodeobject)
- {
- showx = 20/2;
- showy = 40/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- busidsobject.value="";
- buscodeobject.value="";
- }
- else
- {
- var BusIDAndCodes = new Array();
- BusIDAndCodes = FileSrc.split("|!|");
- busidsobject.value=BusIDAndCodes[0];
- buscodeobject.value=BusIDAndCodes[1];
- }
- }
- function GetTGIDAndNames(TGidsobject,TGnameobject)
- {
- showx = 20/2;
- showy = 40/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- TGidsobject.value="";
- TGnameobject.value="";
- }
- else
- {
- var TGIDAndNmaes = new Array();
- TGIDAndNmaes = FileSrc.split("|!|");
- TGidsobject.value=TGIDAndNmaes[0];
- TGnameobject.value=TGIDAndNmaes[1];
- }
- }
- function GetHotelIDAndNames(Hotelidsobject,Hotelnameobject)
- {
- showx = 20/2;
- showy = 20/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- Hotelidsobject.value="";
- Hotelnameobject.value="";
- }
- else
- {
- var HotelIDAndNmaes = new Array();
- HotelIDAndNmaes = FileSrc.split("|!|");
- Hotelidsobject.value=HotelIDAndNmaes[0];
- Hotelnameobject.value=HotelIDAndNmaes[1];
- }
- }
- function GetTHIDAndNames(THidobject,THnameobject)
- {
- showx = (screen.width-380)/2;
- showy = (screen.height-408)/2;
- 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; ");
- if(FileSrc==null)
- {
- }
- else if(FileSrc=="")
- {
- THidobject.value="";
- THnameobject.value="";
- }
- else
- {
- var HotelIDAndNmaes = new Array();
- HotelIDAndNmaes = FileSrc.split("|!|");
- THidobject.value=HotelIDAndNmaes[0];
- THnameobject.value=HotelIDAndNmaes[1];
- }
- }
- function GetSceneryNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
- {
- 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 + "");
- }
- function listFrameShow(ListFrame,ListFrameButton,hidden){
- if(hidden=="hidden")
- {
- ListFrame.style.display="none";
- ListFrameButton.value="显示查看列表";
- }
- else if(hidden=="show")
- {
- ListFrame.style.display="";
- ListFrameButton.value="隐藏查看列表";
- }
- else if (ListFrame.style.display!="none"){
- ListFrame.style.display="none";
- ListFrameButton.value="显示查看列表";
- }
- else{
- ListFrame.style.display="";
- ListFrameButton.value="隐藏查看列表";
- }
- }
- function editFrameShow(EditFrame,EditFrameButton,hidden){
- if(hidden=="hidden")
- {
- EditFrame.style.display="none";
- EditFrameButton.value="显示修改页面";
- }
- else if(hidden=="show")
- {
- EditFrame.style.display="";
- EditFrameButton.value="隐藏修改页面";
- }
- else if (EditFrame.style.display!="none"){
- EditFrame.style.display="none";
- EditFrameButton.value="显示修改页面";
- }
- else{
- EditFrame.style.display="";
- EditFrameButton.value="隐藏修改页面";
- }
- }
- function GetHotelNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
- {
- 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 + "");
- }
- function GetRestaurantNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
- {
- 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 + "");
- }
- function GetBusNameAndPrice(UnsignObject,SignObject,UnsignPriceObject,FaxID,GuideID)
- {
- 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 + "");
- }
- function MM_swapImage() { //v3.0
- var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
- if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
- }
- function MM_swapImgRestore() { //v3.0
- var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
- }
- function MM_findObj(n, d) { //v4.01
- var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
- d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
- if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
- for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
- if(!x && d.getElementById) x=d.getElementById(n); return x;
- }
- function checkInputingIsNumber(inputObject)
- {
- if(inputObject.value.length>0)
- {
- var src = inputObject.value;
- var re = /((d{1,9})+[.]{0,1}(d{0,9}))/i;
- var arr;
- arr = re.exec(src);
- if(arr == null || RegExp.$1 != src)
- {
- alert("请输入数字!");
- inputObject.focus();
- return false;
- }
- }
- return true;
- }