function sml_preload_dislpay(oCallback) {

	if (document.getElementById('sml_lbc_place')!='undefined') {
		//alert(typeof jQuery);
		if (typeof jQuery != 'undefined') {

			//alert("jQuery library is loaded!");

		}else{
 
    
 

			var oHead = document.getElementsByTagName('head')[0]; 
			//alert(oHead);
			var oScript = document.createElement('script');
			oScript.type = 'text/javascript'; 
			oScript.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js';
		 
			oScript.onload = oCallback;
		 
			oScript.onreadystatechange = function() {
		 
			if (this.readyState == 'loaded' || this.readyState == 'complete'){	 
				$.ajax({
					type: "GET",
					url: "http://www.showmelocal.net/ads/premium_ads_external.aspx",	
					data: {s: sml_state, c: sml_city, z: sml_zip , q: sml_query, pub: sml_pub, pub: sml_pub, bg: sml_bg, lc: sml_lc, fc: sml_fc, header: sml_header, footer: sml_footer},
					dataType: "script"

					});
	
			}
		 
		}
		oHead.appendChild(oScript); 
	}
 }
}
function display_ads_js(){
 
	$.ajax({
	type: "GET",
	url: "http://www.showmelocal.net/ads/premium_ads_external.aspx",	
	data: {s: sml_state, c: sml_city, z: sml_zip , q: sml_query, pub: sml_pub, pub: sml_pub, bg: sml_bg, lc: sml_lc, fc: sml_fc, header: sml_header, footer: sml_footer},
	dataType: "script"

	});
	
}
sml_preload_dislpay(display_ads_js);


