/*
datei: js.js
author: Piero Chiussi
created: 09.08.2006
modified: 04.09.2006 -> Piero Chiussi
*/
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

/*
image array for main menu
*/

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
  return this;
}

function Open(url,name,w,h,string){
  
  var str = "height=" + h + ",innerHeight=" + h;
  str += ",width=" + w + ",innerWidth=" + w;
  
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - w) / 2;
    var yc = (ah - h) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
	str += ","+string+"";
  }
  window.open(url, name, str);
}

function openART(id)
{
	Open("fx/showart.php?id="+id,"press",500,500,"scrollbars=yes");
}

function openGALL()
{
	Open("fx/gallery.php","gallery",900,600);
}
