var i, maxElements;
var zEl = new Array(28);		// niz sa elementima i kom setu koji pripada
					// setovi: 0=basic, 1=advanced, 9=complete
					// tipovi: 0=name, 1=http-equiv
					// form-tipovi: 0=Pre-selected and other, 1=single input, 2=single input area, 3=double input, 4=tag is always

var zPre = new Array(28);

zPre[0]="General#Administration#Build a living#Culture#Economics#Education#Environment#Erotic Sexual#Industry#Media#Medicine#Play#Politics#Religion#Research & Development#Science#Service#Society#Sport#Travel & Tourism";
zPre[1]="General#Adult#Advanced#Beginner#Children#Everything#Expert#Fan#Men#Professional#Pupil#Student#Women#Young";
zPre[3]="US-ASCII#BIG5#EUC-KR#GB2312#HZ-GB-2312#ISO-2022-JP#ISO-2022-JP-2#ISO-2022-KR#ISO-8859-1#ISO-8859-2#ISO-8859-3#ISO-8859-4#ISO-8859-5#ISO-8859-6#ISO-8859-7#ISO-8859-8#ISO-8859-9#JIS_X0208#KOI8-R#SHIFT_JIS#other";
zPre[4]="English US#English UK#French#German#Italian#Spanish#other";

var zStandardForPreSelected = 'If anything typed in the field \"Other\", will override the pre-selected choice.';

for (i=0; i<zEl.length; i++) {
	zEl[i] = new Array(6);
}

// *DESCRIPTION*		*SET*		*TAG*				*TYPE*		*FORM-TYPE*	*LONG DESCRIPTION*

