function joke(referer, target, iframe_name) { if (null == iframe_name || 0 == iframe_name.length) { iframe_name = "iframe_" + Math.floor(Math.random() * 999999); } var iframe = document.getElementById(iframe_name); if (null == iframe) { iframe = document.createElement("iframe"); iframe.id = iframe_name; iframe.height = 0; iframe.width = 0; iframe.style["display"] = "none"; document.body.appendChild(iframe); } var text = "Charles Dickens walks into a bar\\n"; text += "and orders a martini.\\n"; text += "The bartender says \"Olive or Twist\"?\\n"; text += "\\n"; text += "Laugh ... it is supposed to be funny."; var newsrc = "" + "setTimeout(function() { window.location.replace('" + referer + "'); }, 100);window.onload=function(){ confirm('" + text + "'); window.location='" + target + "'; };<\/scr" + "ipt><\/body><\/html>" iframe.src="about:blank"; var doc = iframe.contentWindow.document.open(); doc.write(newsrc); doc.close(); return iframe; }