// Java-script rutine-fil

var name, width, height, settings;


// Åbner et vindue p� den p�g�ldende side og inds�tter fil.


function vindue(width,height,name,s)
{
  settings=
  "toolbar=no,location=no,directories=no,"+
  "status=no,menubar=no,scrollbars=yes,"+
  "resizable=no,width="+width+",height="+height+",left="+1+",top="+1;
  
  switch(name)
  {
    case "admin":
    admin_vindue=window.open("admin.php",name,settings); break;
    case "redigering":
    redigering_vindue=window.open("../siteredigering/website_redigering.php?s="+s+"",name,settings); break;
    case "webshop":
    webshop_vindue=window.open("webshop/webshopvindue.php?s="+s+"",name,settings); break;
    case "webshopadmin":
    webshopadmin_vindue=window.open("../webshopadministration/webshopadmin.php?fane="+s+"",name,settings); break;
    case "bogfoerte":
    bogfoert_vindue=window.open("../webshopadministration/bogfoerte.php",name,settings); break;
    case "udskriv_ordre":
    udskriv_ordre_vindue=window.open("../webshopadministration/ordre_udskriv.php",name,settings); break;
    case "timeout":
    timeout_vindue=window.open("../webshopadministration/timeouttider.php",name,settings); break;
    case "mailingliste":
    mailingliste_vindue=window.open("../mailingliste/mailingliste.php",name,settings); break;
  }
}

function siteedit(width,height,name,id,sprog)
{
  settings=
  "toolbar=no,location=no,directories=no,"+
  "status=no,menubar=no,scrollbars=yes,"+
  "resizable=no,width="+width+",height="+height+",left="+1+",top="+1;
  
  switch(name)
  {
    case "redigerform":
    siteedit_vindue=window.open("login/siteredigering/siteedit.php?id="+id+"&sprog="+sprog,name,settings); break;
  }
}

function visfoto(width,height,name,foto,s)
{
  settings=
  "toolbar=no,location=no,directories=no,"+
  "status=no,menubar=no,scrollbars=no,"+
  "resizable=no,width="+width+",height="+height+",left="+0+",top="+0;
  
  switch(name)
  {
    case "foto1":
    fotovindue=window.open("galleri/restauranten.php?foto="+foto+"&s="+s+"",name,settings); break;
    case "foto2":
    fotovindue=window.open("galleri/kokkenet.php?foto="+foto+"&s="+s+"",name,settings); break;
    case "foto3":
    fotovindue=window.open("galleri/omgivelser.php?foto="+foto+"&s="+s+"",name,settings); break;
    case "infofoto":
    fotovindue=window.open("information/info-foto.php?foto="+foto+"&s="+s+"",name,settings); break;
  }
}

function udskriv(width,height,side,name,sprog)
{
  settings=
  "toolbar=no,location=no,directories=no,"+
  "status=no,menubar=no,scrollbars=yes,"+
  "resizable=no,width="+width+",height="+height+",left="+1+",top="+1;
  
  menuvindue=window.open("menukort/menu-udskriv.php?side="+side+"&menu="+name+"&s="+sprog+"",name,settings);
  
}



// Lukker aktuelt vindue og opdatere forige vindue
function luk_login()
{
  self.close()
 
  // window.open('../index.php','_blank','','true')
  window.onunload = function(){
  opener.location.reload(true);
}

}

// Lukker aktuelt vindue 
function luk_vindue()
{
  self.close()
}

