function dOFullscreen(elementId){
	var element = document.getElementById(elementId);
	element.style['opacity']='0';
	element.style['left'] = '0px';
	element.style['position'] = 'absolute';
	element.style['top'] = '0px';
	element.style['height'] = $('body').getHeight() + 'px';
	element.style['width'] = window.getWidth() + 'px';
}

function dOCenterElement(elementId){
	var element = document.getElementById(elementId);
	element.style['display'] = 'block';
	element.style['top'] = '100px';
	element.style['left'] = '50%';
	element.style['margin'] = '0px 0px 0px -' + (element.clientWidth / 2) + 'px';
}

function dOShowElement(elementId,opacity){
	var fx = new Fx.Tween($(elementId), {property: "opacity", duration: 100}).set(0);
	document.getElementById(elementId).style['display'] = 'block';
	fx.start(opacity);
}

function dOHideElement(elementId){
	document.getElementById(elementId).style['display'] = 'none';
}

function dOCheckVisibility(elementId){
	var element = document.getElementById(elementId);
	return(element.style['display']!='none'&&element.style['opacity']>0);
}

function dOStart(elementId,backgroundOpacity){
	dOFullscreen('divOperationsMain');
	document.getElementById('divOperationsMain').style['display'] = 'block';
	var fx = new Fx.Tween($('divOperationsMain'), {property: "opacity", duration: 100, onComplete: function() {dOShowCenterElement(elementId);}}).set(0);
	fx.start(0.8);
}

function dOShowCenterElement(elementId)
{
	dOCenterElement(elementId);
	dOShowElement(elementId,1);
}

function dOEnd(elementId){
		dOHideElement(elementId);
		dOHideElement('divOperationsMain');
}
