var codelibrary = {
	screen:{
		show: function(){
			//hiding all select box, if browser is ie
			if(window.ie){
				$$('select').each(function(el){el.setStyle('visibility', 'hidden')});
			}
			//creating screen			
			var screen = new Element('DIV',{
				'id' : 'x_screen',
				'styles' : {
					position: 'absolute',
					zIndex: 2,
					top: 0,
					left: 0,
					width: window.getWidth(),					
					opacity: 0.8,
					backgroundColor: 'black'
				}
			});
			document.body.appendChild(screen);
			if(window.getHeight() > $('maincontainer').offsetHeight)
				screen.setStyle('height', window.getHeight());
			else
				screen.setStyle('height', $('maincontainer').offsetHeight);			
		},
		hide: function(){
			var screen = $('x_screen');
			if($type(screen).toLowerCase() == 'element'){
				new Fx.Style(screen, 'opacity', {duration: 500}).start(0).chain(function(){
					screen.remove();
					if(window.ie){
						$$('select').each(function(el){el.setStyle('visibility', 'visible')});
					}
				});
			}
		}
	},
	loadtext: {
		show: function(msg){
			var loadtext = new Element('DIV', {
				'id' : 'x_loadtext',
				'styles': {
					position: 'absolute',
					zIndex: 3,
					left: (window.getWidth() - 450) / 2,
					width: 450,
					textAlign: 'center',
					font: 'bold 12pt Arial',
					color: 'white'
				}
			});	
			loadtext.setHTML(msg);
			document.body.appendChild(loadtext);
			loadtext.setStyle('top',(window.getScrollTop() + ((window.getHeight() - loadtext.offsetHeight) / 2)));			
		},
		hide: function(){
			var loadtext = $('x_loadtext');
			if($type(loadtext).toLowerCase() == 'element'){
				loadtext.remove();	
			}
		}
	}
};
