function strrpos( haystack, needle, offset){
	// http://phpjs.org
	var i = (haystack+'').lastIndexOf(needle, offset);
	return i >= 0 ? i : false;
}
function checkExt(form, field_name){
	filename=form.elements[field_name].value;
	if(!filename.length) return true;
	ext = filename.substring(strrpos(filename, '.') + 1, filename.length);
	if(ext==="zip") return true;
	alert(filename+" is not a .zip archive.\n\nPlease compress your file in zip format and try again.");
	return false
}