// ALL THIS CODE HAS BEEN MOVED INTO functions.js
	/************************************************************************************************************
	(C) www.dhtmlgoodies.com, October 2005
	
	This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	
	
	Terms of use:
	You are free to use this script as long as the copyright message is kept intact. However, you may not
	redistribute, sell or repost it without our permission.
	
	Thank you!
	
	www.dhtmlgoodies.com
	Alf Magne Kalleland
	
	************************************************************************************************************/		
	var progressbar_steps = 50;	// Total number of progress bar steps.
	
	/* Don't change any of these variables */
	var dhtmlgoodies_progressPane = false;
	var dhtmlgoodies_progressBar_bg = false;
	var dhtmlgoodies_progressBar_outer = false;
	var dhtmlgoodies_progressBar_txt = false;
	var progressbarWidth;
	var currentStep = 0;
	function moveProgressBar(steps){
		if(!dhtmlgoodies_progressBar_bg){
			dhtmlgoodies_progressPane = document.getElementById('dhtmlgoodies_progressPane');
			dhtmlgoodies_progressBar_bg = document.getElementById('dhtmlgoodies_progressBar_bg');
			dhtmlgoodies_progressBar_outer = document.getElementById('dhtmlgoodies_progressBar_outer');
			dhtmlgoodies_progressBar_txt = document.getElementById('dhtmlgoodies_progressBar_txt');
			progressbarWidth = dhtmlgoodies_progressBar_bg.clientWidth;
		}
		if(!steps){
			dhtmlgoodies_progressBar_outer.style.width = progressbarWidth + 'px';
			dhtmlgoodies_progressBar_txt.innerHTML = '100%';
			setTimeout('document.getElementById("dhtmlgoodies_progressPane").style.display="none"',50);
		}else{
			currentStep+=steps;
			if(currentStep>progressbar_steps)currentStep = progressbar_steps;
			var width = Math.ceil(progressbarWidth * (currentStep / progressbar_steps));
			dhtmlgoodies_progressBar_outer.style.width = width + 'px';
			var percent = Math.ceil((currentStep / progressbar_steps)*100);
			dhtmlgoodies_progressBar_txt.innerHTML = percent + '%';
			if(currentStep==progressbar_steps){
				setTimeout('document.getElementById("dhtmlgoodies_progressPane").style.display="none"',50);
			}
		}
		
		
		
		
	}
	
	function demoProgressBar()
	{
		if(currentStep<progressbar_steps){
			moveProgressBar(10);
			setTimeout('demoProgressBar()',1000);
		}
	}
	
function centerDIV(div, Width, Height) {
if (isNN) { Height = Height-60; Width=Width-5;}
var w = (screen.width - Width)/2;
var h = (screen.height - Height)/2 - 20;
	div.style.position = 'absolute';
	div.top   = h;
	div.left  = w;
	div.height= Height+'px';
	div.width = Width +'px';
}
	
function pleaseWait(isSlow) {

	if (isSlow) {
		body = document.createElement("body");
		document.body = body;
		div = document.createElement("div");

	//	centerDIV(div, 400, 200);
		div.innerHTML = '' +
		'<div id="dhtmlgoodies_progressPane">' +
	    	'<div id="dhtmlgoodies_progressBar_bg">' +
	    		'<div id="dhtmlgoodies_progressBar_outer">' +
	    			'<div id="dhtmlgoodies_progressBar"></div>' +
				'</div>' +
	    		'<div id="dhtmlgoodies_progressBar_txt">0 %</div>' +
			'</div>' +
		'</div>';

		body.appendChild(div);
		demoProgressBar();
	}
}	

 

