protected override void OnRender(ScriptWriter writer, bool multiLine, bool startOnNewLine)
        {
            string start = String.Empty;
            string end = String.Empty;

            if (Before != null)
            {
                if (startOnNewLine && multiLine && this.Count != 0)
                    writer.WriteNewLineAndIndent();

                writer.Write(Before);
                writer.BeginIndent();
            }

            if (startOnNewLine && multiLine && !this.IsNothing())
                writer.WriteNewLineAndIndent();


            bool first = true;

			foreach (object line in GetRenderList())
            {
                if (line != null)
                {
                    if (line is IScriptItem)
                    {
                        if (!((IScriptItem)line).IsNothing())
                        {
                            if (first)
                                first = false;
                            else
                            {
								if (writer is JsScriptWriter && ((JsScriptWriter)writer).Condensed && this.SeperatorCondensed != null)
                                    writer.Write(this.SeperatorCondensed);
                                else
                                    writer.Write(this.Seperator);

                                if (multiLine)
                                    writer.WriteNewLineAndIndent();

 
                            }

                            ((IScriptItem)line).Render(writer);
                        }
                    }
                    else
                    {
                        if (first)
                            first = false;
                        else
                        {
							if (writer is JsScriptWriter && ((JsScriptWriter)writer).Condensed && this.SeperatorCondensed != null)
                                writer.Write(this.SeperatorCondensed);
                            else
                                writer.Write(this.Seperator);

                            if (multiLine)
                                writer.WriteNewLineAndIndent();
                        }

                        writer.Write(JsScriptWriter.JsFormat(line));
                    }
                }
            }

            if (Before != null)
            {
                writer.EndIndent();

                if (multiLine && this.Count != 0)
                    writer.WriteNewLineAndIndent();

                writer.Write(After);
            }

        }
        public void Render(ScriptWriter writer, int indents, bool? multiLine, bool? startOnNewLine)
        {
            bool realMultiLine = multiLine == null ? MultiLine : (bool)multiLine;
            bool realStartOnNewLine = startOnNewLine == null ? StartOnNewLine : (bool)startOnNewLine;

            if (realMultiLine) // don't indent if not multiline
            {
                writer.BeginIndent(Indents + indents);

                OnRender(writer, realMultiLine, realStartOnNewLine);

                writer.EndIndent(Indents + indents);
            }
            else
            {
                OnRender(writer, realMultiLine, realStartOnNewLine);
            }
        }