function toggleLayer(whichLayer){
  if (document.getElementById){
    // this is the way the standards work
    var style2 = document.getElementById(whichLayer).style;
    style2.display = style2.display? "":"block";
    }
  else if (document.all){
    // this is the way old msie versions work
    var style2 = document.all[whichLayer].style;
    style2.display = style2.display? "":"block";
    }
  else if (document.layers){
    // this is the way nn4 works
    var style2 = document.layers[whichLayer].style;
    style2.display = style2.display? "":"block";
    }
}

function popup( adr, w, h ) {
    var dlg = window.open( adr, "send_mail",
                  "toolbar=no,menubar=no,personalbar=no,width="+w+",height="+h+",left=40,top=120" +
                  "scrollbars=no,resizable=no");
}
function addToFavorite(favTitle){
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4)) {
    window.external.AddFavorite(location.href, unescape(favTitle));
    }
  else window.alert('This function is supported only by IE 4.x browsers.\n If you are using a different browser,\n please press Ctrl+D (Netscape) or add this bookmark manually.');
    }

function newImage(arg) {
	if (document.images) {rslt = new Image();rslt.src = arg;return rslt;}
	}


function changeImage(ID, newImage){
document.getElementById(ID).src=newImage
}


function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
			}
		}
	}

var preloadFlag = false;

function preloadImages() {
	if (document.images) {
		image_1 = newImage("_images/arrow.gif");
		image_2 = newImage("_images/spacer.gif");
		preloadFlag = true;
		}
	}
ro = "ro";
en = "en"; 
de = "de"; 

categorie = "";
lang = "";
project = ""; 
key_pic = "";

popupWins = new Array();

function windowOpener(categ, lang, project, key_pic) {
  /******************************* 
  the popupWins array stores an object reference for
  each separate window that is called, based upon
  the name attribute that is supplied as an argument
  *******************************/
  if ( typeof( popupWins[name] ) != "object" ){
    width_popup = 600;
    height_popup = 600;
    if (key_pic > 99){
      width_popup = 600;
      height_popup = 600;
      }
    popupWins[name] = window.open('zoom.php?categ='+categ+'&lang='+lang+'&project='+project+'&key_pic='+key_pic,categ,'WIDTH='+width_popup+',HEIGHT='+height_popup);
    }
  else {
    if (!popupWins[name].closed){
      popupWins[name].location.href = 'zoom.php?categ='+categ+'&lang='+lang+'&project='+project+'&key_pic='+key_pic;
      } 
    else {
      popupWins[name] = window.open('zoom.php?categ='+categ+'&lang='+lang+'&project='+project+'&key_pic='+key_pic,categ,'WIDTH='+width_popup+',HEIGHT='+height_popup);
      }
    }
  popupWins[name].focus();
  }
function changeOver(obj,color)
  {
  obj.style.borderColor=color;
  }
function popup( adr, w, h ) {
    var dlg = window.open( adr, "send_mail",
                  "toolbar=no,menubar=no,personalbar=no,width="+w+",height="+h+",left=40,top=120" +
                  "scrollbars=no,resizable=no");
}

