function LoadImage(image_url)
{
	var obj = document.getElementById("imageshow");
	if(typeof obj != "undefined" && obj != null)
	{
		obj.src = "thumbnail.php?file="+image_url+"&w=320&h=265&color=FFFFFF&el=1&gd=1";
	}
}
function GetPricingGuide()
{
	 window.open ("pricing.php", "mywindow","location=0,status=0,scrollbars=1,width=500,height=480"); 
}
function ChangeTypeSelect(obj)
{
	var index = obj.selectedIndex;
	var search_type = obj.options[index].value;
	Request("scripts/GetSearchType.php?type="+search_type, "select_option");
}


function GetXMLObj()
{
	var xmlHttpReq = false;
	var self = this;

	// Mozilla/Safari
	if (window.XMLHttpRequest) {
		self.xmlHttpReq = new XMLHttpRequest();
	}
	// IE
	else if (window.ActiveXObject) {
		self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
	}
	return self.xmlHttpReq;
}
function Request(strURL, div_name) 
{
	var div_obj = document.getElementById(div_name);
	if(typeof div_obj != "undefined" && div_obj != null)
	{
		div_obj.innerHTML = "<img src='images/indicator.gif' /> loading...";
	}	
	
	self.xmlHttpReq = GetXMLObj();
	self.xmlHttpReq.open('GET', strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() 
	{
		if (self.xmlHttpReq.readyState == 4) 
		{
		    updatepage(self.xmlHttpReq.responseText, div_name);
		}
	}
	self.xmlHttpReq.send(null);
}
function updatepage(txt, div_name)
{
	var div_obj = document.getElementById(div_name);
	if(typeof div_obj != "undefined" && div_obj != null)
	{
		div_obj.innerHTML = txt;
	}
}