<!--
var win;
var domain = "drralphstanley.com";
var special;

function openURI(site) {

   win = window.open(site, "extwin");
   win.focus();
}

function sendemail(name, subj)
{
   window.open("mailto:" + name + "@" + domain + "?subject=" + subj);
}

function confirmSubscription()
{
   var address = new String();

   address = window.prompt( "Please enter your email address", "" );
   if ( address ) {
      document.verify.address.value = address;
      return( true );
   }
   return( false );
}

//
// Initialize the form with the URL query parameters provided
//
function getparam( param ) {

   var loc = new String( document.location + "" );
   var value = 0;

   //
   // http://domain.com/page.html?param1=value1&param2=value2&param3=value3
   //
   pstart = loc.indexOf( param );
   if ( pstart != -1 ) {
      vstart = loc.indexOf( "=", pstart ) + 1;
      if ( vstart != -1) {
         vend = loc.indexOf( "&", vstart );
         if (vend == -1) vend = loc.length;
         value = loc.slice( vstart, vend );
      }
   }
   return ( value );
}

//
// Open special notice page with dated material
//
function special( page, startdate, enddate )
{
   var today = new Date();
   var StartDate = new Date( startdate );
   var EndDate = new Date( enddate );

//   alert( "Current date is " + today.getTime() + "\nStart is " + StartDate.getTime() + "\nEnd is " + EndDate.getTime() );
   if ( page ) {
//   alert( "Popup page is " + page );
      if ( StartDate.getTime() <= today.getTime() && EndDate.getTime() >= today.getTime() ) {
         special = window.open( page, "special", "height=590px,width=820px,location=no,menubar=no,resizable=no,scrollbars=yes" )
         special.focus();
//       alert( "Popup page " + page + " is displayed");
//      } else
//      {
//         alert( "Start or end date is not in range" );
      }
   }
}

//
// PerlShop Init Function
// Sets the original referrer page for store exit
//
function PerlShopInit()
{
   var loc = new String( document.location );
   var qindex = loc.indexOf( "?" );

   if ( loc.indexOf( "?" ) == -1 )
   {
      document.store.RETURNPAGE.value = loc;
   } else
   {
      document.store.RETURNPAGE.value = loc.substring( 0, qindex );
   }
}

// -->