function validate()
{
  if (upload_article.title.value == "")
  {
    alert("Please enter a value for the \"Title\" field.");
    upload_article.title.focus();
    return (false);
  }

  if (upload_article.language.value == "")
  {
    alert("Please enter a value for the \"Language\" field.");
    upload_article.language.focus();
    return (false);
  }

  if (upload_article.publication.value == "")
  {
    alert("Please enter a value for the \"Publication\" field.");
    upload_article.publication.focus();
    return (false);
  }

  if (upload_article.body.value == "")
  {
    alert("Please enter a value for the \"Body of the article\" field.");
    upload_article.body.focus();
    return (false);
  }

  var pFile1=document.upload_article.body.value.indexOf("<I1>");
  var pFile2=document.upload_article.body.value.indexOf("<I2>");
  var pFile3=document.upload_article.body.value.indexOf("<I3>");

  if (pFile1 >= 0)
  {
   if (document.upload_article.picfile1.value == "")
   {
    alert("Please attach the image1.");
    document.upload_article.picfile1.focus();
    return (false);
   }
  }

  if (pFile2 >= 0)
  {
   if (document.upload_article.picfile2.value == "")
   {
    alert("Please attach the image2.")
    document.upload_article.picfile2.focus();
    return (false);
   }
  }

  if (pFile3 >= 0)
  {
   if (document.upload_article.picfile3.value == "")
   {
    alert("Please attach the image3.");
    document.upload_article.picfile3.focus();
    return (false);
   }
  }
  
 if (document.upload_article.picfile1.value != "")
   {
    if(pFile1 < 0)
    {
     alert("Please insert the tag <I1> for the image1.");
     document.upload_article.body.focus();
     return (false);
   }
}
 
if (document.upload_article.picfile2.value != "")
   {
    if(pFile2 < 0)
    {
     alert("Please insert the tag <I2> for the image1.");
     document.upload_article.body.focus();
     return (false);
   }
}
 
if (document.upload_article.picfile3.value != "")
   {
    if(pFile3 < 0)
    {
     alert("Please insert the tag <I3> for the image1.");
     document.upload_article.body.focus();
     return (false);
   }
}
var PFile1 = document.upload_article.picfile1.value;
var Pfile1Chk1 = PFile1.indexOf("'");
if (Pfile1Chk1 > -1)
{
 alert("Please check the 1st file name.");
 document.upload_article.picfile1.focus();
 return (false);
}

var PFile2 = document.upload_article.picfile2.value;
var Pfile1Chk2 = PFile2.indexOf("'");
if (Pfile1Chk2 > -1)
{
 alert("Please check the 2nd file name.");
 document.upload_article.picfile2.focus();
 return (false);
}

var PFile3 = document.upload_article.picfile3.value;
var Pfile1Chk3 = PFile3.indexOf("'");
if (Pfile1Chk3 > -1)
{
 alert("Please check the 3rd file name.");
 document.upload_article.picfile3.focus();
 return (false);
}
  return (true);
}