function stime() {
var now = new Date();
var tim = document.getElementById("time");
tim.innerHTML = now.getHours() + ":" + now.getMinutes();
}
function example(el) {
var items = new Array('', 'moon', 'sun', 'burger', 'cocktail', 'work', 'sleep', 'party', 'school', 'sport');
var ex = document.getElementById("example");
ex.innerHTML = "<strong>Example:</strong><br /><img src=\"" + items[el.value] + ".jpg\">";


}
function update(el) {
/* el is a unique nr that will save the H in db, fetch it on generate to find out local time */
var now = new Date();
var hour = now.getHours();

 var diff = document.getElementById("diff");
diff.value = hour;

}
function getXML(file,str)

    {
var url = file;		
// code for Mozilla, etc.
	if (window.XMLHttpRequest)
	{
		xmlhttp2=new XMLHttpRequest();
		xmlhttp2.onreadystatechange = gameChange;
		xmlhttp2.open("POST", url, true);
		xmlhttp2.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
		xmlhttp2.send(str);
	}
	// code for IE
	else if (window.ActiveXObject)
	{
		xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
		if (xmlhttp2)
		{
			xmlhttp2.onreadystatechange = gameChange;
			xmlhttp2.open("POST", url, true);
			xmlhttp2.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
			xmlhttp2.send(str);
		}
	}
      

    }
function gameChange()
{

if (xmlhttp2.readyState==4)
  {
  if (xmlhttp2.status==200)
    {


data = xmlhttp2.responseText;

	}

  }
} 
