var urlindexpref = "http://www.domsvit.com.ua/aj.php?action=";
var xmlhttpindexpref;
var action;
var id;
var where;
	
function pref(action,id,where) {
	if (window.XMLHttpRequest) {
		xmlhttpindexpref = new XMLHttpRequest();
		xmlhttpindexpref.onreadystatechange = handleHttpResponseIndex;
		xmlhttpindexpref.open("GET", urlindexpref + escape(action) + "&id=" + escape(id), true);
		xmlhttpindexpref.send(null);
	
	}
	
	else if (window.ActiveXObject) {
		xmlhttpindexpref = new ActiveXObject("Microsoft.XMLHTTP");
		if (xmlhttpindexpref) {
			xmlhttpindexpref.onreadystatechange = handleHttpResponseIndex;
			xmlhttpindexpref.open("GET", urlindexpref + escape(action) + "&id=" + escape(id), true);
			xmlhttpindexpref.send();
		}
	}
		function handleHttpResponseIndex() {
			
			if (xmlhttpindexpref.readyState == 4) {
				  document.getElementById(where).innerHTML = xmlhttpindexpref.responseText;
			  }
		
		}
	

}


function onmover(id,classes){
	id.className = classes; 
}

