scattertv <- function(x,y,z,itr,ival)
{
   zi <- z[itr]; xi <- x[itr]; yi <- y[itr,1]; 
   points(xi[zi==0],yi[zi==0],col="blue",pch=16)
   points(xi[zi==1],yi[zi==1],col="red",pch=16)
   if (length(ival)>0)
   { 
      zi <- z[ival]; xi <- x[ival]; yi <- y[ival,1]; 
      points(xi[zi==0],yi[zi==0],col="cyan",pch=16)
      points(xi[zi==1],yi[zi==1],col="magenta",pch=16)
   }
}
