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 korrekte 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.getElementById('lbox').checked) {
			if ((document.form_agb.lname.value!="") && (document.form_agb.lstrasse.value!="") && (document.form_agb.lplz.value!="") && (document.form_agb.lort.value!="")) {
			} else {
				alert(document.form_agb.unvoll_meldung.value);
				return false;
			}
	} 

	if (document.form_agb.agb[0].checked == false) {
		alert(document.form_agb.agb_meldung.value);
		return false;
	} else {
	  if (document.form_agb.email.value!=document.form_agb.email2.value) { 
			alert(document.form_agb.email_meldung.value); 
			return false; 
		} else {
			if ((document.form_agb.email.value!="") && (document.form_agb.bname.value!="") && (document.form_agb.bstrasse.value!="") && (document.form_agb.bplz.value!="") && (document.form_agb.bort.value!="")) {
				return true;
			} else {
					alert(document.form_agb.unvoll_meldung.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(html_decode(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(html_decode(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

function html_decode(str) {
  var ta=document.createElement("textarea");
  ta.innerHTML=str.replace(/</g,"&lt;").replace(/>/g,"&gt;");
  return ta.value;
}


