asp+|js| Client | display | Page <%
Bigurl = "Bigscreen.htm"
Smallurl = "Smallscreen.htm"
A = LCase (Request.ServerVariables ("Http_user_agent"))
If InStr (A, "MSIE 5") >0 or InStr (A, "MSIE 4") >0 Then
%>
<script language= "JavaScript" >
var w = document.body.clientWidth;
if (w>=650)
{
Window.location.href= "<%=bigurl%>";
}
Else
{
Window.location.href= "<%=smallurl%>";
}
</script>
<%
ElseIf InStr (A, "MSIE 3") >0 Then
Smallurl = "Smallscreen.htm"
Bigurl = "Bigscreen.htm"
A = Request ("Http_ua_pixels")
URL = Smallurl
If InStr (A, "X") >0 Then
A = Split (A, "X")
If CLng (A (0)) >= 650 Then
URL = Bigurl
End If
End If
Response.Redirect (URL)
ElseIf InStr (A, "ZILLA/4") >0 Then
%>
<script language= "JavaScript" >
var w = document.body.clientWidth;
if (w>=650)
{
Window.location.href= "<%=bigurl%>";
}
Else
{
Window.location.href= "<%=smallurl%>";
}
</script>
<%
ElseIf InStr (A, "ZILLA/3") >0 Then
%>
<script language= "JavaScript" >
var sizer=java.awt.toolkit.getdefaulttoolkit ();
var scrsize=sizer.getscreensize ();
var scrw=scrsize.width;
if (scrw>=650)
{
Window.location.href= "<%=bigurl%>";
}
Else
{
Window.location.href= "<%=smallurl%>";
}
</script>
<%
Else
Respose.redirect (Smallurl)
End If
%>