var xmlHttp

function showVoting(id)
{ 
	xmlHttp=GetXmlHttpObject()


	var o=document.getElementById('txtTimer'); 
	if(o) 
	{ 
		document.getElementById("txtTimer").innerHTML=Date(); 
	} 


	if (xmlHttp==null)
 	{
 		alert ("Browser does not support HTTP Request")
 		return
 	}

//	var url="ajaxVoting.php?vid="+id
	
	var url="ajaxImage.php"

	
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
	
	draginit()

}

function reload()
{ 
	xmlHttp=GetXmlHttpObject()


	if (xmlHttp==null)
 	{
 		alert ("Browser does not support HTTP Request")
 		return
 	}

//	var url="ajaxVoting.php?vid="+id
	
	var url="ajaxImage.php"

	
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)

    alert(url);

}

function sndReq()
{
	xmlHttp=GetXmlHttpObject()

	 if (xmlHttp != null) {
	  //GET Weg
/*	  
		var url="ajaxVoting.php"
		url=url+"?mid="+checkradio(document.myForm.mid)
		url=url+"&sid="+Math.random()	  		
		  
		xmlHttp.onreadystatechange=stateChanged 
		xmlHttp.open("GET",url,true)
		xmlHttp.send(null)
*/
	
	  //POST Weg
	    xmlHttp.open("POST", "ajaxImage.php", true);
	    xmlHttp.onreadystatechange = stateChanged;
	    xmlHttp.setRequestHeader(
	       "Content-Type",
	       "application/x-www-form-urlencoded");
	    xmlHttp.send(null);


	 }
}

function checkradio(feld){
	for (i=0; i<feld.length; i++){
			if(feld[i].checked == true){
				return feld[i].value;
			}
	}
}

function closeVoting()
{
 document.getElementById("txtVoting").style.display="none"; 
}


function stateChanged() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtVoting").innerHTML=xmlHttp.responseText 
 } 
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}




