//<![CDATA[




var xmlhttp=false;

if(window.XMLHttpRequest)
{
xmlhttp= new XMLHttpRequest();
xmlhttp.overrideMimeType("text/xml");
}

else
{

try
{
xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
}


catch(e)
{

try
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}

catch(e)
{
xmlhttp=false;
}

}

}








function aktywne(f,e,puste) 
{

for(var i=0; i< document.forms[f].length - puste ; i++ )
{

if( i != e)
{
document.forms[f].elements[i].style.borderColor='rgb(163,163,163)';
document.forms[f].elements[i].style.borderStyle='solid';
document.forms[f].elements[i].style.borderWidth='1px';
}

if( i==e)
{
document.forms[f].elements[i].style.borderColor='rgb(0,120,0)';
document.forms[f].elements[i].style.borderStyle='solid';
document.forms[f].elements[i].style.borderWidth='1px';
}

}

}





function zaznaczanie(stan,ilepol)
{

if(stan==1)
{

for(i=1; i<=ilepol; i++)
{
document.forms[1].elements[i].checked=true;
}

}


if(stan==0)
{

for(i=1; i<=ilepol; i++)
{
document.forms[1].elements[i].checked=false;
}

}


}






function zamknijkomunikat(id)
{
var element=document.getElementById(id);
element.style.display='none';
}


function zmienramke(element,stan)
{

if(stan==1)
{
var element=document.getElementById(element);
element.style.borderColor='rgb(0,120,0)';
element.style.borderStyle='solid';
element.style.borderWidth='1px';
}

if(stan==0)
{
var element=document.getElementById(element);
element.style.borderColor='rgb(216,216,216)';
element.style.borderStyle='solid';
element.style.borderWidth='1px';
}


}














function pokazkalendarz(godzina,dzien,miesiac,rok,kalendarzinput,input,zaznaczanie)
{
var url="pokazkalendarz.php?godzina=" + godzina + "&dzien=" + dzien + "&miesiac=" + miesiac + "&rok=" + rok + "&kalendarzinput=" + kalendarzinput + "&input=" + input + "&zaznaczanie=" + zaznaczanie  ;



xmlhttp.open("GET",url,true);


xmlhttp.onreadystatechange=xmlhttp.onreadystatechange=function()
{

if(xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(kalendarzinput).style.display="block" ;
document.getElementById(kalendarzinput).innerHTML=xmlhttp.responseText ;
}


};



xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
xmlhttp.send(null);



}

function wstawdoinputa(kalendarzinput,input,wartosc)
{
document.getElementById(input).value=wartosc ;
document.getElementById(kalendarzinput).style.display="none" ;
}









//]]>


