  function popup_now(popuplink) {
    popup = window.open(popuplink,"SiteWindow","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width=250,height=300,copyhistory=0");
  }
  name = "hauptfenster";

  function openwin(verweis) {
    fenster = open(verweis,"Shopinfo","toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,height=450,width=430");
  }
  function picwin(verweis) {
    fenster = open(verweis,"Detail","toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,height=450,width=450");
  }
  function infowin(verweis) {
    fenster = open(verweis,"Detail","toolbar=no,scrollbars=yes,location=no,status=no,menubar=no,height=450,width=560");
  }
  function wk_weiter(verweis) {
    fenster = open(verweis,"WKInfo","toolbar=no,scrollbars=0,location=no,status=no,menubar=no,height=150,width=200");
  }
  function wk_aktual(verweis) {
    fenster = open(verweis,"WKInfo","toolbar=no,scrollbars=0,location=no,status=no,menubar=no,height=150,width=200");
  }
  function popup() {
    alert(shoptext_119);
  }
  function open_zs_popup(seite) { // Zusatzseiten-Popup
    f_url = seite;
    f_name = "zs_popup";
    f_props = "width=644,height=550,left=100,top=100,scrollbars=yes,resizable=yes";
    f = open(f_url,f_name,f_props);
    f.focus();
    if (open_zs_popup.arguments[1]) f.print();
  }
  function open_versandkosten_popup(seite) { // Versandkosten-Popup
    f_url = seite;
    f_name = "versandkosten_popup";
    f_props = "width=500,height=540,left=200,top=200,scrollbars=yes,resizable=yes";
    f = open(f_url,f_name,f_props);
    f.focus();
    if (open_versandkosten_popup.arguments[1]) f.print();
  }
  function wk_check(form) {
    if (form.wkausf_1 && form.wkausf_1.value == "xxnoinputxx") {
      alert(shoptext_19);
     return false;
    }
    if (form.wkausf_2 && form.wkausf_2.value == "xxnoinputxx") {
      alert(shoptext_19);
      return false;
    }
  }
  function feld_not_ok(feld,msg) {
    alert(msg);
    feld.select();
    feld.focus();
  }
  function format_price(price){
        price = parseFloat(price);
        //return price;
        price *=100;
        price = Math.round(price);
        price /= 100;
        strP = new String(price);
        var tmp = strP.split(".");
        if(!tmp[1])
            tmp[1] = "00";    
        else
            if(tmp[1].length==1)tmp[1]*=10;
        
        strP = tmp[0] + "," + tmp[1];
        
        return strP;
  }
  
    function vgl_toggle_artnum(num){
        var form = document.artikel_vergleichen;
        var artnums = form.artnums.value; 
        var arrNums =  artnums.split(",");
        var i;
        var found=false;
        var newStr="";
        for (i=0;i< arrNums.length;i++){
            var tmpNum = arrNums[i];
            if(!tmpNum)continue;
            if( tmpNum==num ){
                found = true;    
            }else{
                newStr += tmpNum +",";
            }
        }
        if(!found)newStr += num;
        //alert(newStr);
        form.artnums.value = newStr;
         
    }

		function pl_av_toggle_checkboxes(){
			var el,i,check;
			
			document.artikel_vergleichen.artnums.value="";
			
			if(!pl_av_fieldstatus["checkboxes"])pl_av_fieldstatus["checkboxes"]="notall";
			var sel_link = document.getElementById("pl_av_toggle_checkboxes");
			if(pl_av_fieldstatus["checkboxes"]=="all"){
				check = false;
				pl_av_fieldstatus["checkboxes"]="notall";
				sel_link.innerHTML = av_text_2;
			}else{
				check = true;
				pl_av_fieldstatus["checkboxes"]="all";
				sel_link.innerHTML = av_text_3;
			}
			for(i=0;i<pl_av_checkboxes.length;i++){
				//alert(pl_av_checkboxes[i])
				el = document.getElementById(pl_av_checkboxes[i]);
				
				if(el.type=="checkbox"){
					
					if(check)el.click();
					el.checked = check;
				}
			}
			
		} 
