// JavaScript Document

menu_status = new Array(); 

function hideShow(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}

function cconv1()
{
	if(!(document.converter.val1.value))
		document.converter.val2.value = "";
	else if ((document.converter.cur1.options[document.converter.cur1.selectedIndex].value == -1) || (document.converter.cur2.options[document.converter.cur2.selectedIndex].value == -1))
		document.converter.val2.value = "";
	else
	{
		document.converter.val2.value=parseFloat(document.converter.val1.value)*(parseFloat(document.converter.cur1.options[document.converter.cur1.selectedIndex].value)/parseFloat(document.converter.cur2.options[document.converter.cur2.selectedIndex].value));
		document.converter.val2.value=Math.round(document.converter.val2.value*100)/100;
	}
}

function switchTabs(tabId, tabNo, qTabs) {
	if (tabNo == '' || tabNo == null) tabNo = 1;
	if (typeof tabNo == 'string') tabNo = tabNo.charCodeAt(0)-64;
	for (t=1;t<=qTabs;t++) {
		tabToChange = document.getElementById(tabId+t+'tab');
		tabToHide = document.getElementById(tabId+t);
		tabToChange.className = 'tabHide';
		tabToHide.style.display = 'none' ;
	}
	tabToSet = document.getElementById(tabId+tabNo+'tab');
	tabToShow = document.getElementById(tabId+tabNo);
	tabToSet.className = 'tabShow';
	tabToShow.style.display = 'block';
}

function MM_openBrWindow(f_ime,winName,features) {
	theURL='vguide/multimedia/qp.php?f='+f_ime+'&winName='+winName;
	window.open(theURL,winName,features);
}