Public Class Error

I'm working on this script to make a day and night time system for our game. The problem is I get these errors in Unity's console "Assets/TimeOfDay.js(38,1): BCE0043: Unexpected token: public. " "Assets/TimeOfDay.js(38,18): BCE0043: Unexpected token: (. "

after each of my classes. Also I wanted to know what the best program is to edit scripts with . I tried setting Eclipse up with Unity but I got errors every time i coded with it. Also there was no syntex highlighting for Untitys JavaScript.

why does this site keep taking my classes out of the code?

/////////////////////////////////////////////////////////////////////////////
///
///     This script will get time and set light status to day or night
///         By Jared .S Chase 
///                 1/14/2011
///
/////////////////////////////////////////////////////////////////////////////

function Update () 
{
    var timeAccelerator = 3.0; // for now this is set to 3 until we extract user input from the settings / config menu 
    var gameTime = Time.Time;  // Time.Time returns time since you started playing. 
    var acceleratedTime = gameTime * timeAccelerator;   

    if( acceleratedTime <= 4 ) 
    {
        Dawn() ; // set dawn class for time and height settings
    }else if( acceleratedTime > 4 && acceleratedTime < 8 ) 
    {
        Morning(); // set morning class for time and light settings 
    }else if ( acceleratedTime > 8 && acceleratedTime < 12 ) 
    {
        Noon(); // set morning class for time and light settings 
    }else if ( acceleratedTime > 12 && acceleratedTime < 16 )
    {
        AfterNoon(); // set the after noon class for time  and height
    }else if ( acceleratedTime > 16 && acceleratedTime < 20 )
    {
        Evening(); // set the Evening class for time and hieght 
    }else if ( acceleratedTime > 20 && acceleratedTime <= 24 )
    {
        Night();  // set the Night class for time and height 
    }
} 

// Create our classes for each time of day 

public class Dawn()
{
}

public class Morning()
{
}

public class Noon()
{
}

public class AfterNoon()
{
}

public class Evening()
{
}

public class Night()
{
}

You don't seem to be using your classes correctly. You don't just call `Dawn()`. Dawn is a class, not a method and you aren't doing anything by just saying `Dawn()` so nothing will happen when you say that.

It looks like you actually want to use functions instead:

function Dawn () {
     //Change your lighting and stuff.
}

or you could use an enum and a switch statement.