function hoverRow(tableRow, highLight){
	if (highLight){
	  tableRow.style.backgroundColor = '#eef1f5';/*
	  tableRow.style.backgroundImage = 'url(/files/nkr_raskaat/images/detail_arrow.gif)';
	  tableRow.style.backgroundPosition = '0 10px';
	  tableRow.style.backgroundRepeat = 'no-repeat';*/
	  tableRow.style.cursor = 'pointer';
	}
	else{
	  tableRow.style.backgroundColor = '#FFFFFF';	  
	  tableRow.style.backgroundImage = 'none';
	  tableRow.style.cursor = 'default';
	}

}

function show_details(pid, lang){
document.getElementById('tuote_rengasmerkinnat_details').style.display = 'block';
	document.getElementById('tuote_rengasmerkinnat').style.display = 'none';
if(lang=='fi'){
document.getElementById('tuote_rengasmerkinnat_details').src="/rengasmerkinnat_details?id=" + pid;
}
if(lang=='en'){
document.getElementById('tuote_rengasmerkinnat_details').src="/rengasmerkinnat_details_en?id=" + pid;
}
if(lang=='se'){
document.getElementById('tuote_rengasmerkinnat_details').src="/rengasmerkinnat_details_se?id=" + pid;
}
if(lang=='de'){
document.getElementById('tuote_rengasmerkinnat_details').src="/rengasmerkinnat_details_de?id=" + pid;
}
if(lang=='ru'){
document.getElementById('tuote_rengasmerkinnat_details').src="/rengasmerkinnat_details_ru?id=" + pid;
}

}

function hide_details(pid, lang){
parent.document.getElementById('tuote_rengasmerkinnat_details').style.display = 'none';
	parent.document.getElementById('tuote_rengasmerkinnat').style.display = 'block';
}


function popUpTuoteKuva(id) {
	window.open('/isokuva?id=' + id,'productkuva','scrollbars=no,resizable=no,location=no,toolbar=no,height=625,width=490');
}


function checkCaptcha(field, checkNum, lang)
{
  cStr = field.value;
  totalSum = 0;
  for (i = 0, o = 0; i < cStr.length; i++, o++)
  {
    cNum = new Number(cStr.substr(i, 1));
    if (o == 0)
    {
      totalSum += (cNum.valueOf() * 7);
    } 
    if (o == 1)
    {
      totalSum += (cNum.valueOf() * 3);
    } 
    if (o == 2)
    {
      totalSum += cNum.valueOf();
      o = -1;
    } 
  }
  if (totalSum % 10 != checkNum.value)
  {
	if(lang=='fi'){
	alert("Tarkasta syöttämäsi numerot!");
	}
	if(lang=='se'){
	alert("Var god och kontrollera numren!");
	}
	if(lang=='en'){
	alert("Please check the numbers!");
	}
	if(lang=='no'){
	alert("Sjekk nummeret!");
	}
	if(lang=='cz'){
alert("Zadan\u00e1 \u010d\u00edsla ov\u011b\u0159it!");
	}
	if(lang=='de'){
	alert("Die eingegebenen Nummern prüfen!");
	}
	if(lang=='ru'){
	alert("\u041f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 \u043d\u043e\u043c\u0435\u0440");
	}
    return false;
  }
  return true;
}