function set_cookie(name, value) {
	var cookie_string = name + "=" + escape(value) + ";path=/";
	document.cookie = cookie_string;
}

function get_cookie(cookie_name) {
	var results = document.cookie.match('(^|;) ?' + cookie_name + '=([^;]*)(;|$)');
	if(results)
		return (unescape(results['path']));
	else
		return null;
}

function del_cookie(name) {
	if(get_cookie(name)) {
		set_cookie(name, '');
	}
}

function top_nav(value, txt) {
	if (value == 'hide') {
		dialog = confirm(txt);
		if (dialog != 0) {
			set_cookie("top_nav", "hide");
			$("#topNavBlockHolder").fadeOut('slow');
		}
	} else if(value == 'down') {
		set_cookie("top_nav", "show");
		$("#topNavBlockHolder").fadeIn('slow');
	} else {
		set_cookie("top_nav", "show");
		$("#topNavBlockHolder").fadeIn('slow');
	}
}

function confirmChoice(url, txt) {
	var url;
	var txt;
	if (txt == null) {
		txt = "Are you sure?";
	}
	dialog = confirm(txt);
	if (dialog != 0) {
		location = url;
	}
}

function slideCookie(status) {
	if ( status == 'hide' ) {
		set_cookie("slide_status", "hide");
	} else if ( status == 'show' ) {
		set_cookie("slide_status", "show");
	}
}

function slideStatus(status) {
	if ( status == 'hide' ) {
		var myVerticalSlide = new Fx.Slide('vertical_slide').hide();
	} else if ( status == 'show' ) {
		var myVerticalSlide = new Fx.Slide('vertical_slide').show();
	}
}
