
function calc(){
	var m1 = document.getElementById("mm1").value;	
	var m2 = document.getElementById("mm2").value;

	if (!m1 || !m2) alert ("Please insert a Value in all needed input fields!");
	else {
		var ret = confirm("Please have a last look on your entries. Are they all right?");	
		if (ret) window.document.form1.submit();
	}
}

function change(id){
	document.getElementById('hllr['+id+']').value = 1;
}

function change2(id){
	document.getElementById('hllrV1['+id+']').value = 1;	
}


function cor(){
	window.document.form1.submit();	
}

function cor2(){
	window.document.form2.submit();	
}

function cor3(){
	window.document.form3.submit();	
}


function buy(id){
	ret = confirm("This will cost one credit. Are you sure?");
	if (ret) window.location.href="login.php?id=3&sub=4&clid="+id;
}

function buyTemplate(id,typ){
	ret = confirm("Diese Templates kosten 30 Credits. Weiter?");
	if (ret && typ == 1) window.location.href="download/index.php?"+id+".pdf";
	if (ret && typ == 2) window.location.href="login.php?id=3&sub=11&pdf="+id;
}
