// JavaScript Document

	// -------------------------------------------------------------------------
	//move to jsUtils.js
	
	function pg(id, idPrev, idNext, nHeight, validate) 
	{
	  	this.id = id;
	  	this.idPrev = idPrev;
	  	this.idNext = idNext;
	  	this.idParent = 'dvQrel';
	  	this.height = nHeight;
		this.validate = validate
	}

	function hide(sCtrl) 
	{
	  var dv;
		if (dv = document.getElementById(sCtrl))
			dv.style.visibility = 'hidden'; 
	}
	
	function show(sCtrl) 
	{
	  var dv;
		if (dv = document.getElementById(sCtrl))
			dv.style.visibility = 'visible'; 
	}

	function isEmpty (sCtrl)
	{
		if (document.getElementById(sCtrl).value == "")
			return true;
		else 
			return false;	
	}
	
	function isChecked (sCtrl)
	{
		if (document.getElementById(sCtrl).checked == true)
			return true;
		else
			return false;	
	}
	
	function setFocus(sCtrl) { 
		document.getElementById(sCtrl).focus(); 
	} 

	function setHeight(sCtrl, nHeight) { 
		document.getElementById(sCtrl).style.height = nHeight; 
	} 

	function submitForm() {
		document.forms[0].submit();
	}

	function prev(p) 
	{
		gCurrPage = p
		hide (p.idNext)
		show (p.id)
		setHeight(p.idParent, p.height)
	}

	function next(p) 
	{
		if (gCurrPage.validate) {
			if (!validatePg (gCurrPage.id))
				return;
		}	
		if (!p) {
			submitForm()
			return;
		}	
		gCurrPage = p	
		hide (p.idPrev)
		show (p.id)
		setHeight(p.idParent, p.height)
	}




