var isIMG = document.images;
var bon;
var boff;

    if (isIMG) {
      bon = new Image(); 
      boff = new Image();   
      bon.src = 'images/goldstar.gif';
      boff.src = 'images/silverstar.gif';
    }

    function b(bname) {
        if (isIMG) {
          document[bname].src = (document[bname].src.indexOf('goldstar.gif') != -1) ? 'images/silverstar.gif' : 'images/goldstar.gif';
        }
    }



function checknew(date) {
  var newimg = "images/new.gif";
  var expdate = new Date(date);
  var curdate = new Date();
  if (expdate.getTime() > curdate.getTime())
  {
    document.write('<img src=' + newimg + '>');
  }

}