function Findobj (n, D) {
var p, I, X;
if (!d) d = document;
if (p = n.indexof ("?")) >0 && parent.frames.length) {
d = parent.frames[n.substring (P + 1)].document;
n = n.substring (0, p);
}
if (x!= d[n] && d.all) x = D.all[n];
for (i = 0;!x && i < d.forms.length; i++) x = D.forms[i][n];
for (i = 0;!x && d.layers && i < d.layers.length; i++) x = Findobj (n, d.layers[i].document);
if (!x && document.getelementbyid) x = document.getElementById (n);
return x;
}
function Copycode (obj) {
var rng = Document.body.createTextRange ();
Rng.movetoelementtext (obj);
Rng.scrollintoview ();
Rng.select ();
Rng.execcommand ("Copy");
Rng.collapse (FALSE);
}
//--------------------------------------------------------------------------------------------
function RunCode (obj) {
var winname = window.open ("," _blank ",");
Winname.document.open (' text/html ', ' replace ');
var str = Obj.value.replace (";?", "<");
Winname.document.writeln (str);
Winname.document.close ();
}
function Savecode (obj) {
var winname = window.open (', ' _blank ', ' top=10000 ');
Winname.document.open (' text/html ', ' replace ');
Winname.document.writeln (Obj.value);
Winname.document.execCommand (' SaveAs ', ', ', ' code.htm ');
Winname.close ();
}
//--------------------------------------------------------------------------------------------
function Dozoom (size)
{
document.getElementById (' Zoom '). style.fontsize=size+ ' px ';
}
Count---------------------------------------------------------------------------------------
var xmlHttp;
function Createxmlhttprequest () {
if (window. ActiveXObject) {
XmlHttp = new ActiveXObject ("Microsoft.XMLHTTP");
}
else if (window. XMLHttpRequest) {
XmlHttp = new XMLHttpRequest ();
}
}
function Startrequest (arid) {
Createxmlhttprequest ();
Xmlhttp.onreadystatechange = Handlestatechange;
var qurl = ". /include/hit.php?a_id= "+arid+" ×tamp= "+new Date (). GetTime ();
Xmlhttp.open ("Get", Qurl, True);
Xmlhttp.send (NULL);
}
function Handlestatechange () {
if (xmlhttp.readystate = = 4) {
if (Xmlhttp.status = = 200) {
var MySpan = document.getElementById (' count ');
myspan.innerhtml = Xmlhttp.responsetext;
}
}
}