function showSwap(id1, id2){
	for (var i=1; i<=4; i++) {
		var temp = document.getElementById('tab'+i);
		if ('tab'+i == id1) {
			temp.className = "current";
		} else {
			temp.className = "";
		}

		if ('tab'+i+'Section' == id2) {
			document.getElementById('tab'+i+'Section').style.display = "block";
			jQuery.cookie('tab', i, { path: "/" });
		} else {
			document.getElementById('tab'+i+'Section').style.display = "none";
		}
	}

	return false;
}
jQuery(function() {
	if (jQuery.cookie('tab')) {
		var tab = 'tab' + jQuery.cookie('tab');
		showSwap(tab, tab + 'Section');
	} else {
		showSwap('tab4', 'tab4Section');
	}
});

