glsl problem

there is an article on the nehe website about GLSL.I am trying one of their example sripts in blender;

i

mport GameLogic as g
cont = g.getCurrentController()
obj = cont.getOwner()

VertexShader = """
varying vec3 normal;
varying vec3 vtlvec;


void main()
{
    gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex;
    normal = gl_NormalMatrix * gl_Normal;
    vec4 vimvs = gl_ModelViewMatrix * gl_Vertex;
    vtlvec = vec3(gl_LightSource[0].position-vimvs);
}
"""

FragmentShader = """
varying vec3 normals;
varying vec3 vtlvec;

void main()
{
    const vec4 AmbientColor = vec4(0.1,0.0,0.0,1.0);
    const vec4 DiffuseColor = vec4(1.0,0.0,0.0,1.0);
    
    vec3 normalised_nrm = normalize(normal);
    vec3 normalisedvtlvec = normalize(vtlvec);
    
    float diffterm = clamp(dot(normal,vtlvec),0.0,1.0);
    
    gl_FragColor = AmbientColor+DiffuseColor*diffterm;
}
"""

    
def MainLoop ():


    mesh_index = 0
    mesh = obj.getMesh(mesh_index)

    while mesh != None:

        for mat in mesh.materials:
                
            shader = mat.getShader()
            if shader != None:
                if not shader.isValid():
                    shader.setSource(VertexShader, FragmentShader,1)

                    
        mesh_index += 1
        mesh = obj.getMesh(mesh_index)


MainLoop()

the problem is that i keep getting errors;
http://img2.freeimagehosting.net/uploads/19a6bafa71.jpg

what am i doing wrong?