if (Ajax.getTransport()) {
//supports ajax
}else{
alert('Ajax not supported')
}

 
You can include this onload of your page. Make sure that before checking this , to include the prototype.js in your page