function openEditWindow(a,b,c){$pos=(window.opera)?", left=100, top=100":"";nw=window.open(a,prName+"_"+b+c,"status=no, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, width=800, height=600"+$pos);nw.focus();return false;}function showImage(a,b,c){href=prefix+"show/?url="+a;b+=20;c+=10;sh=screen.height-80;if(document.all)sh-=40;sw=screen.width;if(c>sh)c=sh;if(b>sw)b=sw;posX=sw/2-b/2;posY=sh/2-c/2;if(posY<0)posY=0;if(posX<0)posX=0;posCode=(document.all)?",left="+posX+",top="+posY:",screenX="+posX+",screenY="+posY;moreWin=window.open(href,"","status=no, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, width="+b+", height="+c+posCode);moreWin.focus();}function popupWindow(a,b,c){href=a;sh=screen.height-80;if(document.all)sh-=40;sw=screen.width;if(c>sh)c=sh;if(b>sw)b=sw;posX=sw/2-b/2;posY=sh/2-c/2;if(posY<0)posY=0;if(posX<0)posX=0;posCode=(document.all)?",left="+posX+",top="+posY:",screenX="+posX+",screenY="+posY;moreWin=window.open(href,"idm_popup","status=no, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, width="+b+", height="+c+posCode);moreWin.focus();}if(refEdit){var elements=[];function changeElement(a){if(a.checked==true){addElement(a.name);}else{deleteElement(a.name);}}function addElement(a){elements[elements.length]=a;}function deleteElement(a){var b=false;var c=elements.length;for(i=0;i<c;i++){if(elements[i]==a){b=true;}if(b&(i<(c-1))){elements[i]=elements[i+1];}}elements.length=c-1;}function moveElements(a,b){var c=document.getElementById('moveDocForm'+b);var d=new RegExp('el_ref_([0-9]+)_([0-9]+)');var e=[];var f,i,j=0;for(i=0;i<elements.length;i++){f=d.exec(elements[i]);if(f[1]==b){e[j]=f[2];j++;}}if(elements.length!=0&a.value!='no'){c.elements.elemToMove.value=e;c.submit();}else{alert('Вы не выбрали ни одного документа для переноса. Проставьте галочки напротив тех документов, которые хотите перенести');c.elements.newRef.selectedIndex=0;}}}function BI(id) {return document.getElementById(id);}function switchVisible(id,alink,showText,hideText) {var block = BI(id); if(alink !=null){if(showText==null){show='Показать';}else{show=showText;} if(hideText==null){hide='Скрыть';}else{hide=hideText;}} if(block.style.display == 'none'){block.style.display='block';if(alink !=null){alink.innerHTML=hide;}}else{block.style.display='none';if(alink !=null){alink.innerHTML=show;}}}
