objWidth=991;
offsetLeft=20;
offsetTop=200;
outTime=10;

var offsetLeft=new Array(0,0,53,157,244,326,462,490);
var is_on=new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;

var outTime=new Array();
var noOff=0;

for(i=1;i<=7;i++){outTime[i]=0;}



function menuOn(n){
 th='menu'+n+'tab';
 obj='menu'+n;



 if(outTime[n]){clearTimeout(outTime[n]);outTime[n]=0;}
 is_on[n]=1;

 if(document.getElementById(obj).style){
  document.getElementById(obj).style.display = 'block'
 }
	if (n != 11 && n != 12) {
    document.getElementById(th).style.background='url(pics/sipka.gif) no-repeat 50% top';

	 	for(i=1;i<=8;i++){if(i!=n&&is_on[i]){menuOff(i);}}
	}
}

function menuOff(n){
	th='menu'+n+'tab';
 	obj='menu'+n;

	//alert(th +' ' +obj);

	if (!(n == 5 && (is_on[11] == 1 || is_on[12] == 1))) {
 		is_on[n]=0;

	if 	(n == 5) {
		is_on[11]=0;
		is_on[12]=0;
	}

	 if(document.getElementById(obj).style){
	  document.getElementById(obj).style.display='none';
	 }
	 if (n != 11 && n != 12 && document.getElementById(th))
	 	document.getElementById(th).style.background='none';
	}

	if ((n == 11 || n == 12) && (noOff != 5)) menuOff(5);
}


function lightOn(n) {
    var lightImg = document.getElementById('light'+n);
    if (lightImg)
        lightImg.style.display = 'block';
}

function lightOff(n) {
    var lightImg = document.getElementById('light'+n);
    if (lightImg)
        lightImg.style.display = 'none';
}


function openSetCard(id){
 foc=window.open('/setk.php?id='+id,'','scrollbars=no, status=no, width=700, height=400, resizable=no');
 foc.focus();
}

function openGallery(id){
 foc=window.open('/gallery.php?id='+id,'','scrollbars=no, width=765, height=420, resizable=no');
 foc.focus();
}


