function change() {	document.getElementById("bild_oben").style.backgroundImage = "url(/shared/pics/top" + Math.round(1 + Math.random() * 2) + ".jpg)";	var s = getCookie("font");		if (!s) { s = '12px'; };	document.body.style.fontSize = s;	openings();}function openings() {	var aktuell = new Date();	var tag = aktuell.getDay();	var wt = "";		switch (tag) {		case 0: wt = "Sonntag"; break;		case 1: wt = "Montag"; break;		case 2: wt = "Dienstag"; break; 		case 3: wt = "Mittwoch"; break; 		case 4: wt = "Donnerstag"; break;		case 5: wt = "Freitag"; break;		case 6: wt = "Samstag"; break; 	}		var ort = document.getElementById("oeffnungszeiten_ort");	if (ort) {		var i = ort.length - 1;		var tmp;		var ele;			while (i>=0) {			tmp = ort.options[i];			ele = document.getElementById("openings_" + tmp.value + "_" + wt);			ele.style.display = "none";			i--;		}		document.getElementById("openings_" + ort.value + "_" + wt).style.display = "";	}}function greater() {	var s = getCookie('font');    var expDays = 7;    var exp = new Date();    var value = exp.getDate()+'_'+exp.getMonth()+'_'+exp.getFullYear();       exp.setTime(exp.getTime() + (expDays*24*60*60*1000));   		if (s == '12px'){			s = '14px';	} else	if (s == '14px'){			s = '16px';	} else {			s = '12px';	} 		document.body.style.fontSize = s;	document.cookie = "font="+escape(s)+';' + "; expires=" + exp.toGMTString() + ";path=/;url=http://"+document.location.host;}function MM_findObj(n, d) { //v4.0  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);  if(!x && d.getElementById) x=d.getElementById(n); return x;}function MM_validateForm() { //v4.0  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;    for (i=0; i<(args.length-2); i+=3) {   	test=args[i+2];   	val=MM_findObj(args[i]);    if (val) {     	nm=val.name;     	if (nm == 'EMail') nm = 'E-Mail';    	if ((val=val.value)!="") {      		if (test.indexOf('isEmail')!=-1) {      		  p=val.indexOf('@');        	  if (p<1 || p==(val.length-1)) errors+='- '+nm+'.\n';            } else if (test!='R') {        	  if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';        	  if (test.indexOf('inRange') != -1) {         	    p=test.indexOf(':');          		min=test.substring(8,p);           		max=test.substring(p+1);          		if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';    	      }    	   }        } else if (test.charAt(0) == 'R') errors += '- '+nm+'\n';     }  }   if (errors) alert('Bitte tragen Sie alle Felder ein. Nicht vollstaendig:  \n'+errors);  document.MM_returnValue = (errors == '');}var bestellung = 1;function AddBestellung() {	var b = document.createElement("div");	bestellung++;	b.innerHTML="<br clear='all' />" +				"<div id='Bestellung" + bestellung + "'>" + 				"<div class='vorwort2'>" + 				"<strong>Produkt " + bestellung + "</strong><br />" + 				"<br />" + 				"</div><br clear='all' />" +				"<div class='beschriftung2'>Produktname</div>" +				"<div class='feld'>" +				"<input type='text' name='Produkt" + bestellung + "'/>" +				"</div>" +				"<br clear='all' />" +				"<div class='beschriftung2'>Hersteller</div>" +				"<div class='feld'>" +				"<input type='text' name='Hersteller" + bestellung + "'/>" +				"</div>" +				"<br clear='all' />" +				"<div class='beschriftung2'>Packungsgr&ouml;&szlig;e</div>" +				"<div class='feld'>" +				"<input type='text' name='Packungsgrosse" + bestellung + "'/>" +				"</div>" +				"<br clear='all' />" +				"<div class='beschriftung2'>Darreichungsform</div>" +				"<div class='feld'>" +				"<input type='text' name='Darreichungsform" + bestellung + "'/>" +				"</div>" +				"<br clear='all' />" +				"<div class='beschriftung2'>PZN</div>" +				"<div class='feld'>" +				"<input type='text' name='PZN" + bestellung + "'/>" +				"</div>" +				"</div>";					var c = document.getElementById("bestellung");	c.appendChild(b);}function getCookie_OLD(name) {    a = document.cookie;	res = '';    while(a != '' && res == '') {        cookiename = a.substring(0,a.search('='));        if (a.search(';') >= 0) {            cookiewert = a.substring(a.search('=')+1,a.search(';'));        } else {            cookiewert = a.substring(a.search('=')+1,a.length);        }        if(name == cookiename) {res = cookiewert;}        i = a.search(';')+1;        if(i == 0) {i = a.length;}        a = a.substring(i,a.length);    }    return res;}function getCookie(name) {    a = document.cookie;	res = '';    while(a != '' && res == '') {        cookiename = a.substring(0,a.search('='));        if (a.search(';') >= 0) {            cookiewert = a.substring(a.search('=')+1,a.search(';'));        } else {            cookiewert = a.substring(a.search('=')+1,a.length);        }		while(cookiename.substring(0, 1) == ' ') {			cookiename = cookiename.substring(1, cookiename.length);		}				if(name == cookiename) {res = unescape(cookiewert);}		i = a.search(';')+1;        if(i == 0) {i = a.length;}        a = a.substring(i,a.length);    }    return res;}