
function doframe(URL) {
   top.body.location=URL;
   }

function ZweiFrames(URL1,F1,URL2,F2)
  {top.frames[F1].location.href=URL1; top.frames[F2].location.href=URL2;}
  
function Vor() { parent.history.forward(); }
function Rueck() { parent.history.back(); }

function home(){
  if (top.frames.length < 1) { top.location.href = "../index.htm";}
}

function doframes(URL) {
   var test = top.header.document.out.seite.value;
   if (test == "") { 
   top.header.document.out.seite.value=URL;
   top.body.location='body1.htm';
   } else {
   top.body.out.location=URL;
   } }
   
function OrgFrames(URL1,URL2)
  {top.header.location=URL1;   top.body.location=URL2;
  top.header.document.out.seite.value="";}
  
function dress()
  {neu = window.open("http://www.dressline.de", "", "scrollbars=yes,width=600,height=400,screenX=150,screenY=150");
   }

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1) endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg) return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
  }
  return null;
}

function SetCookie (name, value) {
  var argv = SetCookie.arguments;
  var argc = SetCookie.arguments.length;
  var expires = (argc > 2) ? argv[2] : null;
  var path = (argc > 3) ? argv[3] : null;
  var domain = (argc > 4) ? argv[4] : null;
  var secure = (argc > 5) ? argv[5] : false;
  document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
}

function DeleteCookie (name) {
  var exp = new Date();
  exp.setTime (exp.getTime() - 1); 
  var cval = GetCookie (name);
  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}

  function GetInfo(N) {           
       var cwert = GetCookie('Geschenk'); 
       if (cwert != null) { 
         var elem = new Array(9);       
         elem = cwert.split("#");     
         for (var k = elem.length; k < 9; k++) { elem[k]=""; }              
         if (N == 0) { top.body.document.email.firma.value = elem[N]; }  
         if (N == 1) { top.body.document.email.vorn.value = elem[N]; }     
         if (N == 2) { top.body.document.email.name.value = elem[N]; }     
         if (N == 3) { top.body.document.email.email.value = elem[N]; }   
         if (N == 4) { top.body.document.email.tel.value = elem[N]; }     
         if (N == 5) { top.body.document.email.fax.value = elem[N]; }    
         if (N == 6) { top.body.document.email.strasse.value = elem[N]; }   
         if (N == 7) { top.body.document.email.plz.value = elem[N]; }     
         if (N == 8) { top.body.document.email.ort.value = elem[N]; }                                                              
       }  
     }

     function SetInf(N,wert) {        
       var cwert = GetCookie('Geschenk');
       var elem = new Array(9);
       for (var k = 0; k < 9; k++) { elem[k] = ""; }
       if (cwert != null) { elem = cwert.split("#") };  
       var expdate = new Date (); 
       expdate.setTime(expdate.getTime() + (8760 * 60 * 60 * 1000)); 
       var nwert = "";
       for (k = 0; k < N; k++) { nwert = nwert + elem[k] + "#"; }
       nwert = nwert + wert + "#";
       for (k = N+1; k < 9; k++) { nwert = nwert + elem[k] + "#"; }       
       SetCookie('Geschenk', nwert, expdate); 
      } 

function newwin(N) { 
       var el = new Array(10);   
       el[0] = top.body.document.email.firma.value; 
       el[1] = top.body.document.email.vorn.value;       
       el[2] = top.body.document.email.name.value;               
       el[3] = top.body.document.email.email.value; 
       el[4] = top.body.document.email.tel.value;  
       el[5] = top.body.document.email.fax.value;         
       el[6] = top.body.document.email.strasse.value; 
       el[7] = top.body.document.email.plz.value; 
       el[8] = top.body.document.email.ort.value;                    
       if(el[0]=="" || el[1]=="" || el[2]=="" || el[3]=="" || el[3].indexOf('@')==-1 || el[4]=="" || el[5]=="" || el[6]=="" || el[7]=="" || el[8]=="") 
         { alert("Bitte tragen Sie alle Angaben in das Formular ein!"); return false; } 
        else {
         neu = open("", "anzeige", "height=200,width=300");    
         ndoc = neu.document;    
         ndoc.open();
         ndoc.write("<html><head><title>Bestätigung");
         ndoc.write("</title></head><body>Sehr geehrte(r) " + el[1] + " " + el[2] + ", <br>");
         if (N==1) {ndoc.write("vielen Dank fuer Ihre E-Mail.Wir setzen uns schnellstens mit Ihnen in Verbindung.");}                      
         ndoc.write("<br></body></html>");
         ndoc.close(); 
         return true; }
     }


