// To find out more about this, go to http://kwissle.com
var Kwissle=function(){var a=typeof kwissle_options!="undefined"?kwissle_options:{},f=("https:"==document.location.protocol?"https://":"http://")+(a.host_name||"kwissle.com"),c=f+"/widget/random/jsonp?callback=Kwissle.callback",h=a.root_node_id||"kwisslewidget",i="#"+h+" p{margin:2px}#"+h+" h3{margin:4px 2px}";document.write('<form action="'+(f+"/widget/answer/")+'" method="post" id="'+h+'" style="display:none"></form>');(function(){var a=document.createElement("style");a.appendChild(document.createTextNode(i));
document.getElementsByTagName("head")[0].appendChild(a)})();(function(){var a=document.createElement("script");a.type="text/javascript";a.defer=!0;a.src=c;document.getElementsByTagName("head")[0].appendChild(a)})();return{callback:function(a){if(a){var c=document.getElementById(h),d=document.createElement("input");d.setAttribute("type","hidden");d.setAttribute("value",a.id);d.setAttribute("name","id");c.appendChild(d);d=document.createElement("h3");d.appendChild(document.createTextNode("Random "));
var e=document.createElement("a");e.setAttribute("href",f);addEvent(e,"click",function(a){window.open(this.href);a.preventDefault()});e.appendChild(document.createTextNode("Kwissle"));d.appendChild(e);d.appendChild(document.createTextNode(" question"));c.appendChild(d);d=document.createElement("p");d.setAttribute("class","question");d.appendChild(document.createTextNode("Question: "+a.text));c.appendChild(d);d=document.createElement("div");e=document.createElement("p");e.setAttribute("id","kwissle-answer");
e.appendChild(document.createTextNode("Answer: "));var b=document.createElement("input");b.setAttribute("type","text");b.setAttribute("name","answer");b.setAttribute("id","kw-ans");e.appendChild(b);b=document.createElement("input");b.setAttribute("type","submit");b.setAttribute("value","check!");addEvent(b,"click",function(a){document.getElementById("kw-ans").value||a.preventDefault()});e.appendChild(b);b=document.createElement("a");b.setAttribute("href","#");addEvent(b,"click",function(a){document.getElementById("kwissle-alts").style.display=
"inline";document.getElementById("kwissle-answer").style.display="none";a.preventDefault()});b.appendChild(document.createTextNode("I don't know, show alternatives"));e.appendChild(b);d.appendChild(e);e=document.createElement("span");e.setAttribute("id","kwissle-alts");e.style.display="none";e.appendChild(document.createTextNode("Alternatives: "));for(var g,b=0;b<a.alts.length;b++)g=document.createElement("input"),g.setAttribute("type","submit"),g.setAttribute("name","alt_answer"),g.setAttribute("value",
a.alts[b]),e.appendChild(g);d.appendChild(e);c.appendChild(d);c.style.display="block"}}}}();function registerEventHandler(a,f,c){typeof a.addEventListener=="function"?a.addEventListener(f,c,!1):a.attachEvent("on"+f,c)}function addEvent(a,f,c){a.attachEvent?(a["e"+f+c]=c,a[f+c]=function(){a["e"+f+c](window.event)},a.attachEvent("on"+f,a[f+c])):a.addEventListener(f,c,!1)};

