nWin=null;function OpenWindow(link,w,h){if(nWin&&!nWin.closed)nWin.close();var url=link;if(self.screen){width=screen.width
height=screen.height}else if(self.java){var jkit=java.awt.Toolkit.getDefaultToolkit();var scrsize=jkit.getScreenSize();width=scrsize.width;height=scrsize.height;}
var top=(height-h)/2;var left=(width-w)/2;nWin=window.open(url,"OpenWindow","width="+w+", height="+h+", location=no,status=no,resizable=no,toolbar=no,scrollbars=yes,menubar=no,top="+top+",left="+left+"");nWin.focus();}
pWin=null;function PrintWindow(link,w,h){if(pWin&&!pWin.closed)pWin.close();var url=link;if(self.screen){width=screen.width
height=screen.height}else if(self.java){var jkit=java.awt.Toolkit.getDefaultToolkit();var scrsize=jkit.getScreenSize();width=scrsize.width;height=scrsize.height;}
var top=(height-h)/2;var left=(width-w)/2;pWin=window.open(url,"PrintWindow","width="+w+", height="+h+", location=no,status=no,resizable=yes,toolbar=yes,scrollbars=yes,menubar=yes,top="+top+",left="+left+"");pWin.focus();}
oWin=null;function open_image(pic,w,h){if((w=='')||(h=="")){w=300;h=150;}
if(pic=="")pic="<b>Нет картинки</b>";else pic='<img src="'+path+pic+'" onclick="self.close();" title="close">';oWin=window.open("","PictureWindow","width="+w+",height="+h+",resizable=no,status=no,toolbar=no,menubar=no");with(oWin.document){open();write('<html><body style="margin:0px;padding:0px">');write(pic+'</body></html>');close();}
oWin.focus();}
function loadHTML(sURL){var request=null;if(!request)try{request=new ActiveXObject('Msxml2.XMLHTTP');}catch(e){}
if(!request)try{request=new ActiveXObject('Microsoft.XMLHTTP');}catch(e){}
if(!request)try{request=new XMLHttpRequest();}catch(e){}
if(!request)return"";request.open('GET',sURL,false);request.send(null);return request.responseText;}
function testNumbers(e){var key=(typeof e.charCode=='undefined'?e.keyCode:e.charCode);if(e.ctrlKey||e.altKey||key<32)
return true;key=String.fromCharCode(key);return/[\d]/.test(key);}
