function show_props(obj, obj_name) {
   var result = "";
   for (var i in obj)
      result += obj_name + "." + i + " = " + obj[i] + "\n";
   return "<pre>"+result+"</pre>";
}
//This prototype is provided by the Mozilla foundation and
//is distributed under the MIT license.
//http://www.ibiblio.org/pub/Linux/LICENSES/mit.license

if (!Array.prototype.indexOf)
{
  Array.prototype.indexOf = function(elt /*, from*/)
  {
    var len = this.length;

    var from = Number(arguments[1]) || 0;
    from = (from < 0)
         ? Math.ceil(from)
         : Math.floor(from);
    if (from < 0)
      from += len;

    for (; from < len; from++)
    {
      if (from in this &&
          this[from] === elt)
        return from;
    }
    return -1;
  };
}
if($){
	//jQuery Extensions: Shadow, Blink
	//(c) 2007 KrzysztofWiniarski.com
	$.fn.extend({
		elements: function(all){ //Require indexOf method. Availible in FF1.5. There is a prototype function for IE.
			var elements = Array(this.length);
			var unique = Array();
			for(i=0;i<this.length;i++){
				el = this[i].nodeName + ( (this[i].className) ? (this[i].id) ? '#' + this[i].id : '.' + this[i].className : false );
				if(elements.indexOf(el)==-1) { unique.push(el); } elements.push(el);
			}
			return (all)?elements:unique;
		},

		heightFull: function(){
			return parseInt($(this).css('height'))+parseInt($(this).css('marginTop'))+parseInt($(this).css('marginBottom'))+parseInt($(this).css('paddingTop'))+parseInt($(this).css('paddingBottom'));
		},
		widthFull: function(){
			return parseInt($(this).css('width'))+parseInt($(this).css('marginLeft'))+parseInt($(this).css('marginRight'));
		},
		padding: function(){
			return parseInt($(this).css('paddingTop'))+'px '+parseInt($(this).css('paddingRight'))+'px '+parseInt($(this).css('paddingBottom'))+'px '+parseInt($(this).css('paddingLeft'))+'px';
		},
		margin: function(){
			return parseInt($(this).css('marginTop'))+'px '+parseInt($(this).css('marginRight'))+'px '+parseInt($(this).css('marginBottom'))+'px '+parseInt($(this).css('marginLeft'))+'px';
		},

		repeat: function(t){ //Repeat DOM element X times
			i=0;if(!t||t<1)t=1;
			while(i<t){$(this).clone().insertAfter(this);i++};
		},







		fadeOutAndIn: function(t){ // Speial function for Blink
			$(this).fadeOut(t);$(this).fadeIn(t)
		},

		shadow: function(parameters){ //Drops shadow under text
			var defaults = { distance: 2, direction: "bottom right", color: "#000", opacity: 30, x: 0, y: 0, block: false };
			var p = $.extend(defaults, parameters);

			if(p.opacity<0) p.opacity = 0; else if(p.opacity>100) p.opacity = 100;
			opacity = { msie: p.opacity, mozilla: parseFloat(p.opacity/100) };

			$(this).each(function(){
				if(p.block) $(this).css({display:"block"});
				if(!p.block && $(this).css("display")!="block") return false;
				if($(this).css("position")=="static") $(this).css({position:"relative"});

				$(this).html('<span class="JQ_TEXT_shadow">'+$(this).html()+'</span><span class="JQ_TEXT_text">'+$(this).html()+'</span>');

				$('.JQ_TEXT_text',this).css({position:'absolute',top:"0px",left:"0px",padding:$(this).padding()});

				var mY = ( p.direction.indexOf("top") < 0 && p.direction.indexOf("bottom") < 0 )
					? 0 : ( p.direction.indexOf("top") != -1 )
						? -p.distance : p.distance;
				mY = (mY + parseInt(p.y)) + 'px';

				var mX = ( p.direction.indexOf("right") < 0 && p.direction.indexOf("left") < 0 )
					? 0 : ( p.direction.indexOf("left") != -1 )
						? -p.distance : p.distance;
				mX = (mX + parseInt(p.x)) + 'px';

				$('.JQ_TEXT_shadow',this).css({display:"block",position:'relative',top:mY,left:mX,color:p.color,opacity:opacity.mozilla});
				$('.JQ_TEXT_shadow',this).css({
					width:$(this).width()+parseInt(Math.abs(parameters.x)),
					height:$(this).height()+parseInt(Math.abs(parameters.y))
				});

				if($.browser.msie) { $('.JQ_TEXT_shadow',this).css('filter','alpha(opacity='+opacity.msie+')'); }
				if($.browser.mozilla) { $('.JQ_TEXT_shadow',this).css('-moz-opacity',opacity.mozilla); }
			});
		},
		blink: function(parameters){ //Blinks block elements
			var defaults = { speed: 1000, fade: false };
			var p = $.extend(defaults, parameters);

			$(this).each(function(){
				$(this).wrap('<div class="JQ_BLINK_box"></div>');
				$(this).parent().css({
					display:"block",
					position:"relative",
					height:$(this).heightFull(),
					width:$(this).widthFull()
				});
			});

			var speed = (parseInt(p.speed) < 500) ? 500 : parseInt(p.speed);
			(!p.fade)
				? setInterval("$('*.JQ_BLINK_box').children().toggle()",speed)
				: setInterval("$('*.JQ_BLINK_box').fadeOutAndIn("+speed+")",0) ;
		}

	});
}


function showUl( id )
{
	ul = document.getElementById( id );
	if ( !ul ) return false;
	if ( ul.style.display!='block'  )
		ul.style.display='block';
	else
		ul.style.display='none';
}
window.onload = function() {
	Nifty("*.nc","medium");
	$('.sidebox>h2').shadow({direction:"bottom right",opacity:100,distance:1,color:"#ef6500"});


}

