function NewOnlineelectric2() {
this.domain=location.href+'/';
this.domain=this.domain.substr(this.domain.indexOf('://')+3);
this.domain=this.domain.substr(0,this.domain.indexOf('/'));
this.location=false;
this.selection=function() {
var sel;
if (window.getSelection) sel=window.getSelection();
else if (document.selection) sel=document.selection.createRange();
else sel='';
if (sel.text) sel=sel.text;
return encodeURIComponent(sel);
}
this.redirect=function() {
if (this.location) location.href=this.location;
this.location=false;
}
this.go=function(i) {
this.location=this.url(i);
setTimeout('onlineelectric2.redirect()',2000);
var scr=document.createElement('script'); 
scr.type='text/javascript'; 
scr.src='http://www.online-electric.ru/pics/?domain='+this.domain+'&system='+i; 
document.body.appendChild(scr);
return false;
}
this.url=function(system) {
var title=encodeURIComponent(document.title);
var url=encodeURIComponent(location.href);
switch (system) {
case 1: return 'http://www.online-electric.ru/zaz/zaz.php';
case 2: return 'http://www.online-electric.ru/light/light.php';
case 3: return 'http://www.online-electric.ru/cen/cen.php';
case 4: return 'http://www.online-electric.ru/econom/econom.php';
case 5: return 'http://www.online-electric.ru/tp/tp.php';
case 6: return 'http://www.online-electric.ru/ktp/ktp.php';
case 7: return 'http://www.online-electric.ru/power/power.php';
case 8: return 'http://www.online-electric.ru/cb/cb.php';
case 9: return 'http://www.online-electric.ru/line/line.php';
case 10: return 'http://www.online-electric.ru/svet/svet.php';
case 11: return 'http://www.online-electric.ru/tkz/tkz.php';
case 12: return 'http://www.online-electric.ru/graph/graph.php';
case 13: return 'http://www.online-electric.ru/dgr/dgr.php';
case 14: return 'http://www.online-electric.ru/app/tt10.php';
case 15: return 'http://www.online-electric.ru/app/tv10.php';
case 16: return 'http://www.online-electric.ru/';
}
}
this.hide=function() {
if (this.timeout) clearTimeout(this.timeout);
document.getElementById('onlineelectric').style.visibility='hidden';
}
this.show=function(element) {
if (this.timeout) clearTimeout(this.timeout);
var left=0,top=0;
var style=document.getElementById('onlineelectric').style;
while (element) {
left+=element.offsetLeft;
top+=element.offsetTop;
element=element.offsetParent;
}
style.left=left+'px';
style.top=top+'px';
style.visibility='visible';
}
this.init=function() {
var titles=new Array('&#1047;&#1072;&#1079;&#1077;&#1084;&#1083;&#1077;&#1085;&#1080;&#1077;','&#1052;&#1086;&#1083;&#1085;&#1080;&#1077;&#1079;&#1072;&#1097;&#1080;&#1090;&#1072;', '&#1062;&#1077;&#1085;&#1090;&#1088; &#1085;&#1072;&#1075;&#1088;&#1091;&#1079;&#1086;&#1082;',
'&#1057;&#1084;&#1077;&#1090;&#1072;',
'&#1042;&#1099;&#1073;&#1086;&#1088; &#1058;&#1055;',
'&#1058;&#1069;&#1054; &#1058;&#1055;',
'&#1056;&#1072;&#1089;&#1095;&#1077;&#1090; &#1085;&#1072;&#1075;&#1088;&#1091;&#1079;&#1086;&#1082;',
'&#1042;&#1099;&#1073;&#1086;&#1088; &#1050;&#1059;',
'&#1042;&#1099;&#1073;&#1086;&#1088; &#1082;&#1072;&#1073;&#1077;&#1083;&#1103;',
'&#1054;&#1089;&#1074;&#1077;&#1097;&#1077;&#1085;&#1080;&#1077;',
'&#1056;&#1072;&#1089;&#1095;&#1077;&#1090; &#1050;&#1047;',
'&#1043;&#1088;&#1072;&#1092;&#1080;&#1082;&#1080;',
'&#1042;&#1099;&#1073;&#1086;&#1088; &#1044;&#1043;&#1056;',
'&#1042;&#1099;&#1073;&#1086;&#1088; &#1058;&#1058;',
'&#1042;&#1099;&#1073;&#1086;&#1088; &#1058;&#1053;', '&#1042;&#1089;&#1077; &#1089;&#1077;&#1088;&#1074;&#1080;&#1089;&#1099;');
if (!document.getElementById('onlineelectric')) {
var div=document.createElement('div');
div.id='onlineelectric';
div.style.position='absolute';
div.style.visibility='hidden';
div.style.width='264px';
div.style.height='182px';
div.style.backgroundColor='transparent';
div.style.backgroundImage='url(http://www.online-electric.ru/pics/panel.png)';
div.style.border='0';
div.style.margin='0';
div.style.padding='0 1px 4px 1px';
div.style.overflow='hidden';
div.style.zIndex='1000';
div.style.font='normal 12px arial';
div.style.lineHeight='20px';
div.style.color='#666';
html='<a href="http://www.online-electric.ru" style="display:block;float:left;width:258px;height:20px;overflow:hidden;margin:1px 0;padding:0;background-color:transparent;font:bold 11px arial;color:#666;text-decoration:none"></a>';
for (var i=0;i<16;i++) {
html+='<a href="'+this.url(i+1)+'" style="display:block;float:left;width:108px;height:16px;overflow:hidden;margin:1px 0;padding:0 0 0 24px;background-color:transparent;background:url(http://www.online-electric.ru/pics/panel.png) no-repeat -266px '+(-i*16)+'px;font:normal 12px arial;color:#666;text-decoration:none;text-align:left" onmouseover="this.style.textDecoration=\'underline\'" onmouseout="this.style.textDecoration=\'none\'" onclick="return onlineelectric2.go('+(i+1)+');">'+titles[i]+'</a>';
}
html+='<a href="http://www.online-electric.ru" style="display:block;float:left;width:258px;height:16px;overflow:hidden;margin:1px 0;padding:0;background-color:transparent;font:bold 11px arial;color:#666;text-decoration:none;text-align:right">&copy; ONLINE-ELECTRIC.RU</a>';
div.innerHTML=html;
div.onmouseover=function() {if (onlineelectric2.timeout) clearTimeout(onlineelectric2.timeout)}
div.onmouseout=function() {onlineelectric2.timeout=setTimeout('onlineelectric2.hide()',500)};
document.body.insertBefore(div,document.body.firstChild);
}
document.write('<a href="http://www.online-electric.ru/"><img src="http://www.online-electric.ru/pics/button2.jpg" alt="&#1054;&#1085;&#1083;&#1072;&#1081;&#1085; &#1069;&#1083;&#1077;&#1082;&#1090;&#1088;&#1080;&#1082;" title="&#1054;&#1085;&#1083;&#1072;&#1081;&#1085; &#1069;&#1083;&#1077;&#1082;&#1090;&#1088;&#1080;&#1082;" width=88 height=31 style="border:0;margin:0;padding:0" onmouseover="onlineelectric2.show(this);" onmouseout="onlineelectric2.timeout=setTimeout(\'onlineelectric2.hide()\',500);"></a>');
}
}
onlineelectric2=new NewOnlineelectric2();
onlineelectric2.init();