<script type="text/javascript">
//Note: userAgent in Opera9.24 WinXP returns: Opera/9.24 (Windows NT 5.1; U; en)
// userAgent in Opera 8.5 (identified as IE) returns: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 8.50 [en]
// userAgent in Opera 8.5 (identified as Opera) returns: Opera/8.50 (Windows NT 5.1; U) [en]
if (/Opera[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Opera/x.x or Opera x.x (ignoring remaining decimal places);
var oprversion=new Number(RegExp.$1) // capture x.x portion and store as a number
if (oprversion>=10)
document.write("You're using Opera 10.x or above")
else if (oprversion>=9)
document.write("You're using Opera 9.x")
else if (oprversion>=8)
document.write("You're using Opera 8.x")
else if (oprversion>=7)
document.write("You're using Opera 7.x")
else
document.write("n/a")
}
else
document.write("n/a")
</script>