function ShowProgress()
{

  strAppVersion = navigator.appVersion;
  if (document.form1.fileupload.value != "")
  {
    if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4)
    {
      winstyle = "dialogWidth=385px; dialogHeight:140px; center:yes";
      window.showModelessDialog('<% = barref %>&b=IE',null,winstyle);
    }
    else
    {
      window.open('<% = barref %>&b=NN','','width=375,height=115', true);
    }
  }
  return true;
}



function check()
{
if(document.form1.fileupload.value=="")
{
alert("Please select the image")
return false
}
// You can modify the file extentions to which ever file extensions you want to unblock
// Example you can modify ".jpg" extension to ".bmp" extension if you want to allow ".bmp" file to upload.

if((document.form1.fileupload.value.lastIndexOf(".jpg")==-1) && (document.form1.fileupload.value.lastIndexOf(".JPG")==-1) && (document.form1.fileupload.value.lastIndexOf(".gif")==-1) && (document.form1.fileupload.value.lastIndexOf(".GIF")==-1))
{
alert("You can upload only upload GIF and JPG extension files")
return false
}
ShowProgress()
document.form1.submit();
return true

}

