var LabelToInput = {
	init: function() {
	
		$$('.labelvalue').each( function(elmt) {
			$(elmt).hide();
			var txt = $(elmt).innerHTML;
			var chpsTxt = $(elmt).next("input");
			if(chpsTxt.readAttribute('type') == "text")
			{
				chpsTxt.setValue(txt);
				$(chpsTxt).observe('focus', function(event) {
					if(chpsTxt.getValue() == txt)
					{
						chpsTxt.setValue('');
					}
				});
				
				$(chpsTxt).observe('blur', function(event) {
					if(chpsTxt.getValue() == '')
					{
						chpsTxt.setValue(txt);
					}
				});
			}
		});
		
	}
}

Carousel = Class.create();
Carousel.prototype = {
	initialize: function() {		
		
	},
	
	newVertical:function(id) {
		new UI.Carousel(id, {direction: "vertical"});
	},
	
	newHorizontal:function(id) {
		new UI.Carousel(id);
	}
}

FlashDetect = Class.create();
FlashDetect.prototype = {
	initialize: function() {
		this.playerVersion = swfobject.getFlashPlayerVersion();
	},
	
	isValidVersion: function(major, minor, release) {
			
		if(this.playerVersion.major>major)
			return true;
		
		if((this.playerVersion.major==major) && (this.playerVersion.minor>minor))
			return true;
			
		if((this.playerVersion.major==major) && (this.playerVersion.minor==minor) && (this.playerVersion.release>=release))
			return true;
		
		return false;
	}
}

Event.observe(window, "load", function() {
	LabelToInput.init();
});
