     
     //
     // Make sure page does not reside in another page's frame
     //
     if ( top.location != self.location ) {

          top.location = self.location 
     }

     // 
     //    CONSTANTS     
     //
     numDays     = 7;
     numMonths   = 12;             
     
     //  
     //   Function Definitions
     //   

     function CreateStringArray( size ) {
    
               this.length = size;  
               return this;
     }
     
     function CreateImageArray(size) 
     {
               this.length = size
               for (var i = 0; i<size; i++) {
                    this[i] = new Image()
               }
               return this
     }         
     
     var amonths  = new CreateStringArray( numMonths );
     var days     = new CreateStringArray( numDays );

     amonths[1]  = "January";    amonths[2]  = "February";  
     amonths[3]  = "March";      amonths[4]  = "April";  
     amonths[5]  = "May";         amonths[6]  = "June";
     amonths[7]  = "July";        amonths[8]  = "August";  
     amonths[9]  = "September";  amonths[10] = "October";  
     amonths[11] = "November";   amonths[12] = "December"; 
     
     days[1]  = "Sunday";    days[2]  = "Monday";  
     days[3]  = "Tuesday";   days[4]  = "Wednesday";  
     days[5]  = "Thursday";  days[6]  = "Friday";
     days[7]  = "Saturday";   
                                   
     function showDate( splitit ) {

          var  now = new Date();
          var   localYear = now.getYear();
          var splitdate = ", ";

          if ( splitit == 1 ) { splitdate =  "<br>"; }


          localYear = ( localYear <= 1000 ) ? localYear + 1900 : localYear;
     
               return days[now.getDay() + 1] + splitdate + amonths[now.getMonth() + 1] + " " + now.getDate() + 
                      ",  " + now.getFullYear() + "&nbsp;";

     }    
     
     function completeInit()
     {
          showTime();
     }
     
     function showTime() 
     {
          var now = new Date();
          var hr  = now.getHours();
          var min = now.getMinutes();
          var sec = now.getSeconds();
          var ampm = ( hr >= 12 ) ? " PM" : " AM";

          hr = ( hr >= 13 ) ? hr - 12 : hr;
          hr = ( hr == 0 ) ? 12 : hr;

          sec = ( sec < 10 ) ? "0" + sec : sec;
          min = ( min < 10 ) ? "0" + min : min;

          writeToDiv( "&nbsp;" + hr + ":" + min + ampm, 'timecell' );
          setTimeout( "showTime ()", 60000 );
     }
     
     function writeToDiv( text, id )
     {
          if (document.getElementById)
          {
               x = document.getElementById(id);
               x.innerHTML = '';
               x.innerHTML = text;
          }
          else if (document.all)
          {
               x = document.all[id];
               x.innerHTML = text;
          }
          else if (document.layers)
          {
               x = document.layers[id];
               text2 = '<P CLASS="testclass">' + text + '</P>;';
               x.document.open();
               x.document.write(text2);
               x.document.close();
          }
     }

     
     
     function setCookie(name, value, expires, path, domain, secure) {
       var curCookie = name + "=" + escape(value) +
           ((expires) ? "; expires=" + expires.toGMTString() : "") +
           ((path) ? "; path=" + path : "") +
           ((domain) ? "; domain=" + domain : "") +
           ((secure) ? "; secure" : "");
           
       document.cookie = curCookie;
     }              
     
     function getCookie(name) {
       var dc = document.cookie;
       var prefix = name + "=";
       var begin = dc.indexOf("; " + prefix);
       if (begin == -1) {
         begin = dc.indexOf(prefix);
         if (begin != 0) return null;
       } else
         begin += 2;
       var end = document.cookie.indexOf(";", begin);
       if (end == -1)
         end = dc.length;
       return unescape(dc.substring(begin + prefix.length, end));
     }    
     
     function deleteCookie(name, path, domain) {
       if (getCookie(name)) {
         document.cookie = name + "=" +
         ((path) ? "; path=" + path : "") +
         ((domain) ? "; domain=" + domain : "") +
         "; expires=Thu, 01-Jan-70 00:00:01 GMT";
       }
     }
     
	function setDivContent( obj )
	{	
		var divText = "";

		if ( obj.selectedIndex == ( obj.options.length - 1 ) )
		{
			divText = "<input type='text' name='othersubject' value=''>";
		}
		writeToDiv( divText, 'othersubject' );

	}
	
	function validateContactForm( form, src )
	{
		 var noemail;
		 
		 if ( fieldIsBlank( form.sender )  )
		 {
		  alert( "Please enter sender's name." )
		  form.sender.focus();
		  return false;
		 }
	
		 if ( fieldIsBlank( form.from_email )  )
		 {
		  noemail =  confirm( "You did not enter the sender's email address\nDo you wish to continue without it? Ok = Yes, Cancel = No." );
		  
		  if ( ! noemail ) {	  
			return false;
		  }
		 }
		 else {
			if ( ! emailIsValid( form.from_email ) )
				return false;
		 }
	
		 if ( src == 'S' && form._rcptID.selectedIndex == 0 ) {
				alert( "Please make a selection for receipient of email." )
			form._rcptID.focus();
			return false;
		 }
	
		 if (  src != 'F' && form.subject.selectedIndex == 0 ) {
				alert( "Please select subject of email." )
			form.subject.focus();
			return false;
		 }
		 
		 if ( fieldIsBlank( form.message )  )
		 {
		  alert( "Message is blank, please enter email message." )
		  form.message.focus();
		  return false;
		 }
		 
		 return true;
	}
	
	function submitForm( form, action, src )
	{		
		if ( validateContactForm( document.forms[form], src ) )
		{	
			document.forms[form].action = action;
			document.forms[form].submit();
		}
	}
	
	function resetForm( form )
	{
		document.forms[form].reset();
	}