function shopConfirm(level) {

	var ADRES = "index.php?pw=shop&act=confirm&level="+level;  // ADRES WPISANY NA SZTYWNO

	location.href=ADRES;
}

function goBasket() {

	var ADRES = "index.php?pw=shop&act=basket"

	location.href=ADRES;
}

function validateCustom() {
	if (document.shopForm.elements[4].value.length < 3) {
		alert( "Proszę podać dane odbiorcy." );
		document.shopForm.elements[4].focus();
		return false ;
	}

	if (document.shopForm.elements[6].value.length < 3) {
		alert( "Proszę podać adres odbiorcy." );
		document.shopForm.elements[6].focus();
		return false ;
	}

	if (document.shopForm.elements[7].value.length < 3) {
		alert( "Proszę podać miejscowosć." );
		document.shopForm.elements[7].focus();
		return false ;
	}

	if (document.shopForm.elements[8].value.length < 3) {
		alert( "Proszę podać kod pocztowy." );
		document.shopForm.elements[8].focus();
		return false ;
	}


	if ((document.shopForm.elements[9].value == "") || (document.shopForm.elements[9].value.indexOf ('@') == -1) || (document.shopForm.elements[9].value.indexOf ('.') == -1)) {
		alert( "Podano błędny adres e-mail." );
		document.shopForm.elements[9].focus();
		return false;
	}
	
	if (document.shopForm.elements[10].value.length < 3) {
		alert( "Proszę podać telefon." );
		document.shopForm.elements[10].focus();
		return false ;
	}
	

	if (document.shopForm.elements[12].checked) {
		if (document.shopForm.elements[13].value.length < 3) {
			alert( "Proszę podać dane odbiorcy." );
			document.shopForm.elements[13].focus();
			return false ;
		}

		if (document.shopForm.elements[14].value.length < 3) {
			alert( "Proszę podać adres odbiorcy." );
			document.shopForm.elements[14].focus();
			return false ;
		}

		if (document.shopForm.elements[15].value.length < 3) {
			alert( "Proszę podać miejscowosć." );
			document.shopForm.elements[15].focus();
			return false ;
		}

		if (document.shopForm.elements[16].value.length < 3) {
			alert( "Proszę podać kod pocztowy." );
			document.shopForm.elements[16].focus();
			return false ;
		}
		if (document.shopForm.elements[17].value.length < 3) {
			alert( "Proszę podać NIP." );
			document.shopForm.elements[17].focus();
			return false ;
		}
	
	}
document.shopForm.submit();
}
