var str=location.href;
if (str.substr(7,1) != "w" && str.substr(7,1) != "W" )
{
  location.href = "http://www."+str.substr(7);
} 

