var urlindexpref = "aj.php?action=";
var xmlhttpindexpref;
var action;
var id;
var where;
	
function pref(action,id,where) {
	 document.getElementById(where).innerHTML = "<img src=http://www.skepter.com/img/loading.gif border=0 align=top>";
	if(action=="category"){
		if(id==7 || id==8 || id==9){
			this.document.getElementById("price").style.display = 'block';
		}else{
			this.document.getElementById("price").style.display = 'none';
			
		}
	}
	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; 
}

