$(function()
{function formatUserAgentValue(value)
{if(value)
{return value;}
return"";}
function updateInformation()
{var tableCells=null;$.each($("#user-agent-information tbody tr"),function()
{tableCells=$(this).children();tableCells.eq(1).text(eval(tableCells.eq(0).text()));});$("#user-agent-xml pre").html('&lt;useragentswitcher&gt;&lt;useragent description="User Agent" useragent="'+formatUserAgentValue(navigator.userAgent)+'" appcodename="'+formatUserAgentValue(navigator.appCodeName)+'" appname="'+formatUserAgentValue(navigator.appName)+'" appversion="'+formatUserAgentValue(navigator.appVersion)+'" platform="'+formatUserAgentValue(navigator.platform)+'" vendor="'+formatUserAgentValue(navigator.vendor)+'" vendorsub="'+formatUserAgentValue(navigator.vendorSub)+'"/&gt;&lt;/useragentswitcher&gt;');}
$("#refresh-information").click(function()
{var information=$("#user-agent-information, #user-agent-xml");information.hide();updateInformation();information.slideDown();});updateInformation();});
