// JavaScript Document
function searchproduct()
		{	//,val,nameck
			var search_val  = document.getElementById('search').value;
			var site_url = document.getElementById('site_url').value;

			if(trim(search_val) == "" || trim(search_val) == "Your Keyword Here")
			{
					alert('Please Enter Valid Text');
					return false;
			}				
			xmlHttp=GetXmlHttpObject();			
			if(xmlHttp == null) {
				alert("Browser doesnt support ajax");
				return;
			}
			
			var url=site_url+'listing_ajax/list_ajax.php?search='+search_val;
			//alert(url);
			xmlHttp.onreadystatechange=GetListing_response;
			xmlHttp.open("GET",url,true);
			xmlHttp.send(null);
			
			
		}

function searchpro()
		{	//,val,nameck
			var search_val  = document.getElementById('search').value;
			var site_url = document.getElementById('site_url').value;
			if(trim(search_val) == "" || trim(search_val) == "Your Keyword Here")
			{
					alert('Please Enter Valid Text');
					document.getElementById('search').focus();
					return false;
			}
			document.location.href=site_url+'index.php?file=search&search='+search_val;				
		
			
		}
function GetListing_response () {
	
if(xmlHttp.readyState==1 || xmlHttp.readyState==2 || xmlHttp.readyState==3)
	{
			var html_loader = '<div style="height:200px; margin:85px 0 0 155px; padding:100px;"><img src="'+Site_URL+'images/ajax-loader.gif"><span class="error"><br>Please wait while products are loading....</span></div?'
			document.getElementById("productlist").innerHTML="";
			document.getElementById("productlist").innerHTML = html_loader;
	}

if(xmlHttp.readyState == 4 || xmlHttp.readyState=="complete") 	
{
		response=xmlHttp.responseText;

		//alert(response);
	
		document.getElementById('productlist').innerHTML  = response;
			
		
	jQuery(function(jQuery)
		{	
			$(".jqtransform").jqTransform();							   	    	    	    
		});		
		
		return false;
	}
}			

