// basic get and set functions for javascript cookies
function setCookie (cookieName, cookieValue, expires, path, domain, secure) {
document.cookie =
escape(cookieName) + '=' + escape(cookieValue)
+ (expires? '; EXPIRES=' + expires.toGMTString() : '')
+ (path? '; PATH=' + path : '')
+ (domain? '; DOMAIN=' + domain : '')
+ (secure? '; SECURE' : '');
}

function getCookie (cookieName) {
var cookieValue = null;
var posName = document.cookie.indexOf(escape(cookieName) + '=');
if (posName!= -1) {
var posValue = posName + (escape(cookieName) + '=').length;
var endPos = document.cookie.indexOf(';', posValue);
if (endPos!= -1) {
cookieValue = unescape(document.cookie.substring(posValue, endPos));
} else {
cookieValue = unescape(document.cookie.substring(posValue));
}
}
return cookieValue;
}

// custom code to store and remove links from the cookies

function storePageDB(){
thisPage = "<a href="+parent.document.location.href+" target=_parent>"+parent.document.getElementById('Fav').name+"</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");

parent.alert("The "+parent.document.getElementById('Fav').name+" page has been added to your WTCM My Favs list.")
}


function storePage(){
thisPage = "<a href="+document.location.href+" target=_parent>"+document.getElementById('Fav').name+"</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");

alert("The "+document.getElementById('Fav').name+" page has been added to your WTCM My Favs list.")
}


function storePage1(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=fa13 target=_parent>Meet Jack O\'Malley</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage2(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_page.pl/Show?_id=morningshow>Jack O&#39;s Show Notes</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage3(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=c74b target=_parent>Meet Carey Carlson</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage4(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=514e target=_parent>Meet Mike Sinclair</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage5(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=58ca target=_parent>Meet Steve Fordyce</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage6(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=8404 target=_parent>Meet Norm Jones</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage7(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=3343 target=_parent>Meet Rick Houston</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage8(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=9003 target=_parent>Meet Tom Szafranski</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage9(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=d07c target=_parent>Meet Dave Barr</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage10(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=f469 target=_parent>Meet Colleen Wares</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage11(){
thisPage = "<a href=http://www.myspace.com/colleenwares target=_blank>Colleen\'s MySpace Page</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage12(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Show?_id=7354 target=_parent>Meet Barbara Whitmore</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage13(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_2.pl/Search?search=news+staff+community target=_parent>News & Weather Folks</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage14(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/Search?search=Type%3AArtist target=_parent>Artist Search Page</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage15(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/Search?search=Type%3AFeatured+Artist target=_parent>Featured Artists</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage16(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=cf15 target=_parent>WTCM Concert Page</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage17(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Venue target=_parent>MI Concert Venues</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage18(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/Show?_id=8e8c target=_parent>Star Tickets Plus</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage19(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/Show?_id=0ee9 target=_parent>TicketMaster</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage20(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_page.pl/Show?_id=songwars target=_parent>WTCM Song Wars</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage21(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_7.pl/Search?search=&paint=on&sort=DYNAMICZA&sort1=Date target=_parent>WTCM Photo Gallery</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage22(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=01ba target=_parent>Contests</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage23(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=cd1e target=_parent>Special Promotions</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage24(){
thisPage = "<a href=loyal_listener.html target=_parent>Loyal Listener Club</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage25(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=2757 target=_parent>WTCM on the Road</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage26(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Casino target=_parent>Casino Links</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage27(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Country target=_parent>Country Links</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage28(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Family%20Fun target=_parent>Family Fun Links</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage29(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Local%20Interest target=_parent>Local Links</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage30(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Movie%20Theater target=_parent>Movie Links</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage31(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Sports target=_parent>Sports Links</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage32(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/BrowseTree?field=Type&value=Syndicated%20Program target=_parent>Syndicated Programs</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage33(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=4b21 target=_parent>WTCM Local News</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage34(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/Show?_id=2112 target=_parent>ABC National News</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage35(){
thisPage = "<a href=local_weather.html target=_parent>WTCM Local Weather</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage36(){
thisPage = "<a href=national_weather.html target=_parent>NOAA National Weather</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage37(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_calendar/calendar.cgi target=_parent>Community Calendar</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage38(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=8692 target=_parent>Weekend Events</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage39(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=1147 target=_parent>Employment Opportunities</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage40(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_page.pl/Show?_id=eeoc target=_parent>EEOC Reports</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage41(){
thisPage = "<a href=http://northernwebservices.com/cgi-bin/wtcm-fm_page.pl/Show?_id=eas target=_parent>EAS Information</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function storePage42(){
thisPage = "<a href=contact_us.html target=_parent>Contact WTCM</a>";
var pageList = getCookie("pageList");
var linkFound = false;
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a] == thisPage) linkFound = true;
}
}
if (!linkFound) {
if (pageList == null || pageList == ";"){
pageList = thisPage
} else {
pageList += ";" + thisPage;
}
}
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",pageList,nextYear,"/wtcm-fm");
window.location.reload();
}

