String.prototype.printAddr =
function (_hamper,_prefix,_postfix,_face)
{
  _hamper=
  _prefix+
  "@"+
  this+
  (_postfix || '')
   document.write((_face||_hamper).link("mailto:"+_hamper));
  }
  
function NewWindow(theURL, kood)
{
var koguss;
koguss=document.forms[kood].elements['kogus'].value;
theURL=theURL+'?kood='+kood+'&kogus='+koguss;
window.open(theURL,"n_win","width=400, height=500, toolbar=no, location=no, resizable=yes, left=5, top=5");
}

function closewin()
{
window.close();
}

function key1()
{

document.onkeydown=key;

function key()
{

   if(event.keyCode==13)    {
   return false;
   alert("Klickide 'Telli8', palun.");
      	  }
	  }

}

function blink_it_() {
var vis=0;

function blink_it2() {

if (vis==1) {
document.all.mig.style.visibility="hidden";
vis=0;
}
else {
document.all.mig.style.visibility="visible";
vis=1;
}
setTimeout ("blink_it2()", 400);
}
}


var scrollCounter = 0; 
  var scrollText = "Toodete sorteerimiseks nimetuse, koodi või hinna järgi , kilkkige pealkirjadel -'Nimetus', 'Kood', 'Hind'.                                                 Kui kursorit hoida mõni hetk toote hinna peal, siis näete hinda ilma käibemaksuta."; 
  var scrollDelay = 100; 
  var i = 0; 
  while (i ++ < 130) 
  scrollText = " " + scrollText; 
  function Scroller() 
  {window.status = scrollText.substring(scrollCounter++, 
  scrollText.length); 
     if (scrollCounter <= scrollText.length)      setTimeout("Scroller()", 
       scrollDelay); 
	   //else {
	  // scrollCounter = 0;
	  // setTimeout("Scroller()", 
     //  30000);
	 //  }
	   }
  Scroller();

  function openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}