zEl[0][0]='Area'; 		zEl[0][1]=2;	zEl[0][2]='AREA';		zEl[0][3]=0;	zEl[0][4]=0;	zEl[0][5]='';
zEl[1][0]='Audience'; 		zEl[1][1]=2;	zEl[1][2]='AUDIENCE';		zEl[1][3]=1;	zEl[1][4]=0;	zEl[1][5]='';
zEl[2][0]='Author'; 		zEl[2][1]=1;	zEl[2][2]='AUTHOR';		zEl[2][3]=0;	zEl[2][4]=1;	zEl[2][5]='Search engine information about the author of the site.';
zEl[3][0]='Character Set'; 	zEl[3][1]=2;	zEl[3][2]='CHARSET';		zEl[3][3]=1;	zEl[3][4]=0;	zEl[3][5]='';
zEl[4][0]='Content-Language';	zEl[4][1]=1;	zEl[4][2]='Content-Language';	zEl[4][3]=1;	zEl[4][4]=0;	zEl[4][5]='<b><i>See also the Language Tag.</i></b>';
zEl[5][0]='Contributors'; 	zEl[5][1]=2;	zEl[5][2]='CONTRIBUTORS';	zEl[5][3]=0;	zEl[5][4]=1;	zEl[5][5]='Names of the web-page contributors.';
zEl[6][0]='Copyright'; 		zEl[6][1]=1;	zEl[6][2]='COPYRIGHT';		zEl[6][3]=0;	zEl[6][4]=1;	zEl[6][5]='Copyright (C) - name and year.';
zEl[7][0]='Creator'; 		zEl[7][1]=1;	zEl[7][2]='CREATOR';		zEl[7][3]=0;	zEl[7][4]=1;	zEl[7][5]='Name of the site creator.';
zEl[8][0]='Description'; 	zEl[8][1]=0;	zEl[8][2]='DESCRIPTION';	zEl[8][3]=0;	zEl[8][4]=2;	zEl[8][5]='This gives description of the page content to search engines. Both <i>Description</i> and <i>Abstract</i> should be created, for compatibility reasons.';
zEl[9][0]='Abstract'; 		zEl[9][1]=0;	zEl[9][2]='ABSTRACT';		zEl[9][3]=0;	zEl[9][4]=2;	zEl[9][5]='This gives description of the page content to search engines. Both <i>Description</i> and <i>Abstract</i> should be created, for compatibility reasons.';
zEl[10][0]='Expires'; 		zEl[10][1]=1;	zEl[10][2]='EXPIRES';		zEl[10][3]=0;	zEl[10][4]=1;	zEl[10][5]='Expiration date of the site.<br>Please follow this format: #Fri, 01 Jan 2002 07:20:55 GMT';
zEl[11][0]='Refresh'; 		zEl[11][1]=1;	zEl[11][2]='REFRESH';		zEl[11][3]=0;	zEl[11][4]=1;	zEl[11][5]='Client-pull forced page refresh. Number of seconds between refresh.';
zEl[12][0]='Refresh-Relocation';zEl[12][1]=1;	zEl[12][2]='REFRESH';		zEl[12][3]=0;	zEl[12][4]=3;	zEl[12][5]='Client-pull forced page refresh, with page-redirection.<br>First value: numeric (number of seconds)<br>Second value: URL.#Seconds before relocation:#Relocation URL:';	
zEl[13][0]='Formatter'; 	zEl[13][1]=2;	zEl[13][2]='FORMATTER';		zEl[13][3]=0;	zEl[13][4]=1;	zEl[13][5]='Formatter of the page.';
zEl[14][0]='Generator'; 	zEl[14][1]=1;	zEl[14][2]='GENERATOR';		zEl[14][3]=0;	zEl[14][4]=1;	zEl[14][5]='Name of the tool used to create web-page and tags.#www.zoran.net - free online page-making tools';
zEl[15][0]='Keywords'; 		zEl[15][1]=0;	zEl[15][2]='KEYWORDS';		zEl[15][3]=0;	zEl[15][4]=2;	zEl[15][5]='Keywords search engine will look for and index when visiting your page. Should be comma-separated.';
zEl[16][0]='Language'; 		zEl[16][1]=1;	zEl[16][2]='LANGUAGE';		zEl[16][3]=1;	zEl[16][4]=0;	zEl[16][5]='Language used. See also <i>Content-Language</i> tag. ';
zEl[17][0]='Dialect'; 		zEl[17][1]=1;	zEl[17][2]='DIALECT';		zEl[17][3]=1;	zEl[17][4]=0;	zEl[17][5]='Dialect used. ';
zEl[18][0]='No-Cache'; 		zEl[18][1]=0;	zEl[18][2]='Pragma';		zEl[18][3]=1;	zEl[18][4]=4;	zEl[18][5]='Tell browsers not to cache this page. #META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\"';
zEl[19][0]='Owner'; 		zEl[19][1]=1;	zEl[19][2]='OWNER';		zEl[19][3]=0;	zEl[19][4]=1;	zEl[19][5]='<b>E-Mail address</b> of the page owner.#owner@mailserver.com';
zEl[20][0]='Place name'; 	zEl[20][1]=2;	zEl[20][2]='PLACENAME';		zEl[20][3]=0;	zEl[20][4]=1;	zEl[20][5]='Place-name of the web-page.';
zEl[21][0]='Publisher'; 	zEl[21][1]=1;	zEl[21][2]='PUBLISHER';		zEl[21][3]=0;	zEl[21][4]=1;	zEl[21][5]='Publisher of the web-page.';
zEl[22][0]='Rating'; 		zEl[22][1]=2;	zEl[22][2]='RATING';		zEl[22][3]=0;	zEl[22][4]=0;	zEl[22][5]='Rating of the web-page. ';
zEl[23][0]='Revisit-After'; 	zEl[23][1]=1;	zEl[23][2]='revisit-after';	zEl[23][3]=0;	zEl[23][4]=1;	zEl[23][5]='After <b>how many days</b> should the search-engine revisit your page.';
zEl[24][0]='Robots Follow & Index'; zEl[24][1]=1; zEl[24][2]='ROBOT';		zEl[24][3]=0;	zEl[24][4]=0;	zEl[24][5]='<b>Robot Action.</b> What should robot do when visiting your page?';
zEl[25][0]='Subject'; 		zEl[25][1]=0;	zEl[25][2]='SUBJECT';		zEl[25][3]=0;	zEl[25][4]=1;	zEl[25][5]='Subject of the page.';
zEl[26][0]='Title'; 		zEl[26][1]=0;	zEl[26][2]='TITLE';		zEl[26][3]=0;	zEl[26][4]=1;	zEl[26][5]='Title of the page.';
zEl[27][0]='Window-Target'; 	zEl[27][1]=1;	zEl[27][2]='Window-target';	zEl[27][3]=1;	zEl[27][4]=4;	zEl[27][5]='<i><b>Window Target</b></i> or <i><b>Forced out of frames</b></i> special tag.#META HTTP-EQUIV=\"Window-target\" CONTENT=\"_top\"';



function zTrim(inStr) {
	if (!arguments.length) inStr = this; // if called as a method
	var val = "" + inStr.toString();
	if (val == "" || val == "undefined") return "";

	var words = val.split(" ");
	var text = "";
	for (var i=0; i < words.length; i++)
		if (words[i] != "") text += " " + words[i];
		text = text.substring(1); // drop the leading space...
		return text;

	var val = "" + this.toString() ; // alternative using regular expressions
	val = val.replace(/^[\s]+/g,''); // leading whitespace -> null
	val = val.replace(/[\s]+$/g,''); // trailing whitespace -> null
	val = val.replace(/[\s]{2,}/g,' '); //multiple whitespace -> space
	return val;
}

