function validFileUpload(zFile, uDocTypes) { 
	if (!uDocTypes || uDocTypes == '') {
		uDocTypes='JPG,GIF,PDF';
	} 
	uFile = zFile.toUpperCase();  
	allowJPG=uDocTypes.indexOf("JPG",0);
	allowGIF=uDocTypes.indexOf("GIF",0);  
	allowPDF=uDocTypes.indexOf("PDF",0);  
	periodPos = uFile.indexOf(".",1) 
	if (periodPos == -1) { 
		return false;
	}
	if (periodPos+3 > uFile.length)	{
		return false;
	}
	isJpg=uFile.indexOf("JPG",periodPos);
	isGif=uFile.indexOf("GIF",periodPos);  
	isPdf=uFile.indexOf("PDF",periodPos);  
	if (
			(allowJPG != -1 &&  isJpg != -1) ||
			(allowGIF != -1 &&  isGif != -1)  ||
			(allowPDF != -1 &&  isPdf != -1)  
		) {
		// jpg allowed, and jpg exists in file name after the period
		ok=true; // continue  
	}
	else { 
		return false;
	} 
 return true; 
}