bug 1236: Use single assignment for global variables
[cacert-devel.git] / stamp / old_showlogo.php.broken
1 try
2 {
3 var URI = location.protocol+'//stamp.cacert.org';
4 var URL = encodeURIComponent(URI);
5 var curDateTime = new Date();
6 var tz = -(curDateTime.getTimezoneOffset()/60);
7 var rf = encodeURIComponent(parent==self ? window.document.referrer : top.document.referrer);
8 var ul = encodeURIComponent(navigator.appName=="Netscape" ? navigator.language : navigator.userLanguage);
9 if(typeof(screen)=="object")
10 {
11 var sr = encodeURIComponent(screen.width+","+screen.height);
12 var cd = encodeURIComponent(screen.colorDepth);
13 var jo = encodeURIComponent(navigator.javaEnabled()?"Yes":"No");
14 }
15
16 document.write("<script type='text/javascript'>function popup() { ");
17 document.write("window.open('"+URI+"/certdet.php?refer="+location.href+"&tz="+tz+"', 'CertInfo',");
18 document.write("'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=600,height=400,left=200,top=100'); } </script>");
19 document.write("<a href='#' onClick='popup(); return false;'>");
20 document.write("<img src='"+URI+"/displogo.php?refer="+location.href+"&tz="+tz+"&rf="+rf+"&ul="+ul+"&sr="+sr+"&cd="+cd+"&jo="+jo+"&URL="+URL+"' border='0' /></a>");
21 }
22 catch(e)
23 {
24 document.write("<img src='http://stamp.cacert.org/javascript_is_broken.php'/>");
25 }