if (document.images) {
   // describe exchange
   btn1_exc = new Image();
   btn1_exc.src = '/images/menu/btn1_exc.jpg';

   btn2_exc = new Image();
   btn2_exc.src = '/images/menu/btn2_exc.jpg';

   btn3_exc = new Image();
   btn3_exc.src = '/images/menu/btn3_exc.jpg';

   btn4_exc = new Image();
   btn4_exc.src = '/images/menu/btn4_exc.jpg';

   btn5_exc = new Image();
   btn5_exc.src = '/images/menu/btn5_exc.jpg';

   btn6_exc = new Image();
   btn6_exc.src = '/images/menu/btn6_exc.jpg';

   btn7_exc = new Image();
   btn7_exc.src = '/images/menu/btn7_exc.jpg';
}

// when mouse over buttons
function img_exc(imgName) {
   if (document.images) {
      document['exc'].src = eval(imgName + 'exc.src');
   }
}

// when mouse not over buttons
function img_noexc(imgName,orgImg) {
   if (document.images) {
      document['exc'].src = orgImg;
   }
}

function isMac() {
   return (navigator.appVersion.indexOf('Mac') != -1);
}

function loadSearchForm(findVal) {
   if(findVal == 1)
      document.search.keyword.focus();
}

function checkKeyword() {
   if(document.search.keyword.value.length == 0) {
      alert('You Must Provide Search Criteria...');
      document.search.keyword.focus();
   }
   else
      document.search.submit();
}

function bannerLink(id) {
   var szURL = '/common/clickthru.asp?id=' + id;
   mainWin = window.open(szURL,'mainWin',
                         'menubar=0,status=1,toolbar=0,location=0,directories=0,scrollbars=1,width=680,height=520,resizable=0');
   mainWin.opener = self;
}

function viewLink(sURL) {
   viewWin = window.open(sURL,'viewWin',
                         'menubar=0,status=1,toolbar=0,location=0,directories=0,scrollbars=1,width=680,height=520,resizable=0');
   viewWin.opener = self;
}

function viewMenu(ndx1,ndx2,ndx3) {
   var sURL = '/default.asp?id1=' + ndx1 + '&id2=' + ndx2 + '&id=' + ndx3;
   location.href = sURL;
}

function viewConsole(sURL) {
   viewWisdom = window.open(sURL,'viewWisdom',
                           'menubar=0,status=1,toolbar=1,location=1,directories=0,scrollbars=1,width=840,height=680,resizable=1');
   viewWisdom.opener = self;
}

function viewTwitter() {
   var sURL = '/common/twitter.asp';
   viewTweets = window.open(sURL,'viewTweets',
                           'menubar=0,status=0,toolbar=0,location=0,directories=0,scrollbars=1,width=600,height=320,resizable=0');
   viewTweets.opener = self;
}

function showCase(ndx) {
   var sURL;
   switch(ndx) {
      case 1:
         sURL = '/showcase/openhouse.asp';
         break;

      case 2:
         sURL = '/showcase/showcase.asp';
         break;
   }
   viewShow = window.open(sURL,'viewShow',
                          'menubar=0,status=1,toolbar=1,location=1,directories=0,scrollbars=1,width=840,height=650,resizable=1');
   viewShow.opener = self;
}

function viewMap() {
   sURL = 'http://maps.google.com?q=11812+Eton+Manor+Drive+Germantown+MD+20876';
   mapWin = window.open (sURL,'mapWin',
                         'scrollbars=1,width=760,height=610');

   if(mapWin.opener == null)
      mapWin.opener = self;
}

