function launchDivCache()
{
	var arrayPageSize = _getPageSize();
	$('body').css("overflow","hidden");
	$('<div id="div_waiting" class="div_caching"></div>').appendTo('body');
	$('#div_waiting')
		.css({height: arrayPageSize[1]+"px",width: arrayPageSize[0]+"px",backgroundColor:"#000"})
		.css({position:"absolute",zIndex:1500,left:"0px",top:"0px"});
	$('<img src="/img/'+_Theme+'/loading.gif" id="load" />').css("position","absolute").appendTo($('#div_waiting'));
	_load_position();
}

function _load_position() {
	var pagesize = _getPageSize();
	var arrayPageScroll = _getPageScrollTop();
	$("#load")
		.css({left: (arrayPageScroll[0] + (pagesize[0] - 16)/2), top: (arrayPageScroll[1] + ((pagesize[1]-16)/2)) })
		.css({display:"block"});
}
function _getPageScrollTop(){
	var yScrolltop;
	var xScrollleft;
	if (self.pageYOffset || self.pageXOffset) {
		yScrolltop = self.pageYOffset;
		xScrollleft = self.pageXOffset;
	} else if (document.documentElement && document.documentElement.scrollTop || document.documentElement.scrollLeft ){	 // Explorer 6 Strict
		yScrolltop = document.documentElement.scrollTop;
		xScrollleft = document.documentElement.scrollLeft;
	} else if (document.body) {// all other Explorers
		yScrolltop = document.body.scrollTop;
		xScrollleft = document.body.scrollLeft;
	}
	arrayPageScroll = new Array(xScrollleft,yScrolltop) 
	return arrayPageScroll;
}

function _getPageSize(){
	var de = document.documentElement;
	var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
	var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight
	arrayPageSize = new Array(w,h) 
	return arrayPageSize;
}

function clearDivCache()
{
	$('#div_waiting').remove();
}
function launchEditWindow(strTitle)
{
	$('body').append(
		'<div class="editWindow">'+
			'<h1>'+
				'<a class="closewin_button" href="javascript:void(0);">X</a>'+
				 strTitle+
			'</h1>'+
			'<div class="editWindow_content">'+
				'<div class="waitingDiv"><img src="/img/'+_Theme+'/loading.gif" /></div>'+
			'</div>'+
		'</div>'
	);
	$('div.editWindow h1 a.closewin_button').click(function() { $('div.editWindow').empty().remove(); });
	return $('div.editWindow');
}