	function getXmlHttpRequestObject() { 
		if (window.XMLHttpRequest) { 
			return new XMLHttpRequest(); 
		} else if(window.ActiveXObject) { 
			return new ActiveXObject("Microsoft.XMLHTTP"); 
		} else { 
			alert('Status: Cound not create XmlHttpRequest Object. Consider upgrading your browser.'); 
		} 
	} 
	function doAjaxLoadingText(url,method,getStr,postStr,divtag,loading) { 
		var Req = getXmlHttpRequestObject(); 
		if(loading=="yes") { 
			document.getElementById(divtag).innerHTML = "Loading ..."; 
			//document.getElementById(divtag).innerHTML = "<img src='images/loading.gif' />"; 
		} 
		if (Req.readyState == 4 || Req.readyState == 0) {  
			if(method=="GET") { 
				Req.open("GET", url+"?"+getStr, true);  
			} else if(method=="POST") { 
				Req.open("POST", url+"?"+getStr, true);  
				Req.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); 
			} else { 
				Req.open("GET", url+"?"+getStr, true);  
			} 
			Req.onreadystatechange = function() { 
				if (Req.readyState == 4) {  
					var xmldoc = Req.responseText;  
					if(document.getElementById(divtag)) { 
		 				document.getElementById(divtag).innerHTML = xmldoc; 
					} 
				}  
			}  
			if(method=="GET") { 
				Req.send(null);   
			} else if(method=="POST") { 
				Req.send(postStr);  
			} else { 
				Req.send(null);  
			} 
		} 
	}
	var lastID = "smallimage1";
	function SelectImg(img, img2, divId) {
		if(lastID!=divId) {
			if (lastID) {
				document.getElementById(lastID).className = "thumbslight";
			}
			document.getElementById(divId).className = "thumbsdark";
			//document.getElementById("bigImage").src = img;
			doAjaxLoadingText('object2.php','GET','s='+encodeURIComponent(img)+'&b='+encodeURIComponent(img2),'','loadarea','yes');
			lastID = divId;
		}
	}
	
	
	var lastID2 = "smallimage6";
	function SelectImg2(img, img2, divId) {
		if(lastID2!=divId) {
			if (lastID2) {
				document.getElementById(lastID2).className = "thumbslight";
			}
			document.getElementById(divId).className = "thumbsdark";
			//document.getElementById("bigImage2").src = img;
			doAjaxLoadingText('object.php','GET','s='+encodeURIComponent(img)+'&b='+encodeURIComponent(img2),'','bigImage2','yes');
			lastID2 = divId;
		}
	}