function getStateList(CountryID){	
	$('#DivState').html("<img src='"+base_url+"images/working.gif'> ");
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=getStateList&countryID="+CountryID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#DivState').html(response);
			$('#DivCity').html('<select name="cityName" id="cityName" class="select" style="width:145px;"><option value="">Select City</option></select>');
			$('#content-loading').hide();
			$('#server-message').hide();
			$('#register-message').hide();				
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//====================
function getCitiesList(stateID){
	$('#DivCity').html("<img src='"+base_url+"images/working.gif'> ");
	CountryID=$('#countryName').val();
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=getCityList&countryID="+CountryID+'&stateID='+stateID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#DivCity').html(response);
			$('#content-loading').hide();
			$('#server-message').hide();
			$('#register-message').hide();
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//========================
function getUserStateList(CountryID){	

	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=userStateList&countryID="+CountryID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#Div_State').html(response);	
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//====================
function getUserCitiesList(stateID){
	CountryID=$('#country').val();
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=userCityList&countryID="+CountryID+'&stateID='+stateID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#Div_City').html(response);
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//========================
function GetAdminStates(CountryID){	
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=GetAdminState&StateID="+CountryID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#Div_State').html(response);
			$('#Div_State').show();
				
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//====================
function getAdminCitiesList(stateID){
	CountryID=$('#countryName').val();
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=getCityList&countryID="+CountryID+'&stateID='+stateID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#DivCity').html(response);
			$('#content-loading').hide();
			$('#server-message').hide();
			$('#register-message').hide();
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//==============
function GetAdminCategories(CategoryType){	
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=GetAdminCategories&CategoryType="+CategoryType,
            dataType: "html",
            success: function(response){				               
			jQuery('#DivFillCategories').html(response);			
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//============
function Get_States(CountryID){	
	jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=GetState&StateID="+CountryID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#Div_State').html(response);
			$('#Div_State').show();
				
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}
//=========================
function validate_search(){	
	if($.trim($('#keywords').val())=='')
	{
		alert("Please enter keywords to search");
		$('#keywords').focus();
		return false;
	}
	/*jQuery.ajax({
            type: "GET",
            url: base_url+"requests.php?option=GetState&StateID="+CountryID,
            dataType: "html",
            success: function(response){				
               
			jQuery('#Div_State').html(response);
			$('#Div_State').show();
				
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });*/
}
//=================
/*function loadRandomProducts(CategoryID){
	jQuery('#DivProducts').html("<img  src='"+base_url+"images/loader.gif' >");
	
		jQuery.ajax({
            type: "GET",
            url: base_url+"randomProducts.php?CategoryID="+CategoryID,
            dataType: "html",
            success: function(response){				
			jQuery('#DivProducts').html(response);
				
            },
            error: function(){
                alert("Error occured during Ajax request...");
            }
        });
}*/
