//////////////////////////////////////////
//        filename: cms-scripts.js      //
//        digital.watersgulch.com       //
//          rik nilsson 09/04           //
//////////////////////////////////////////


/* Browser detection; assume ver. 5+, handle others by exception. */

 isNav4 = ((navigator.appName == "Netscape") 
           && (parseInt(navigator.appVersion) <= 4)) ? 1 : 0;
 isIE6 = (navigator.userAgent.indexOf("MSIE 6") >= 0) ? 1 : 0;
 
 // returns a date string of the form yyyy-mm-dd,
 // length is always the same - 10 chars
 function setDate()
 {
    // to call, use: document.form_one.field.value = setDate();
    pdy=new Date();       // today
    dy=''+pdy.getDate();     // get day forced to be string
    if (dy.length < 2)
      { dy='0'+dy; }
    mo=''+(pdy.getMonth()+1);  // present month (Jan=0)
    if (mo.length < 2)
      { mo='0'+mo; }
    yr=pdy.getYear();     // present year (-1900)
    if (!document.all)
      { yr+=1900;  }           // adjust for Netscape/Moz
    tdate=yr+"-"+mo+"-"+dy;
    return tdate;
} // end setDate

/* function to open a new window with content */
function createWindow(cUrl,cName,cFeatures)
{
  newWin = window.open(cUrl,cName,cFeatures);
} // end createWindow

/* function to open a new window for Mini */
function showMini()
{
  minWin = window.open("images/Mini.jpg","Mini","menubar=no, resizable=yes, height=710, width=350, scrollbars=yes");
} // end createWindow
