function doBlockRij(objId) 	{ 	document.getElementById(objId).style.display 	= 	""; 	}
function doBlockObj(oObj)	{	oObj.style.display								=	"";		}
function doHideRij(objId) 	{ 	document.getElementById(objId).style.display 	= 	"none";	}
function doHideObj(oObj)	{	oObj.style.display								=	"none";	}
function doHideField(sObjId)
{
	var iSoort							=	findHtmlType(sObjId, -1);
	if ((iSoort == 3) || (iSoort == 4))	{	sObjId	+=	"_0";													}	//Specific workaround for 'multiple' fields (like radio groups or checkboxes)
	if (iSoort != 4)					
	{ 
		if (document.getElementById(sObjId)==null)
		{
			alert(sObjId);
		}
	}

	if (iSoort != 4)					{	doHideObj(document.getElementById(sObjId).parentNode);				}
	else 								{	doHideObj(document.getElementById(sObjId).parentNode.parentNode); 	}
}

function doShowField(sObjId)
{
	var iSoort							=	findHtmlType(sObjId, -1);
	if ((iSoort == 3) || (iSoort == 4))	{	sObjId	+=	"_0";													}	//Specific workaround for 'multiple' fields (like radio groups or checkboxes)

	if (iSoort != 4)					
	{ 
		if (document.getElementById(sObjId)==null)
		{
			alert(sObjId);
		}
	}
	if (iSoort != 4)					{	doBlockObj(document.getElementById(sObjId).parentNode);				}
	else								{	doBlockObj(document.getElementById(sObjId).parentNode.parentNode);	}
}

function doGetHeight()
{
	var oObj				=	document.getElementById("content-layer");
	if (IE == true)			{	return oObj.clientHeight+100;					}
	else if (saf == true)	{	return parseInt(oObj.scrollHeight) + 180;	}
	else					{	return parseInt(oObj.scrollHeight) + 180;	}
}

//Retrieves the error message to display it a form field has not been filled
function getEmptyErrorText(sObjId, veldIndex)
{
	var iSoort				=	findHtmlType(sObjId, -1);
	if (! isNaN(veldIndex))	{	sObjId	= 	String(sObjId).replace("_"+veldIndex, "");	}
	for (var f=0; f < formFields.length; f++)
	{
		if (String(formFields[f][0]).toLowerCase() == String(sObjId).toLowerCase() && formFields[f][5].length > 0)	{	return formFields[f][5]; 	}
	}
	//Didn't find nothing??
	if (iSoort == 1 || iSoort == 3 || iSoort == 4)	{	return "Maak een keuze.";	}
	return "U heeft deze vraag nog niet beantwoord.";
}


function getIncorrectErrorText(sObjId, veldIndex)
{
	var iSoort				=	findHtmlType(sObjId, -1);
	if (! isNaN(veldIndex))	{	sObjId	= 	String(sObjId).replace("_"+veldIndex, "");	}
	for (var f=0; f < formFields.length; f++)
	{
		if (String(formFields[f][0]).toLowerCase() == String(sObjId).toLowerCase() && formFields[f][6].length > 0)	{	return formFields[f][6]; 	}
	}
	return "Uw invoer is incorrect. Corrigeer uw invoer a.u.b.";
}

function getViolationMinimum(sObjId, veldIndex)
{
	var iSoort				=	findHtmlType(sObjId, -1);
	if (! isNaN(veldIndex))	{	sObjId	= 	String(sObjId).replace("_"+veldIndex, "");	}
	for (var f=0; f < formFields.length; f++)
	{
		if (String(formFields[f][0]).toLowerCase() == String(sObjId).toLowerCase() && formFields[f][14].length > 0)	{	return formFields[f][14]; 	}
	}
	return "Uw invoer voldoet niet aan de minimumwaarde voor dit veld. Corrigeer uw invoer a.u.b.";
}

