function PrintPage() { re=/\?/g; var s=location.search; var p=location.pathname; if (p=='' || p=='/') { p='/index.html'; } s=s.replace(re, "&"); /* if (p.indexOf("/_t_/")!=-1) { var t=p.split("/_t_/"); var uri='/print/_t_/'+t[1]+'?uri='+t[0]+s; } else { var uri='/print/_t_/?uri='+p+s; } */ var t=p.split("/"); var uri; if (t.length < 7 && p.indexOf("news")!=-1) { uri='/print/_t_/id='+t[5]+'?uri='+ '/' +t[1] + '/view' +s; } else if (t.length < 7 && p.indexOf("digest")!=-1 ) { uri='/print/_t_/id='+t[4]+'?uri='+ '/' +t[1] + '/digest/view' +s; } else { /* uri='/print?uri='+ '/' +t[2] + '/view' +s;*/ uri='/print/_t_/?uri='+p+s; } window.open(uri, '', 'width=600, height=500, status=yes, resizable=yes, toolbar=yes, menubar=yes, scrollbars=yes'); return false; } function SearchPage() { var o=document.getElementById('search'); o.value=o.value.replace(/&|and|\+/g,''); o.value=o.value.replace(/^\s+|\s+$/g,''); o.value=o.value.replace(/\s+/g,' & '); location.href='/search/?search='+encodeURIComponent(o.value); } function SearchPageD() { var o=document.getElementById('search'); o.value=o.value.replace(/&|and|\+/g,''); o.value=o.value.replace(/^\s+|\s+$/g,''); o.value=o.value.replace(/\s+/g,' & '); location.href='/searchd/?search='+encodeURIComponentpe(o.value); } function GetImage(image){ CGForm.chosenPhotoIMG.src = image; } function GetImageEx(image){ window.open(image,'Увеличенная фотография','height=450,width=600'); } function ProcessSearchEnterDirect(e, controlId, parentId) { try { var ctl = FindControl(controlId, parentId); var key = navigator.appName == 'Netscape' ? e.which : e.keyCode; if (key == 13){ SearchPage(); return false; } } catch (ex) { alert('Ошибка ProcessSearchEnter: ' + ex.message); } }