Index: /FCKeditor/trunk/_test/manual/fcktoolbar/test1.html
===================================================================
--- /FCKeditor/trunk/_test/manual/fcktoolbar/test1.html	(revision 74)
+++ /FCKeditor/trunk/_test/manual/fcktoolbar/test1.html	(revision 75)
@@ -62,13 +62,13 @@
 	oToolbar.Create( target ) ;
 	
-	var oToolbar = CreateNewToolbar() ;
+	var oToolbar2 = CreateNewToolbar() ;
 	
 	// Add a few buttons.
-	oToolbar.AddButton( 'Search'	, null, null			, 2, FCK_TOOLBARITEM_ICONTEXT ) ;
-	oToolbar.AddSeparator() ;
-	oToolbar.AddButton( 'Previous'	, null, null			, 3 ) ;
-	oToolbar.AddButton( 'Next'		, null, null			, 1 ) ;
+	oToolbar2.AddButton( 'Search'	, null, null			, 2, FCK_TOOLBARITEM_ICONTEXT ) ;
+	oToolbar2.AddSeparator() ;
+	oToolbar2.AddButton( 'Previous'	, null, null			, 3 ) ;
+	oToolbar2.AddButton( 'Next'		, null, null			, 1 ) ;
 	
-	oToolbar.Create( target ) ;
+	oToolbar2.Create( target ) ;
 }
 
