// функция переключения типа группировки в ГОСТах

function switchSelector(n) {
	for (i=1; i<=2; i++) {
		if (n==i) {
			document.getElementById("selector"+i).className="mainGoodsSelectorOff";
			document.getElementById("topics"+i).style.display="inline";
		} else {
			document.getElementById("selector"+i).className="mainGoodsSelectorOn";
			document.getElementById("topics"+i).style.display="none";
		}
	}
}

// функция переключения типа группировки в ГОСТах

function switchSelector2(n) {
	for (i=1; i<=2; i++) {
		if (n==i) {
			document.getElementById("selector"+i).className="mainGoodsSelectorOff2";
			document.getElementById("topics"+i).style.display="inline";
		} else {
			document.getElementById("selector"+i).className="mainGoodsSelectorOn2";
			document.getElementById("topics"+i).style.display="none";
		}
	}
}

function confirmLink(theLink, theSqlQuery)
{
    // Confirmation is not required in the configuration file
    // or browser is Opera (crappy js implementation)
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        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