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) { //v3.0
  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); 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];}
}

function MenuLink(x)
  {
   if(x == "nothing")
   {
     document.forms[0].reset();
     document.forms[0].elements[0].blur();
     return;
   }
   else if(x == "end") top.location.href = parent.frames[1].location;
   else
   {
     top.location.href = x;
     document.forms[0].reset();
     document.forms[0].elements[0].blur();
   }
  }

function ZweiFrames(URL1,F1,URL2,F2)
  {
   parent.frames[F1].location.href=URL1;
   parent.frames[F2].location.href=URL2;
  }
function DreiFrames(URL1,F1,URL2,F2,URL3,F3)
  {
   parent.frames[F1].location.href=URL1;
   parent.frames[F2].location.href=URL2;
   parent.frames[F3].location.href=URL3;
  }

function ImageChange(imgDocID,imgObjName)
  {
   document.images[imgDocID].src = eval(imgObjName + ".src");
  }

function SprachWechselLocal(DestLang)
  {
   var alt = top.location.href;
   var datei = alt.substring(40,alt.length);
   var altFrame = parent.frames[2].location.href;
   var neu = "file:///E|/Daten/Sven/Homepage HTML/SOS/"
   var dateiFrame = altFrame.substring(40,altFrame.length);

   alert("alt: " + altFrame + "; neu: " + neu + " Datei: " + dateiFrame);

   if(DestLang == "deutsch")
    {
      datei = alt.substring(48,alt.length);
      top.location.href = neu + datei;
    }
   else if(DestLang == "englisch")
    {
      top.location.href = neu + "english/" + datei;
    }
  }

function SprachWechsel(DestLang)
  {
   var alt = top.location.href;
   var altFrame = parent.frames[2].location.href;
   var datei = alt.substring(27,alt.length);
   var dateiFrame = altFrame.substring(27,alt.length);
   var neu = "http://www.sunofsadness.de/";

   if(DestLang == "deutsch")
    {
      datei = alt.substring(35,alt.length);
      top.location.href = neu + datei;
    }
   else if(DestLang == "englisch")
    {
      top.location.href = neu + "english/" + datei;
    }
  }

function updateFrame(FrameURL)
  {
   if(FrameURL.length>0)
    {
     var url2=FrameURL;
     var x=FrameURL.indexOf("?");
     if(x>=0) {url2 = url2.substring(0,x);}
     if(top.name!=url2)
      {
       top.frames[2].location.href=FrameURL;
       top.name=url2;
      }
    }
  }

function Kommentar(text)
  {
    self.status = text;
  }

function InFrame(Datei)
  {
    opener.parent.Hauptframe.location.href = Datei;
  }

function changeOpener(Datei1,Datei2)
  {
    opener.parent.Verweise.location.href = Datei1;
    opener.parent.Hauptframe.location.href = Datei2;
  }

function NewsWindow(doc)
  {
    Neues = window.open(doc,'NewsFenster','width=400,height=500,left=100,top=50,scrollbars=yes');
    Neues.focus();
  }

function SendMail(Login, Server)
{
window.navigate("mailto:" + Login + "&#064" + Server);
}

function popUp(doc)
  {
    Neues = window.open(doc,'Hinweise','width=545,height=500,left=100,top=50,scrollbars=yes');
    Neues.focus();
  }
