$(document).ready(function() {
// This is more like it!

$("#but-slide").addClass("show");
var menu_status = getCookie('menu_status');
var t;

$("#but-slide").click( function() {
    if(menu_status=='show')  {
		clearTimeout(t);
		$("#slide").animate({ marginLeft: -200}, 200);
		$("#but-slide").animate({ marginLeft: 0 }, 200);
		setCookie('menu_status','hide',1, '/');
		menu_status = 'hide';
	} else {
		clearTimeout(t);
		$("#slide").animate({ marginLeft: 0}, 200);
		$("#but-slide").animate({ marginLeft: 200 }, 200);
		setCookie('menu_status','show',1, '/');
		menu_status = 'show';
	}
});//toggle





function setCookie(name, value, expires, path, domain, secure) {
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+expires);
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + exdate : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}

function getCookie(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
    } else {
        begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
        end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
}

if(menu_status=='hide')  {
	$("#slide").css({ marginLeft: -200}, 200);
	$("#but-slide").css({ marginLeft: 0}, 200);
} else {
	$("#slide").css({ marginLeft: 0}, 200);
	$("#but-slide").css({ marginLeft: 200}, 200);
	t = setTimeout( function() {
	 $("#slide").animate({ marginLeft: -200}, 700);
	 $("#but-slide").animate({ marginLeft: 0 }, 700);
	 menu_status = 'hide';
	}, 10000);
}




});//doc.ready





function showFlash() { 
	document.getElementById('dustsheet').style.display = 'none';
};
function hideFlash() { document.getElementById('flashdiv').style.zIndex = '1';};