// e-dvertising - Hinterdorfer & Edlinger OEG, http://e-dvertising.at/
// browserabfrage ... (support && credits: w.reinisch, http://reinisch.at)

// Default browsercheck, added to all scripts! ... (support && credits: Thomas Brattli, http://www.bratta.com)
function checkBrowser(){
	this.ver=navigator.appVersion
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
	return this
}
var bw=new checkBrowser()

//
var browserVersion=0;

if (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion)  >= 3 )) ||
    ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))
        browserVersion = 3;

if (browserVersion==3) {
		selfname="";
        fensterlcheck=false;

        einsopen=new Function("fensterl= window.open('news_zipfer.html','zoom','toolbar=yes,menubar=no,pageYOffset=10,pageXOffset=310,resizable=yes,scrollbars=no,width=500,height=396');fensterlcheck=true;");
		
function popopen(picname,dir,titel,width,height)
	    { 
		window.open('/popup.php?pic_name=' + picname +'&dir=' + dir +'&titel=' + titel +'','zoom','toolbar=no,menubar=no,pageYOffset=10,pageXOffset=10,resizable=no,scrollbars=no,width=' + width + ',height=' + height + '');
		}

function popopenprint(picname,dir,titel,width,height)
	    { 
		window.open('/popup.php?pic_name=' + picname +'&dir=' + dir +'&titel=' + titel +'','zoom','toolbar=yes,menubar=no,pageYOffset=10,pageXOffset=10,resizable=no,scrollbars=no,width=' + width + ',height=' + height + '');
		}
}


//


// the netscape bugfix "resize'it" ...
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);




/**
 * Sets/unsets the pointer in browse mode
 *
 * @param   object   the table row
 * @param   object   the color to use for this row
 * @param   object   the background color
 *
 * @return  boolean  whether pointer is set or not
 */
function setPointer(theRow, thePointerColor, theNormalBgColor)
{
    var theCells = null;

    if (thePointerColor == '' || typeof(theRow.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    }
    else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    }
    else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var currentColor = null;
    var newColor     = null;
    // Opera does not return valid values with "getAttribute"
    if (typeof(window.opera) == 'undefined'
        && typeof(theCells[0].getAttribute) != 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].setAttribute('bgcolor', newColor, 0);
        } // end for
    }
    else {
        currentColor = theCells[0].style.backgroundColor;
        newColor     = (currentColor.toLowerCase() == thePointerColor.toLowerCase())
                     ? theNormalBgColor
                     : thePointerColor;
        for (var c = 0; c < rowCellsCnt; c++) {
            theCells[c].style.backgroundColor = newColor;
        }
    }

    return true;
} // end of the 'setPointer()' function
