function fnFormLangShow(objE, strAction)
{
	var objT	= document.getElementById('gobjLangActionName');
	var intH	= 0;
	if (objT)
	{
		intH	= objT.offsetParent.offsetHeight;
		switch (strAction)
		{
			case 'USER_AD_LIST':
			{
				objT.innerHTML	= gstrSelectAd;
				break;
			}
			case 'USER_LINK_LIST':
			{
				objT.innerHTML	= gstrSelectLink;
				break;
			}
			case 'USER_FILE_LIST':
			{
				objT.innerHTML	= gstrSelectFile;
				break;
			}
			case 'USER_DOCUMENT_LIST':
			{
				objT.innerHTML	= gstrSelectDoc;
				break;
			}
		}
	}

	objT	= fnFloatTableShow(objE, 'gobjLangTable', {x_pos: 'after_begin', y_pos: 'after_begin', x_offset: 10, y_offset: -(objE.offsetHeight * 2) - 5});
	document.formLang.gstrAction.value	= strAction;
}

function fnFormLangCheck(objForm)
{
	if (!objForm) return false;

	if (objForm.gintLang.value == 0)
	{
		alert(gstrNeedLang);
		return false;
	}

	return true;
}

function doFormLangTarget(objE)
{
	objE.form.target	= objE.checked ? '_blank' : '_self';
}

function doReplacePhotoLinks()
{
	if (!/gecko/i.test(navigator.userAgent))
		return;

	var objE;

	for (var i = 0, nCount = document.links.length; i < nCount; i++)
	{
		objE = document.links[i];

		if (objE.getAttribute('refType') == 'photo')
			objE.href = 'javascript:doOpenLink("' + objE.href + '");';
	}
}

function doOpenLink(strLink)
{
	window.open(strLink);
}
