localhs_url = '';
localhs_err = window.onerror;

if(typeof window.localhs_outputid == 'undefined'){
	window.localhs_outputid = "localhsgroups";
}else{
	if(typeof window.localhs_output != 'undefined'){
		var lhso = window.localhs_output;
		try{
			var x = document.getElementById(lhso);
			if(typeof x == null)
				document.write('<'+'div id="'+lhso+'"><'+'/div>');
		}catch(e){
			document.write('<'+'div id="'+lhso+'"><'+'/div>');
		}
	}
}

function localhs_show(){
  var w = window;
	var s='';
  w.onerror = w.localhs_err;
  if(typeof w.localhs_height == 'undefined') w.localhs_height='450';
  if(typeof w.localhs_width  == 'undefined') w.localhs_width ='320';
  if(typeof w.localhs_target == 'undefined') w.localhs_target='_top';
  if(typeof w.localhs_output == 'undefined') w.localhs_output='html';
  w.localhs_url = 'http://localhs.com/js/?js=1';
  w.localhs_url +='&f=' + euc(w.localhs_filter);
  w.localhs_url +='&l=' + euc(w.localhs_location);
  w.localhs_url +='&t=' + euc(w.localhs_target);
  w.localhs_url +='&o=' + euc(w.localhs_output);
  w.localhs_url +='&i=' + euc(w.localhs_outputid);
  w.localhs_url +='&c=' + euc(w.localhs_count);
  w.localhs_url +='&h=' + euc(w.localhs_height);
  w.localhs_url +='&w=' + euc(w.localhs_width);
  w.localhs_url +='&ca=' + euc(w.localhs_color_alt);
  w.localhs_url +='&cb=' + euc(w.localhs_color_bg);
  w.localhs_url +='&ce=' + euc(w.localhs_color_border);
  w.localhs_url +='&cl=' + euc(w.localhs_color_link);
  w.localhs_url +='&ct=' + euc(w.localhs_color_text);
  w.localhs_url +='&cu=' + euc(w.localhs_color_url);
  w.localhs_url +='&url='+ euc(document.location);
  w.localhs_url = w.localhs_url.substring(0, 1024);
  if (w.localhs_output=='js'){
		s += '<' + 'script type="text/javascript" src="' + w.localhs_url + '">\n';
		s += '<' + '/script>\n';
		document.write(s);
	}else{
		var sStyle = "";
		if(typeof w.localhs_color_alt != 'undefined') sStyle += "background-color:" + w.localhs_color_alt + ";";
		if(typeof w.localhs_color_border != 'undefined') sStyle += "border:1px solid " + w.localhs_color_border + ";";
		s += '<' + 'iframe\n';
		s += ' height="' + w.localhs_height + '" width="' + w.localhs_width + '"\n';
		s += ' style="margin:0;padding:0;' + sStyle + '" src="' + w.localhs_url + '"\n';
		s += ' allowtransparency="true" vspace="0" hspace="0"\n';
		s += ' frameborder="0" scrolling="no">\n';
		s += '<' + '/iframe>\n';
		try{
			var iof = document.getElementById("localhsgroups");
			iof.innerHTML=s;
		}catch(e){
			document.write(s);
		}
	}
}

function localhs_err(message,url,line){
	localhs_show();
	return true;
}
window.onerror = localhs_err;

function euc(s){
  if(typeof s=="undefined")
	  return "";
	if(typeof(encodeURIComponent)=="function"){
		return encodeURIComponent(s);
	}else{
		return escape(s);
	}
}

localhs_show();