var today = new Date();
var expiry = new Date(today.getTime() + 28 * 24 * 60 * 60 * 1000);
function mdn() {
    e = document.getElementById('htxt');
    if (e) e.style.display = 'none';
}
function getCookie(name) {
	var re = new RegExp(name + "=([^;]+)");
	var value = re.exec(document.cookie);
	return (value != null) ? unescape(value[1]) : null;
}
function setCookie(name, value) {
	document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
}
function a(module, action, id, msg) {
//	setCookie(module + "-action", action);
//	setCookie(module + "-id", id);
	if(typeof(msg)== 'string') {
		if (! confirm(msg)) {
			return;
		}
	}
	setCookie(module + "-" +action, id);
	document.location.href=document.location.href;
}

var flipflops = new Array();
flipflops['hdm1'] = new Array();
flipflops['hdm1'][0] = '/i/start/banner/hdm_winter2.jpg';
flipflops['hdm1'][1] = '/i/start/banner/hdm_winter3.jpg';
flipflops['hdm1'][2] = '/i/start/banner/hdm_winter4.jpg';
flipflops['hdm1'][3] = '/i/start/banner/hdm_winter1.jpg';

var flipflopstatus = new Array();
flipflopstatus['img1'] = 0;

function goFlipFlop() {
	setTimeout('flip("hdm1")', 2000);
}

function flip(what) {
	current = flipflopstatus[what];
	if (current < (flipflops[what].length - 1)) {
		next = current+1;
	} else {
		next = 0;
	}
	document.images[what].src = flipflops[what][next];
	flipflopstatus[what] = next;
	setTimeout('flip("' + what + '")', 4000);
}
