<!--

function OpenWindow( path, conf ){
	win = window.open( path, 'SMC', conf );
	win.focus();
}

function CheckAll(elm,name){
  for (var i = 0; i < elm.form.elements.length; i++)
          if (elm.form.elements[i].name.indexOf(name) == 0)
            elm.form.elements[i].checked = elm.checked;
}

function OpenWindowCenter(path, conf, w, h)
{
    var winl = (screen.width - w) / 2;
    var wint = (screen.height - h) / 2;
    winConf = 'height='+h+',width='+w+',top='+wint+',left='+winl + "," + conf;
    window.open(path,"",winConf);
}

function validateEmail (emailField)
{
	emailpat = /^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/;

	if (!emailField.value.match(emailpat))
	{
		alert('Neįvestas arba neteisingas el. pašto adresas!');
		emailField.focus();
		emailField.select();
		return false;
	}

	return true;
}

function enable_vote_but(vote_num, product_id)
{
	var vote_but = document.getElementById("votebut" + product_id);
	
	if (vote_num != "---")
	{
		vote_but.disabled = false;
	}
	else {
		vote_but.disabled = true;
	}
}

-->
