function urlencode(str) {str = (str+'').toString();return encodeURIComponent(str).replace(/!/g, '%21').replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29').replace(/\*/g, '%2A').replace(/%20/g, '+');} var keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "=";function encode64(input) {var output = ""; var chr1, chr2, chr3 = ""; var enc1, enc2, enc3, enc4 = ""; var i = 0; do {chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) { enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;} output = output + keyStr.charAt(enc1) + keyStr.charAt(enc2) + keyStr.charAt(enc3) + keyStr.charAt(enc4); chr1 = chr2 = chr3 = ""; enc1 = enc2 = enc3 = enc4 = ""; } while (i < input.length); return output;} var dolohr= encode64(urlencode(document.location.href));  var online = "<a href='javascript:void(0);' rel='external' onClick=\"popupWin = window.open('http://www.spexe.com/for/ru/scient/"+dolohr+"', '&#1050;&#1086;&#1085;&#1089;&#1091;&#1083;&#1100;&#1090;&#1072;&#1085;&#1090;', 'directories=0,toolbar=0,status=0,scrollbars=0,menubar=0,statusbar=0,location=0,resizable=1,width=430,height=530,top=100,left=300'); popupWin.focus(); return false;\" title='&#1050;&#1083;&#1080;&#1082;&#1085;&#1080;&#1090;&#1077; &#1076;&#1083;&#1103; &#1086;&#1073;&#1097;&#1077;&#1085;&#1080;&#1103; &#1089; &#1082;&#1086;&#1085;&#1089;&#1091;&#1083;&#1100;&#1090;&#1072;&#1085;&#1090;&#1086;&#1084;'><img src='http://www.spexe.com/client/bdg/online_ru_v4.gif' border='0' alt='&#1050;&#1086;&#1085;&#1089;&#1091;&#1083;&#1100;&#1090;&#1072;&#1085;&#1090; &#1085;&#1072; &#1089;&#1072;&#1081;&#1090;&#1077;'></a>";  var offline = "<a href='javascript:void(0);' rel='external' onClick=\"popupWin = window.open('http://www.spexe.com/for/ru/scient/"+dolohr+"', '&#1050;&#1086;&#1085;&#1089;&#1091;&#1083;&#1100;&#1090;&#1072;&#1085;&#1090;', 'directories=0,toolbar=0,status=0,scrollbars=0,menubar=0,statusbar=0,location=0,resizable=1,width=430,height=530,top=100,left=300'); popupWin.focus(); return false;\" title='&#1050;&#1083;&#1080;&#1082;&#1085;&#1080;&#1090;&#1077;, &#1095;&#1090;&#1086;&#1073;&#1099; &#1086;&#1089;&#1090;&#1072;&#1074;&#1080;&#1090;&#1100; &#1042;&#1072;&#1096;&#1077; &#1089;&#1086;&#1086;&#1073;&#1097;&#1077;&#1085;&#1080;&#1077;'><img src='http://www.spexe.com/client/bdg/offline_ru_v4.gif' border='0' alt='&#1054;&#1089;&#1090;&#1072;&#1074;&#1080;&#1090;&#1100; &#1089;&#1086;&#1086;&#1073;&#1097;&#1077;&#1085;&#1080;&#1077;'></a>";  window.nquery = true;  var callbacks=new Object(); function GetStatus(url,cb) { var cb = onSuccess; var url = "http://www.spexe.com/st/scient"; var i; do i='c'+Math.floor(Math.random() * 30); while(callbacks[i]); callbacks[i] = function(obj) {cb(obj); delete callbacks[i]; }; var script=document.createElement('script'); script.src=url+(url.indexOf('?')>=0?'&':'?')+'callback=callbacks.'+i; script.type='text/javascript'; document.body.appendChild(script);} function onSuccess(response) { var on_url = document.getElementById('online_url'); var off_url = document.getElementById('offline_url'); var spexe_id = document.getElementById('spexe'); if(response.result.indexOf("online")==0){ if(spexe_id){spexe_id.innerHTML = online;} if(document.getElementById('telnum')){ document.getElementById('telnum').style.display='';} if(on_url){on_url.style.display=''; if(off_url){off_url.style.display='none';} on_url.rel='external'; on_url.href='javascript:void(0);'; on_url.onclick = function() { popupWin = window.open('http://www.spexe.com/for/ru/scient/'+dolohr+'', '','directories=0,toolbar=0,status=0,scrollbars=0,menubar=0,statusbar=0,location=0,resizable=1,width=430,height=530,top=100,left=300'); popupWin.focus(); return false; }}} else { if(spexe_id){spexe_id.innerHTML = offline;} if(document.getElementById('telnum')){ document.getElementById('telnum').style.display='none';} if(on_url){ on_url.style.display='none'; if(off_url){off_url.style.display=''; off_url.rel='external'; off_url.href='javascript:void(0);'; off_url.onclick = function() { popupWin = window.open('http://www.spexe.com/for/ru/scient/'+dolohr+'', '','directories=0,toolbar=0,status=0,scrollbars=0,menubar=0,statusbar=0,location=0,resizable=1,width=430,height=530,top=100,left=300'); popupWin.focus(); return false;}}}}} function init() { if (arguments.callee.done) return; arguments.callee.done = true; GetStatus(); window.nquery = false;}; if (document.addEventListener) { document.addEventListener("DOMContentLoaded", init, false);} /*@cc_on @*/ /*@if (@_win32) document.write("<script type=\"text/javascript\"  id=\"__ie_onload\" defer=\"defer\" src=\"javascript:void(0)\"><\/script>"); var script = document.getElementById("__ie_onload"); script.onreadystatechange = function() { if (this.readyState == "complete") { init();}};/*@end @*/ if (/WebKit/i.test(navigator.userAgent)) { var _timer = setInterval(function() { if (/loaded|complete/.test(document.readyState)){clearInterval(_timer); init();}}, 10);} window.onload = init;    var intervalID = setInterval(GetStatus, 30000); setTimeout(function(){ clearInterval(intervalID); intervalID = setInterval(GetStatus, 150000);},300000); 
