Index: /CKEditor/trunk/CHANGES.html
===================================================================
--- /CKEditor/trunk/CHANGES.html	(revision 5503)
+++ /CKEditor/trunk/CHANGES.html	(revision 5504)
@@ -94,5 +94,5 @@
 		<li><a href="http://dev.fckeditor.net/ticket/5591">#5591</a> : [Firefox] Select a list item makes selected element broken.</li>
 		<li><a href="http://dev.fckeditor.net/ticket/5667">#5667</a> : Pasting in a RTL page content causes shows up the horizontal scrollbar.</li>
-		<li><a href="http://dev.fckeditor.net/ticket/4783">#4783</a> : [IE6]Page break for print cause horizontal scrollbar in IE quirks.</li>
+		<li><a href="http://dev.fckeditor.net/ticket/5688">#5688</a> : Duplicate ids are used in dialog definition.</li>
 		<li>Updated the following language files:<ul>
 			<li><a href="http://dev.fckeditor.net/ticket/5432">#5432</a> : Dutch;</li>
Index: /CKEditor/trunk/_source/plugins/colordialog/dialogs/colordialog.js
===================================================================
--- /CKEditor/trunk/_source/plugins/colordialog/dialogs/colordialog.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/colordialog/dialogs/colordialog.js	(revision 5504)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -29,6 +29,6 @@
 		{
 			var color = new $el( event.data.getTarget() ).getAttribute( 'title' );
-			$doc.getById( 'hicolor' ).setStyle( 'background-color', color );
-			$doc.getById( 'hicolortext' ).setHtml( color );
+			$doc.getById( hicolorId ).setStyle( 'background-color', color );
+			$doc.getById( hicolorTextId ).setHtml( color );
 		};
 
@@ -98,5 +98,5 @@
 		function clear()
 		{
-			$doc.getById( 'selhicolor' ).removeStyle( 'background-color' );
+			$doc.getById( selHiColorId ).removeStyle( 'background-color' );
 			dialog.getContentElement( 'picker', 'selectedColor' ).setValue( '' );
 		}
@@ -104,7 +104,12 @@
 		var clearActual = $tools.addFunction( function()
 		{
-			$doc.getById( 'hicolor' ).removeStyle( 'background-color' );
-			$doc.getById( 'hicolortext' ).setHtml( '&nbsp;' );
+			$doc.getById( hicolorId ).removeStyle( 'background-color' );
+			$doc.getById( hicolorTextId ).setHtml( '&nbsp;' );
 		} );