function getViolationMaximum(sObjId, veldIndex)
{
	var iSoort				=	findHtmlType(sObjId, -1);
	if (! isNaN(veldIndex))	{	sObjId	= 	String(sObjId).replace("_"+veldIndex, "");	}
	for (var f=0; f < formFields.length; f++)
	{
		if (String(formFields[f][0]).toLowerCase() == String(sObjId).toLowerCase() && formFields[f][15].length > 0)	{	return formFields[f][15]; 	}
	}
	return "Uw invoer voldoet niet aan de maximumwaarde voor dit veld. Corrigeer uw invoer a.u.b.";
}

function getDefaultValue(sObjId, veldIndex)
{
	var iSoort				=	findHtmlType(sObjId, -1);
	if (! isNaN(veldIndex))	{	sObjId	= 	String(sObjId).replace("_"+veldIndex, "");	}
	var sObjName			=	document.getElementById(sObjId).name;
	for (var f=0; f < formFields.length; f++)
	{
		if (String(formFields[f][0]).toLowerCase() == String(sObjName).toLowerCase() && formFields[f][16].length > 0)	{	return formFields[f][16]; 	}
	}
	return "";
}

var iCurrentHeight			=	0;
function doSetFormHeight(iHeight, sInit)
{
	if ((iCurrentHeight != iHeight) && (iHeight > 0) && (bAllowSizing == true))
	{
		iCurrentHeight	=	iHeight;
		if (sInit != "y")	{	sInit	=	'n';	}
		if (saf == true) 	{	document.getElementById('sizerFrame').location.href	=	"http://"+sCaller+"/CmsClient/Common/sizer.php?iHeight="+iHeight+"&sInit="+sInit;	}
		else 				{	window.frames["sizerFrame"].location.href	=	"http://"+sCaller+"/CmsClient/Common/sizer.php?iHeight="+iHeight+"&sInit="+sInit;	}
	}
}
function ParseContent(content,innerDiv)
{
	if(content!=null)
	{
		if (saf == true) 	{	document.getElementById('sizerFrame').location.href	=	"http://"+sCaller+"/CmsClient/Common/parsecontent.php?conent="+content+"&innerDiv=" + innerDiv;}
		else
		{	
			url = "http://"+sCaller+"/CmsClient/Common/parsecontent.php?content="+escape(content)+"&innerDiv=" + innerDiv;
			setTimeout(
				function() {
				window.frames["sizerFrame"].location.href=url
			}, 100);

		}
	}
}


function doArt(iArt)
{
	if (parseInt(iArt) > 0)
	{
		if (saf == true) 	{ 	document.getElementById("sizerFrame").src	=	"http://"+sCaller+"/CmsClient/Common/loader.php?art="+iArt+"&fc="+iCycleId;	}
		else 				{ 	window.frames["sizerFrame"].location		=	"http://"+sCaller+"/CmsClient/Common/loader.php?art="+iArt+"&fc="+iCycleId;	}
	}
}

function doApp(iApp)
{
	if (parseInt(iApp) > 0)
	{
		if (saf == true) 	{ 	document.getElementById("sizerFrame").src	=	"http://"+sCaller+"/CmsClient/Common/loader.php?app="+iApp+"&fc="+iCycleId+"&id="+iTmpReseller;	}
		else 				{ 	window.frames["sizerFrame"].location		=	"http://"+sCaller+"/CmsClient/Common/loader.php?app="+iApp+"&fc="+iCycleId+"&id="+iTmpReseller;	}
	}
}

function doSitemap(sPage, iPage, iApp, iArt, iMi)
{
	var sLoader		=	"http://"+sCaller+"/CmsClient/Common/sitemap.php?sUrl="+sPage+"&wp="+iPage+"&app="+iApp+"&art="+iArt+"&mi="+iMi;
	doSneaky(sLoader);
}

function doSneaky(sFrame)
{
	window.frames["sizerFrame"].location.replace(sFrame);
	//try			{	document.getElementById("bogus-layer").innerHTML	=	document.getElementById("bogus-layer").innerHTML + "<iframe src=\""+sFrame+"\"></iframe>";	}
	//catch (e)	{	alert("Uw browser ondersteunt helaas niet alle gebruikte technieken op deze site (waaronder deze functie).");	return;								}
}

