document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("12\n");
document.write("13\n");
document.write("14\n");
document.write("15\n");
document.write("16\n");
document.write("17\n");
document.write("18\n");
document.write("19\n");
document.write("20\n");
document.write("21\n");
document.write("22\n");
document.write("23\n");
document.write("24\n");
document.write("25\n");
document.write("26\n");
document.write("27\n");
document.write("28\n");
document.write("29\n");
document.write("30\n");
document.write("31\n");
document.write("32\n");
document.write("33\n");
document.write("34\n");
document.write("35\n");
document.write("36\n");
document.write("37\n");
document.write("38\n");
document.write("39\n");
document.write("40\n");
document.write("41\n");
document.write("42\n");
document.write("43\n");
document.write("44\n");
document.write("45\n");
document.write("46\n");
document.write("47\n");
document.write("48\n");
document.write("49\n");
document.write("50\n");
document.write("51\n");
document.write("52\n");
document.write("53\n");
document.write("54\n");
document.write("55\n");
document.write("56\n");
document.write("57\n");
document.write("58\n");
document.write("59\n");
document.write("60\n");
document.write("61\n");
document.write("62\n");
document.write("63\n");
document.write("64\n");
document.write("65\n");
document.write("66\n");
document.write("67\n");
document.write("68\n");
document.write("69\n");
document.write("70\n");
document.write("71\n");
document.write("72\n");
document.write("73\n");
document.write("74\n");
document.write("75\n");
document.write("76\n");
document.write("77\n");
document.write("78\n");
document.write("79\n");
document.write("80\n");
document.write("81\n");
document.write("82\n");
document.write("83\n");
document.write("84\n");
document.write("85\n");
document.write("86\n");
document.write("87\n");
document.write("88\n");
document.write("89\n");
document.write("90\n");
document.write("91\n");
document.write("92\n");
document.write("93\n");
document.write("94\n");
document.write("95\n");
document.write("96\n");
document.write("97\n");
document.write("98\n");
document.write("99\n");
document.write("100\n");
document.write("101\n");
document.write("102\n");
document.write("103\n");
document.write("104\n");
document.write("105\n");
document.write("106\n");
document.write("107\n");
document.write("108\n");
document.write("109\n");
document.write("110\n");
document.write("111\n");
document.write("112\n");
document.write("113\n");
document.write("114\n");
document.write("115\n");
document.write("116\n");
document.write("117\n");
document.write("118\n");
document.write("119\n");
document.write("120\n");
document.write("121\n");
document.write("122\n");
document.write("123\n");
document.write("124\n");
document.write("125\n");
document.write("126\n");
document.write("127\n");
document.write("128\n");
document.write("129\n");
document.write("130\n");
document.write("131\n");
document.write("132\n");
document.write("133\n");
document.write("134\n");
document.write("135\n");
document.write("136\n");
document.write("137\n");
document.write("138\n");
document.write("139\n");
document.write("140\n");
document.write("141\n");
document.write("142\n");
document.write("143\n");
document.write("144\n");
document.write("145\n");
document.write("146\n");
document.write("147\n");
document.write("148\n");
document.write("149\n");
document.write("150\n");
document.write("151\n");
document.write("152\n");
document.write("153\n");
document.write("154\n");
document.write("155\n");
document.write("156\n");
document.write("157\n");
document.write("158\n");
document.write("159\n");
document.write("160\n");
document.write("161\n");
document.write("162\n");
document.write("163\n");
document.write("164\n");
document.write("165\n");
document.write("166\n");
document.write("167\n");
document.write("168\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\"><span class=\'source source_php source_php_embedded source_php_embedded_block source_php_embedded_block_html\'>&lt;?php\n");
document.write("<span class=\'meta meta_class meta_class_php\'><span class=\'storage storage_type storage_type_class storage_type_class_php\'>class<\/span> <span class=\'entity entity_name entity_name_type entity_name_type_class entity_name_type_class_php\'>BrowserUtils<\/span><\/span>\n");
document.write("{\n");
document.write("	<span class=\'comment comment_block comment_block_documentation comment_block_documentation_phpdoc comment_block_documentation_phpdoc_php\'>/**<\/span>\n");
document.write("<span class=\"Comment\">	 * Detect browser names and versions of Chrome, Firefox, Internet Explorer, Opera &amp; Safari.<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * Returns array(\'name\' =&gt; Browser name (as written here ^),<\/span>\n");
document.write("<span class=\"Comment\">	 * 				 \'version\' =&gt; array(major version, minor subversion, release, build)).<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * \'version\' is array of integers. <\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * In case of no browser detected method returns array(null, array()).<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * All non-digital version flags (a, b, beta, pre and so on) are skipped.<\/span>\n");
document.write("<span class=\"Comment\">	 * If browser version is shorter then 4 parts separated by point (.),<\/span>\n");
document.write("<span class=\"Comment\">	 * undetected parts will be set in \'version\' array as null.<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * This code written with great help of <span class=\'markup markup_underline markup_underline_link markup_underline_link_php\'>http://www.useragentstring.com/<\/span> website<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * The code is actual on 2009-09-15.<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@author<\/span> Leontyev Valera (feedbee@gmail.com)<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@copyright<\/span> 2009<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@license<\/span> BSD<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@param<\/span> string $userAgent<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@return<\/span> array<\/span>\n");
document.write("<span class=\"Comment\">	 */<\/span>\n");
document.write("<span class=\'meta meta_function meta_function_php\'>	<span class=\'storage storage_modifier storage_modifier_php\'>static <\/span><span class=\'storage storage_type storage_type_function storage_type_function_php\'>function<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_php\'>detectBrowser<\/span>(<span class=\'meta meta_function meta_function_arguments meta_function_arguments_php\'><span class=\'meta meta_function meta_function_argument meta_function_argument_default meta_function_argument_default_php\'><span class=\'variable variable_other variable_other_php\'>$userAgent<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'constant constant_language constant_language_php\'>null<\/span><\/span><\/span>)<\/span>\n");
document.write("	{\n");
document.write("		<span class=\'support support_function support_function_type support_function_type_php\'>is_null<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> (<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'variable variable_other variable_other_global variable_other_global_safer variable_other_global_safer_php\'>$_SERVER<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>HTTP_USER_AGENT<\/span>\'<\/span>]);\n");
document.write("		<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'constant constant_language constant_language_php\'>null<\/span>;\n");
document.write("		<span class=\'variable variable_other variable_other_php\'>$version<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'meta meta_array meta_array_php\'><span class=\'support support_function support_function_construct support_function_construct_php\'>array<\/span>(<span class=\'constant constant_language constant_language_php\'>null<\/span>, <span class=\'constant constant_language constant_language_php\'>null<\/span>, <span class=\'constant constant_language constant_language_php\'>null<\/span>, <span class=\'constant constant_language constant_language_php\'>null<\/span>)<\/span>;\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Opera/<\/span>\'<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>//http://www.useragentstring.com/pages/Opera/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Opera<\/span>\'<\/span>;\n");
document.write("			<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Version/<\/span>\'<\/span>)) <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// http://dev.opera.com/articles/view/opera-ua-string-changes/<\/span>\n");
document.write("			{\n");
document.write("				<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Version/(\\d{1,2})\\.(\\d{1,2})#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("			}\n");
document.write("			<span class=\'keyword keyword_control keyword_control_php\'>else<\/span>\n");
document.write("			{\n");
document.write("				<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Opera/(\\d{1,2})\\.(\\d{1,2})#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("			}\n");
document.write("		}\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Opera <\/span>\'<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>//http://www.useragentstring.com/pages/Opera/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Opera<\/span>\'<\/span>;\n");
document.write("			<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Opera (\\d{1,2})\\.(\\d{1,2})#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("		}\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Firefox/<\/span>\'<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// http://www.useragentstring.com/pages/Firefox/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Firefox<\/span>\'<\/span>;\n");
document.write("			<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Firefox/(\\d{1,2})\\.(\\d{1,2})(\\.(\\d{1,2})(\\.(\\d{1,2}))?)?#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>6<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>3<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>6<\/span>];\n");
document.write("		}\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>MSIE <\/span>\'<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>//http://www.useragentstring.com/pages/Internet%20Explorer/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Internet Explorer<\/span>\'<\/span>;\n");
document.write("			<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#MSIE (\\d{1,2})\\.(\\d{1,2})#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("		}\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Iceweasel/<\/span>\'<\/span>)) <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// Firefox in Debian<\/span>\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// http://www.useragentstring.com/pages/Iceweasel/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Firefox<\/span>\'<\/span>; <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>//Iceweasel is identical to Firefox! no need to differt them<\/span>\n");
document.write("			<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Iceweasel/(\\d{1,2})\\.(\\d{1,2})(\\.(\\d{1,2})(\\.(\\d{1,2}))?)?#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>6<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>3<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>6<\/span>];\n");
document.write("		}\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Chrome/<\/span>\'<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// http://www.useragentstring.com/pages/Chrome/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Chrome<\/span>\'<\/span>;\n");
document.write("			<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Chrome/(\\d{1,2})\\.(\\d{1,3})\\.(\\d{1,3}).(\\d{1,3})#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>3<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>3<\/span>];\n");
document.write("			<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>3<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>];\n");
document.write("		}\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'constant constant_language constant_language_php\'>false<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>==<\/span> <span class=\'support support_function support_function_string support_function_string_php\'>strpos<\/span>(<span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Safari/<\/span>\'<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// http://www.useragentstring.com/pages/Safari/<\/span>\n");
document.write("			<span class=\'variable variable_other variable_other_php\'>$name<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>Safari<\/span>\'<\/span>;\n");
document.write("			<span class=\'comment comment_block comment_block_php\'>/* Uncomment this block of code if u want to use Version/ tag<\/span>\n");
document.write("<span class=\"Comment\">			 * instead of Safari/Build tag. Old Safari browsers haven’t Version/ tag<\/span>\n");
document.write("<span class=\"Comment\">			 * and their version was marked as build number (ex. 528.16).<\/span>\n");
document.write("<span class=\"Comment\">			if (false !== strpos($userAgent, \'Version/\')) // old versions of Safari doesn\'t have Version tag in UserAgent<\/span>\n");
document.write("<span class=\"Comment\">			{<\/span>\n");
document.write("<span class=\"Comment\">				preg_match(\'#Version/(\\d{1,2})\\.(\\d{1,2})(\\.(\\d{1,2}))?#i\', $userAgent, $versionMatch);<\/span>\n");
document.write("<span class=\"Comment\">				isset($versionMatch[1]) &amp;&amp; $version[0] = (int)$versionMatch[1];<\/span>\n");
document.write("<span class=\"Comment\">				isset($versionMatch[2]) &amp;&amp; $version[1] = (int)$versionMatch[2];<\/span>\n");
document.write("<span class=\"Comment\">				isset($versionMatch[4]) &amp;&amp; $version[2] = (int)$versionMatch[4];<\/span>\n");
document.write("<span class=\"Comment\">			}<\/span>\n");
document.write("<span class=\"Comment\">			else<\/span>\n");
document.write("<span class=\"Comment\">			{*/<\/span>\n");
document.write("				<span class=\'support support_function support_function_php_pcre support_function_php_pcre_php\'>preg_match<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>#Safari/(\\d{1,3})\\.(\\d{1,2})(\\.(\\d{1,2}))?#i<\/span>\'<\/span>, <span class=\'variable variable_other variable_other_php\'>$userAgent<\/span>, <span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>);\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>];\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>];\n");
document.write("				<span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>&amp;&amp;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>2<\/span>] <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> (<span class=\'storage storage_type storage_type_php\'>int<\/span>)<span class=\'variable variable_other variable_other_php\'>$versionMatch<\/span>[<span class=\'constant constant_numeric constant_numeric_php\'>4<\/span>];\n");
document.write("			<span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>//}<\/span>\n");
document.write("		}\n");
document.write("		\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>return<\/span> <span class=\'meta meta_array meta_array_php\'><span class=\'support support_function support_function_construct support_function_construct_php\'>array<\/span>(<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>name<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'variable variable_other variable_other_php\'>$name<\/span>, <span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>version<\/span>\'<\/span> <span class=\'keyword keyword_operator keyword_operator_key keyword_operator_key_php\'>=&gt;<\/span> <span class=\'variable variable_other variable_other_php\'>$version<\/span>)<\/span>;\n");
document.write("	}\n");
document.write("	\n");
document.write("	<span class=\'comment comment_block comment_block_documentation comment_block_documentation_phpdoc comment_block_documentation_phpdoc_php\'>/**<\/span>\n");
document.write("<span class=\"Comment\">	 * Compare browser versions.<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * Returns int(0)  if version is aqual to $conditions,<\/span>\n");
document.write("<span class=\"Comment\">	 *         int(-1) if version is older than $conditions,<\/span>\n");
document.write("<span class=\"Comment\">	 *         int(1)  if version is newer than $conditions.<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * Returns NULL in case of any error.<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@author<\/span> Leontyev Valera (feedbee@gmail.com)<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@copyright<\/span> 2009<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@license<\/span> BSD<\/span>\n");
document.write("<span class=\"Comment\">	 * <\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@param<\/span> array $browser -- result of self::detectBrowser() method<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@param<\/span> $conditions    -- vetsions to compre array(\'Opera\' =&gt; array(9, 4), \'Firefox\' =&gt; array(3, 1, 1), ...)<\/span>\n");
document.write("<span class=\"Comment\">	 * <span class=\'keyword keyword_other keyword_other_phpdoc keyword_other_phpdoc_php\'>@return<\/span> int<\/span>\n");
document.write("<span class=\"Comment\">	 */<\/span>\n");
document.write("<span class=\'meta meta_function meta_function_php\'>	<span class=\'storage storage_modifier storage_modifier_php\'>static public <\/span><span class=\'storage storage_type storage_type_function storage_type_function_php\'>function<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_php\'>checkForBrowserVersion<\/span>(<span class=\'meta meta_function meta_function_arguments meta_function_arguments_php\'><span class=\'meta meta_function meta_function_argument meta_function_argument_array meta_function_argument_array_php\'><span class=\'storage storage_type storage_type_php\'>array<\/span> <span class=\'variable variable_other variable_other_php\'>$browser<\/span><\/span>,<span class=\'meta meta_function meta_function_argument meta_function_argument_array meta_function_argument_array_php\'> <span class=\'storage storage_type storage_type_php\'>array<\/span> <span class=\'variable variable_other variable_other_php\'>$conditions<\/span><\/span><\/span>)<\/span>\n");
document.write("	{\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>name<\/span>\'<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>||<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$conditions<\/span>[<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>name<\/span>\'<\/span>]])\n");
document.write("			<span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>||<\/span> <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'support support_function support_function_construct support_function_construct_php\'>isset<\/span>(<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>version<\/span>\'<\/span>]) <span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>||<\/span> <span class=\'support support_function support_function_array support_function_array_php\'>count<\/span>(<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>version<\/span>\'<\/span>]) <span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>&lt;<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>)\n");
document.write("		{\n");
document.write("			<span class=\'keyword keyword_control keyword_control_php\'>return<\/span> <span class=\'constant constant_language constant_language_php\'>null<\/span>;\n");
document.write("		}\n");
document.write("		\n");
document.write("		<span class=\'variable variable_other variable_other_php\'>$cnd<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'variable variable_other variable_other_php\'>$conditions<\/span>[<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>name<\/span>\'<\/span>]]; <span class=\'comment comment_line comment_line_double-slash comment_line_double-slash_php\'>// 0=&gt;, 1=&gt;, 2=&gt;<\/span>\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'keyword keyword_operator keyword_operator_logical keyword_operator_logical_php\'>!<\/span><span class=\'support support_function support_function_type support_function_type_php\'>is_array<\/span>(<span class=\'variable variable_other variable_other_php\'>$cnd<\/span>))\n");
document.write("		{\n");
document.write("			<span class=\'keyword keyword_control keyword_control_php\'>return<\/span> <span class=\'constant constant_language constant_language_php\'>null<\/span>;\n");
document.write("		}\n");
document.write("		\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>for<\/span> (<span class=\'variable variable_other variable_other_php\'>$i<\/span> <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_php\'>=<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>; <span class=\'variable variable_other variable_other_php\'>$i<\/span> <span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>&lt;<\/span> <span class=\'support support_function support_function_array support_function_array_php\'>count<\/span>(<span class=\'variable variable_other variable_other_php\'>$cnd<\/span>); <span class=\'variable variable_other variable_other_php\'>$i<\/span><span class=\'keyword keyword_operator keyword_operator_increment-decrement keyword_operator_increment-decrement_php\'>++<\/span>)\n");
document.write("		{\n");
document.write("			<span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>version<\/span>\'<\/span>][<span class=\'variable variable_other variable_other_php\'>$i<\/span>] <span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>&lt;<\/span> <span class=\'variable variable_other variable_other_php\'>$cnd<\/span>[<span class=\'variable variable_other variable_other_php\'>$i<\/span>])\n");
document.write("			{\n");
document.write("				<span class=\'keyword keyword_control keyword_control_php\'>return<\/span> <span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_php\'>-<\/span><span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>;\n");
document.write("			}\n");
document.write("			<span class=\'keyword keyword_control keyword_control_php\'>else<\/span> <span class=\'keyword keyword_control keyword_control_php\'>if<\/span> (<span class=\'variable variable_other variable_other_php\'>$browser<\/span>[<span class=\'string string_quoted string_quoted_single string_quoted_single_php\'>\'<span class=\'meta meta_string-contents meta_string-contents_quoted meta_string-contents_quoted_single meta_string-contents_quoted_single_php\'>version<\/span>\'<\/span>][<span class=\'variable variable_other variable_other_php\'>$i<\/span>] <span class=\'keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_php\'>&gt;<\/span> <span class=\'variable variable_other variable_other_php\'>$cnd<\/span>[<span class=\'variable variable_other variable_other_php\'>$i<\/span>])\n");
document.write("			{\n");
document.write("				<span class=\'keyword keyword_control keyword_control_php\'>return<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>1<\/span>;\n");
document.write("			}\n");
document.write("		}\n");
document.write("		\n");
document.write("		<span class=\'keyword keyword_control keyword_control_php\'>return<\/span> <span class=\'constant constant_numeric constant_numeric_php\'>0<\/span>;\n");
document.write("	}\n");
document.write("}\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/618513.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/618513\">Pastie #618513<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");

