//functions.js
//Create a boolean variable to check for a valid IE instance.
var xmlhttp = false;
//Check if we are using IE.
try {
//If the javascript version is greater than 5.
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
xmlhttp = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.
var showCalendar = true;
//var newcont=document.getElementById(objID).innerHTML;
function showHide(serverPage,objID) {
	//alert(ir);
//The location we are loading the page into.
//var objID = "calendar";
//Change the current image of the minus or plus.

if (showCalendar == true ){
	
//Show the calendar.
//document.getElementById("opencloseimg").src = "images/delete.png";


var oldcont=document.getElementById(objID).innerHTML ;

var loading="<span style='font-size:16px;background:#FFFF66'>Y&uuml;kl&#601;nir...</span><br><a></a>";

var rrrr=oldcont.split("<a></a>");
//alert(rrrrp[0]);

if (rrrr[1]==undefined){var oldcont1=rrrr[0];}else {var oldcont1=rrrr[1];}


document.getElementById(objID).innerHTML = loading+''+oldcont1;
//alert(oldcont);

//The page we are loading.
//var serverPage = "calendar.php";
//Set the open close tracker variable.
if (objID=='calendar1'){showCalendar = false;}
var obj = document.getElementById(objID);
xmlhttp.open("GET", serverPage);
xmlhttp.onreadystatechange = function() {
	if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
obj.innerHTML = xmlhttp.responseText;
}
}
xmlhttp.send(null);
ir=0;
} else {
//Hide the calendar.
//document.getElementById("opencloseimg").src = "images/add.png";
showCalendar = true;
document.getElementById(objID).innerHTML = "";
}
}








//functions.js
//Create a boolean variable to check for a valid IE instance.
var xmlhttp2 = false;
//Check if we are using IE.
try {
//If the javascript version is greater than 5.
xmlhttp2 = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
//If not, then use the older active x object.
try {
//If we are using IE.
xmlhttp2 = new ActiveXObject("Microsoft.XMLHTTP");
} catch (E) {
//Else we must be using a non-IE browser.
xmlhttp2 = false;
}
}
//If we are using a non-IE browser, create a JavaScript instance of the object.
if (!xmlhttp2 && typeof XMLHttpRequest != 'undefined') {
xmlhttp2 = new XMLHttpRequest();
}
//A variable used to distinguish whether to open or close the calendar.
var showCalendar2 = true;
//var newcont=document.getElementById(objID).innerHTML;
function showHide2(serverPage2,objID2) {
	//alert(ir);
//The location we are loading the page into.
//var objID = "calendar";
//Change the current image of the minus or plus.

if (showCalendar2 == true ){
	
//Show the calendar.
//document.getElementById("opencloseimg").src = "images/delete.png";


var oldcont2=document.getElementById(objID2).innerHTML ;

var loading2="<span style='font-size:16px;background:#FFFF66'>Y&uuml;kl&#601;nir...</span><br><a></a>";

var rrrr2=oldcont2.split("<a></a>");
//alert(rrrrp[0]);

if (rrrr2[1]==undefined){var oldcont12=rrrr2[0];}else {var oldcont12=rrrr2[1];}


document.getElementById(objID2).innerHTML = loading2+''+oldcont12;
//alert(oldcont);

//The page we are loading.
//var serverPage = "calendar.php";
//Set the open close tracker variable.
if (objID2=='calendar1'){showCalendar2 = false;}
var obj2 = document.getElementById(objID2);
xmlhttp2.open("GET", serverPage2);
xmlhttp2.onreadystatechange = function() {
	if (xmlhttp2.readyState == 4 && xmlhttp2.status == 200) {
obj2.innerHTML = xmlhttp2.responseText;
}
}
xmlhttp2.send(null);
ir=0;
} else {
//Hide the calendar.
//document.getElementById("opencloseimg").src = "images/add.png";
showCalendar2 = true;
document.getElementById(objID2).innerHTML = "";
}
}



		
