var tabs = new Array('menu_1', 'menu_2', 'menu_3');
 
function change_class(tab)
{
   for (i = 0; i < tabs.length; i++)
   {
       if (document.getElementById(tabs[i]))
       {
           document.getElementById(tabs[i]).style.display = 'none';
           document.getElementById('link_' + tabs[i]).className = 'linki';
         
       }    
   }
   document.getElementById(tab).style.display = 'block';
   document.getElementById('link_' + tab).className = 'linki_aktywne';
   
}


function pop(file, width, height, scroll, unblock, wname) {
	var sc = 'no';
	if(scroll) sc = 'yes';

	if(!wname) var wn = 'win';
	else wn = wname;

	if(unblock && !wname) {
		var rnd = Math.random();
		rnd = rnd.toString();
		rnd = rnd.substring(2,rnd.length);
		wn += rnd;
	}

	var xp = (screen.width - parseInt(width))/2;
	var yp = (screen.height - parseInt(height))/2;

	var opts = '';
	opts += 'width=' + width;
	opts += ',height=' + height;
	opts += ',left=' + xp;
	opts += ',top=' + yp;
	opts += ',screenX=' + xp;
	opts += ',screenY=' + yp;
	opts += ',toolbar=no';
	opts += ',location=no';
	opts += ',directories=no';
	opts += ',status=no';
	opts += ',menubar=no';
	opts += ',scrollbars=' + sc;
	opts += ',resizable=yes';

	var nw = window.open(file, wn, opts);
	nw.focus();
}