TbtnSchowek = function()
{ 	
	var param =
	{
		status	: 0,
		liczba	: 0,
		className:'schowek_text'
	};

	for (var i in arguments[0]) if (typeof(arguments[0][i]!= 'function')) param[i]=arguments[0][i];
	
	this.obj			= _c('div',param);
	this.obj.AJAXsrc	= '/strona_v2/ajax/getSchowekDane/';	
	//this.obj.apC( _cTxt('schowek') );	
	 
	this.obj.sprawdz = function(dane)
	{	
		if (dane == undefined) return false; 
	  	this.getByAjax();  		
		return(this.status);
	} 	
	
	this.obj.load 	= function( dane ) {  this.update( dane );	}
	
	this.obj.update = function( dane )
	{
		if (dane == undefined) return false;
		
		this.liczba = dane['liczba_ogloszen_w_schowku'];
		if (this.liczba == undefined) this.liczba = 0;
		if (dane['liczba_ogloszen_w_schowku']>0)
		{
			this.zmienLokacje();
			return true;			
		}
	}
	
	this.obj.zmienLokacje	= function()
	{
		document.location = location.protocol + '//' + location.hostname + "/strona_v2/schowek/anonimOgl" ;		
	}
	this.obj.onmousedown	= function()
	{
		if ( this.liczba > 0 ) this.zmienLokacje();
	}
	
	this.obj.do_zmiany	= function( dane ){	}
		
	return this.obj;
}
