// workaround for the infamous Netscape CSS- and Layer-bug:
// reloads the window on resize
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);

// ----------------------------------------------------------------------------------------
// Rollover-Effekt der Hauptthemen
// ----------------------------------------------------------------------------------------
var selectedtopic = 0;
var ptitle = "";
function checkTopic(pTopic,image,ptitle) {
 if (document.images) {          
  selectedtopic = pTopic; 
  title = ptitle;      
  if (selectedtopic != 0) {
    eval("document.topic" + selectedtopic + ".src = image");
    if (ptitle) eval("document.topictitle.src = ptitle");
    }
  }  
}
function changeImage(row,s,image,ptitle) { 
 if (!document.images)
   return ;
   if (s==1)
   {
        eval("document.topic" + row + ".src = image");
        if (ptitle) eval("document.topictitle.src = ptitle");
   } else {
        if (selectedtopic != row) {
            eval("document.topic" + row + ".src = image");
            if (ptitle) eval("document.topictitle.src = ptitle");
        }
   }
}
// ----------------------------------------------------------------------------------------
// Verhindert, dass man mit der Enter-Taste das Formular versehentlich triggert
// ----------------------------------------------------------------------------------------

function noenter() {
  return !(window.event && window.event.keyCode == 13); 
}

// ----------------------------------------------------------------------------------------
// Rollover-Effekt in der Brillenkollektion
// ----------------------------------------------------------------------------------------

function changeGlasses(img) {
	document.brille_gross.src = "/images/eyedentity_gross/" + pathname + "/" +img;
}

function changeGlassesBack() {
	//document.brille_gross.src = "/images/site-images/brillenkollektionstext.gif"
}