//*** browser detection

function get_browser()
{
// 1st detect Opera
  ua = navigator.userAgent.toLowerCase();
  if (ua.indexOf('opera') >= 0)
  {
    an = navigator.appName.toLowerCase();
    if (an.indexOf('explorer') >= 0)
      return 'OPERA_IE';
    else
      alert('Attention please!\nYour Opera-browser is not running in IE5.0-mode.\n\nIf you experience any problems browsing www.mkuehn-design.de,\nplease change Opera-mode and reload this page.\n');
  }

// 2nd detect IE
  if (document.all)   // the all-obj works on all IE since IE4, assuming IE3 is not in use any more
    return 'IE';

// 3rd detect NN 4.x
  if (navigator.appName.substring(0,8).toLowerCase() == 'netscape'
  &&  navigator.appVersion.indexOf('4.') == 0)
    return 'NN4';

// 4th detect all others which should be able to match WC3-requirements like NN6.x, newer mozillas, ...
  return 'WC3';
}

browser = get_browser();

//*** plattform detection

function get_plattform()
{
	if (navigator.appVersion.indexOf('Mac') != -1)
		plattform = 'MAC' ;
	else
		plattform = 'PC' ;

  return plattform;
}

plattform = get_plattform();

//*** open window with following parameters

function wopen(link,wname,xsize,ysize,xpos,ypos,sb)
{
	if (xsize==-1)
		xsize=screen.availWidth-10;
	if (ysize==-1)
		ysize=screen.availHeight-60;
	if (xpos==-1)
		xpos=(screen.availWidth-xsize)/2;
	if (ypos==-1)
		ypos=(screen.availHeight-ysize)/2;

 	features = 'width='+ xsize +',height='+ ysize +',status=no,scrollbars='+ sb +',noresizable,top='+ ypos +',left='+ xpos +',screenY='+ ypos +',screenX='+ xpos;

	nwindow  = open(link, wname, features);
	nwindow.focus();
}

//*** reload page request for netscape 4, called onResize event

function MM_reloadPage(init)
{
	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);

//*** page navigation tools

function PosTop()
{
	window.scrollTo(0,0)
}


//*** more to come ...