﻿function runCode(obj) {
        var winname = window.open('', "_blank", '');
        winname.document.open('text/html', 'replace');
	winname.opener = null // 防止代码对论谈页面修改 www.hao51xx.com设计
        winname.document.write(obj.value);
        winname.document.close();
}
function saveFile()
{
  var win=window.open('','','top=10000,left=10000');
  win.document.write(document.all.asdf.innerText)
  win.document.execCommand('SaveAs','false','www.hao51xx.com代码.html')
  win.close();
}
function MM_goToURL()
{ 
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function JM_cc(ob)
{
var obj=MM_findObj(ob); if (obj) { 
obj.select();js=obj.createTextRange();js.execCommand("copy");alert("耶！ 代码已经被成功复制；快拿去自己网站试试吧！！\n\n 请记住本站地址：www.hao51xx.com，好我要嘻嘻(*^__^*)……");}
}

function MM_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=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}
