function loadLoader() {
  var WindowWidth = 0, WindowHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    WindowWidth = window.innerWidth;
    WindowHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    WindowWidth = document.documentElement.clientWidth;
    WindowHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    WindowWidth = document.body.clientWidth;
    WindowHeight = document.body.clientHeight;
  }
	loadDiv=document.createElement("div");
	loadDiv.className = "loadDivContainer";
	loadDiv.id = "loadDivContainer";
	loadDiv.style.position = 'absolute';
	loadDiv.style.top = 0;
	loadDiv.style.left = 0;
	loadDiv.style.width = WindowWidth;
	loadDiv.style.height = WindowHeight;
	loadDiv.style.filter = 'Alpha(opacity=50)';
	loadDiv.style.opacity = 0.5;
	loadDiv.style.background = '#000000';
	document.body.appendChild(loadDiv);

	imgLeft = WindowWidth / 2;
	imgTop = WindowHeight / 2.6;
	var img=document.createElement('IMG');
	img.id = 'loaderImg';
	img.src = 'loader.gif';
	img.style.position = 'absolute';
	img.style.left=imgLeft;
	img.style.top=imgTop;
	document.body.appendChild(img);
	
}
function unloadLoader() {
  document.body.removeChild(document.getElementById('loadDivContainer'));
  document.body.removeChild(document.getElementById('loaderImg'));
}


