if (!app) { 
	var app = new Object(); 
}

app.bloquea = function() {};

app.bloquea.prototype = {
	actionSelect: "display",
	ok: function() { 
		document.getElementById("alert_container").style.display = "none";
	 	this.actionSelect = "block";
		this.selectSH();	 
	},
	cancel: function() { 
		document.getElementById("alert_container").style.display = "none"; 
	 	this.actionSelect = "block";
		this.selectSH();		
	},
	height: function() {
		if (window.scrollHeight) { 
			return window.scrollHeight;
		} else if (document.documentElement && document.documentElement.scrollHeight != 0) {
			return document.documentElement.scrollHeight;
		} else if (document.body) {
			return document.body.scrollHeight;	
		}
		return false;
	},
	container: function() {
	var opacs = ["0",".1",".2",".3",".4",".5",".6",".7",".8",".9","1"];
	var opacs2 = ["0",".1",".2",".3",".4",".5",".6",".7",".8"];	
		if(!document.getElementById("alert_container")) {
			var inBody = document.getElementsByTagName("body")[0];
			var container_alert = document.createElement("div");
			container_alert.id = "alert_container";
			container_alert.style.display = "none";
			inBody.appendChild(container_alert);
		} else {
			var container_alert = document.getElementById("alert_container");
		}
		container_alert.style.height = this.height()+"px";
		
		document.getElementById('alert_container').style.opacity = "0.4";
		document.getElementById('alert_container').style.filter = "alpha(opacity=40)";		
	
		container_alert.style.zIndex = 5;
		return container_alert;
	},
	show: function() {
	 	this.actionSelect = "none";
		this.selectSH();			
		var container = this.container();	
		container.style.display = "";		
	},
	hide: function() {
		document.getElementById("alert_container").style.display = "none";
		this.actionSelect = "block";
		this.selectSH();
	},
	selectSH: function() {
		var fieldSelect= document.getElementsByTagName("select");
		for (k = 0; k < fieldSelect.length; k++){
			fieldSelect[k].style.display = this.actionSelect;
		}
	}
};	
