//*********************** PARTEA DE AJAX *****************************************//

	function createRequestObject() {
	    var ro;
	    var browser = navigator.appName;
	    if(browser == "Microsoft Internet Explorer"){
	        ro = new ActiveXObject("Microsoft.XMLHTTP");
	    }else{
	        ro = new XMLHttpRequest();
	    }
	    return ro;
	}

	var http = createRequestObject();
	var http2 = createRequestObject();
	var id1, id2;

	function sndReq(script,action,id,func) {
		argv=script+'?'+action;
		if (func==f1) {
			http.open('get', argv);
			id1=id;
			http.onreadystatechange = f1;
			http.send(null);
		}
		else {
			http2.open('get', argv);
			id2=id;
			http2.onreadystatechange = f2;
			http2.send(null);
		}

	}

	function f1() {
		handleResponse(http, id1);
	}

	function f2() {
		handleResponse(http2, id2);
	}

	function handleResponse(http_obj, id) {
	    if(http_obj.readyState == 4){
	        var response = http_obj.responseText;
	        if (id != '') document.getElementById(id).innerHTML = response;

	    }
	}

//*********************** SFARSIT PARTEA DE AJAX *****************************************//






imgout=new Image(7,7);
imgin=new Image(7,7);

/////////////////BEGIN USER EDITABLE///////////////////////////////
imgout.src="images/plus.jpg";
imgin.src="images/minus.jpg";
///////////////END USER EDITABLE///////////////////////////////////

//this switches expand collapse icons
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

//show OR hide funtion depends on if element is shown or hidden
function show(id) {

	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			filter(("img"+id),'imgin');
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';
		}
	} else {
		if (document.layers) {
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}

