// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// SRC="MAG_global.js"
// Application: maggiesattic.us
//
// Copyright 2007-2010, brymar.net - All rights reserved.
// Copyright 2007-2010  Maggie's Attic of Florida. All rights reserved.
//
avWdth = screen.availWidth; if(!avWdth){avWdth = 800}
popOK = 0; isIE = 0; isNS = 0; isOP = 0;
if(navigator.appName == "Microsoft Internet Explorer"){
isIE = 1; if(navigator.appVersion.charAt(0) >= 4){popOK = 1}};
if(navigator.appName == "Netscape"){
isNS = 1; if(navigator.appVersion.charAt(0) >= 5){popOK = 1}};
if(navigator.appName == "Opera"){
isOP = 1; if(navigator.appVersion.charAt(0) >= 9){popOK = 1}};
//
//
function GoLink(webPage){window.open(webPage)}
function goWMF(){window.open("http://brymar.net/WMSTR/WMF_feedbk.htm", "", "status")}
function goWM(){window.open("http://brymar.net/WM_email.htm", "", "status")}
function LinkClsGo(webPage){window.open(webPage); window.close();}
function pgPrint(){window.print()}
function pgClose(){window.close()}
function pgPrintCls(){window.print(); window.close()}
function goBackDelay(retrn){gotopg = retrn; setTimeout("document.location = gotopg", 1800)}
// function goBackDelay(retrn){setTimeout("parent.location = retrn", 1500)}
function GoStore(){window.open("http://shop.maggiesattic.us")}
//  https://ssl207.chi.us.siteprotect.com/maggiesattic.us/merchantmanager/admin/login.php
function splash(splashit){document.getElementById(splashit).style.display = "inline";
                          SplashIntrv = setInterval("closeSplash('splashPOP')", 7200)}
function closeSplash(splashit){document.getElementById(splashit).style.display = 'none'}
function imgV(imgElem){document.getElementById(imgElem).style.display = "inline"}
function imgH(imgElem){document.getElementById(imgElem).style.display = "none"}
//
function menuV(menuElem){if(popOK){
document.getElementById(menuElem).style.display = "inline"}}
function menuH(menuElem){if(popOK){
document.getElementById(menuElem).style.display = "none"}}
//
//
//function iSide(){sbarPix.location = "iSbar.htm"}
//
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
dowList = new Array(7)
dowList[0] = "Sunday"
dowList[1] = "Monday"
dowList[2] = "Tuesday"
dowList[3] = "Wednesday"
dowList[4] = "Thursday"
dowList[5] = "Friday"
dowList[6] = "Saturday"
//
function dateNow(){dateNow = new Date();
                   daNow = dateNow.getDate().toString().concat("-");
                   moNow = (dateNow.getMonth() + 1).toString().concat("-");
                   yrNow = dateNow.getYear().toString();
                   if(dateNow.getYear() < 200){
                   yrNow = (dateNow.getYear() + 1900).toString()};
                   dowNow = dowList[dateNow.getDay()].concat("&nbsp;&nbsp;");
                   dowmdyNow = (dowNow.concat(moNow.concat(daNow))).concat(yrNow)}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
//
dd = "maggiesattic"
tt = "us"
ss = ""
nnList = new Array(6)
nnList[0] = "webmaster"
nnList[1] = "stephanie"
nnList[2] = "terry"
nnList[3] = "jerome"
nnList[4] = "cellarmaster"
nnList[5] = "clubs"
//
function sendTo(thisObj, nn, subj){ss = "";  realThing = thisObj.href;
                             if(subj){ss = "?subject=" + subj};
                             thisObj.href = "mailto:" +nnList[nn] + "@" + dd + "." + tt + ss;
                             return true}
// -----------------------------------------------------------------------------------
//
stSite = "From Maggie's Link:"   // set to name of the site
stHide = "z5@9f"
stLevel = new Array()
stLevel[0] = "xxx"
stLevel[1] = "com"
stLevel[2] = "us"
stLevel[3] = "org"
stLevel[4] = "biz"
stLevel[5] = "net"
stWho = new Array()
stWho[0] = "rofnicisabz"
stWho[1] = "5allirebldk"
stWho[2] = "qocihsusarodtms"
stWho[3] = "ggnivilyhtlaeh47"
stWho[4] = "120yllohybsemohp"
stWho[5] = "zyriqni9"
stWho[6] = "yttocstz"
stWho[7] = "qnebttobbah"
stWho[8] = "3erahsepicerx"
stDN = new Array()
stDN[0] = "??????????"
stDN[1] = "yahoo"
stDN[2] = "comcast"
stDN[3] = "aol"
stDN[4] = "beachrentalsofdaytona"
stDN[5] = "embarqmail"
stDN[6] = "tscottwalker"
stDN[7] = "ymail"
stDN[8] = "maggiesattic"
function stIsto(Ann)
               {stAt = stHide.substr(2, 1);
                ln = stWho[Ann].length - 1; k = ln;
                stWhois = ""; wkWho = stWho[Ann].substr(1, ln-1);
                while(k > -1){stWhois = stWhois.concat(wkWho.substr(k, 1)); k=k-1;};
                }
function AnySendTo(thisObj, stL, stW, stD, stS)
         {ss = "";  realThing = thisObj.href;
          if(stS == ""){stS = stSite};
          ss = "?subject=" + stS;
          stIsto(stW);
          thisObj.href = "mailto:" + stWhois + stAt + stDN[stD] + "." + stLevel[stL] + ss;
          return true}
// ---------------------------------------------------------------------------------------
//      iContact E-mail sign-up form validation.
//
function verifyRequired(signup) {
  if (!signup.fields_email.value){
      alert("The E-mail field is required.");
      signup.fields_email.focus();
      return false;}
  val_emSignUP(signup.fields_email.value);
  if (errEM == 1){
      alert("The E-mail address appears invalid, please re-enter.");
      signup.fields_email.focus();
      return false;}
  if (!signup.fields_fname.value) {
      alert("The First Name field is required.");
      signup.fields_fname.focus();
      return false;}
  if (!signup.fields_lname.value) {
      signup.fields_lname.focus();
      alert("The Last Name field is required.");
      return false;}
      return true;}
function val_emSignUP(ckaddr){
                      badStuff = " /:,;"; i=0; errEM=0;
                      while(i < badStuff.length){badChar = badStuff.charAt(i); i++;
                      if(ckaddr.indexOf(badChar) > -1){errEM = 1; return }};
                      at = ckaddr.indexOf("@", 1); if(at <= 0){errEM = 1; return };
                      dot = ckaddr.indexOf(".", at); if(dot < 0){errEM = 1; return };
                      ln = ckaddr.length; if(dot == ln - 2){errEM = 1;  return };
                      return}
// ----------------------------------------------------------------------------------------
//