//perekljuchenie jazyka
function changeLang_old(l)
{
document.newlangform.lang.value=l
this.newlangform.submit()
}
function changeLang(l)
{
document.newlangform.nlang.value=l
this.newlangform.submit()
}


function submitMessageList(id, dd)
{
document.messagelistform.message_id.value=id
document.messagelistform.message_act.value=dd
this.messagelistform.submit()
}

function openLinkInParentWindow(link){
      window.opener.parent.location.href=link;
      window.close();
}

function openWin(a,p)
{
small=window.open("","History",p);
small.location=a;
small.focus();
}

// js form validation stuff

var confirmMsg  = 'Are you sure to delete? ';
function confirmLink(theLink, theSqlQuery)
	{
		// Confirmation is not required in the configuration file
		if (confirmMsg == '') {
			return true;
			}
			var is_confirmed = confirm(confirmMsg + ' :\n' + theSqlQuery);
			if (is_confirmed) {
				theLink.href += '&is_js_confirmed=1';
				}
				return is_confirmed;
				} // end of the 'confirmLink()' function 





