/*
	(c) 2007-2008 | http://olegrorovin.spb.ru/
	Author - Oleg Korovin (mail@olegrorovin.spb.ru)
*/


/////////////////////////////////////////////////////////////////////////////////////////
function objectInfo(o, bNoFunc){
	var
		s = '',
		sTemp,
		mFiels = [],
		i;
	for(i in o){
		try {
		sTemp = i + ' = ' + rep(o[i]);
		s += sTemp + '\n\n';
		mFiels[mFiels.length] = sTemp;
//		s += i + ' = ' + rep(o[i]) + '\n\n';
		}
		catch (e){}
	}

	mFiels.sort();
	s = '';
	for(i = 0 ; i < mFiels.length ; i++ ){
		s += mFiels[i] + '\n\n';
	}

	s = s.replace( /\n/g,'<br>');

	var newWindow = window.open( '/', '_blank' , 'width=150,height=250,left=200,top=200,scrollbars=1,resizable=1');

	newWindow.document.open();
	newWindow.document.write(
		'<html><head><title>t</title></head><body style="margin:10px;font:11px Tahoma">' +
			s +
		'</body></html>'
	);
	newWindow.document.close();
	newWindow.focus();

	function rep(t){
		if( typeof t != 'function' && typeof t != 'undefined'){
			t = t + '';
			t = t.replace( /&/g ,'&amp;');
			t = t.replace( /</g,'&lt;');
			t = t.replace( />/g,'&rt;');
			t = t.replace( /\"/g,'&quot;');
			return t;
		}
		else if(!bNoFunc){
			return typeof t;
		}
	}
}
/////////////////////////////////////////////////////////////////////////////////////////


