function dropdown_m(sub_id,act)
{
	if(act == 'show')
	{
		if(sub_id == '1') {document.getElementById('dropdown_dviraciai').style.display = 'block'; }
		else {document.getElementById('dropdown_komplektai').style.display = 'block'; }
	}else{
		if(sub_id == '1') {
			document.getElementById('dropdown_dviraciai').style.display = 'none'; 
			document.getElementById('men_dvirat').style.textDecoration = 'none';
		}else {
			document.getElementById('dropdown_komplektai').style.display = 'none'; 
			document.getElementById('men_komple').style.textDecoration = 'none';
		}
	}
}

function set_trans(obj_id){obj_id.style.opacity=1;obj_id.filters.alpha.opacity=100;}
function set_some_trans(obj_id){obj_id.style.opacity=0.9;obj_id.filters.alpha.opacity=90;}
function unset_trans(obj_id){obj_id.style.opacity=0.4;obj_id.filters.alpha.opacity=40;}

function isNumberKey(evt)
{
  var charCode = (evt.which) ? evt.which : event.keyCode
	if(charCode == 44){return true;}
	if(charCode == 46){return false;}
	if(charCode == 188){return false;}
  if (charCode > 31 && (charCode < 48 || charCode > 57)){return false;}
  return true;
}

function show_hide(blokas_id)
{
 bl = document.getElementById(blokas_id);
 bl2 = document.getElementById(blokas_id + '_ex');
 if(bl.style.display=="none" ){bl.style.display="block";bl2.innerHTML = '-';} else { bl.style.display="none";bl2.innerHTML = '+';}
}

function isValidEmail(checkEmail) 
{
  if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.')))
	{return true;}
	else
	{return false;}
}

function show_warn(warn_id)
{
 	warn_block = document.getElementById(warn_id);
	warn_block.style.display = 'block';
}
function hide_warn(warn_id)
{
 	warn_block = document.getElementById(warn_id);
	warn_block.style.display = 'none';
}

function set_nosubmit()
{
 document.getElementById('nosubmit').value = 1;
}
