function convertDate(datein,language) {
    var date ='';

    date = datein.split(" ");

    date = date[0]+' '+changeMonthLang(language,date[1])+' '+date[2];

    document.write(date);
}
function changeMonthLang(lang,monthin) {
   var month = '';

   if (monthin!=10)
   monthin = monthin.replace('0','');
   
   var enMonth = new Array();
   var arMonth = new Array();

   enMonth[1] = "Janurary";	arMonth[1] = "&#01610;&#01606;&#01575;&#01610;&#01585;";
   enMonth[2] = "Feburary";	arMonth[2] = "&#01601;&#01576;&#01585;&#01575;&#01610;&#01585;";
   enMonth[3] = "March";	arMonth[3] = "&#01605;&#01575;&#01585;&#01587;";
   enMonth[4] = "April";	arMonth[4] = "&#01575;&#01576;&#01585;&#01610;&#01604;";
   enMonth[5] = "May";		arMonth[5] = "&#01605;&#01575;&#01610;&#01608;";
   enMonth[6] = "June";		arMonth[6] = "&#01610;&#01608;&#01606;&#01610;&#01608;";
   enMonth[7] = "July";		arMonth[7] = "&#01610;&#01608;&#01604;&#01610;&#01608;";
   enMonth[8] = "August";	arMonth[8] = "&#01575;&#01594;&#01587;&#01591;&#01587;";
   enMonth[9] = "September";	arMonth[9] = "&#01587;&#01576;&#01578;&#01605;&#01576;&#01585;";
   enMonth[10] = "October";	arMonth[10] = "&#01575;&#01603;&#01578;&#01608;&#01576;&#01585;";
   enMonth[11] = "Novemeber";	arMonth[11] = "&#01606;&#01608;&#01601;&#01605;&#01576;&#01585;";
   enMonth[12] = "December";	arMonth[12] = "&#01583;&#01610;&#01587;&#01605;&#01576;&#01585;";

   if(lang=='en') {
	  month = enMonth[monthin];
   }
   else if(lang=='ar') {
      month = arMonth[monthin];
   }
  

    return month;
}