/* 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 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';
//   obj.title = whl;
}

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="http://www.bluepage-cms.com"
      var bookmarktitle="BLUEPAGE-CMS "
      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 nav_hover(theRow,theClass,txt) {
   window.status = txt;

   if (typeof(document.getElementsByTagName) != 'undefined') {
      var theCells = theRow.getElementsByTagName('td');
      var theLinks = theRow.getElementsByTagName('a');
   } else if (typeof(theRow.cells) != 'undefined') {
      var theCells = theRow.cells;
      var theLinks = theRow.theLinks;
   } else {
      return false;
   }
   var rowCellsCnt  = theCells.length;

   for (var c = 0; c < rowCellsCnt; c++) {
      theCells[c].className = theClass;
      theLinks[c].className = theClass;
   }
   return true;
}



var obj_src,link_class;

function nav_change(obj_id,zst){
   if(document.getElementById || document.all) {
      if(document.all) {
         obj = document.all("nb_"+obj_id);
         link = document.all("nl_"+obj_id);
      } else if(document.getElementById) {
         obj = document.getElementById("nb_"+obj_id);
         link = document.getElementById("nl_"+obj_id);
      }
      if (zst == 1 || zst == 2) {
         obj_src = obj.src;
         link_class = link.className;
         if (zst == 1) {
            obj.src = "images/index/t_over.gif";
            link.className = "tnav_over";
         } else {
            link.className = "tnav_over";
         }
      } else {
         obj.src = obj_src;
         link.className = link_class;
      }
   }
}