// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// MAG99_evt.js
// Copyright 2010  Maggie's Attic of Florida. All rights reserved.
//
//
//
SEVNTS = ""
aN = /AAAAAA/
iN = /NNNNNN/
sR = /SSSSSS/
hH = /HHHHHH/
seBT = "<table cellpadding='0' cellspacing='0' border='0'>"
seET = "</table>"
seIF = "<tr><td><a name='AAAAAA'>&nbsp;</a><iframe name='NNNNNN' src='SSSSSS.htm' width='690' height='HHHHHH' align='left' frameborder='0' marginwidth='0' marginheight='0' scrolling='no'></iframe></td></tr>"
seIT = ""
// format:
//   start date/end date/iFrame source file(htm)/iFrame hieght necessary(width is fixed)/bookmark anchoe name/
SEV = new Array(
"99999999/xxxxxxxx/iEventxx/Hxxx/xxxxxxxxxxxx/", // Bluff item
"00000000/20100610/iEvent08/H560/earthday/", // Expires on 06/10/2010
"00000000/20100513/iEvent09/H670/md-sushi/",  // Expires on 05/13/2010
"20100722/20100804/iEvent10/H999/samhouse/"  // Expires on 09/04/2010
)
//
function buildSEV(){ymdNow(); SEVNTS = ""; seIT = ""; buld = 0;
                    Eitms = SEV.length; kk = 1;
                    while(kk < Eitms){
                    if(SEV[kk].substr(0,8) <= yrmodaNow &&  SEV[kk].substr(9,8) >= yrmodaNow){seIT = seIF;
                    seIT = seIT.replace(aN, SEV[kk].substr(32));                    // establish anchor name
                    seIT = seIT.replace(iN, "evnt".concat(SEV[kk].substr(24,2)));   // establish iFrame name
                    seIT = seIT.replace(sR, SEV[kk].substr(18,8));                  // establish iFrame source
                    seIT = seIT.replace(hH, SEV[kk].substr(28,3));                  // establish necessary iFrame height
                    buld = buld + 1;
                    SEVNTS = SEVNTS.concat(seIT)};
                    kk++;}
                    if(buld > 0){SEVNTS = seBT.concat(SEVNTS);
                                 SEVNTS = SEVNTS.concat(seET);
                                 document.getElementById("SEdsply").innerHTML = SEVNTS;}
                    return}
//
//
function ymdNow(){YMDNow = new Date(); yrmodaNow = "";
                   daNow = YMDNow.getDate().toString();
                   if(daNow.length == 1){daNow = "0".concat(daNow)};
                   moNow = (YMDNow.getMonth() + 1).toString();
                   if(moNow.length == 1){moNow = "0".concat(moNow)};
                   yrNow = YMDNow.getYear().toString(); if(YMDNow.getYear() < 200){yrNow = (YMDNow.getYear() + 1900).toString()};
                   yrmodaNow = (yrNow.concat(moNow.concat(daNow)))}
//
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^