function getXMLHTTP() { //fuction to return the xml http object
		var xmlhttp=false;	
		try{
			xmlhttp=new XMLHttpRequest();
		}
		catch(e)	{		
			try{			
				xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
			}
			catch(e){
				try{
				req = new ActiveXObject("Msxml2.XMLHTTP");
				}
				catch(e1){
					xmlhttp=false;
				}
			}
		}
		 	
		return xmlhttp;
	}
	
	
	
	function movepic(img_name,img_src) 
	{
		document[img_name].src='images/'+img_src;
		ShowComparison(img_src);
	}
	
	
	
	function ShowComparison(strURL) 
	{		
		//alert('oye');
		//alert(strURL);
		
		img = strURL
		strURL="";
		strURL+="book-comp-inner.php?img="+img;
		//alert(strURL);
		var req = getXMLHTTP();
		//alert(req);
		if (req) 
		{
			
			req.onreadystatechange = function() {
				
				if (req.readyState == 4) 
				{
					// only if "OK"
						
					if (req.status == 200) {						
						
						document.getElementById('div_bookcomp').innerHTML=req.responseText;						
					} else {
						alert("There was a problem while using XMLHTTP:\n" + req.statusText);
					}
				}
				else
				{
					document.getElementById('div_bookcomp').innerHTML= '<img src=images/loading-new.gif border=0 style=padding-top:30px>';		
				}
			}			
			req.open("GET", strURL, true);
			req.send(null);
		}
		
	}
