function show_bill(bid, print){
   add ="";
   if(print==1){
     add = "action=print&";
   }
   window.open("show_bill.php?"+add+"bid=" + bid, "bill_"+bid, 'width=450,height=340,location=no,toolbar=no,scrollbars=no');
}


function displayhtml600x600(filename)
{
   window.open(filename, '', 'width=600,height=600,location=no,toolbar=no,scrollbars=yes');
}

function openRadion(filename, name)
{
   window.open(filename, name, 'width=345,height=480,location=no,toolbar=no,scrollbars=no');
}


function checkArtistLink(){
  // window.open("show_vcard.php?calid=" + calid, "vcard", 'width=640,height=460,location=no,toolbar=no,scrollbars=no');
  artist_name = document.theform.artist_name.value;
  artist_lastname = document.theform.artist_lastname.value;
  
  window.open("checklink.php?name=" + artist_name + "&last="+artist_lastname, "link", 'width=640,height=460,location=no,toolbar=no,scrollbars=no');
}

function chooseArtist(gal){
  window.opener.document.theform.artist_link2.value="http://www.svenskakonstnarer.se/start/opengal.php?aid=" + gal;
  window.close();
}


function cleanSvk(){
  window.document.theform.artist_link2.value="";
}


function suredelete(chr, aid){
  if (confirm("Är du säker på att du vill radera denna posten?")) {
    window.location="deleteartist.php?id="+aid+"&char="+chr;
  }
}


function checkLexikon(theForm){
 if( theForm.artist_name.value=="" ||  theForm.artist_lastname.value=="" || theForm.artist_bio.value=="" ){
   alert("Fyll i alla obligatoriska fält");
   return(false);
 }

 return(true);
}

function surewithtext(page, text){
  if (confirm(text)) {
    window.location=page;  
  }
}