function popup(width,height) {
  var mywin = window.open('about:blank','popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,width='+width+',height='+height+',left=20,top=20');
  mywin.focus();
  return mywin;
} 

function new_win(width,height) {
  var mywin = window.open('about:blank','new_win','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+width+',height='+height+',left=20,top=20');
  mywin.focus();
  return mywin;
} 

function page_print() {
  self.print();
}

function zufavoriten()
{
    if ((navigator.appName == "Microsoft Internet Explorer") && 
          (parseInt(navigator.appVersion) >= 4))
    {
        var url="http://www.www.cd-preis.de/"
        var title="cd-preis.de - Suche & Preisvergleich speziell für Musik-CDs"
        window.external.AddFavorite(url,title)
    }
    else
    {
        var FavText = "Sie können www.cd-preis.de"; 
        if(navigator.appName == "Netscape")
        {
           FavText += " mit der Tastenkombination  [STRG] + [D]";
        }
        FavText += " zu den Favoriten hinzufügen";
        alert(FavText);
    }
}


function neuesfenster(asin){
  var fenster = window.open("redirect.htm", "neu")

  window.location.href = "cd_zumshop_"+asin+".htm";
  
/*
  window.location.href = "preisvergleich.php?asin="+asin+"&action=zumshop";
*/  
}


function AddSearchPlugin()
{
  if ((typeof window.sidebar == "object") && (typeof
  window.sidebar.addSearchEngine == "function"))
  {
    window.sidebar.addSearchEngine(
      "http://www.cd-preis.de/plugins/cd-preisDE.src",
      "http://www.cd-preis.de/plugins/cd-preisDE.png",
      "CD Preisvergleich",
      "Shopping" );
  }
  else
  {
    errorMsg();
  }
}

function errorMsg()
{
 alert("Das Plugin konnte nicht installiert werden. Versuchen Sie es noch einmal mit der manuelle Installation."); 
}


function hide_pleasewait() { 
  document.getElementById("pleasewait").style.visibility = "hidden";
} 

function showe(account,domain,post,cssclass) {
  email_adr = account + "@" + domain + "." + post;
  if (cssclass != "") css_str = " class='"+ cssclass +"' ";
  document.write("<a href='mailto:"+email_adr + "' " + css_str + ">"+email_adr+"</a>")
} 

function zeige_erw_suche(block) {

  if (block == "main"){
    document.getElementById("schnellsuche_main").style.display = 'none';
    document.getElementById("erw_suche_main").style.display = 'block';
    document.getElementById("erw_suche_opt_main").style.display = 'block';
  }
  else{
    document.getElementById("schnellsuche").style.display = 'none';
    document.getElementById("erw_suche").style.display = 'block';
    document.getElementById("erw_suche_opt").style.display = 'block';
  } 
}

function zeige_einfache_suche(block) {
  if (block == "main"){
    document.getElementById("erw_suche_main").style.display = 'none';
    document.getElementById("erw_suche_opt_main").style.display = 'none';  
    document.getElementById("schnellsuche_main").style.display = 'block';
  }
  else{
    document.getElementById("erw_suche").style.display = 'none';
    document.getElementById("erw_suche_opt").style.display = 'none';  
    document.getElementById("schnellsuche").style.display = 'block';
 }   
}

