function uservalidation()
{
  if(document.frmlogin.username.value.replace(/\s/g,'')=="")
  {
    alert("Provide your user name.");
	document.frmlogin.username.focus();
	return false;
  }
   if(document.frmlogin.userpw.value.replace(/\s/g,'')=="")
  {
    alert("Provide your password.");
	document.frmlogin.userpw.focus();
	return false;
  }
}

function validation()
{
  if(document.uploadfile.thumb.value.replace(/\s/g,'')=="")
  {
    alert("Browse and select the file you want to upload.");
	document.uploadfile.thumb.focus();
	return false;
  }
  return true;
}
function delfile(userfile)
{
  var userfilename= userfile;
  var agree=confirm("Are you sure to delete this file?");
	if (agree)
  	{ 
	 window.location="upload/delete.php?filename="+userfilename;
	}
	
}
