function __mk_ow_print(lang,css){
	printwin = window.open("extensions/print/"+lang+"/print.htm","Print","status=yes,scrollbars=yes,width=600,height=600");
}

function nm_change_css(nm_css) {
	printwin.document.header.printheader.src = "../../../designs/"+nm_css+"/images/headerprint.jpg";
}

function __mk_window_open(url){
  var popup = window.open(url);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  var printfenster = window.open(theURL,winName,features);
}

function check(vv,vn,ve,vk,vc,vs)
{
	if(!checkEmail(document.getElementById(ve).value, true )) {
		alert("keine gültige Emailadresse");
		return false;
	}
	if ((document.getElementById(vv).value!="") && (document.getElementById(vn).value!="") && (document.getElementById(ve).value!="")) {
		if (document.getElementById(vc)) {
			if (document.getElementById(vc).value == vs) {
				return true;
			} else {
				alert(document.getElementById("angaben_check").value); return false
			}
		} else {
				alert(document.getElementById("angaben_check").value); return false
		}
		return true; 
	} else { 
		alert(document.getElementById("angaben").value); return false
	}
}

// Shop

function check_agb()
{
	if (document.form1.agb[0].checked == false) {
		alert(document.form1.agb_check.value);
		return false;
	} else {
	  if (document.form1.email.value!=document.form1.email2.value) { 
			alert(document.form1.agb_check.value); 
			return false; 
		} else {
			if ((document.form1.email.value!="") && (document.form1.bname.value!="") && (document.form1.firma.value!="") && (document.form1.adresse.value!="")) {
				return true;
			} else {
					alert(document.form1.agb_check.value); return false
			}
		}
	}
}

function inkorb(nr,j)
{
  count=eval("document.formprod"+j+".mengenfeld.value");
//	attribnr=eval("document.formprod"+j+".attribnr.value");
//	ausnr=eval("document.formprod"+j+".ausfuehrung.options[document.formprod"+j+".ausfuehrung.selectedIndex].value");
	ausnr=eval("document.formprod"+j+".id.value");
	attribnr = "0";
	es = "0";
	alert(count + document.formugruppen.shop_anzahl_in_warenkorb.value);
	myurl = window.location.href+'&ib=1&ibnr='+nr+'&ibausnr='+ausnr+'&ibattribnr='+attribnr+'&ibes='+es+'&ibcount='+count;
	window.location.href = myurl;
}

function attribute(j)
{
	__anr = eval("document.formprod"+j+".ausfuehrung.options[document.formprod"+j+".ausfuehrung.selectedIndex].value");
	var myurl=window.location.search;
	var neue_url = myurl.replace(/ib=1/, "");
	location.href="index.php"+neue_url+"&__anr="+__anr;
}

function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

function delbasket(nr)
{
  if (confirm(document.form1.shop_artikel_loeschen_abfragen.value) )
  {
		self.location.href = 'index.php?lang='+document.form1.shop_lang.value+'&css='+document.form1.shop_css.value+'&aend=1&bd=1&id='+nr;
  }
}

function chcnt(pnr)
{
  if (confirm(document.form1.shop_artikel_aendern_abfragen.value)) {
    if (eval("document.form1.cnt"+pnr+".value")!="") {
			self.location.href = 'index.php?lang='+document.form1.shop_lang.value+'&css='+document.form1.shop_css.value+'&aend=1&bc=1&id='+pnr+'&count='+eval('document.form1.cnt'+pnr+'.value');
    }	
  }
}

// DropDown Hover für IE
sfHover = function() {
	if(document.getElementById("base_nav")){
		var sfEls = document.getElementById("base_nav").getElementsByTagName("LI");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
// Ende DropDown
