function chglang(lang){
  url = location.href;
  if (lang==0) {
        regexp = /.php/gi;
         newstr = "_e.php";
  }
  else
     if (lang==1)
         {regexp = /_e.php/gi;
          newstr = ".php";
         }
     else
       if (lang==2)
             {regexp = /.php/gi;
               newstr = "_s.php";
             }
       else
          if (lang==3)
              {regexp=/_e.php/gi;
               newstr= "_s.php";
              }
        else
              if (lang==4)
	  {regexp=/_s.php/gi;
                   newstr=".php";
              }
         else
                 {regexp=/_s.php/gi;
                   newstr="_e.php";
                 }


          
  url = url.replace(regexp, newstr);
  //document.write (url);
  window.location = url;
 }