function removePage(url){
var pageList = getCookie("pageList");
var linkList = ""
// add each link to the linksList string and skip the one you want to remove
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";");
for (a=0;a<pSplit.length;a++) {
if (pSplit[a]!= url && pSplit[a]!= '') linkList += ";" + pSplit[a];
}
}

// get the cookie expiry date
var now = new Date();
var nextYear = new Date(now.getTime() + 1000 * 60 * 60 * 24 * 365);
setCookie("pageList",linkList,nextYear);
// refresh screen after link has been removed
window.location.reload();
}

function deleteLinks(){
var now = new Date();
var rightNow = new Date(now.getTime());
setCookie("pageList","",rightNow,"/wtcm-fm");
window.location.reload();
}


// code to write the list of urls to the page, and extra link to remove the url from the list.
function writeLinks(){
var pageList = getCookie("pageList")
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";")
for (a=0;a<pSplit.length;a++) {
if (pSplit[a]!= '' && pSplit[a]!= 'null') {
document.write("<b><a href=\"javascript:removePage('" + pSplit[a] + "')\" onmouseover=\"status='Click here to REMOVE This Link From Your Favorites List...';return true\" onmouseout=\"status='';return true\"><img src=minus.gif height=11 width=11 border=0 alt=\"Click here to REMOVE This Link From Your Favorites List...\" onmouseover=\"this.src='minus_on.gif',this.className='Hover'\" onmouseout=\"this.src='minus.gif'\" align=absmiddle hspace=4 vspace=4></a>" + pSplit[a] + "</b><br>");
}
}
document.write("<small><br>[<a href=\"javascript:deleteLinks()\">click here to delete \'em all</a>]</small>");
} else {
document.write("<b>Apparently you have no favs...</b><br><br>Select from the list on the right to add some!");
}
}

function homeLinks(){
var pageList = getCookie("pageList")
if (pageList!= "" && pageList!= null) {
pSplit = pageList.split(";")
for (a=0;a<pSplit.length;a++) {
if (pSplit[a]!= '' && pSplit[a]!= 'null') {
document.write("<li>" + pSplit[a] + "</li>");
}
}
} else {
document.write("<li><a href=songwars.html>WTCM Song Wars</a></li>");
document.write("<li><a href=http://northernwebservices.com/cgi-bin/wtcm-fm_4.pl/Show?_id=cf15>Concerts &amp; Venues</a></li>");
document.write("<li><font color=#ff3300>NEW!</font> <a href=http://northernwebservices.com/cgi-bin/wtcm-fm_1.pl/Search?search=Type%3AFeatured+Artist>Featured Artists</a></li>");
document.write("<li><a href=http://northernwebservices.com/cgi-bin/wtcm-fm_page.pl/Show?_id=morningshow>Jack O\'s Show Notes</a></li>");
document.write("<li><a href=http://northernwebservices.com/cgi-bin/wtcm-fm_7.pl/Search?search=&paint=on&sort=DYNAMICZA&sort1=Date>WTCM Photo Gallery</a></li>");
}
}