// Java Script Funktionen Archiv (c) 2000-2003 Stephan Sigloch @ NETFORMIC

// Java Script Fehler automatisch abfangen
onerror = keinfehler;
function keinfehler()
{return true;}


// Auto-Abfrage ob im Frameset geladen
//if (top.frames.length > 1) { top.location.href="http://www.abi-island.de"; }


// onMouseOver Bilder
function getAppVersion() {
 appname= navigator.appName;
 appversion = navigator.appVersion;
 majorver = appversion.substring(0, 1);
 if ( (appname == "Netscape") && ( majorver >= 3 ) ) return 1;
 if ( (appname == "Microsoft Internet Explorer") && (majorver >= 4) ) return 1;
  return 0;
}

function swtch(num, imgname) {
  if (getAppVersion()) {
 	document[imgname].src = img[num].src;
  	}
}
imgsrc = new Array();
imgsrc[0] = "graphics/g0.gif";
imgsrc[1] = "graphics/arrow-red.gif";

if (getAppVersion()) {
  img = new Array();
  for (i = 0; i < imgsrc.length; i++) {
 img[i] = new Image();
 img[i].src = imgsrc[i];
  }
}


//new window
var newwin;
function popup(url,name,eigenschaften)
{
newwin = window.open(url,name,eigenschaften);
setTimeout('newwin.focus();',200);
}


// Statustext der Seite --->
window.defaultStatus='Forturex GmbH - The Expert Network for Microelectronics';
function stext(text) { window.status=text; }


// onResize Reload
function Fensterweite()
{
	if (window.innerWidth) return window.innerWidth;
	else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
	else return 0;
}

function Fensterhoehe()
{
	if (window.innerHeight) return window.innerHeight;
	else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
	else return 0;
}


function neuAufbau()
{
	if (Weite != Fensterweite() || Hoehe != Fensterhoehe())
	window.history.go(0);
}

function onResizeReload()
{
	/*Überwachung von Netscape initialisieren*/
	if(!window.Weite && window.innerWidth)
	{
		window.onresize = neuAufbau;
		Weite = Fensterweite();
		Hoehe = Fensterhoehe();
	}

	/*Überwachung von MS Internet Explorer initialisieren*/
	if(!window.Weite && document.body && document.body.offsetWidth)
	{
		window.onresize = neuAufbau;
		Weite = Fensterweite();
		Hoehe = Fensterhoehe();
	}
}


//reloads the window if Nav4 resized
function reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.pgW=innerWidth; document.pgH=innerHeight; onresize=reloadPage; }}
  else if (innerWidth!=document.pgW || innerHeight!=document.pgH) location.reload();
}
reloadPage(true);


//TR Highlghter
function setPointer(theRow, thePointerColor) {   
	if (typeof(theRow.style) == 'undefined' || typeof(theRow.cells) == 'undefined') {
		return false;
	}
	var row_cells_cnt = theRow.cells.length;
	for (var c = 0; c < row_cells_cnt; c++) {
		theRow.cells[c].bgColor = thePointerColor;
	}
	return true;
}

