I wrote this script (but can't take credit for it since it was heavily borrowed from some applescript that was posted online). This will check how long it is until the user's password expires then displays a pop-up letting them know. We have it set for a user's password to be changed every 90 days. You can use this script, but add a line to say that if the result is less than 10 days to display a pop-up notifying the user. You can set this script to run once a day at login, but might need to create a launchdaemon since I have a feeling the pop-up part might result in an error. In any case, I hope this helps and should be something you can work off of.
#!/bin/bash
#########################################################################
#
# This script will let the user know how many days are left until their AD password expires
#
# Author: Jason Borchardt
# Date: 10/15/12
#
#########################################################################
pwdPolicy=90
lastpwdMS=`dscl /Active Directory/(ENTER YOUR DOMAIN HERE)/All Domains/ read /Users//$USER pwdLastSet | /usr/bin/awk '/pwdLastSet:/{print $2}'`
lastpwdUNIX1=`expr $lastpwdMS / 10000000 - 1644473600`
lastpwdUNIX=`expr $lastpwdUNIX1 - 10000000000`
todayUNIX=`date +%s`
diffDays1=`expr $todayUNIX - $lastpwdUNIX`
diffDays=`expr $diffDays1 / 86400`
daysRemaining=`expr $pwdPolicy - $diffDays`
/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -title "$daysRemaining" -description "Days until your AD password expires: $daysRemaining" -icon /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ToolbarInfo.icns -button1 "OK" -defaultButton 1