// Home page JavaScript 	function hideURLbar() { window.scrollTo(0, 1); }	addEventListener("load", function(){ setTimeout(hideURLbar, 0); }, false);			var clickedStatement = null;		function answer(item,statement_id,choice)		{			clickedStatement = item;			new ajax('ajax.php',			  {			    method:'post',				postBody: "statement=" + statementID + "&name=" + name + "&choice=" + choice,			    onComplete: function(transport)				{					var response = transport.responseText;										var next = document.createElement("a");					next.href="http://tattletalz.com/";					var pointSpan = document.createElement("span");					if(response=="TRUE")					{						next.className = "wrong";						nextText = document.createTextNode('Got You!');						spanText = document.createTextNode(name+ " earned a point for fooling you.");						/*						if(firstName){							//spanText = document.createTextNode("No points for you");							spanText = document.createTextNode(firstName + " earned a point for fooling you.");						}						else {							spanText = document.createTextNode("try again");						}						*/					}					else if (response != "" )					{						$("face").className = "devil";						nextText = document.createTextNode('Good Job!');						spanText = document.createTextNode(response /*"You earned 1 point."*/);												//shake the one I clicked						//shake(item);					}					else					{						alert("Oops, something went wrong. Refresh the page and maybe it'll work?"+response);						return;					}										next.appendChild(nextText);					pointSpan.appendChild(spanText);					$("bigMessage").appendChild(next);					$("bigMessage").appendChild(pointSpan);					$("nextButton").innerHTML = "Next &raquo;";										//fade the lie and brighten the true answers					var choices = document.getElementsByClassName("choice");					for(var i=0 in choices)					{						choices[i].onclick = gotoNext;												if(choices[i].className && choices[i].className.indexOf("lie") > 0)						{							//var trans = new Fx.Opacity( choices[i].id, {duration:500} );							//trans._start(1,0.7);							choices[i].className = "lied";						}						else						{							choices[i].className = "honest";						}					}			    }			  });		}				function shake(elt){}				function gotoNext()		{			window.location = nextPage;		}		var currentWidth = 0;		var currentHash = location.hash;		function checkOrientAndLocation()		{			if (window.innerWidth != currentWidth)			{   				currentWidth = window.innerWidth;				var orient = currentWidth == 320 ? "profile" : "landscape";				document.body.setAttribute("orient", orient);				setTimeout(scrollTo, 100, 0, 1);			}					if (location.hash != currentHash)			{				var pageId = location.hash.substr(hashPrefix.length)				iui.showPageById(pageId);			}		}				addEventListener("load", function(event)		{			setTimeout(checkOrientAndLocation, 0);		//	checkTimer = setInterval(checkOrientAndLocation, 300);		}, false);