if(Browser.Engine.trident)
	{
	var IESelectsManager=new Class({
		initialize: function()
			{
			this.selects=$$('select');
			this.selects.each(this.initializeSelect, this);
			},
		initializeSelect: function(select)
			{
			var initSize = select.getStyle('width'), maxSize = 0;
			$(select).set('style','width:auto;');
			maxSize=select.offsetWidth;
			$(select).set('style','width:none;');
			if (maxSize > initSize.substring(0,initSize.length-2))
				{
				select.addEvent('mousedown',this.handleSelectChoice.bind(this));
				window.document.addEvent('click', this.handleOutsideClick.bind(this));
				select.addEvent('change',this.handleSelectChange.bind(this));
				}
			},
		handleOutsideClick: function(event)
			{
			if(event.target.nodeName.toLowerCase() != 'select')
				{
				this.selects.each(this.handleSelectBlur,this);
				}
			},
		handleSelectChange: function(event)
			{
			if(event.target.nodeName.toLowerCase() == 'select')
				{
				this.handleSelectBlur(event.target);
				}
			},
		handleSelectBlur: function(select)
			{
			$(select).set('style','width:none; position:static;');
			},
		handleSelectChoice: function(event)
			{
			var select=event.target;
			$(select).set('style','width:auto; position:absolute; left:'+$(select).getPosition().x+'px; top:'+$(select).getPosition().y+'px;');
			}
		});
	new IESelectsManager();
	}

// No parent frames
window.addEvent('domready', function() {
    if (window.top.location.href != location.href)
		{
		window.top.location.href = location.href;
		}
});
