
	function cookieCheck() {
		var cookieEnabled = (navigator.cookieEnabled) ? true : false;
		//if not IE4+ nor NS6+
		if ( typeof navigator.cookieEnabled=="undefined" && !cookieEnabled ) { 
			document.cookie = "testcookie";
			cookieEnabled = ( document.cookie.indexOf("testcookie")!=-1 ) ? true : false;
		}

		return cookieEnabled;
	}


	function goto(url) {
		window.location.href = url;
	}

	// Simple AJAX Alternative	
	function transfer (nameValues) {
		if (!nameValues) return;

		var form = document.createElement('form');
		form.method = 'post';

		for (varName in nameValues) {
			var input = document.createElement('input');
			input.type = 'hidden';
			input.name = varName;
			input.value = nameValues[varName];
			form.appendChild(input);
		}
		document.body.appendChild(form);
		form.submit();
	}


	function deleteGeneric(action, id) {
		var choice = window.confirm('Really delete this?');
		if (choice)
			transfer({ 'action':action, 'id':id });
	}
	
	function confirmSubmit(it) {
		var choice = window.confirm('Are you sure?');
		if (choice)
			it.form.submit();
	}

	function markShipped(orderid) {
		var choice = window.confirm('Do you sure you want to mark this as shipped?');
		if (choice)
			transfer({ 'action':'markShipped', 'orderid':orderid });
	}
