var selected;
var submitter = null;

function submitFunction() {
	submitter = 1;
}

function popupWindow(url) {
	window
			.open(
					url,
					'popupWindow',
					'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=400,screenX=50,screenY=50,top=50,left=50')
}

function selectRowEffect(object, buttonSelect, modul_list) {
	
	modul_array = modul_list.split(';'); 

	for (i = 0; i < modul_array.length; i++) {
		n = i + 1;
		if (i == buttonSelect) {
			if (object == 'payment') {								
				document.getElementById('radio_'+modul_array[i]).checked = true;
			} else
				
				document.getElementsByName(object)[i].checked = true;			
				document.getElementById(modul_array[i]).className = 'moduleRowSelected';
				
		} else {
			document.getElementsByName(object)[i].checked = false;
			document.getElementById(modul_array[i]).className = 'moduleRow';
		}

	}

}

function switch_button(object, count) {

	for ($i = 0; $i < count; $i++) {

		var name = 'select_button' + $i;

		if (object.id == document.getElementById(name).id)
			document.getElementById(name).className = "image_button_select";
		else
			document.getElementById(name).className = "image_button";

	}

}

function rowOverEffect(object) {
	if (document.Object.className == 'moduleRow')
		object.className = 'moduleRowOver1';
}

function rowOutEffect(object) {
	if (object.className == 'moduleRowOver1')
		object.className = 'moduleRow';
}

function popupImageWindow(url) {
	window.open(url,
					'popupImageWindow',
					'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150');
}

function aendern(object) {
	object.className = "moduleRowSelected";

}

function select_basket(obj, way) {

	obj.style.backgroundColor = '#bfbbba';
	if (obj.id == 'notepad') {
		if (way == 'in') {
			document.getElementById("cart").style.backgroundColor = obj.parentNode.style.backgroundColor;
			obj.style.backgroundColor = '#bfbbba';
			$("#box_cart_summary").css({"visibility" : "hidden"});
			$("#box_memo_summary").css({"visibility" : "visible"});
			$("#box_cart_summary").css({"display" : "none"});
			$("#box_memo_summary").css({"display" : "block"});
			return;
		}
		if (way == 'out') {
			document.getElementById("cart").style.backgroundColor = '#bfbbba';
			obj.style.backgroundColor = obj.parentNode.style.backgroundColor;
			return;
		}

	}

	if (obj.id == 'cart') {
		document.getElementById("notepad").style.backgroundColor = obj.parentNode.style.backgroundColor;
		$("#box_cart_summary").css({"visibility" : "visible"});
		$("#box_memo_summary").css({"visibility" : "hidden"});
		$("#box_cart_summary").css({"display" : "block"});
		$("#box_memo_summary").css({"display" : "none"});
		
		

	}

}
