function getNextSection(default_section) { var section = getSection(null); if(section != null) { var index = Number(section); if(!isNaN(index)) { if(index == 3) section = '1'; else section = '' + (index + 1); setSection(section); } } return getSection(default_section); } function setSection(section) { $.cookie('flash_section', section); } function getSection() { var value = $.cookie('flash_section'); if(value != null) return value; else return '0'; }