function ARTResizeIFrame(oIFrame)
{
	if (oIFrame.document.body.scrollHeight)
	{
		oIFrame.frameElement.style.height = oIFrame.document.body.scrollHeight + 'px';
	}
}

function ARTToggleSprache(lID, bActive, lIDActive)
{
	var sSrc = 'images/lang/' + lID;

	if ((!bActive) && (lID != lIDActive))
	{
		sSrc = sSrc + '_inactive';
	}
	
	sSrc = sSrc + '.gif';

	document.images['imgSprache' + lID].src = sSrc;
}

function ARTOrderArtikel(iID, sQuestion)
{
	var bOk = true;

	if (sQuestion != '')
	{
		bOk = confirm(sQuestion);
	}

	if (bOk)
	{
		ARTSubmitForm('frmOrder' + iID);
	}
}

function ARTSubmitForm(sFormName)
{
	var oForm = document.forms[sFormName];
	oForm.submit();	
}

function ARTSubmitFormAction(sFormName, sAction)
{
	var oForm = document.forms[sFormName];
	oForm.elements['hidAction'].value = sAction;

	oForm.submit();	
}

function ARTOpenPopup(sPage, lWidth, lHeight, bScrollBars, bCenter)
{
	ARTDoOpenPopup(sPage, lWidth, lHeight, bScrollBars, bCenter);
}

function ARTOpenPopupWithReturn(sPage, lWidth, lHeight, bScrollBars, bCenter)
{
	return ARTDoOpenPopup(sPage, lWidth, lHeight, bScrollBars, bCenter);
}

function ARTDoOpenPopup(sPage, lWidth, lHeight, bScrollBars, bCenter)
{
	if (lWidth > screen.width)
	{
		lWidth = screen.width;
		bScrollBars = true;
	}
	if (lHeight > screen.height)
	{
		lHeight = screen.height;
		bScrollBars = true;
	}

	if (bScrollBars)
	{
		var sScrollBars = 'yes';
	}
	else
	{
		var sScrollBars = 'no';
	}

	var oPopup = window.open(sPage, '', 'width=' + lWidth + ',height=' + lHeight + ',hotkeys=no,locationbar=no,toolbar=no,menubar=no,resizable=no,status=no,scrollbars=' + sScrollBars);

	if (oPopup)
	{
		if (oPopup.closed == false)
		{
			if (bCenter)
			{
		  		oPopup.moveTo((screen.width / 2) - (lWidth / 2), (screen.height / 2) - (lHeight / 2));
			}

			return true;
		}
		else
		{
			return false;
		}
	}
	else
	{
		return false;
	}
}

function ARTHistoryBack()
{
	history.back();
}

function ARTAskUser(sUrl, sQuestion)
{
	if (confirm(sQuestion))
	{
		document.location.href = sUrl;
	}
}

function ARTDoNothing()
{
}