
	
// START - Scroll Detection //

var pageend, winheight;			
var howoften = 2000;			
var bufferHeight = 200;
var thumbPage = 2;

function calcParams(){
	// calculate the end coordinates of the page and the visibile height of a page
	// at any time on the client's desktop
	pageend = document.getElementById('results_end').offsetTop;
	winheight = (typeof window.innerHeight != 'undefined' ? window.innerHeight : document.body.offsetHeight);
}

function isitend(curpos){
	calcParams();
	if((curpos + winheight + bufferHeight) > pageend){
		AddNode();
	}
}

function howlow(){	
	if(navigator.appName == "Microsoft Internet Explorer")
		isitend(document.body.scrollTop);
	else
		isitend(window.pageYOffset);
}

function AddNode(){

	if ( js_continueCount != 0 ){
	
		var continue_span = document.getElementById('continue_span');
		var childEl = document.createElement("span");
		
		childEl.id = 'continue_' + js_continueCount;
		continue_span.appendChild(childEl);
		
		document.getElementById('continue_' + js_continueCount).innerHTML = '<BR><IMG SRC="images/loading_small_blue.gif" WIDTH="24" HEIGHT="24" BORDER="0"><BR><BR>Loading More Products...<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>'
		GetURL('tag_search_result_thumb.cfm?self_sustained=yes&' + js_QUERY_STRING + '&max_results=24&pagenum=' + ( thumbPage - 1),'continue_' + js_continueCount,'GET','','display',0,0);
		
		js_continueCount = js_continueCount - 1;
		thumbPage = thumbPage + 1;
	}
}

// END - Scroll Detection //


function SearchFilterMore(filter){
	document.getElementById('filter_' + filter + '_more').className = 'filter_more_on';
	document.getElementById('filter_' + filter + '_more_link').innerHTML = '';
};

function SearchItOpen(){
	document.getElementById('search_it_options').style.visibility = 'visible';	
}

function SearchItClose(){
	document.getElementById('search_it_options').style.visibility = 'hidden';	
}