+
+		var numbering = function( id ){ return id + CKEDITOR.tools.getNextNumber(); },
+			hicolorId = numbering( 'hicolor' ),
+			hicolorTextId = numbering( 'hicolortext' ),
+			selHiColorId = numbering( 'selhicolor' );
 
 		return {
@@ -150,8 +155,8 @@
 											type : 'html',
 											html : '<span>' + lang.highlight +'</span>\
-												<div id="hicolor" style="border: 1px solid; height: 74px; width: 74px;"></div>\
-												<div id="hicolortext">&nbsp;</div>\
+												<div id="' + hicolorId + '" style="border: 1px solid; height: 74px; width: 74px;"></div>\
+												<div id="' + hicolorTextId + '">&nbsp;</div>\
 												<span>' + lang.selected +'</span>\
-												<div id="selhicolor" style="border: 1px solid; height: 20px; width: 74px;"></div>'
+												<div id="' + selHiColorId + '" style="border: 1px solid; height: 20px; width: 74px;"></div>'
 										},
 										{
@@ -164,5 +169,5 @@
 												try
 												{
-													$doc.getById( 'selhicolor' ).setStyle( 'background-color', this.getValue() );
+													$doc.getById( selHiColorId ).setStyle( 'background-color', this.getValue() );
 												}
 												catch ( e )
Index: /CKEditor/trunk/_source/plugins/flash/dialogs/flash.js
===================================================================
--- /CKEditor/trunk/_source/plugins/flash/dialogs/flash.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/flash/dialogs/flash.js	(revision 5504)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -176,6 +176,6 @@
 		var previewPreloader,
 			previewAreaHtml = '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'<br>' +
-			'<div id="FlashPreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>' +
-			'<div id="FlashPreviewBox"></div></div>';
+			'<div id="FlashPreviewLoader' + CKEDITOR.tools.getNextNumber() + '" style="display:none"><div class="loading">&nbsp;</div></div>' +
+			'<div id="FlashPreviewBox' + CKEDITOR.tools.getNextNumber() + '" class="FlashPreviewBox"></div></div>';
 
 		return {
Index: /CKEditor/trunk/_source/plugins/image/dialogs/image.js
===================================================================
--- /CKEditor/trunk/_source/plugins/image/dialogs/image.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/image/dialogs/image.js	(revision 5504)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -6,205 +6,205 @@
 (function()
 {
-	// Load image preview.
-	var IMAGE = 1,
-		LINK = 2,
-		PREVIEW = 4,
-		CLEANUP = 8,
-		regexGetSize = /^\s*(\d+)((px)|\%)?\s*$/i,
-		regexGetSizeOrEmpty = /(^\s*(\d+)((px)|\%)?\s*$)|^$/i,
-		pxLengthRegex = /^\d+px$/;
-
-	var onSizeChange = function()
+	var imageDialog = function( editor, dialogType )
 	{
-		var value = this.getValue(),	// This = input element.
-			dialog = this.getDialog(),
-			aMatch  =  value.match( regexGetSize );	// Check value
-		if ( aMatch )
+		// Load image preview.
+		var IMAGE = 1,
+			LINK = 2,
+			PREVIEW = 4,
+			CLEANUP = 8,
+			regexGetSize = /^\s*(\d+)((px)|\%)?\s*$/i,
+			regexGetSizeOrEmpty = /(^\s*(\d+)((px)|\%)?\s*$)|^$/i,
+			pxLengthRegex = /^\d+px$/;
+
+		var onSizeChange = function()
 		{
-			if ( aMatch[2] == '%' )			// % is allowed - > unlock ratio.
-				switchLockRatio( dialog, false );	// Unlock.
-			value = aMatch[1];
+			var value = this.getValue(),	// This = input element.
+				dialog = this.getDialog(),
+				aMatch  =  value.match( regexGetSize );	// Check value
+			if ( aMatch )
+			{
+				if ( aMatch[2] == '%' )			// % is allowed - > unlock ratio.
+					switchLockRatio( dialog, false );	// Unlock.
+				value = aMatch[1];
+			}
+
+			// Only if ratio is locked
+			if ( dialog.lockRatio )
+			{
+				var oImageOriginal = dialog.originalElement;
+				if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
+				{
+					if ( this.id == 'txtHeight' )
+					{
+						if ( value && value != '0' )
+							value = Math.round( oImageOriginal.$.width * ( value  / oImageOriginal.$.height ) );
+						if ( !isNaN( value ) )
+							dialog.setValueOf( 'info', 'txtWidth', value );
+					}
+					else		//this.id = txtWidth.
+					{
+						if ( value && value != '0' )
+							value = Math.round( oImageOriginal.$.height * ( value  / oImageOriginal.$.width ) );
+						if ( !isNaN( value ) )
+							dialog.setValueOf( 'info', 'txtHeight', value );
+					}
+				}
+			}
+			updatePreview( dialog );
+		};
+
+		var updatePreview = function( dialog )
+		{
+			//Don't load before onShow.
+			if ( !dialog.originalElement || !dialog.preview )
+				return 1;
+
+			// Read attributes and update imagePreview;
+			dialog.commitContent( PREVIEW, dialog.preview );
+			return 0;
+		};
+
+		// Custom commit dialog logic, where we're intended to give inline style
+		// field (txtdlgGenStyle) higher priority to avoid overwriting styles contribute
+		// by other fields.
+		function commitContent()
+		{
+			var args = arguments;
+			var inlineStyleField = this.getContentElement( 'advanced', 'txtdlgGenStyle' );
+			inlineStyleField && inlineStyleField.commit.apply( inlineStyleField, args );
+
+			this.foreach( function( widget )
+			{
+				if ( widget.commit &&  widget.id != 'txtdlgGenStyle' )
+					widget.commit.apply( widget, args );
+			});
 		}
 
-		// Only if ratio is locked
-		if ( dialog.lockRatio )
+		// Avoid recursions.
+		var incommit;
+
+		// Synchronous field values to other impacted fields is required, e.g. border
+		// size change should alter inline-style text as well.
+		function commitInternally( targetFields )
+		{
+			if ( incommit )
+				return;
+
+			incommit = 1;
+
+			var dialog = this.getDialog(),
+				element = dialog.imageElement;
+			if ( element )
+			{
+				// Commit this field and broadcast to target fields.
+				this.commit( IMAGE, element );
+
+				targetFields = [].concat( targetFields );
+				var length = targetFields.length,
+					field;
+				for ( var i = 0; i < length; i++ )
+				{
+					field = dialog.getContentElement.apply( dialog, targetFields[ i ].split( ':' ) );
+					// May cause recursion.
+					field && field.setup( IMAGE, element );
+				}
+			}
+
+			incommit = 0;
+		}
+
+		var switchLockRatio = function( dialog, value )
+		{
+			var oImageOriginal = dialog.originalElement;
+
+			// Dialog may already closed. (#5505)
+			if( !oImageOriginal )
+				return;
+
+			var ratioButton = CKEDITOR.document.getById( btnLockSizesId );
+
+			if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
+			{
+				if ( value == 'check' )			// Check image ratio and original image ratio.
+				{
+					var width = dialog.getValueOf( 'info', 'txtWidth' ),
+						height = dialog.getValueOf( 'info', 'txtHeight' ),
+						originalRatio = oImageOriginal.$.width * 1000 / oImageOriginal.$.height,
+						thisRatio = width * 1000 / height;
+					dialog.lockRatio  = false;		// Default: unlock ratio
+
+					if ( !width && !height )
+						dialog.lockRatio = true;
+					else if ( !isNaN( originalRatio ) && !isNaN( thisRatio ) )
+					{
+						if ( Math.round( originalRatio ) == Math.round( thisRatio ) )
+							dialog.lockRatio = true;
+					}
+				}
+				else if ( value != undefined )
+					dialog.lockRatio = value;
+				else
+					dialog.lockRatio = !dialog.lockRatio;
+			}
+			else if ( value != 'check' )		// I can't lock ratio if ratio is unknown.
+				dialog.lockRatio = false;
+
+			if ( dialog.lockRatio )
+				ratioButton.removeClass( 'cke_btn_unlocked' );
+			else
+				ratioButton.addClass( 'cke_btn_unlocked' );
+
+			var lang = dialog._.editor.lang.image,
+				label =  lang[  dialog.lockRatio ? 'unlockRatio' : 'lockRatio' ];
+
+			ratioButton.setAttribute( 'title', label );
+			ratioButton.getFirst().setText( label );
+
+			return dialog.lockRatio;
+		};
+
+		var resetSize = function( dialog )
 		{
 			var oImageOriginal = dialog.originalElement;
 			if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
 			{
-				if ( this.id == 'txtHeight' )
-				{
-					if ( value && value != '0' )
-						value = Math.round( oImageOriginal.$.width * ( value  / oImageOriginal.$.height ) );
-					if ( !isNaN( value ) )
-						dialog.setValueOf( 'info', 'txtWidth', value );
+				dialog.setValueOf( 'info', 'txtWidth', oImageOriginal.$.width );
+				dialog.setValueOf( 'info', 'txtHeight', oImageOriginal.$.height );
+			}
+			updatePreview( dialog );
+		};
+
+		var setupDimension = function( type, element )
+		{
+			if ( type != IMAGE )
+				return;
+
+			function checkDimension( size, defaultValue )
+			{
+				var aMatch  =  size.match( regexGetSize );
+				if ( aMatch )
+				{
+					if ( aMatch[2] == '%' )				// % is allowed.
+					{
+						aMatch[1] += '%';
+						switchLockRatio( dialog, false );	// Unlock ratio
+					}
+					return aMatch[1];
 				}
-				else		//this.id = txtWidth.
-				{
-					if ( value && value != '0' )
-						value = Math.round( oImageOriginal.$.height * ( value  / oImageOriginal.$.width ) );
-					if ( !isNaN( value ) )
-						dialog.setValueOf( 'info', 'txtHeight', value );
-				}
+				return defaultValue;
 			}
-		}
-		updatePreview( dialog );
-	};
-
-	var updatePreview = function( dialog )
-	{
-		//Don't load before onShow.
-		if ( !dialog.originalElement || !dialog.preview )
-			return 1;
-
-		// Read attributes and update imagePreview;
-		dialog.commitContent( PREVIEW, dialog.preview );
-		return 0;
-	};
-
-	// Custom commit dialog logic, where we're intended to give inline style
-	// field (txtdlgGenStyle) higher priority to avoid overwriting styles contribute
-	// by other fields.
-	function commitContent()
-	{
-		var args = arguments;
-		var inlineStyleField = this.getContentElement( 'advanced', 'txtdlgGenStyle' );
-		inlineStyleField && inlineStyleField.commit.apply( inlineStyleField, args );
-
-		this.foreach( function( widget )
-		{
-			if ( widget.commit &&  widget.id != 'txtdlgGenStyle' )
-				widget.commit.apply( widget, args );
-		});
-	}
-
-	// Avoid recursions.
-	var incommit;
-
-	// Synchronous field values to other impacted fields is required, e.g. border
-	// size change should alter inline-style text as well.
-	function commitInternally( targetFields )
-	{
-		if ( incommit )
-			return;
-
-		incommit = 1;
-
-		var dialog = this.getDialog(),
-			element = dialog.imageElement;
-		if ( element )
-		{
-			// Commit this field and broadcast to target fields.
-			this.commit( IMAGE, element );
-
-			targetFields = [].concat( targetFields );
-			var length = targetFields.length,
-				field;
-			for ( var i = 0; i < length; i++ )
-			{
-				field = dialog.getContentElement.apply( dialog, targetFields[ i ].split( ':' ) );
-				// May cause recursion.
-				field && field.setup( IMAGE, element );
-			}
-		}
-
-		incommit = 0;
-	}
-
-	var switchLockRatio = function( dialog, value )
-	{
-		var oImageOriginal = dialog.originalElement;
-
-		// Dialog may already closed. (#5505)
-		if( !oImageOriginal )
-			return;
-
-		var ratioButton = CKEDITOR.document.getById( 'btnLockSizes' );
-
-		if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
-		{
-			if ( value == 'check' )			// Check image ratio and original image ratio.
-			{
-				var width = dialog.getValueOf( 'info', 'txtWidth' ),
-					height = dialog.getValueOf( 'info', 'txtHeight' ),
-					originalRatio = oImageOriginal.$.width * 1000 / oImageOriginal.$.height,
-					thisRatio = width * 1000 / height;
-				dialog.lockRatio  = false;		// Default: unlock ratio
-
-				if ( !width && !height )
-					dialog.lockRatio = true;
-				else if ( !isNaN( originalRatio ) && !isNaN( thisRatio ) )
-				{
-					if ( Math.round( originalRatio ) == Math.round( thisRatio ) )
-						dialog.lockRatio = true;
-				}
-			}
-			else if ( value != undefined )
-				dialog.lockRatio = value;
-			else
-				dialog.lockRatio = !dialog.lockRatio;
-		}
-		else if ( value != 'check' )		// I can't lock ratio if ratio is unknown.
-			dialog.lockRatio = false;
-
-		if ( dialog.lockRatio )
-			ratioButton.removeClass( 'cke_btn_unlocked' );
-		else
-			ratioButton.addClass( 'cke_btn_unlocked' );
-
-		var lang = dialog._.editor.lang.image,
-			label =  lang[  dialog.lockRatio ? 'unlockRatio' : 'lockRatio' ];
-
-		ratioButton.setAttribute( 'title', label );
-		ratioButton.getFirst().setText( label );
-
-		return dialog.lockRatio;
-	};
-
-	var resetSize = function( dialog )
-	{
-		var oImageOriginal = dialog.originalElement;
-		if ( oImageOriginal.getCustomData( 'isReady' ) == 'true' )
-		{
-			dialog.setValueOf( 'info', 'txtWidth', oImageOriginal.$.width );
-			dialog.setValueOf( 'info', 'txtHeight', oImageOriginal.$.height );
-		}
-		updatePreview( dialog );
-	};
-
-	var setupDimension = function( type, element )
-	{
-		if ( type != IMAGE )
-			return;
-
-		function checkDimension( size, defaultValue )
-		{
-			var aMatch  =  size.match( regexGetSize );
-			if ( aMatch )
-			{
-				if ( aMatch[2] == '%' )				// % is allowed.
-				{
-					aMatch[1] += '%';
-					switchLockRatio( dialog, false );	// Unlock ratio
-				}
-				return aMatch[1];
-			}
-			return defaultValue;
-		}
-
-		var dialog = this.getDialog(),
-			value = '',
-			dimension = (( this.id == 'txtWidth' )? 'width' : 'height' ),
-			size = element.getAttribute( dimension );
-
-		if ( size )
-			value = checkDimension( size, value );
-		value = checkDimension( element.getStyle( dimension ), value );
-
-		this.setValue( value );
-	};
-
-	var imageDialog = function( editor, dialogType )
-	{
+
+			var dialog = this.getDialog(),
+				value = '',
+				dimension = (( this.id == 'txtWidth' )? 'width' : 'height' ),
+				size = element.getAttribute( dimension );
+
+			if ( size )
+				value = checkDimension( size, value );
+			value = checkDimension( element.getStyle( dimension ), value );
+
+			this.setValue( value );
+		};
+
 		var previewPreloader;
 
@@ -219,5 +219,5 @@
 
 			// Hide loader
-			CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' );
+			CKEDITOR.document.getById( imagePreviewLoaderId ).setStyle( 'display', 'none' );
 
 			// New image -> new domensions
@@ -247,7 +247,16 @@
 
 			// Hide loader
-			CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' );
+			CKEDITOR.document.getById( imagePreviewLoaderId ).setStyle( 'display', 'none' );
 			switchLockRatio( this, false );	// Unlock.
 		};
+
+		var numbering = function( id ){ return id + CKEDITOR.tools.getNextNumber(); },
+			btnLockSizesId = numbering( 'btnLockSizes' ),
+			btnResetSizeId = numbering( 'btnResetSize' ),
+			imagePreviewLoaderId = numbering( 'ImagePreviewLoader' ),
+			imagePreviewBoxId = numbering( 'ImagePreviewBox' ),
+			previewLinkId = numbering( 'previewLink' ),
+			previewImageId = numbering( 'previewImage' );
+
 		return {
 			title : ( dialogType == 'image' ) ? editor.lang.image.title : editor.lang.image.titleButton,
@@ -274,8 +283,8 @@
 
 				//Hide loader.
-				CKEDITOR.document.getById( 'ImagePreviewLoader' ).setStyle( 'display', 'none' );
+				CKEDITOR.document.getById( imagePreviewLoaderId ).setStyle( 'display', 'none' );
 				// Create the preview before setup the dialog contents.
 				previewPreloader = new CKEDITOR.dom.element( 'img', editor.document );
-				this.preview = CKEDITOR.document.getById( 'previewImage' );
+				this.preview = CKEDITOR.document.getById( previewImageId );
 
 				// Copy of the image
@@ -438,6 +447,6 @@
 					this.hidePage( 'Link' );		//Hide Link tab.
 				var doc = this._.element.getDocument();
-				this.addFocusable( doc.getById( 'btnResetSize' ), 5 );
-				this.addFocusable( doc.getById( 'btnLockSizes' ), 5 );
+				this.addFocusable( doc.getById( btnResetSizeId ), 5 );
+				this.addFocusable( doc.getById( btnLockSizesId ), 5 );
 
 				this.commitContent = commitContent;
@@ -497,5 +506,5 @@
 													original.setCustomData( 'isReady', 'false' );
 													// Show loader
-													var loader = CKEDITOR.document.getById( 'ImagePreviewLoader' );
+													var loader = CKEDITOR.document.getById( imagePreviewLoaderId );
 													if ( loader )
 														loader.setStyle( 'display', '' );
@@ -724,6 +733,6 @@
 													{
 														// Activate Reset button
-														var	resetButton = CKEDITOR.document.getById( 'btnResetSize' ),
-															ratioButton = CKEDITOR.document.getById( 'btnLockSizes' );
+														var	resetButton = CKEDITOR.document.getById( btnResetSizeId ),
+															ratioButton = CKEDITOR.document.getById( btnLockSizesId );
 														if ( resetButton )
 														{
@@ -774,7 +783,7 @@
 													html : '<div>'+
 														'<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.unlockRatio +
-														'" class="cke_btn_locked" id="btnLockSizes" role="button"><span class="cke_label">' + editor.lang.image.unlockRatio + '</span></a>' +
+														'" class="cke_btn_locked" id="' + btnLockSizesId + '" role="button"><span class="cke_label">' + editor.lang.image.unlockRatio + '</span></a>' +
 														'<a href="javascript:void(0)" tabindex="-1" title="' + editor.lang.image.resetSize +
-														'" class="cke_btn_reset" id="btnResetSize" role="button"><span class="cke_label">' + editor.lang.image.resetSize + '</span></a>'+
+														'" class="cke_btn_reset" id="' + btnResetSizeId + '" role="button"><span class="cke_label">' + editor.lang.image.resetSize + '</span></a>'+
 														'</div>'
 												}
@@ -1056,8 +1065,8 @@
 											style : 'width:95%;',
 											html : '<div>' + CKEDITOR.tools.htmlEncode( editor.lang.common.preview ) +'<br>'+
-											'<div id="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>'+
-											'<div id="ImagePreviewBox"><table><tr><td>'+
-											'<a href="javascript:void(0)" target="_blank" onclick="return false;" id="previewLink">'+
-											'<img id="previewImage" alt="" /></a>' +
+											'<div id="' + imagePreviewLoaderId + '" class="ImagePreviewLoader" style="display:none"><div class="loading">&nbsp;</div></div>'+
+											'<div id="' + imagePreviewBoxId + '" class="ImagePreviewBox"><table><tr><td>'+
+											'<a href="javascript:void(0)" target="_blank" onclick="return false;" id="' + previewLinkId + '">'+
+											'<img id="' + previewImageId + '" alt="" /></a>' +
 											( editor.config.image_previewText ||
 											'Lorem ipsum dolor sit amet, consectetuer adipiscing elit. '+
Index: /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js
===================================================================
--- /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/smiley/dialogs/smiley.js	(revision 5504)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -134,9 +134,10 @@
 
 	// Build the HTML for the smiley images table.
+	var labelId = 'smiley_emtions_label' + CKEDITOR.tools.getNextNumber();
 	var html =
 	[
 		'<div>' +
-		'<span id="smiley_emtions_label" class="cke_voice_label">' + lang.options +'</span>',
-		'<table role="listbox" aria-labelledby="smiley_emtions_label" style="width:100%;height:100%" cellspacing="2" cellpadding="2"',
+		'<span id="' + labelId + '" class="cke_voice_label">' + lang.options +'</span>',
+		'<table role="listbox" aria-labelledby="' + labelId + '" style="width:100%;height:100%" cellspacing="2" cellpadding="2"',
 		CKEDITOR.env.ie && CKEDITOR.env.quirks ? ' style="position:absolute;"' : '',
 		'><tbody>'
@@ -149,4 +150,5 @@
 			html.push( '<tr>' );
 
+		var smileyLabelId = 'cke_smile_label_' + i + '_' + CKEDITOR.tools.getNextNumber();
 		html.push(
 			'<td class="cke_dark_background cke_hand cke_centered" style="vertical-align: middle;">' +
@@ -154,5 +156,5 @@
 					' aria-posinset="' + ( i +1 ) + '"',
 					' aria-setsize="' + size + '"',
-					' aria-labelledby="cke_smile_label_' + i + '"',
+					' aria-labelledby="' + smileyLabelId + '"',
 					' class="cke_smile" tabindex="-1" onkeydown="CKEDITOR.tools.callFunction( ', onKeydown, ', event, this );">',
 					'<img class="hand" title="', config.smiley_descriptions[i], '"' +
@@ -162,5 +164,5 @@
 						( CKEDITOR.env.ie ? ' onload="this.setAttribute(\'width\', 2); this.removeAttribute(\'width\');" ' : '' ),
 					'>' +
-					'<span id="cke_smile_label_' + i + '" class="cke_voice_label">' +config.smiley_descriptions[ i ]  + '</span>' +
+					'<span id="' + smileyLabelId + '" class="cke_voice_label">' +config.smiley_descriptions[ i ]  + '</span>' +
 				'</a>',
  			'</td>' );
Index: /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js
===================================================================
--- /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/specialchar/dialogs/specialchar.js	(revision 5504)
@@ -263,5 +263,6 @@
 				chars = this.definition.chars;
 
-			var html = [ '<table role="listbox" aria-labelledby="specialchar_table_label"' +
+			var charsTableLabel =  'specialchar_table_label' + CKEDITOR.tools.getNextNumber();
+			var html = [ '<table role="listbox" aria-labelledby="' + charsTableLabel + '"' +
 						 			' style="width: 320px; height: 100%; border-collapse: separate;"' +
 						 			' align="center" cellspacing="2" cellpadding="2" border="0">' ];
@@ -290,4 +291,6 @@
 						charDesc = charDesc || character;
 
+						var charLabelId =  'cke_specialchar_label_' + i + '_' + CKEDITOR.tools.getNextNumber();
+
 						html.push(
 							'<td class="cke_dark_background" style="cursor: default" role="presentation">' +
@@ -295,5 +298,5 @@
 							' aria-posinset="' + ( i +1 ) + '"',
 							' aria-setsize="' + size + '"',
-							' aria-labelledby="cke_specialchar_label_' + i + '"',
+							' aria-labelledby="' + charLabelId + '"',
 							' style="cursor: inherit; display: block; height: 1.25em; margin-top: 0.25em; text-align: center;" title="', CKEDITOR.tools.htmlEncode( charDesc ), '"' +
 							' onkeydown="CKEDITOR.tools.callFunction( ' + onKeydown + ', event, this )"' +
@@ -303,5 +306,5 @@
 							character +
 							'</span>' +
-							'<span class="cke_voice_label" id="cke_specialchar_label_' + i + '">' +
+							'<span class="cke_voice_label" id="' + charLabelId + '">' +
 							charDesc +
 							'</span></a>');
@@ -315,5 +318,5 @@
 			}
 
-			html.push( '</tbody></table>', '<span id="specialchar_table_label" class="cke_voice_label">' + lang.options +'</span>' );
+			html.push( '</tbody></table>', '<span id="' + charsTableLabel + '" class="cke_voice_label">' + lang.options +'</span>' );
 
 			this.getContentElement( 'info', 'charContainer' ).getElement().setHtml( html.join( '' ) );
Index: /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js
===================================================================
--- /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/templates/dialogs/templates.js	(revision 5504)
@@ -147,4 +147,5 @@
 			var listContainer;
 
+			var templateListLabelId = 'cke_tpl_list_label_' + CKEDITOR.tools.getNextNumber();
 			return {
 				title :editor.lang.templates.title,
@@ -177,8 +178,8 @@
 										focus: true,
 										html :
-											'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="cke_tpl_list_label">' +
+											'<div class="cke_tpl_list" tabIndex="-1" role="listbox" aria-labelledby="' + templateListLabelId+ '">' +
 												'<div class="cke_tpl_loading"><span></span></div>' +
 											'</div>' +
-											'<span class="cke_voice_label" id="cke_tpl_list_label">' + editor.lang.templates.options+ '</span>'
+											'<span class="cke_voice_label" id="' + templateListLabelId + '">' + editor.lang.templates.options+ '</span>'
 									},
 									{
Index: /CKEditor/trunk/_source/plugins/uicolor/dialogs/uicolor.js
===================================================================
--- /CKEditor/trunk/_source/plugins/uicolor/dialogs/uicolor.js	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/uicolor/dialogs/uicolor.js	(revision 5504)
@@ -1,3 +1,3 @@
-﻿/*
+/*
 Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
 For licensing, see LICENSE.html or http://ckeditor.com/license
@@ -8,5 +8,6 @@
 	var dialog, picker, pickerContents,
 		// Actual UI color value.
-		uiColor = editor.getUiColor();
+		uiColor = editor.getUiColor(),
+		pickerId = 'cke_uicolor_picker' + CKEDITOR.tools.getNextNumber();
 
 	function setNewPickerColor( color )
@@ -17,5 +18,5 @@
 		picker.setValue( color, true );
 		// Refresh picker UI.
-		picker.refresh( 'cke_uicolor_picker' );
+		picker.refresh( pickerId );
 	}
 
@@ -34,5 +35,5 @@
 		id : 'yuiColorPicker',
 		type : 'html',
-		html : "<div id='cke_uicolor_picker' style='width: 360px; height: 200px; position: relative;'></div>",
+		html : "<div id='" + pickerId + "' class='cke_uicolor_picker' style='width: 360px; height: 200px; position: relative;'></div>",
 		onLoad : function( event )
 		{
@@ -43,5 +44,5 @@
 
 			// Create new color picker widget.
-			picker = new window.YAHOO.widget.ColorPicker( "cke_uicolor_picker",
+			picker = new window.YAHOO.widget.ColorPicker( pickerId,
 				{
 					showhsvcontrols : true,
Index: /CKEditor/trunk/_source/plugins/uicolor/yui/assets/yui.css
===================================================================
--- /CKEditor/trunk/_source/plugins/uicolor/yui/assets/yui.css	(revision 5503)
+++ /CKEditor/trunk/_source/plugins/uicolor/yui/assets/yui.css	(revision 5504)
@@ -13,3 +13,3 @@
 version: 2.7.0
 */
-#cke_uicolor_picker .yui-picker-panel{background:#e3e3e3;border-color:#888;}#cke_uicolor_picker .yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}#cke_uicolor_picker .yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}#cke_uicolor_picker .yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}#cke_uicolor_picker .yui-picker{position:relative;}#cke_uicolor_picker .yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}#cke_uicolor_picker .yui-picker-hue-bg{-moz-outline:none;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}#cke_uicolor_picker .yui-picker-bg{-moz-outline:none;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html #cke_uicolor_picker .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='picker_mask.png',sizingMethod='scale');}#cke_uicolor_picker .yui-picker-mask{position:absolute;z-index:1;top:0;left:0;}#cke_uicolor_picker .yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}#cke_uicolor_picker .yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}#cke_uicolor_picker .yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}#cke_uicolor_picker .yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}#cke_uicolor_picker .yui-picker-controls .hd{background:transparent;border-width:0!important;}#cke_uicolor_picker .yui-picker-controls .bd{height:100px;border-width:0!important;}#cke_uicolor_picker .yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0;}#cke_uicolor_picker .yui-picker-controls li{padding:2px;list-style:none;margin:0;}#cke_uicolor_picker .yui-picker-controls input{font-size:.85em;width:2.4em;}#cke_uicolor_picker .yui-picker-hex-controls{clear:both;padding:2px;}#cke_uicolor_picker .yui-picker-hex-controls input{width:4.6em;}#cke_uicolor_picker .yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;}
+.cke_uicolor_picker .yui-picker-panel{background:#e3e3e3;border-color:#888;}.cke_uicolor_picker .yui-picker-panel .hd{background-color:#ccc;font-size:100%;line-height:100%;border:1px solid #e3e3e3;font-weight:bold;overflow:hidden;padding:6px;color:#000;}.cke_uicolor_picker .yui-picker-panel .bd{background:#e8e8e8;margin:1px;height:200px;}.cke_uicolor_picker .yui-picker-panel .ft{background:#e8e8e8;margin:1px;padding:1px;}.cke_uicolor_picker .yui-picker{position:relative;}.cke_uicolor_picker .yui-picker-hue-thumb{cursor:default;width:18px;height:18px;top:-8px;left:-2px;z-index:9;position:absolute;}.cke_uicolor_picker .yui-picker-hue-bg{-moz-outline:none;outline:0 none;position:absolute;left:200px;height:183px;width:14px;background:url(hue_bg.png) no-repeat;top:4px;}.cke_uicolor_picker .yui-picker-bg{-moz-outline:none;outline:0 none;position:absolute;top:4px;left:4px;height:182px;width:182px;background-color:#F00;background-image:url(picker_mask.png);}*html .cke_uicolor_picker .yui-picker-bg{background-image:none;filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='picker_mask.png',sizingMethod='scale');}.cke_uicolor_picker .yui-picker-mask{position:absolute;z-index:1;top:0;left:0;}.cke_uicolor_picker .yui-picker-thumb{cursor:default;width:11px;height:11px;z-index:9;position:absolute;top:-4px;left:-4px;}.cke_uicolor_picker .yui-picker-swatch{position:absolute;left:240px;top:4px;height:60px;width:55px;border:1px solid #888;}.cke_uicolor_picker .yui-picker-websafe-swatch{position:absolute;left:304px;top:4px;height:24px;width:24px;border:1px solid #888;}.cke_uicolor_picker .yui-picker-controls{position:absolute;top:72px;left:226px;font:1em monospace;}.cke_uicolor_picker .yui-picker-controls .hd{background:transparent;border-width:0!important;}.cke_uicolor_picker .yui-picker-controls .bd{height:100px;border-width:0!important;}.cke_uicolor_picker .yui-picker-controls ul{float:left;padding:0 2px 0 0;margin:0;}.cke_uicolor_picker .yui-picker-controls li{padding:2px;list-style:none;margin:0;}.cke_uicolor_picker .yui-picker-controls input{font-size:.85em;width:2.4em;}.cke_uicolor_picker .yui-picker-hex-controls{clear:both;padding:2px;}.cke_uicolor_picker .yui-picker-hex-controls input{width:4.6em;}.cke_uicolor_picker .yui-picker-controls a{font:1em arial,helvetica,clean,sans-serif;display:block;*display:inline-block;padding:0;color:#000;}
Index: /CKEditor/trunk/_source/skins/kama/dialog.css
===================================================================
--- /CKEditor/trunk/_source/skins/kama/dialog.css	(revision 5503)
+++ /CKEditor/trunk/_source/skins/kama/dialog.css	(revision 5504)
@@ -680,5 +680,5 @@
 }
 
-.cke_skin_kama .cke_dialog  #ImagePreviewBox
+.cke_skin_kama .cke_dialog  .ImagePreviewBox
 {
 	border : 2px ridge black;
@@ -690,5 +690,5 @@
 }
 
-.cke_skin_kama .cke_dialog #ImagePreviewBox table td {
+.cke_skin_kama .cke_dialog .ImagePreviewBox table td {
 	white-space: normal;
 }
@@ -700,5 +700,5 @@
 }
 
-.cke_skin_kama .cke_dialog  #ImagePreviewLoader
+.cke_skin_kama .cke_dialog  .ImagePreviewLoader
 {
 	position: absolute;
@@ -715,5 +715,5 @@
 }
 
-.cke_skin_kama .cke_dialog  #FlashPreviewBox
+.cke_skin_kama .cke_dialog  .FlashPreviewBox
 {
 	white-space : normal;
Index: /CKEditor/trunk/_source/skins/office2003/dialog.css
===================================================================
--- /CKEditor/trunk/_source/skins/office2003/dialog.css	(revision 5503)
+++ /CKEditor/trunk/_source/skins/office2003/dialog.css	(revision 5504)
@@ -611,5 +611,5 @@
 }
 
-.cke_skin_office2003 .cke_dialog  #ImagePreviewBox
+.cke_skin_office2003 .cke_dialog  .ImagePreviewBox
 {
 	border : 2px ridge black;
@@ -621,5 +621,5 @@
 }
 
-.cke_skin_office2003 .cke_dialog #ImagePreviewBox table td {
+.cke_skin_office2003 .cke_dialog .ImagePreviewBox table td {
 	white-space: normal;
 }
@@ -631,5 +631,5 @@
 }
 
-.cke_skin_office2003 .cke_dialog  #ImagePreviewLoader
+.cke_skin_office2003 .cke_dialog  .ImagePreviewLoader
 {
 	position: absolute;
@@ -646,5 +646,5 @@
 }
 
-.cke_skin_office2003 .cke_dialog  #FlashPreviewBox
+.cke_skin_office2003 .cke_dialog  .FlashPreviewBox
 {
 	white-space : normal;
Index: /CKEditor/trunk/_source/skins/v2/dialog.css
===================================================================
--- /CKEditor/trunk/_source/skins/v2/dialog.css	(revision 5503)
+++ /CKEditor/trunk/_source/skins/v2/dialog.css	(revision 5504)
@@ -613,5 +613,5 @@
 }
 
-.cke_skin_v2 .cke_dialog  #ImagePreviewBox
+.cke_skin_v2 .cke_dialog  .ImagePreviewBox
 {
 	border : 2px ridge black;
@@ -623,5 +623,5 @@
 }
 
-.cke_skin_v2 .cke_dialog #ImagePreviewBox table td {
+.cke_skin_v2 .cke_dialog .ImagePreviewBox table td {
 	white-space: normal;
 }
@@ -633,5 +633,5 @@
 }
 
-.cke_skin_v2 .cke_dialog  #ImagePreviewLoader
+.cke_skin_v2 .cke_dialog  .ImagePreviewLoader
 {
 	position: absolute;
@@ -648,5 +648,5 @@
 }
 
-.cke_skin_v2 .cke_dialog  #FlashPreviewBox
+.cke_skin_v2 .cke_dialog  .FlashPreviewBox
 {
 	white-space : normal;
