var isIE = document.all?true:false;
(function($){
	$.toJSON = function(v) {
		var f = isNaN(v) ? s[typeof v] : s['number'];
		if (f) return f(v);
	};

	$.parseJSON = function(v, safe) {
		if (safe === undefined) safe = $.parseJSON.safe;
		if (safe && !/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/.test(v))
			return undefined;
		return eval('('+v+')');
	};

	$.parseJSON.safe = false;

function a_lgn(){
	window.location.reload(true);
}

})(jQuery);


   function setFunctAttribute(el_node, prop, funct_str)
   {
	   if (isIE){
	       el_node.setAttribute( prop,function() {eval(funct_str)});
	   }
	   else{
	       el_node.setAttribute( prop,funct_str);
	   }
   }

   function pr(cont, max_level, curr_level, pref){
     var out=$('#out').get(0);
     if (!curr_level) curr_level=0;
     if (!pref) pref='';
     if (!max_level) max_level=2;

     if (typeof cont=='object'){
     		pref=pref.concat('&nbsp;&nbsp;&nbsp;&nbsp;', pref);
     		//pref=pref.concat(' -> ', pref);
    	 	for (var i in cont){
     			out.innerHTML+=pref+' -> '+i+' : '+cont[i]+"<br>";
     		if (typeof cont[i]=='object' && curr_level<max_level)
     			pr(cont[i], max_level, curr_level, pref);

     	}
     }
     else
     	out.innerHTML+='<br>'+cont;
     out.innerHTML+='-------<br>';
    }

