var xmlHttp

function cupApply(str,name)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	}
	str = escape(str)
	var url="/sub/cup2/ajax/cupApply.php"
	url=url+"?value="+str
	url=url+"&name="+name
	url=url+"&sid="+Math.random()
	if (name=="klan")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyKlan
	}
	if (name=="kanal")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyKanal
	}
	if (name=="webbsida")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyWebbsida
	}
	if (name=="server")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyServer
	}
	if (name=="medlem1")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyMedlem1
	}
	if (name=="medlem2")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyMedlem2
	}
	if (name=="medlem3")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyMedlem3
	}
	if (name=="medlem4")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyMedlem4
	}
	if (name=="medlem5")
	{
		xmlHttp.onreadystatechange=stateChangedCupApplyMedlem5
	}
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChangedCupApplyKlan()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("klanBox").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyKanal()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("kanalBox").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyWebbsida()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("webbsidaBox").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyServer()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("serverBox").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyMedlem1()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("medlem1Box").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyMedlem2()
{
	if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("medlem2Box").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyMedlem3()
{  
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("medlem3Box").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyMedlem4()
{  
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("medlem4Box").innerHTML=xmlHttp.responseText }
}
function stateChangedCupApplyMedlem5()
{  
  if(xmlHttp.readyState==4 || xmlHttp.readyState=="complete"){ document.getElementById("medlem5Box").innerHTML=xmlHttp.responseText }
}





