/**
 * SyntaxHighlighter
 * http://alexgorbatchev.com/
 *
 * SyntaxHighlighter is donationware. If you are using it, please donate.
 * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
 *
 * @version
 * 2.0.320 (May 03 2009)
 * 
 * @copyright
 * Copyright (C) 2004-2009 Alex Gorbatchev.
 *
 * @license
 * This file is part of SyntaxHighlighter.
 * 
 * SyntaxHighlighter is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * SyntaxHighlighter is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with SyntaxHighlighter.  If not, see <http://www.gnu.org/copyleft/lesser.html>.
 */
SyntaxHighlighter.brushes.JScript = function()
{
	var keywords =	'break case catch continue ' +
					'default delete do else false  ' +
					'for function if in instanceof ' +
					'new null return super switch ' +
					'this throw true try typeof var while with'
					;
					
	var objects  =  'window document history Date Array Regex String Boolean Math Number Object'
					;
					
	var methods  =  'alert confirm prompt anchor big blink bold charAt charCodeAt concat ' +
					'fixed fontcolor fontsize fromCharCode indexOf italics lastIndexOf link ' +
					'match replace search slice small split strike sub substr substring sup '+
					'toLowerCase toUpperCase toSource valueOf write concat join pop push '+
					'reverse shift slice sort splice toSource toString unshift valueOf ' +
					'getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth '+
					'getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCMonth '+
					'getUTCFullYear getUTCHours getUTCMinutes getUTCSeconds getUTCMilliseconds '+
					'getYear parse setDate setFullYear setHours setMilliseconds setMinutes '+
					'setMonth setSeconds setTime setUTCDate setUTCMonth setUTCFullYear setUTCHours '+
					'setUTCMinutes setUTCSeconds setUTCMilliseconds setYear toDateString toGMTString '+
					'toLocaleDateString toLocaleTimeString toLocaleString toTimeString toUTCString '+
					'UTC abs acos asin atan atan2 ceil cos exp floor log max min pow random round '+
					'sin sqrt tan toExponential toFixed toPrecision compile exec test '+
					'decodeURI decodeURIComponent encodeURI encodeURIComponent escape eval '
					'isFinite isNaN parseFloat parseInt unescape'
					;
	var properties = 'length constructor prototype global ignoreCase input lastIndex lastMatch ' +
					'lastParen leftContext multiline rightContext source Infinity NaN undefined '+
					'E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2 ' +
					'MAX_VALUE MIN_VALUE NEGATIVE_INFINITY POSITIVE_INFINITY'
					;
	
	this.regexList = [
		{ regex: SyntaxHighlighter.regexLib.singleLineCComments,	css: 'preprocessor' },	// one line comments
		{ regex: SyntaxHighlighter.regexLib.multiLineCComments,		css: 'preprocessor' },	// multiline comments
		{ regex: SyntaxHighlighter.regexLib.doubleQuotedString,		css: 'string' },		// double quoted strings
		{ regex: SyntaxHighlighter.regexLib.singleQuotedString,		css: 'string' },		// single quoted strings
		{ regex: /\s*#.*/gm,										css: 'comment' },		// preprocessor tags like #region and #endregion
		{ regex: new RegExp(this.getKeywords(keywords), 'gm'),		css: 'keyword' },		// keywords
		{ regex: new RegExp(this.getKeywords(objects), 'gm'),		css: 'color2' },		// objects
		{ regex: new RegExp(this.getKeywords(methods), 'gm'),		css: 'color3' },		// methods
		{ regex: new RegExp(this.getKeywords(properties), 'gm'),	css: 'variable' }		// objects properties
		];
	
	this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
};

SyntaxHighlighter.brushes.JScript.prototype	= new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.JScript.aliases	= ['js', 'jscript', 'javascript'];

