Having difficult time to implement a Rule using OpenLayers.Filter.Func

I’m trying to set up a Rule using the Function Filter. But it does not work: the lines on that layer are just black.

Can someone please point out what is the mistake that i’m making?

Here is the code.

Thank you for your time and kind concern.

var my_filter = new OpenLayers.Filter.Function(
function(attributes) {
var x=0;
return true;


var ruleLow = new OpenLayers.Rule({
filter:my_filter ,

var my_style=new OpenLayers.Style( {pointRadius: 10, fillColor: “green”,
fillOpacity: 0.5, strokeColor: “green”},ruleLow);

var my_style_map=new OpenLayers.StyleMap({

this.vectors= new OpenLayers.Layer.Vector(
“Vector Layer”,