
function getE(objectID) {
	return document.getElementById(objectID);
}

function BrCheck()
{
	this.VER	= navigator.appVersion;
	this.AGENT	= navigator.userAgent;
	this.DOM	= document.getElementById ? true:false;

	this.OP5	= this.AGENT.indexOf("Opera 5")>-1							?true:false;
	this.OP6	= this.AGENT.indexOf("Opera 6")>-1							?true:false;
	this.OP7	= this.AGENT.indexOf("Opera 7")>-1							?true:false;
	this.OP		= (this.OP5 || this.OP6 || this.OP7);

	this.IE4	= (document.all && !this.DOM && !this.OP)					?true:false;
	this.IE5	= (this.VER.indexOf("MSIE 5")>-1 && this.DOM && !this.OP)	?true:false; 
	this.IE6	= (this.VER.indexOf("MSIE 6")>-1 && this.DOM && !this.OP)	?true:false;
	this.IE		= (this.IE4 || this.IE5 || this.IE6);

	this.NS4	= (document.layers && !this.DOM)							?true:false;
	this.NS7	= (this.DOM && parseInt(this.VER) >= 5 && this.AGENT.lastIndexOf('Netscape')<this.AGENT.lastIndexOf('7'))?true:false;
	this.NS6	= (this.DOM && parseInt(this.VER) >= 5 && !this.NS7)		?true:false;
	this.NS		= (this.NS4 || this.NS6 || this.NS7);

	return this;
}

function DeliverySame(bChecked)
{
	if (bChecked) {
	getE('dodac_spolocnost').value = getE('fakt_spolocnost').value;
	getE('dodac_meno').value = getE('fakt_meno').value;
	getE('dodac_priezvisko').value = getE('fakt_priezvisko').value;
	getE('dodac_adresa').value = getE('fakt_adresa').value;
	getE('dodac_mesto').value = getE('fakt_mesto').value;
	getE('dodac_psc').value = getE('fakt_psc').value;
	}
	getE('dodac_spolocnost').readOnly = bChecked;
	getE('dodac_meno').readOnly = bChecked;
	getE('dodac_priezvisko').readOnly = bChecked;
	getE('dodac_adresa').readOnly = bChecked;
	getE('dodac_mesto').readOnly = bChecked;
	getE('dodac_psc').readOnly = bChecked;
	if (bChecked) {
		getE('dodac_spolocnost').style.backgroundColor = "#ECEEF4";
		getE('dodac_meno').style.backgroundColor = "#ECEEF4";
		getE('dodac_priezvisko').style.backgroundColor = "#ECEEF4";
		getE('dodac_adresa').style.backgroundColor = "#ECEEF4";
		getE('dodac_mesto').style.backgroundColor = "#ECEEF4";
		getE('dodac_psc').style.backgroundColor = "#ECEEF4";
	}
	else
	{
		getE('dodac_spolocnost').style.backgroundColor = "#FFFFFF";
		getE('dodac_meno').style.backgroundColor = "#FFFFFF";
		getE('dodac_priezvisko').style.backgroundColor = "#FFFFFF";
		getE('dodac_adresa').style.backgroundColor = "#FFFFFF";
		getE('dodac_mesto').style.backgroundColor = "#FFFFFF";
		getE('dodac_psc').style.backgroundColor = "#FFFFFF";
	}
}

