var rp=false
var agt=navigator.userAgent.toLowerCase()
var opera  = agt.indexOf("opera")
if(opera!=-1) if(parseFloat((agt.substring(opera+6,agt.lastIndexOf(' ')))) < 8.00) rp=true
	function getPageScroll(){
	var yScroll;
	if (self.pageYOffset) {
		yScroll = self.pageYOffset;
	} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict
		yScroll = document.documentElement.scrollTop;
	} else if (document.body) {// all other Explorers
		yScroll = document.body.scrollTop;
	}
	arrayPageScroll = new Array('',yScroll) 
	return arrayPageScroll;
}

	function getPageSize(){
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ 
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { 
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	var windowWidth, windowHeight;
	if (self.innerHeight) {	
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) {
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}

function progressBarInit(){
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	var loadingImage = '/style_images/1/loading.gif';		
	
	selects = document.getElementsByTagName("select");
	for (i = 0; i != selects.length; i++) {
	    selects[i].style.visibility = "hidden";
	}
	
	var objOverlay = document.getElementById('busyLayer');
	objOverlay.style.position = 'absolute';
	objOverlay.style.top = '0';
	objOverlay.style.left = '0';
	objOverlay.style.zIndex = '90';
 	objOverlay.style.width = '100%';
	objOverlay.style.height = (arrayPageSize[1] + 'px');
	objOverlay.style.display = 'block';

	var objLoadingImage = document.getElementById('loadingLayer');
		objLoadingImage.style.position = 'absolute';
		objLoadingImage.style.zIndex = '150';
		objLoadingImage.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] + 140 - parseInt(objLoadingImage.style.height)) / 2) + 'px');
		objLoadingImage.style.left = (((arrayPageSize[0] - 20 - parseInt(objLoadingImage.style.width)) / 2) + 'px');
		objLoadingImage.style.display = 'block';
	}
