var IE = navigator.appName.indexOf("Microsoft") != -1;
var newwin = null;
var h_step = 1;
function openBrWindow(theURL, winname, winfeatures) {
  if (newwin) newwin.close();	
  winfeatures += ', resizable=yes';// + ', status=yes';
  newwin = window.open(theURL, winname, winfeatures);
  with (newwin.document) {
    writeln('<html><head><title>Aturen</title></head>');
    writeln('<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">');
//    writeln('<center>');
    writeln('<img src="' + theURL + '">');
//    writeln('</center>');
    writeln('</body></html>');
		close();
  }	
//  h_step = 2;
  newwin.focus();
}

function ZoomClick(obj, w, h) {
	var SlPos = obj.src.lastIndexOf('/', obj.src.length) + 1;
	var f_s = obj.src.slice(SlPos, obj.src.length);
	var f_t = f_s.replace('.jpg', '_g');
	if (eval(f_t)) {
		w = eval(f_t)[0];
		h = eval(f_t)[1];
	}
	f_t += '.jpg';
	openBrWindow('images/'+f_t,'_wnd','width='+w+',height='+h);
}

function MM_openBrWindow(theURL, winname, winfeatures) {
  openBrWindow(theURL, winname, winfeatures)  ;
}

function showmenu(menu) {
	var temp = document.getElementById('menumain'+menu).style.display;
	for (i=0; i<15; i++) {
		if (document.getElementById('menusub'+i)) {
 			document.getElementById('menusub'+i).style.display = 'none';			
			document.getElementById('menumain'+i).style.display = 'block';			
		}
		if(document.getElementById('menumainclass'+i)) {
			//document.getElementById('menumainclass'+i).className = '';
		}
	}
	if (temp == 'block') {
		document.getElementById('menumain'+menu).style.display = 'none';
		document.getElementById('menusub'+menu).style.display = 'block';
	} else {
		document.getElementById('menumain'+menu).style.display = 'block';	
		document.getElementById('menusub'+menu).style.display = 'none';
	}
}
