var xmlHttp


function alf(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Przegladarka nie obsluguje HTTP Request")
return
} 
document.getElementById("alf").innerHTML='<span style="color: black;"><br>proszę czekać<br></span>'
var url="inc/alpha.php?q="+str
xmlHttp.onreadystatechange=alfa 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function alfa() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("alf").innerHTML=xmlHttp.responseText 
} 
} 

function pokazModel(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Przegladarka nie obsluguje HTTP Request")
return
} 
document.getElementById("model").innerHTML='<span style="color: white;"><br>proszę czekać<br></span>'
document.getElementById("ako").innerHTML=''
var url="model.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=model 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function mocowanie(str){
	if(str==1){
		identity=document.getElementById('mocowanie').className='mocowanie2';
		identity=document.getElementById('bieguny').className='bieguny';
		setTimeout('mocowanie(2)', '5000');
		}
	if(str==2){
		identity=document.getElementById('mocowanie').className='mocowanie';
	}
		
}

function bieguny(str){
	if(str==1){
		identity=document.getElementById('bieguny').className='bieguny2';
		identity=document.getElementById('mocowanie').className='mocowanie';
		setTimeout('bieguny(2)', '5000');
		}
	if(str==2){
		identity=document.getElementById('bieguny').className='bieguny';
	}
		
}


function pokazAko(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Przegladarka nie obsluguje HTTP Request")
return
} 
document.getElementById("ako").innerHTML='<span style="color: white;"><br>proszę czekać<br></span>'
var url="ako.php"
url=url+"?q="+str
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=ako 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function viewMain(kod, typ)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Przegladarka nie obsluguje HTTP Request")
return
} 
document.getElementById("main").innerHTML='<span style="color: black; font-weight:bold; font-family: verdana; font-size: 11px; text-align: center;"><br>proszę czekać<br></span>'
var url="aku.php?kod="+kod
url = url + "&typ="+typ
xmlHttp.onreadystatechange=main 
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}


function model() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("model").innerHTML=xmlHttp.responseText 
} 
} 
function ako() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("ako").innerHTML=xmlHttp.responseText 
} 
} 

function main() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{ 
document.getElementById("main").innerHTML=xmlHttp.responseText 
} 
} 

function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}