haschanges=false;

function doStep(fromstep, tostep)
{
	var regex = "^https?://(([a-zA-Z0-9._-]+/)+)[^/]*$";

	var temp = window.location.href.match(regex);

	var ssl_url = "https://" + temp[1];
	var nonssl_url = "http://" + temp[1];

	switch(tostep)
	{
		case 1: tostepkey="choose"; tostepurl=nonssl_url+"product_info.php"; break;
		case 2: tostepkey="customer"; tostepurl=ssl_url+"checkout_payment_address.php"; break;
		case 3: tostepkey="address"; tostepurl=ssl_url+"checkout_shipping_address.php"; break;
		case 4: tostepkey="greeting"; tostepurl=ssl_url+"checkout_greeting_card.php"; break;
		case 5: tostepkey="payment"; tostepurl=ssl_url+"checkout_payment.php"; break;
		case 6: tostepkey="confirm"; tostepurl=ssl_url+"checkout_confirmation.php"; break;
	}

	switch(fromstep)
	{
		case 1: dolink=false; doform="checkout_order"; break;
		case 2: dolink=false; doform="checkout_address"; break;
		case 3: dolink=false; doform="checkout_address"; break;
		case 4: dolink=false; doform="greeting_card"; break;
		case 5: dolink=false; doform="checkout_payment"; break;
		case 6: dolink=true; doform="checkout_confirmation"; break;
	}

//	if (dolink==false)
//	{
//		if (haschanges==true)
//		{
////			if (!confirm("Sie haben Änderungen gemacht\nSollen Ihre Änderungen gespeichert werden?"))
////				dolink=true;
//			dolink=false;
//		}
//		else
//			dolink=true;
//	}

	if (dolink==true)
		document.location.href=tostepurl;
	else
	{
		document.forms[doform].elements["gotostep"].value=tostepkey;
		document.forms[doform].submit();
	}
}

function doEdit(formfield)
{
	haschanges=true;
}