<!--

function AddProduct(id) {

	number = document.form1.p1.value;

	

	MM_goToURL('parent','index.php?group=products&action=add&product='+id+'&number='+number);

	return document.MM_returnValue;

}





function EmptyCart() {

	if(confirm('Er du sikker på at du vil tømme handlevognen?')) {

		MM_goToURL('parent','index.php?group=cart&page=empty');

		return document.MM_returnValue;

	}

}


function PriceWithTaxes(url) {
	if(document.mva.mva_checkbox.checked) {
		document.mva.mva_checkbox.checked = false;
		MM_goToURL('parent', url + '&mva=1');
	} else {
		document.mva.mva_checkbox.checked = true;
		MM_goToURL('parent', url + '&mva=2');
	}
}
 

function MM_setTextOfLayer(objId,x,newText) { //v9.0
  with (document) if (getElementById && ((obj=getElementById(objId))!=null))
    with (obj) innerHTML = unescape(newText);
}


function MM_setTextOfTextfield(objId,x,newText) { //v9.0
  with (document){ if (getElementById){
    var obj = getElementById(objId);} if (obj) obj.value = newText;
  }
}


function TypeShipping(shipping1,shipping2,shipping3,choise,mva) {
	MM_setTextOfTextfield('ShippingType','',choise);
	
	
	var postMethod = document.ShippingForm.ShippingMethod.value;
	
	//alert(postMethod);
	
	
	if(mva == '1') {
		var print_mva = 'ekskl. mva';
	} else if(mva == '1.25') {
		var print_mva = 'inkl. mva';
	}
	
	
	if(postMethod == '1') {
		MM_setTextOfLayer('PostageDIV','',' kr ' + shipping1 + ',- ' + print_mva);
	} else if(postMethod == '2') {
		MM_setTextOfLayer('PostageDIV','',' kr ' + shipping2 + ',- ' + print_mva);
	} else if(postMethod == '3') {
		MM_setTextOfLayer('PostageDIV','',' kr ' + shipping3 + ',- ' + print_mva);
	}
}



function Shipping(shippingA,shippingB,choice,mva) {
	MM_setTextOfTextfield('ShippingMethod','',choice);
	
	var postType = document.ShippingForm.ShippingType.value;
	
	//alert(postType);
	
	
	if(mva == '1') {
		var print_mva = 'ekskl. mva';
	} else if(mva == '1.25') {
		var print_mva = 'inkl. mva';
	}
	
	
	if(postType == 'a') {
		MM_setTextOfLayer('PostageDIV','',' kr ' + shippingA + ',- ' + print_mva);
		MM_setTextOfTextfield('ShippingType','','a');
	} else if(postType == 'b') {
		MM_setTextOfLayer('PostageDIV','',' kr ' + shippingB + ',- ' + print_mva);
		MM_setTextOfTextfield('ShippingType','','b');
	}
}


//-->