function AddProduct(id, rem)
{	
	var proc = new divProcess();
	//set whatever might be needed to manipulate divs, table rows, whatever

	var ajaxConn = new ajaxConnection();
	ajaxConn.url = pathHtm + "include/favoriteAdd.php?rem=" + rem + "&id=" + id;
	if(rem == true)
		ajaxConn.next_function = 'refreshPage';	//function to call AFTER processing
	ajaxConn.returnObj = proc;	//the object we set above, storing that into this class for easy access
	ajaxConn.process_url();	//uses GET method

	delete proc;
	delete ajaxConn;
}

function ChangeView(val)
{	
	var proc = new divProcess();
	//set whatever might be needed to manipulate divs, table rows, whatever

	var ajaxConn = new ajaxConnection();
	ajaxConn.url = pathHtm + "include/view_change.php?view=" + val
    ajaxConn.next_function = 'refreshPage';	//function to call AFTER processing
	ajaxConn.returnObj = proc;	//the object we set above, storing that into this class for easy access
	ajaxConn.process_url();	//uses GET method

	delete proc;
	delete ajaxConn;
}

function TurnPage(val)
{	
	var proc = new divProcess();
	//set whatever might be needed to manipulate divs, table rows, whatever

	var ajaxConn = new ajaxConnection();
	ajaxConn.url = pathHtm + "include/page_turns.php?start=" + val
    ajaxConn.next_function = 'refreshPage';	//function to call AFTER processing
	ajaxConn.returnObj = proc;	//the object we set above, storing that into this class for easy access
	ajaxConn.process_url();	//uses GET method

	delete proc;
	delete ajaxConn;
}

function SelectCategory(val, prod)
{
	var proc = new divProcess();
	//set whatever might be needed to manipulate divs, table rows, whatever

	var ajaxConn = new ajaxConnection();
    if(prod)
        val = "prodcategory=" + val;
    else
        val = "category=" + val;
	ajaxConn.url = pathHtm + "include/select_category.php?" + val
    ajaxConn.next_function = 'refreshPage';	//function to call AFTER processing
	ajaxConn.returnObj = proc;	//the object we set above, storing that into this class for easy access
	ajaxConn.process_url();	//uses GET method

	delete proc;
	delete ajaxConn;
}

function KeywordSearch(val)
{
	var proc = new divProcess();
	//set whatever might be needed to manipulate divs, table rows, whatever
	var ajaxConn = new ajaxConnection();
	ajaxConn.url = pathHtm + "include/keyword_search.php?keyword=" + val
    ajaxConn.next_function = 'refreshPage';	//function to call AFTER processing
	ajaxConn.returnObj = proc;	//the object we set above, storing that into this class for easy access
	ajaxConn.process_url();	//uses GET method

	delete proc;
	delete ajaxConn;
}


function refreshPage(obj)
{
	window.location = pathHtm + "gallery.php";
}
