/* DATEI: *.js */


/* Javascript Datei BLUEPAGE CMS 07 -2004 */
/* Copyright by ISS-Oberlausitz */
/* Author: T.Hojenski */

function img_view(ds,lg,pf,inhId) {
   url = pf + './img_view.php?ds=' + ds + '&lg=' + lg + '&inhId=' + inhId;
   opt = 'location=no,scrollbars=auto,toolbar=no,resizable=yes,left=' + ((screen.availWidth-720)/2) + ',top=' + (((screen.availHeight-650)/2)-20) + ',width=665,height=650';
   galwindow = window.open(url,'_blank',opt);
   galwindow.moveTo(((screen.availWidth-720)/2),((screen.availHeight-650)/2)-20)
}

function NavViewOn(tdf,lg,obj,awhl,txt) {
   if (!tdf.src) {
      if(document.all) tdf = document.all(tdf);
      else if(document.getElementById) tdf = document.getElementById(tdf);
   }
   tdf.src = lg + '/menu/' + awhl + obj;
   window.status = txt;
   setTimeout("window.status=''",25000);
}

function Navchange(nimg,view){
   if (view == 'visible') {
      document.images['p'+nimg].src = document.images['p'+nimg].src.replace(/\/a\./,"\/b.");
   } else {
      document.images['p'+nimg].src = document.images['p'+nimg].src.replace(/\/b\./,"\/a.");
   }
}

function btnchange(obj,whl,zst){
   if(!obj.src) {
      if(document.all) obj = document.all(obj);
      else if(document.getElementById) obj = document.getElementById(obj);
   }
   if(zst == true)  obj.src = 'images/sys/' + whl + '2.gif';
   if(zst == false) obj.src = 'images/sys/' + whl + '.gif';
}

function setline(theRow,linecolor) {
   if (linecolor == '' || typeof(theRow.style) == 'undefined') {
      return false;
   }
   if (typeof(document.getElementsByTagName) != 'undefined') {
      var theCells = theRow.getElementsByTagName('td');
   } else if (typeof(theRow.cells) != 'undefined') {
      var theCells = theRow.cells;
   } else {
      return false;
   }
   var rowCellsCnt  = theCells.length;
//      theCells[0].style.backgroundColor = stopcolor;
   for (var c = 0; c < rowCellsCnt; c++) {
      theCells[c].style.backgroundColor = linecolor;
   }
   return true;
}

function addbookmark() {   // IE
   if (document.all && navigator.userAgent.indexOf('Opera') <= -1) {
      var bookmarkurl   = document.URL
      var bookmarktitle = document.title;
      window.external.AddFavorite(bookmarkurl,bookmarktitle)
   } else {
      alert("Dieser Link funktioniert nur bei Benutzern des Internet-Explorers.\n\nBenutzen Sie bitte die Tastenkombination für\nNetscape/Mozilla:\t\tSTRG+D,\nOpera:\t\t\tSTRG+T.")
   }
}

function open_extern(url,att,w,h) {
   posh = parseFloat(((screen.availHeight-h)/2)-20);
   posw = parseFloat((screen.availWidth-w)/2);
   opt = att + ',left=' + posw + ',top=' + posh + ',width='+w+',height='+h;
   extWindow = window.open(url,'_blank',opt);
   extWindow.focus();
}
function view_rpic(tid,zst) {
   if (zst == true) zst = 'visible';
   else             zst = 'hidden';
   
   if (document.all) {
      document.all('rpic2_'+tid).style.visibility =zst;
      document.all('rtxt_box_'+tid).style.visibility =zst;
   } else if (document.getElementById) {
      document.getElementById('rpic2_'+tid).style.visibility =zst;
      document.getElementById('rtxt_box_'+tid).style.visibility =zst;
   }
   zst = '';
}