function sure(formid) {
   var f = document.getElementById(formid);
   var x = confirm('Bist du dir sicher?');
   if(x) {
       f.submit();
       return true;
   }
   return false;
}



function x() {
	for (var n = 0; n < arguments.length; n++) {
		var a = arguments[n];
		var mode = a.substr(0, 1);
		if (mode != "+" && mode != "-") { //expliziter Zustand?
			var s = document.getElementById(a).style;
			s.display == 'none' ? s.display = 'block' : s.display = 'none';
		} else {
			o = a.substr(1, a.length);
			s = document.getElementById(o).style;
			mode == "-" ? s.display = 'none' : s.display = 'block';
		}
	}
}




function blur() {
	for (var i = 0; i < document.links.length; ++i) {
		document.links[i].onfocus = function() {
				if(this.blur) this.blur();
			}
	}
}





function sonder(val) {
	if (val == "sonder") {
		x('+sonder');
	} else {
		x('-sonder');
	}
}

function mat(val) {
	switch(val) {
		case "1":
			x('+masterauflage','-transparent','-folie','+papier');
			break;
		case "2":
			x('+masterauflage','-transparent','+folie','-papier');
			break;
		case "3":
			x('+masterauflage','+transparent','-folie','-papier');
			break;
	}
}

function more(val) {
	if (val == "mehr") {
		x('+mehr','-masterauflage');
	}
}

function country(val) {
	if (val == "anderes") {
		x('+anderes','-land');
	}
}




function pop(wintype)
{
  var nwl = (screen.width-620)/2;
  var nwh = (screen.height-450)/2;
  popup=window.open(wintype, 'popuplove', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=520,height=550'); 
  popup.window.focus(); 
}

