var tmout, last_on="inet2";
function make_on(some) {
    document.getElementById(some).style.background='no-repeat 6px 5px url(res/on_fone.jpg)';
    document.getElementById("c_pic").src='res/'+some+'.png';
    clearTimeout(tmout);
    if(last_on!=some && document.getElementById(some)) document.getElementById(some).style.background='none';
    last_on=some;
}
function make_off(some) {
    tmout = setTimeout("timer_off('"+some+"')",2000);
}
function timer_off(some) {
    if(document.getElementById(some)) document.getElementById(some).style.background='none';
    document.getElementById("c_pic").src='res/inet2.png';
}

subHover = function() {
var subEls = document.getElementById('nav').getElementsByTagName('li');
	for (var i=0; i<subEls.length; i++) {
		subEls[i].onmouseover=function() { this.className+=' sfhover'; }
		subEls[i].onmouseout=function() { this.className=this.className.replace(new RegExp(' sfhover\\b'),''); }
	}
}
if (window.attachEvent) window.attachEvent('onload',subHover);


function swich_h(h_pic) {
    var pn = h_pic.substr(1,1);
    if(pn<1||pn>6) pn=0;
    document.getElementById("on_hand").src="/res/h0"+pn+".gif";
}