Index: /FCKeditor/trunk/editor/_source/classes/fckdomrange.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckdomrange.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/classes/fckdomrange.js	(revision 75)
@@ -141,6 +141,4 @@
 	CheckEndOfBlock : function()
 	{
-		var bIsEndOfBlock = false ;
-
 		// Create a clone of the current range.
 		var oTestRange = this.Clone() ;
@@ -291,4 +289,6 @@
 	Expand : function( unit )
 	{
+		var oNode, oSibling ;
+
 		switch ( unit )
 		{
@@ -299,5 +299,5 @@
 				{
 					// Get the start node for the current range.
-					var oNode = this._Range.startContainer ;
+					oNode = this._Range.startContainer ;
 					
 					// If it is an element, get the current child node for the range (in the offset).
@@ -317,5 +317,5 @@
 					while ( true )
 					{
-						var oSibling = oNode.previousSibling ;
+						oSibling = oNode.previousSibling ;
 						
 						if ( !oSibling )
@@ -343,5 +343,5 @@
 				else
 				{
-					var oNode = this._Range.endContainer ;
+					oNode = this._Range.endContainer ;
 					if ( oNode.nodeType == 1 )
 						oNode = oNode.childNodes[ this._Range.endOffset ] || oNode.lastChild ;
@@ -354,5 +354,5 @@
 					while ( true )
 					{
-						var oSibling = oNode.nextSibling ;
+						oSibling = oNode.nextSibling ;
 						
 						if ( !oSibling )
Index: /FCKeditor/trunk/editor/_source/classes/fckicon.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckicon.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/classes/fckicon.js	(revision 75)
@@ -36,5 +36,5 @@
 FCKIcon.prototype.CreateIconElement = function( document )
 {
-	var eIcon ;
+	var eIcon, eIconImage ;
 	
 	if ( this.Position )		// It is using an icons strip image.
@@ -48,5 +48,5 @@
 			eIcon = document.createElement( 'DIV' ) ;
 			
-			var eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
+			eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
 			eIconImage.src = this.Path ;
 			eIconImage.style.top = sPos ;
@@ -73,5 +73,5 @@
 		eIcon = document.createElement( 'DIV' ) ;
 		
-		var eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
+		eIconImage = eIcon.appendChild( document.createElement( 'IMG' ) ) ;
 		eIconImage.src = this.Path ? this.Path : FCK_SPACER_PATH ;
 	}
Index: /FCKeditor/trunk/editor/_source/classes/fckpanel.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckpanel.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/classes/fckpanel.js	(revision 75)
@@ -87,4 +87,6 @@
 FCKPanel.prototype.Show = function( x, y, relElement, width, height )
 {
+	var iMainWidth ;
+
 	if ( this._Popup )
 	{
@@ -99,5 +101,5 @@
 		this.MainNode.style.height	= height ? height + 'px' : '' ;
 		
-		var iMainWidth = this.MainNode.offsetWidth ;
+		iMainWidth = this.MainNode.offsetWidth ;
 
 		if ( this.IsRTL )
@@ -132,5 +134,5 @@
 		this.MainNode.style.height	= height ? height + 'px' : '' ;
 
-		var iMainWidth = this.MainNode.offsetWidth ;
+		iMainWidth = this.MainNode.offsetWidth ;
 
 		if ( !width )	this._IFrame.width	= 1 ;
Index: /FCKeditor/trunk/editor/_source/classes/fckw3crange.js
===================================================================
--- /FCKeditor/trunk/editor/_source/classes/fckw3crange.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/classes/fckw3crange.js	(revision 75)
@@ -291,5 +291,5 @@
 		}
 
-		var clone ;
+		var clone, levelStartNode, levelClone, currentNode, currentSibling ;
 		
 		if ( docFrag )
@@ -300,11 +300,11 @@
 		for ( var j = i ; j < startParents.length ; j++ )
 		{
-			var levelStartNode = startParents[j] ;
+			levelStartNode = startParents[j] ;
 			
 			// For Extract and Clone, we must clone this level.
 			if ( clone && ( removeStartNode || levelStartNode != startNode ) )		// action = 0 = Delete
-				var levelClone = clone.appendChild( levelStartNode.cloneNode( removeStartNode && levelStartNode == startNode ) ) ;
-			
-			var currentNode = levelStartNode.nextSibling ;
+				levelClone = clone.appendChild( levelStartNode.cloneNode( removeStartNode && levelStartNode == startNode ) ) ;
+			
+			currentNode = levelStartNode.nextSibling ;
 			
 			while( currentNode )
@@ -316,5 +316,5 @@
 				
 				// Cache the next sibling.
-				var currentSibling = currentNode.nextSibling ;
+				currentSibling = currentNode.nextSibling ;
 
 				// If clonning, just clone it.
@@ -343,16 +343,16 @@
 		// Remove all previous sibling nodes for every node in the
 		// endParents tree.
-		for ( var j = i ; j < endParents.length ; j++ )
-		{
-			var levelStartNode = endParents[j] ;
+		for ( var k = i ; k < endParents.length ; k++ )
+		{
+			levelStartNode = endParents[k] ;
 			
 			// For Extract and Clone, we must clone this level.
 			if ( action > 0 && ( removeEndNode || levelStartNode != endNode ) )		// action = 0 = Delete
-				var levelClone = clone.appendChild( levelStartNode.cloneNode( removeEndNode && levelStartNode == endNode ) ) ;
+				levelClone = clone.appendChild( levelStartNode.cloneNode( removeEndNode && levelStartNode == endNode ) ) ;
 
 			// The processing of siblings may have already been done by the parent.
-			if ( !startParents[j] || levelStartNode.parentNode != startParents[j].parentNode )
-			{
-				var currentNode = levelStartNode.previousSibling ;
+			if ( !startParents[k] || levelStartNode.parentNode != startParents[k].parentNode )
+			{
+				currentNode = levelStartNode.previousSibling ;
 
 				while( currentNode )
@@ -360,9 +360,9 @@
 					// Stop processing when the current node matches a node in the
 					// startParents tree or if it is the startNode.
-					if ( currentNode == startParents[j] || currentNode == startNode )
+					if ( currentNode == startParents[k] || currentNode == startNode )
 						break ;
 
 					// Cache the next sibling.
-					var currentSibling = currentNode.previousSibling ;
+					currentSibling = currentNode.previousSibling ;
 
 					// If clonning, just clone it.
Index: /FCKeditor/trunk/editor/_source/commandclasses/fckfitwindow.js
===================================================================
--- /FCKeditor/trunk/editor/_source/commandclasses/fckfitwindow.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/commandclasses/fckfitwindow.js	(revision 75)
@@ -22,4 +22,5 @@
 	var eBody				= eMainWindow.document.body ;
 	var eBodyStyle			= eBody.style ;
+	var eParent ;
 
 	// No original style properties known? Go fullscreen.
@@ -36,5 +37,5 @@
 		
 		// Save and reset the styles for the entire node tree. They could interfere in the result.
-		var eParent = eEditorFrame ;
+		eParent = eEditorFrame ;
 		// The extra () is to avoid a warning with strict error checking. This is ok.
 		while( (eParent = eParent.parentNode) )
@@ -99,5 +100,5 @@
 
 		// Restore the CSS position for the entire node tree.
-		var eParent = eEditorFrame ;
+		eParent = eEditorFrame ;
 		// The extra () is to avoid a warning with strict error checking. This is ok.
 		while( (eParent = eParent.parentNode) )
Index: /FCKeditor/trunk/editor/_source/internals/fck_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fck_ie.js	(revision 75)
@@ -243,5 +243,5 @@
 	if ( !oDiv )
 	{
-		var oDiv = document.createElement( 'DIV' ) ;
+		oDiv = document.createElement( 'DIV' ) ;
 		oDiv.id = '___FCKHiddenDiv' ;
 		
Index: /FCKeditor/trunk/editor/_source/internals/fckcodeformatter.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckcodeformatter.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fckcodeformatter.js	(revision 75)
@@ -75,8 +75,8 @@
 	
 	// Now we put back the protected data.
-	for ( var i = 0 ; i < FCKCodeFormatter.ProtectedData.length ; i++ )
+	for ( var j = 0 ; j < FCKCodeFormatter.ProtectedData.length ; j++ )
 	{
-		var oRegex = new RegExp( '___FCKpd___' + i ) ;
-		sFormatted = sFormatted.replace( oRegex, FCKCodeFormatter.ProtectedData[i].replace( /\$/g, '$$$$' ) ) ;
+		var oRegex = new RegExp( '___FCKpd___' + j ) ;
+		sFormatted = sFormatted.replace( oRegex, FCKCodeFormatter.ProtectedData[j].replace( /\$/g, '$$$$' ) ) ;
 	}
 
Index: /FCKeditor/trunk/editor/_source/internals/fcklisthandler.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcklisthandler.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fcklisthandler.js	(revision 75)
@@ -67,5 +67,5 @@
 					FCKDomTools.InsertAfterNode( eParent, eNextSiblings ) ;
 				
-				// Move the LI after its parent.parentNode (the upper LI in the hierarchi).
+				// Move the LI after its parent.parentNode (the upper LI in the hierarchy).
 				if ( bWellNested )
 					FCKDomTools.InsertAfterNode( eParent.parentNode, eParent.removeChild( listItem ) ) ;	
Index: /FCKeditor/trunk/editor/_source/internals/fckselection_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckselection_ie.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fckselection_ie.js	(revision 75)
@@ -42,9 +42,9 @@
 	FCK.Focus() ;
 	FCK.EditorDocument.selection.empty() ;
-
+	var oRange ;
 	try 
 	{
 		// Try to select the node as a control.
-		var oRange = FCK.EditorDocument.body.createControlRange() ;
+		oRange = FCK.EditorDocument.body.createControlRange() ;
 		oRange.addElement( node ) ;
 	} 
@@ -52,5 +52,5 @@
 	{
 		// If failed, select it as a text range.
-		var oRange = FCK.EditorDocument.selection.createRange() ;
+		oRange = FCK.EditorDocument.selection.createRange() ;
 		oRange.moveToElementText( node ) ;
 	}
@@ -97,5 +97,5 @@
 FCKSelection.MoveToAncestorNode = function( nodeTagName )
 {
-	var oNode ;
+	var oNode, oRange ;
 
 	if ( ! FCK.EditorDocument )
@@ -104,5 +104,5 @@
 	if ( FCK.EditorDocument.selection.type == "Control" )
 	{
-		var oRange = FCK.EditorDocument.selection.createRange() ;
+		oRange = FCK.EditorDocument.selection.createRange() ;
 		for ( i = 0 ; i < oRange.length ; i++ )
 		{
@@ -116,5 +116,5 @@
 	else
 	{
-		var oRange  = FCK.EditorDocument.selection.createRange() ;
+		oRange  = FCK.EditorDocument.selection.createRange() ;
 		oNode = oRange.parentElement() ;
 	}
Index: /FCKeditor/trunk/editor/_source/internals/fcktablehandler_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktablehandler_ie.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fcktablehandler_ie.js	(revision 75)
@@ -18,5 +18,5 @@
 	else
 	{
-		var oParent = FCKSelection.MoveToAncestorNode( "TABLE" ) ;
+		oParent = FCKSelection.MoveToAncestorNode( 'TABLE' ) ;
 		
 		if ( oParent )
Index: /FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js	(revision 75)
@@ -327,6 +327,6 @@
 
 		// Disable all buttons that are available on WYSIWYG mode only.
-		for ( var i = 0 ; i < aItems.length ; i++ )
-			aItems[i].Disable() ;
+		for ( var j = 0 ; j < aItems.length ; j++ )
+			aItems[j].Disable() ;
 	}	
 }
Index: /FCKeditor/trunk/editor/_source/internals/fckxhtml_ie.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtml_ie.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtml_ie.js	(revision 75)
@@ -125,7 +125,7 @@
 	if ( ! node.attributes.getNamedItem( 'shape' ) )
 	{
-		var sCoords = htmlNode.getAttribute( 'shape', 2 ) ;
-		if ( sCoords && sCoords.length > 0 )
-			FCKXHtml._AppendAttribute( node, 'shape', sCoords ) ;
+		var sShape = htmlNode.getAttribute( 'shape', 2 ) ;
+		if ( sShape && sShape.length > 0 )
+			FCKXHtml._AppendAttribute( node, 'shape', sShape ) ;
 	}
 
Index: /FCKeditor/trunk/editor/_source/internals/fckxhtmlentities.js
===================================================================
--- /FCKeditor/trunk/editor/_source/internals/fckxhtmlentities.js	(revision 74)
+++ /FCKeditor/trunk/editor/_source/internals/fckxhtmlentities.js	(revision 75)
@@ -14,4 +14,5 @@
 
 	var sChars = '' ;
+	var oEntities, e ;
 
 	if ( FCKConfig.ProcessHTMLEntities )
@@ -155,5 +156,5 @@
 
 		// Process Base Entities.
-		for ( var e in FCKXHtmlEntities.Entities )
+		for ( e in FCKXHtmlEntities.Entities )
 			sChars += e ;
 
@@ -161,5 +162,5 @@
 		if ( FCKConfig.IncludeLatinEntities )
 		{
-			var oEntities = {
+			oEntities = {
 				'À':'Agrave',
 				'Á':'Aacute',
@@ -231,5 +232,5 @@
 			} ; 
 			
-			for ( var e in oEntities )
+			for ( e in oEntities )
 			{
 				FCKXHtmlEntities.Entities[ e ] = oEntities[ e ] ;
@@ -243,5 +244,5 @@
 		if ( FCKConfig.IncludeGreekEntities )
 		{
-			var oEntities = {
+			oEntities = {
 				'Α':'Alpha',
 				'Β':'Beta',
@@ -295,5 +296,5 @@
 			} ;
 
-			for ( var e in oEntities )
+			for ( e in oEntities )
 			{
 				FCKXHtmlEntities.Entities[ e ] = oEntities[ e ] ;
Index: /FCKeditor/trunk/editor/dialog/fck_find.html
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_find.html	(revision 74)
+++ /FCKeditor/trunk/editor/dialog/fck_find.html	(revision 75)
@@ -59,8 +59,10 @@
 function GetRegexExpr()
 {
+	var sExpr ;
+
 	if ( document.getElementById('chkWord').checked )
-		var sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
+		sExpr = '\\b' + document.getElementById('txtFind').value + '\\b' ;
 	else
-		var sExpr = document.getElementById('txtFind').value ;
+		sExpr = document.getElementById('txtFind').value ;
 
 	return sExpr ;
Index: /FCKeditor/trunk/editor/dialog/fck_image/fck_image.js
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_image/fck_image.js	(revision 74)
+++ /FCKeditor/trunk/editor/dialog/fck_image/fck_image.js	(revision 75)
@@ -123,8 +123,8 @@
 	if ( oImage.style.width )
 	{
-		var aMatch  = oImage.style.width.match( regexSize ) ;
-		if ( aMatch )
-		{
-			iWidth = aMatch[1] ;
+		var aMatchW  = oImage.style.width.match( regexSize ) ;
+		if ( aMatchW )
+		{
+			iWidth = aMatchW[1] ;
 			oImage.style.width = '' ;
 		}
@@ -133,8 +133,8 @@
 	if ( oImage.style.height )
 	{
-		var aMatch  = oImage.style.height.match( regexSize ) ;
-		if ( aMatch )
-		{
-			iHeight = aMatch[1] ;
+		var aMatchH  = oImage.style.height.match( regexSize ) ;
+		if ( aMatchH )
+		{
+			iHeight = aMatchH[1] ;
 			oImage.style.height = '' ;
 		}
@@ -164,9 +164,9 @@
 	if ( oLink )
 	{
-		var sUrl = oLink.getAttribute( '_fcksavedurl' ) ;
-		if ( sUrl == null )
-			sUrl = oLink.getAttribute('href',2) ;
-	
-		GetE('txtLnkUrl').value		= sUrl ;
+		var sLinkUrl = oLink.getAttribute( '_fcksavedurl' ) ;
+		if ( sLinkUrl == null )
+			sLinkUrl = oLink.getAttribute('href',2) ;
+	
+		GetE('txtLnkUrl').value		= sLinkUrl ;
 		GetE('cmbLnkTarget').value	= oLink.target ;
 	}
Index: /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js	(revision 74)
+++ /FCKeditor/trunk/editor/dialog/fck_link/fck_link.js	(revision 75)
@@ -157,7 +157,7 @@
 	// to edit them. So, we must look for that images now.
 	var aAnchors = new Array() ;
-	
+	var i ;
 	var oImages = oEditor.FCK.EditorDocument.getElementsByTagName( 'IMG' ) ;
-	for( var i = 0 ; i < oImages.length ; i++ )
+	for( i = 0 ; i < oImages.length ; i++ )
 	{
 		if ( oImages[i].getAttribute('_fckanchor') )
@@ -167,5 +167,5 @@
 	// Add also real anchors
 	var oLinks = oEditor.FCK.EditorDocument.getElementsByTagName( 'A' ) ;
-	for( var i = 0 ; i < oLinks.length ; i++ )
+	for( i = 0 ; i < oLinks.length ; i++ )
 	{
 		if ( oLinks[i].name && ( oLinks[i].name.length > 0 ) )
@@ -177,5 +177,5 @@
 	bHasAnchors = ( aAnchors.length > 0 || aIds.length > 0 ) ;
 
-	for ( var i = 0 ; i < aAnchors.length ; i++ )
+	for ( i = 0 ; i < aAnchors.length ; i++ )
 	{
 		var sName = aAnchors[i].name ;
@@ -184,5 +184,5 @@
 	}
 
-	for ( var i = 0 ; i < aIds.length ; i++ )
+	for ( i = 0 ; i < aIds.length ; i++ )
 	{
 		oEditor.FCKTools.AddSelectOption( GetE('cmbAnchorId'), aIds[i], aIds[i] ) ;
Index: /FCKeditor/trunk/editor/dialog/fck_paste.html
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_paste.html	(revision 74)
+++ /FCKeditor/trunk/editor/dialog/fck_paste.html	(revision 75)
@@ -71,5 +71,5 @@
 	else
 	{
-		var sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value )  ;
+		sHtml = oEditor.FCKTools.HTMLEncode( document.getElementById('txtData').value )  ;
 		sHtml = sHtml.replace( /\n/g, '<BR>' ) ;
 	}
Index: /FCKeditor/trunk/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js	(revision 74)
+++ /FCKeditor/trunk/editor/dialog/fck_spellerpages/spellerpages/spellChecker.js	(revision 75)
@@ -323,4 +323,5 @@
 		}
 	
+		var i, j, origSpell ;
 		// examine what happened to this current word.
 		switch( this.wordFlags[text_idx][idx] ) {
@@ -328,8 +329,8 @@
 			// and revert them all to the original spelling and clear their flags
 			case this.replAllFlag :
-				for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
-					for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
+				for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
+					for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
 						if(( i == text_idx && j >= idx ) || i > text_idx ) {
-							var origSpell = this.wordWin.originalSpellings[i][j];
+							origSpell = this.wordWin.originalSpellings[i][j];
 							if( origSpell == preReplSpell ) {
 								this._setWordText ( i, j, origSpell, undefined );
@@ -343,8 +344,8 @@
 			// and clear their flags
 			case this.ignrAllFlag :
-				for( var i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
-					for( var j = 0; j < this.wordWin.totalWords( i ); j++ ) {
+				for( i = text_idx; i < this.wordWin.textInputs.length; i++ ) {
+					for( j = 0; j < this.wordWin.totalWords( i ); j++ ) {
 						if(( i == text_idx && j >= idx ) || i > text_idx ) {
-							var origSpell = this.wordWin.originalSpellings[i][j];
+							origSpell = this.wordWin.originalSpellings[i][j];
 							if( origSpell == preReplSpell ) {
 								this.wordFlags[i][j] = undefined; 
Index: /FCKeditor/trunk/editor/dialog/fck_template.html
===================================================================
--- /FCKeditor/trunk/editor/dialog/fck_template.html	(revision 74)
+++ /FCKeditor/trunk/editor/dialog/fck_template.html	(revision 75)
@@ -65,4 +65,6 @@
 function LoadTemplatesXml()
 {
+	var oTemplate ;
+
 	if ( !FCK._Templates )
 	{
@@ -87,5 +89,5 @@
 			var oNode = aTplNodes[i]
 
-			var oTemplate = new Object() ;
+			oTemplate = new Object() ;
 
 			var oPart ;
@@ -124,10 +126,10 @@
 	else
 	{
-		for ( var i = 0 ; i < FCK._Templates.length ; i++ )
+		for ( var j = 0 ; j < FCK._Templates.length ; j++ )
 		{
-			var oTemplate = FCK._Templates[i] ;
+			oTemplate = FCK._Templates[j] ;
 
 			var oItemDiv = GetE('eList').appendChild( document.createElement( 'DIV' ) ) ;
-			oItemDiv.TplIndex = i ;
+			oItemDiv.TplIndex = j ;
 			oItemDiv.className = 'TplItem' ;
 
Index: /FCKeditor/trunk/editor/filemanager/browser/default/frmresourceslist.html
===================================================================
--- /FCKeditor/trunk/editor/filemanager/browser/default/frmresourceslist.html	(revision 74)
+++ /FCKeditor/trunk/editor/filemanager/browser/default/frmresourceslist.html	(revision 75)
@@ -89,12 +89,12 @@
 
 	// Get the current folder path.
-	var oNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
-	if ( oNode == null )
+	var oFolderNode = fckXml.SelectSingleNode( 'Connector/CurrentFolder' ) ;
+	if ( oFolderNode == null )
 	{
 		alert( 'The server didn\'t reply with a proper XML file\r\nCheck your configuration.' ) ;
 		return ;
 	}
-	var sCurrentFolderPath	= oNode.attributes.getNamedItem('path').value ;
-	var sCurrentFolderUrl	= oNode.attributes.getNamedItem('url').value ;
+	var sCurrentFolderPath	= oFolderNode.attributes.getNamedItem('path').value ;
+	var sCurrentFolderUrl	= oFolderNode.attributes.getNamedItem('url').value ;
 
 //	var dTimer = new Date() ;
@@ -103,5 +103,6 @@
 
 	// Add the Folders.	
-	var oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
+	var oNodes ;
+	oNodes = fckXml.SelectNodes( 'Connector/Folders/Folder' ) ;
 	for ( var i = 0 ; i < oNodes.length ; i++ )
 	{
@@ -111,13 +112,13 @@
 
 	// Add the Files.	
-	var oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ;
-	for ( var i = 0 ; i < oNodes.length ; i++ )
+	oNodes = fckXml.SelectNodes( 'Connector/Files/File' ) ;
+	for ( var j = 0 ; j < oNodes.length ; j++ )
 	{
-		var oNode = oNodes[i] ;
+		var oNode = oNodes[j] ;
 		var sFileName = oNode.attributes.getNamedItem('name').value ;
 		var sFileSize = oNode.attributes.getNamedItem('size').value ;
 
 		// Get the optional "url" attribute. If not available, build the url.
-		var oFileUrlAtt = oNodes[i].attributes.getNamedItem('url') ;
+		var oFileUrlAtt = oNodes[j].attributes.getNamedItem('url') ;
 		var sFileUrl = oFileUrlAtt != null ? oFileUrlAtt.value : sCurrentFolderUrl + sFileName ;
 		
