//Variables

function show(layer){
 if (document.layers) {
  document.layers[layer].visibility = "show";
 }
 if (document.all) {
  document.all[layer].style.visibility = "visible";
 }
 if (document.getElementById) {
  document.getElementById(layer).style.visibility = "visible";
 }
} 

function hide(layer){
 if (document.layers) {
    document.layers[layer].visibility = "hide";
 }
 if (document.all) {
    document.all[layer].style.visibility = "hidden";
 }
 if (document.getElementById) {
    document.getElementById(layer).style.visibility = "hidden";
 }
}

function poppup(theurl,x,y,w,h, bars, name){
  // set the width and height
  var the_width=w;
  var the_height=h;
  // set window position
  var from_top=y;
  var from_left=x;
  // set other attributes
  var has_toolbar='no';
  var has_location='no';
  var has_directories='no';
  var has_status='yes';
  var has_menubar='no';
  var has_scrollbars=bars;
  var is_resizable='yes';
  // attributes put together
  var the_atts='width='+the_width+',height='+the_height+',top='+from_top+',screenY='+from_top+',left='+from_left+',screenX='+from_left;
  the_atts+=',toolbar='+has_toolbar+',location='+has_location+',directories='+has_directories+',status='+has_status;
  the_atts+=',menubar='+has_menubar+',scrollbars='+has_scrollbars+',resizable='+is_resizable;
  // open window
  window.open(theurl,name,the_atts);
}

function popupsz(theurl,x,y,w,h){
	poppup(theurl,x,y,w,h,'auto');
}
function popup(theurl){
	popupsz(theurl,50,30,600,400);
}

function changeLang(lang) {
	top.menu.location.href = 'menu.pl?Index=1&Lang=' + lang;
	top.navbar.location.href = 'navigator.pl?Index=1&Lang=' + lang;
	top.main.location.href = 'page.pl?Index=1&Lang=' + lang;
}

function switchTo(number, lang) {
	top.menu.location.href = 'menu.pl?Index=' + number+ '&Lang=' + lang;
	top.navbar.location.href = 'navigator.pl?Index=' + number+ '&Lang=' + lang;
	top.main.location.href = 'page.pl?Index=' + number+ '&Lang=' + lang;
}

function scrollTo(tag) {
	top.main.location.href = '#' + tag;
}

function linkTo(number, tag, lang) {
	top.menu.location.href = 'menu.pl?Index=' + number;
	top.navbar.location.href = 'navigator.pl?Index=' + number;
	top.main.location.href = 'page.pl?Index='+ number + '&Lang=' + lang +'#' + tag;
}

function fixUglyIE() {
	for (a in document.links) 
		document.links[a].onfocus = document.links[a].blur;
}

if (document.all) {
	document.onmousedown = fixUglyIE;
}

