  // Abfrage auf CSS
if(document.ids)x='nc4';
else if( document.all && !document.getElementById )x='ie4';
else if( window.opera && !document.createElement )x='op5';
else if( window.opera && window.getComputedStyle )  {
          if(document.createRange)x='op8';
            else if(window.navigate)x='op7.5';
                             else x='op7.2';                   }
else if( window.opera && document.compatMode )x='op7';
else if( window.opera && document.releaseEvents )x='op6';
else if( document.contains && !window.opera )x='kq3';
else if(window.pkcs11&&window.XML)x='f15';
else if( window.getSelection && window.atob )x='nn7';
else if( window.getSelection && !document.compatMode )x='nn6';
else if( window.clipboardData && document.compatMode )
  x=window.XMLHttpRequest? 'IE7' : 'IE6';
else if( window.clipboardData ){x='ie5';
     if( !document.createDocumentFragment ) x+='.5'; 
     if( document.doctype && !window.print ) x+='m';}
else if( document.getElementById && !document.all ) x='op4';
else if( document.images && !document.all ) x='nn3';
else if(document.clientWidth&&!window.RegExp)x='kq2';
else x='???';


if(x == 'IE7')
{
document.write('<link href="css/mm-webcam_IE7.css" rel="stylesheet" type="text/css">');
}
else if(navigator.appName == 'Microsoft Internet Explorer')
{
document.write('<link href="css/mm-webcam_IE.css" rel="stylesheet" type="text/css">');
}
else
{
document.write('<link href="css/mm-webcam_FF.css" rel="stylesheet" type="text/css">');
}

var cancelImage=false;
function overlibImage(caption,imagePath)
{
  bgImage=new Image();
  bgImage.src=imagePath;
  if(!bgImage.complete)
  {
    overlib("Bild wird geladen...",FGCOLOR,'#FFFFFF',WIDTH,120);
    cancelImage=false;
    bgImage.onload=function()
    {   
      if(!cancelImage)
      {
        var substringpos=bgImage.src.length-imagePath.length;
        if(bgImage.src.substring(substringpos)==imagePath)
        {
          overlib(caption,TEXTCOLOR,'#FFFFFF',BACKGROUND,imagePath,FGCOLOR,'',WIDTH,bgImage.width,HEIGHT,bgImage.height);
        }
      }
    }
  }
  else
  {
    overlib(caption,TEXTCOLOR,'#FFFFFF',BACKGROUND,imagePath,FGCOLOR,'',WIDTH,bgImage.width,HEIGHT,bgImage.height);
  }
}

function overlibMouseout()
{
  cancelImage=true;
  return nd();
}

function newwin(wname)
{
	newwindow = window.open(wname,
	"camSeite",
	"status=no,"+
	"toolbar=no,"+
	"resizable=no,"+
	"scrollbars=no,"+
	"locationbar=no,"+
	"menubar=no,"+
	"width=1024,"+
	"height=758");
	newwindow.focus();	
}

function openPortal()
{
	newwindow = window.open('http://www.mm-webcam.de/index.htm','Portal');
	newwindow.focus();
}

function openOrt(ortname)
{
	if (ortname=='Zell')
		newort = window.open('http://www.zellmosel.de','Ort');
	else if (ortname=='Wolf')
		newort = window.open('http://www.traben-trarbach-wolf.de','Ort'); 
	else if (ortname=='Prinzenkopf')
		newort = window.open('http://www.mm-webcam.de/Prinzenkopf','Ort'); 
	else
		newort = window.open('http://www.'+ortname+'.de','Ort');
	newort.focus();
}

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);

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}