


//window.onload = function() {
	//readCookie();
	//resize();
//}
function deleteProduct(id, txt) {
	if (confirm(txt)) {
		window.location = 'publicaties_bestellen.php?action=delete&id=' + id;
		GetAllCookies(30);
	}
}

function SetCookie(c_name, expiredays) {
	var exdate = new Date();
	exdate.setDate(exdate.getDate() + expiredays);
	document.cookie = c_name + "=" + escape(document.getElementById(c_name).value) + ((expiredays == null) ? "" : ";expires=" + exdate.toGMTString());
}

function GetAllCookies(expiredays) {
	if (window.location.pathname.search('publicaties_bestellen.php') >= 0) {
		var exdate = new Date();
		exdate.setDate(exdate.getDate() + expiredays);
		var velden = new Array('txt_firstname', 'txt_between', 'txt_lastname', 'txt_email', 'txt_institution', 'txt_address_deliver', 'txt_zipcode_deliver', 'txt_city_deliver', 'txt_address_invoice', 'txt_zipcode_invoice', 'txt_city_invoice');
		var veld;
		var v;
		for (v in velden) {
			veld = velden[v];
			c_start = document.cookie.indexOf(veld);
			if (c_start != -1) {
				c_start = c_start + veld.length + 1;
				c_end = document.cookie.indexOf(";", c_start);
				document.getElementById(veld).value = unescape(document.cookie.substring(c_start, c_end));
			}
		}
	}
}

function GetCookie(c_name) {
	if (document.cookie.length > 0) {
		c_start=document.cookie.indexOf(c_name + "=");
		if (c_start != -1) {
			c_start = c_start + c_name.length + 1;
			c_end = document.cookie.indexOf(";", c_start);
			if (c_end == -1) c_end = document.cookie.length;
			return unescape(document.cookie.substring(c_start, c_end));
		}
	}
	return "";
}

// --> 
