var getSilverlightVersion = function() { var SLVersion; try { try { var control = new ActiveXObject('AgControl.AgControl'); if (control.IsVersionSupported("3.0")) SLVersion = 3; else if (control.IsVersionSupported("2.0")) SLVersion = 2; else SLVersion = 1; control = null; } catch (e) { var plugin = navigator.plugins["Silverlight Plug-In"]; if (plugin) { if (plugin.description === "1.0.30226.2") SLVersion = 2; else SLVersion = parseInt(plugin.description[0]); } else SLVersion = 0; } } catch (e) { SLVersion = 0; } return SLVersion; } function GetXmlHttpObject() { if (window.XMLHttpRequest) { return new XMLHttpRequest(); } if (window.ActiveXObject) { return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } var Ajax = new Object(); Ajax.Request = function(query) { this.isUpdating = true; this.request = GetXmlHttpObject(); //(window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject("MSXML2.XMLHTTP"); this.request.onreadystatechange = function() { Ajax.checkReadyState(); }; this.request.open('GET', "/coletainfonavegador/scripts.aspx?" + query, true); this.request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); this.request.send(query); } Ajax.checkReadyState = function(_id) { switch (this.request.readyState) { case 1: break; case 2: break; case 3: break; case 4: break; //alert(this.request.responseText); } } Ajax.Request("l=" + window.screen.availWidth + "&a=" + window.screen.availHeight + "&s=" + getSilverlightVersion());