winprops = 'toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no,';
 
function win_autologon(url){
  win = window.open(url, 'color', winprops + 'scrollbars=yes,top=150,left=180,width=240,height=390') 
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function session_win(url) {
  win = window.open(url,"info_shopping_cart","height=460,width=430,toolbar=no,statusbar=no,scrollbars=yes")
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function popupWindow(url) {
  win = window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function searchWindow(url) {
  win = window.open(url,'searchWindow',winprops + 'scrollbars=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150')
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function helpWindow(url) {
  win = window.open(url,'helpWindow',winprops + 'scrollbars=no,width=450,height=150,screenX=150,screenY=150,top=150,left=150')
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function popupImageWindow(url) {
  win = window.open(url,'popupImageWindow',winprops + 'scrollbars=no,resizable=yes,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
  if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}



/* PLATO */
var c_el = new Array();
function change(id)
{
  c_el[id] = getE(id);
  if (c_el[id] != null && c_el[id] != '')
  {
    if(c_el[id].style.display == "none" || c_el[id].style.display == "") //|| c_el[id].style.display == ""
      c_el[id].style.display = "block"; //block nicht, damit es in tabellen geht!
    else
      c_el[id].style.display = "none";
  }
}

function show(id)
{
  c_el[id] = getE(id);
  if (c_el[id] != null && c_el[id] != '')
    c_el[id].style.display = "block"; //block nicht, damit es in tabellen geht!
}
function hide(id)
{
  c_el[id] = getE(id);
  if (c_el[id] != null && c_el[id] != '')
    c_el[id].style.display = "none";
}

function toggler(showid, elementstr)
{
  for (i = 0; i < 200; i++)
  { 
    if(getE(elementstr+i))
    {
      if(elementstr+i == elementstr+showid)
      { 
        if(getE(elementstr+i).style.display == "block")
          getE(elementstr+i).style.display = "none";
        else
          getE(elementstr+i).style.display = "block";
      } 
      else
        getE(elementstr+i).style.display = "none";
    }
  }
}

function boldize(obj)
{
	if(obj.style.fontWeight == '' || obj.style.fontWeight == 'normal' )
	  obj.style.fontWeight = "bold";
  else
	  obj.style.fontWeight = "normal";
}

//TOOL: leading zeros
function LZ(x) {return(x<0||x>9?"":"0")+x} 

//TOOL: getElementById
function getE(myel_id){if(document.getElementById(myel_id) != null && document.getElementById(myel_id) != '' && document.getElementById(myel_id) != 'undefined') return document.getElementById(myel_id);}

