function storePositions() {
	var cookieMsg = document.getElementById('inmaps').offsetHeight+'-'+document.getElementById('inback').offsetHeight+'-'+document.getElementById('instart').offsetWidth+'|';
	var x;
	var y;
	var width;
	var height;
	for (var i=0; i < zindexArray.length; i++) {
		if (document.getElementById(zindexArray[i]).style.display != 'none') {
			var id = getId(zindexArray[i]);

			if (matches = id.match(/([0-9]+)G([0-9ABCDEF]+)M$/i)) {
				var feed = matches[1];
				var unique = matches[2].substr(matches[2].length-9);
				eval('unique = 0x'+unique);
				unique = unique.toString(36);
			} else {
				var feed = id;
				var unique = 'list';
			}
			feed = feed*1;
			if ((y = makeNum(document.getElementById(zindexArray[i]).style.top)) > 46000) y = 46000;
			if ((x = makeNum(document.getElementById(zindexArray[i]).style.left)) > 46000) x = 46000;
			if ((width = makeNum(document.getElementById('inelement'+id).offsetWidth)) > 46000) width = 46000;
			if ((height = makeNum(document.getElementById('inelement'+id).offsetHeight)) > 46000) height = 46000;
			cookieMsg += (fillstring(y.toString(36),3,'-')+fillstring(x.toString(36),3,'-')+fillstring(height.toString(36),3,'-')+fillstring(width.toString(36),3,'-')+fillstring(unique,7,'-')+feed.toString(36)+'|');
		}
	}
	if (cookieMsg) storeCookie(cookieMsg,escape(map));
}

function fillstring(input,newlength,fill) {
	var oldlength = input.length;
	var output = '';
	for (var s=oldlength; s < newlength; s++) output +=fill;
	return output+input;
}
function storeCookie(msg,name) {
	msg = msg.substr(0,4000);
	document.cookie = 'MAPS-'+name.substr(0,20)+"="+escape(msg)+"; expires="+expire+"; path=/; ";
}
function removeCookie(name) {
	document.cookie = 'MAPS-'+name.substr(0,20)+"= ; path=/; ";
}