function jsFlObj() {}
jsFlObj.prototype = 
{
	userImgBase: "http://img.epuls.pl/zdjecia/",
	publicImgBase: "http://img2.epuls.pl/lay/wallpapers/",
	divClasses: {site:"stCnMn", profile:"stPaper"},
	publicImages : [],
	userImages: [],
	userID:false,
	lngPro:0,
	flOnSuccessFnName:"",
	picsLoaded:false,
	boxMode: false,
	boxId:false,
	lastBarClr:false,
	bgRepeat: {site:{x:false, y:false}, profile:{x:false, y:false}, box:{x:false, y:false}, boxes:{x:false, y:false}},
	debug: function (msg)
	{
		if(console != undefined && console.debug != undefined) console.debug(msg);
		//return false;
	},
	getPath: function (id)
	{
		var x = (id - (id % 1000));
		if (x == 0) return '0/';
		return (x / 1000) + '/';
	},
	getDivClassByCtg: function (ctg)
	{
		return this.divClasses[ctg];
	},
	getUserImgSrc: function (id)
	{	
		var arr = id.split('.');
		return this.userImgBase + this.getPath(Number(arr[0])) + arr[0] + "_l/user/foto."+arr[1];
	},
	prepareGetAllData: function ()
	{
		var args = {
			url:"/6/service/profile/getuserandpublicpics/",
			load:jsfl.getUserAndPublicPicsSuccess,
			error:function (resp, ioArgs)
			{
				jsfl.debug(resp+"::"+ioArgs);
				return resp;
			},
			handleAs:"json"
		}
		dojo.xhrPost(args);
	},
	getUserAndPublicPicsSuccess: function (resp, ioArgs)
	{
		jsfl.userImages = resp[0];
		jsfl.publicImages = resp[1];
		jsfl.picsLoaded = true;
		jsfl.getAllData(false);
		return resp;
	},
	getAllData: function (prepare, onSuccessFnName)
	{
		if(prepare && !this.picsLoaded)
		{
			this.flOnSuccessFnName = onSuccessFnName;
			return this.prepareGetAllData();
		}
			
		if(!this.boxMode ){
			siteObj = dojo.query("." + this.getDivClassByCtg('site'))[0];
			profileObj = dojo.query("." + this.getDivClassByCtg('profile'))[0];
			var firstBox = this.getFirstBox();
			var firstBoxHeader = dojo.byId(this.getFirstBox(false).id+"Title");
			var d = {
				pro: this.getUserPro(),
				site: {
					images: {
						public: this.publicImages,
						user: this.userImages
					},
					image: {
						type: this.getStyle(siteObj,'backgroundImage','type'), /* "disabled|public|user" */
						id: parseInt(this.getStyle(siteObj,'backgroundImage')),
						position: this.getStyle(siteObj,'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
						repeat:  this.getStyle(siteObj,'backgroundRepeat'),/* "x|y|both|none" */
						ptype:  this.getStyle(siteObj,'backgroundImage','ext')/* "jpg|gif" */
					},
					colors: {
						bg: this.getStyle(siteObj,'backgroundColor') /* "#ff9933|0xff9933|transparent",*/
					}
				},
				profile: {
					images: {
						public: this.publicImages,
						user: this.userImages
					},
					image:{
						type: this.getStyle(profileObj,'backgroundImage','type'), /* "disabled|public|user" */
						id:  parseInt(this.getStyle(profileObj,'backgroundImage')),/*this.getUserWallpaper('profile')*/
						position: this.getStyle(profileObj,'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
						repeat: this.getStyle(profileObj,'backgroundRepeat'),/* "x|y|both|none" */
						ptype:  this.getStyle(profileObj,'backgroundImage','ext')/* "jpg|gif" */
					},
					colors: {
						bg: this.getStyle(profileObj,'backgroundColor') /* "#ff9933|0xff9933|transparent",*/
					}
				},
				boxes: {
					images: {
						public: this.publicImages,
						user: this.userImages
					},
					image: {
						type: this.getStyle(firstBox,'backgroundImage','type'), /* "disabled|public|user" */
						id:  parseInt(this.getStyle(firstBox,'backgroundImage')),/*this.getUserWallpaper('profile')*/
						position: this.getStyle(firstBox,'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
						repeat: this.getStyle(firstBox,'backgroundRepeat'),/* "x|y|both|none" */
						ptype:  this.getStyle(firstBox,'backgroundImage','ext')/* "jpg|gif" */
					},
					colors: {
						bg: this.getStyle(firstBox,'backgroundColor'), /* "#ff9933|0xff9933|transparent",*/
						bar: this.getStyle(firstBoxHeader,'backgroundColor'), /* "#ff9933|0xff9933|transparent",*/
						header: this.getStyle(firstBoxHeader,'color'), /* "#ff9933|0xff9933",*/
						content:this.getStyle(firstBox,'color') /* "#ff9933|0xff9933",*/
					}
				}
			};
		}
		else 
		{
			obj = dojo.byId(this.boxId+"Content");
			var d = {
				pro: this.getUserPro(),
				boxes: {
					images: {
						public: this.publicImages,
						user: this.userImages
					},
					image: {
						type: this.getStyle(obj,'backgroundImage','type'), /* "disabled|public|user" */
						id: parseInt(this.getStyle(obj,'backgroundImage')),
						position: this.getStyle(obj,'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
						repeat:  this.getStyle(obj,'backgroundRepeat')/* "x|y|both|none" */
					},
					colors: {
						bg: this.getStyle(obj,'backgroundColor'), /* "#ff9933|0xff9933|transparent",*/
						bar:  this.getStyle(dojo.byId(this.boxId+"Title"),'backgroundColor'), /* "#ff9933|0xff9933|transparent",*/
						header: this.getStyle(dojo.byId(this.boxId+"Title"),'color'), /* "#ff9933|0xff9933",*/
						content:this.getStyle(obj,'color')/* "#ff9933|0xff9933",*/
					}
				}
			};
		}
		var editor = this.getFlEditor();
		editor[this.flOnSuccessFnName](JSON.stringify(d));
	},
	getFlEditor: function ()
	{
		return (navigator.appName.indexOf("Microsoft") != -1) ? window["flEditor"] : dojo.byId("flEditor");
	},
	setProp: function (ctg, method, value, boxID)
	{
		jsfl.debug(ctg+", "+method+", "+value+", "+boxID);
		this[method](ctg, value,boxID);
		return true;
	},
	setBgColor: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
				var d = dojo.query("." + this.getDivClassByCtg(ctg))[0];
				d.style.backgroundColor = "#" + value;
			case "profile":
				/*var bgID = _layout.IE6 ? "paperBg" : this.getDivClassByCtg(ctg);*/
				var bgID = this.getDivClassByCtg(ctg);
				var d = dojo.query("." + bgID)[0];
				d.style.backgroundColor = "#" + value;
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.backgroundColor = "#" + value;
					dojo.byId(boxID+'TP').style.backgroundColor =  "#" + value;
				}
				else {
					dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Content').style.backgroundColor = "#" + value;
					dojo.byId(b.id+'TP').style.backgroundColor =  "#" + value;});
				}
				break;
		}
	},
	setBgPosition: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
				var d = dojo.query("." + this.getDivClassByCtg(ctg))[0];
				d.style.backgroundPosition = value;
				break;
			case "profile":
				var bgID = this.getDivClassByCtg(ctg);
				var d = dojo.query("." + bgID)[0];
				d.style.backgroundPosition = value;
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.backgroundPosition = value;
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Content').style.backgroundPosition = value;});
				}
				break;
		}
	},
	setPublicWallpaper: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
				var d = dojo.query("." + this.getDivClassByCtg(ctg))[0];
				d.style.backgroundImage = "url(" + this.publicImgBase+value+")";
				break;
			case "profile":
				var bgID = this.getDivClassByCtg(ctg);
				var d = dojo.query("." + bgID)[0];
				d.style.backgroundImage = "url(" + this.publicImgBase+value+ ")";
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.backgroundImage = "url(" + jsfl.publicImgBase+value+ ")";
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){ dojo.byId(b.id+'Content').style.backgroundImage = "url(" + jsfl.publicImgBase+value+ ")";});
				}
				break;
		}
	},
	setUserWallpaper: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
				var d = dojo.query("." + this.getDivClassByCtg(ctg))[0];
				d.style.backgroundImage = "url(" + this.getUserImgSrc(value) + ")";
				break;
			case "profile":
				var bgID = this.getDivClassByCtg(ctg);
				var d = dojo.query("." + bgID)[0];
				d.style.backgroundImage = "url(" + this.getUserImgSrc(value) + ")";
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.backgroundImage = "url(" + jsfl.getUserImgSrc(value) + ")";
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){ dojo.byId(b.id+'Content').style.backgroundImage = "url(" + jsfl.getUserImgSrc(value) + ")";});
				}
				break;
		}
	},
	setBgClrTransparent: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
				var d = dojo.query("." + this.getDivClassByCtg(ctg))[0];
				d.style.backgroundColor = (value || value == "true") ? 'transparent':'';
				break;
			case "profile":
				var bgID = this.getDivClassByCtg(ctg);
				var d = dojo.query("." + bgID)[0];
				d.style.backgroundColor = (value || value == "true") ? 'transparent':'';
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.backgroundColor = (value || value == "true") ? 'transparent':'';
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Content').style.backgroundColor = (value || value == "true") ? 'transparent':'';});
				}
				break;
		}
	},
	getStyle: function (node,style,attr)
	{
		val = dojo.style(node,style);
		if(!val) val = dojo.getComputedStyle(node).style;
		
		/* translations */
		if(style=='backgroundColor' || style=='color')
		{	
			if(val!='transparent')
			{
				var c = new dojo.Color(val);
				val = c.toHex();
			}
		}
		if(style=="backgroundImage")
		{	
			val = val.split('/');
			if(val[5])
			{	
				if(attr == 'type')
				{
					val = (val[2]=='img.epuls.pl')? 'user':'public';
					jsfl.debug('test:'+attr+ ':'+ val); 
					return val;
				}
				if(attr == 'ext')
				{
					if(val[7])
					{
						var tmp = val[7].split('.')
						val = tmp[1];
					}
					else 
					{
						var tmp = val[5].split('.')
						val = tmp[1];
					}
					val = val.slice(0,val.length-1);
					jsfl.debug('test:'+attr+ ':'+ val); 
					return val;
				}
				
				if(val[7])
				{
					val = val[5].slice(0,val[5].length-2);
				}
				else
				{
					var tmp = val[5].split('.')
					val = tmp[0];
				}	
			}
			else val = 'enabled'; /*disabled*/
			jsfl.debug('backgroundImage:'+attr+ ':'+ val);
			
		}
		if(style=="backgroundPosition")
		{	
		/*
			switch(val)
			{
				case "0% 0%":
				case "top left":
					val = "tl"
					break;
				case "0% 50%":
				case "top center":
					val = "tc"
					break;	
				case "0% 100%":
				case "top right":
					val = "tr"
					break;
				case "50% 0%":
				case "center left":
					val = "cl"
					break;
				case "50% 50%":
				case "center center":
					val = "cc"
					break;
				case "50% 100%":
				case "center right":
					val = "cr"
					break;
				case "100% 0%":
				case "bottom left":
					val = "bl"
					break;
				case "100% 50%":
				case "bottom center":
					val = "bc"
					break;
				case "100% 100%":
				case "bottom right":
					val = "br"
					break;			
			} 
		*/
			switch(val)
			{
				case "0% 0%":
				case "left top":
				case "top left":
					val = "tl"
					break;
				case "50% 0%":
				case "top center":
				case "center top":
					val = "tc"
					break;	
				case "100% 0%":
				case "top right":
				case "right top":
					val = "tr"
					break;
				case "0% 50%":
				case "center left":
				case "left center":
					val = "cl"
					break;
				case "50% 50%":
				case "center center":
					val = "cc"
					break;
				case "100% 50%":
				case "center right":
				case "right center":
					val = "cr"
					break;
				case "0% 100%":
				case "bottom left":
				case "left bottom":
					val = "bl"
					break;
				case "50% 100%":
				case "bottom center":
				case "center bottom":
					val = "bc"
					break;
				case "100% 100%":
				case "bottom right":
				case "right bottom":
					val = "br"
					break;			
			} 
			//jsfl.debug('backgroundPosition:'+val);
		}
		if(style=="backgroundRepeat")
		{
			switch(val)
			{
				case "repeat":
					val = "both"
					break;
				case "no-repeat":
					val = "none"
					break;
				case "repeat-x":
					val = "x"
					break;
				case "repeat-y":
					val = "y"
					break;
			} 	
			//jsfl.debug('backgroundRepeat:'+val);
		}
		return val;
	},
	hideWallpaper: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
				var d = dojo.query("." + this.getDivClassByCtg(ctg))[0];
				d.style.backgroundImage =  (value || value == "true") ? 'none':'';
				break;
			case "profile":
				var bgID = this.getDivClassByCtg(ctg);
				var d = dojo.query("." + bgID)[0];
				d.style.backgroundImage =  (value || value == "true") ? 'none':'';
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.backgroundImage = (value || value == "true") ? 'none':'';
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Content').style.backgroundImage = (value || value == "true") ? 'none':'';});
				}
				break;
		}
	},
	getFirstBox: function (contentDiv)
	{
		var idAdd = (contentDiv == undefined || contentDiv == true) ? "Content" : "";
		var tmp = dojo.query('.boxes')[0];
		return dojo.byId(tmp.id + idAdd);
	},
	updateRepeatData: function (ctg, boxID)
	{
		var _ctg = boxID != undefined ? 'box' : ctg;
		var _objID = boxID != undefined ? (boxID+"Content") : this.getDivClassByCtg(ctg);
		var r = this.bgRepeat[_ctg];
		var s = (ctg == "boxes" && boxID == undefined) ? this.getFirstBox().style.backgroundRepeat : dojo.byId(_objID).style.backgroundRepeat;
		r.x = s == '' || s == 'repeat' || s == 'repeat-x';
		r.y = s == '' || s == 'repeat' || s == 'repeat-y';
	},
	setBgRepeatX: function (ctg,value,boxID)
	{
		this.updateRepeatData(ctg, boxID);
		var _ctg = boxID != undefined ? 'box' : ctg;
		var r = this.bgRepeat[_ctg];
		switch(ctg)
		{
			case "site":
			case "profile":
				var d = dojo.byId(this.getDivClassByCtg(ctg));
				var newVal = (value || value == "true") ? (r.y ? 'repeat' : 'repeat-x') : (r.y ? 'repeat-y' : 'no-repeat');
				d.style.backgroundRepeat = newVal;
				break;
			case "boxes":
				if(boxID)
				{
					var d = dojo.byId(boxID + "Content");
					var newVal = (value || value == "true") ? (r.y ? 'repeat' : 'repeat-x') : (r.y ? 'repeat-y' : 'no-repeat');
					d.style.backgroundRepeat = newVal;
				}
				else
				{
					dojo.forEach(dojo.query('.boxes'),
						function(d)
						{
							var newVal = (value || value == "true") ? (r.y ? 'repeat' : 'repeat-x') : (r.y ? 'repeat-y' : 'no-repeat');
							var tmp = dojo.byId(d.id + "Content");
							tmp.style.backgroundRepeat = newVal;
						}
					);
				}
				break;
		}
	},
	setBgRepeatY: function (ctg,value,boxID)
	{
		this.updateRepeatData(ctg, boxID);
		var _ctg = boxID != undefined ? 'box' : ctg;
		var r = this.bgRepeat[_ctg];
		switch(ctg)
		{
			case "site":
			case "profile":
				var d = dojo.byId(this.getDivClassByCtg(ctg));
				var newVal = (value || value == "true") ? (r.x ? 'repeat' : 'repeat-y') : (r.x ? 'repeat-x' : 'no-repeat');
				d.style.backgroundRepeat = newVal;
				break;
			case "boxes":
				if(boxID)
				{
					var d = dojo.byId(boxID + "Content");
					var newVal = (value || value == "true") ? (r.x ? 'repeat' : 'repeat-y') : (r.x ? 'repeat-x' : 'no-repeat');
					d.style.backgroundRepeat = newVal;
				}
				else
				{
					dojo.forEach(dojo.query('.boxes'),
						function(d)
						{
							var newVal = (value || value == "true") ? (r.x ? 'repeat' : 'repeat-y') : (r.x ? 'repeat-x' : 'no-repeat');
							dojo.byId(d.id + "Content").style.backgroundRepeat = newVal;
						}
					);
				}
				break;
		}
	},
	setBarColor: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
			case "profile":
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Title').style.backgroundColor = "#" + value;
					dojo.byId('flCorner'+boxID).setColor("#" + value,false);
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Title').style.backgroundColor = "#" + value;
				dojo.byId('flCorner'+b.id).setColor("#" + value);
				});
				}
				break;
		}
	},
	setHeaderColor: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
			case "profile":
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Title').style.color = "#" + value;
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Title').style.color = "#" + value;});
				}
				break;
		}
	},
	setContentColor: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
			case "profile":
				break;
			case "boxes":
				if(boxID){
					dojo.byId(boxID+'Content').style.color = "#" + value;
				}
				else {
				dojo.forEach(dojo.query('.boxes'),function(b){dojo.byId(b.id+'Content').style.color = "#" + value;
				});
				}
				break;
		}
	},
	setBarClrTransparent: function (ctg, value,boxID)
	{
		switch(ctg)
		{
			case "site":
			case "profile":
				break;
			case "boxes":
				if(boxID){
					if(value || value == "true") this.lastBarClr = this.getStyle(dojo.byId(boxID+'Title'),'backgroundColor');
					dojo.byId(boxID+'Title').style.backgroundColor = (value || value == "true") ? 'transparent':(this.lastBarClr ? this.lastBarClr : '#359bca');
					dojo.byId(boxID+'TP').style.backgroundColor = (value || value == "true") ? 'transparent':'';
					var newClr = (value || value == "true") ? 'transparent': (this.lastBarClr ? this.lastBarClr : '#359bca');
					dojo.byId('flCorner'+boxID).setColor(newClr);
				}
				else
				{
					if(value || value == "true")
					{
						this.lastBarClr = this.getStyle(dojo.byId(this.getFirstBox(false).id+"Title"),'backgroundColor');
					}
					dojo.forEach(dojo.query('.boxes'),function(b){
						dojo.byId(b.id+'Title').style.backgroundColor = (value || value == "true") ? 'transparent':(jsfl.lastBarClr ? jsfl.lastBarClr : '#359bca');
						dojo.byId(b.id+'TP').style.backgroundColor = (value || value == "true") ? 'transparent':'';
						var newClr = (value || value == "true") ? 'transparent':(jsfl.lastBarClr ? jsfl.lastBarClr : '#359bca');
						dojo.byId('flCorner'+b.id).setColor(newClr);
					});
				}
				break;
		}
	},
	getSaveData: function ()
	{	
		siteObj = dojo.query("." + this.getDivClassByCtg('site'))[0];
		var bgID = this.getDivClassByCtg('profile');
		profileObj = dojo.query("." + bgID)[0];
		
		var c=[];
			dojo.forEach(dojo.query('.boxes'),function(b)
			{  c.push({
				id:b.id,
				image: {
					type: jsfl.getStyle(dojo.byId(b.id+'Content'),'backgroundImage','type'), /* "disabled|public|user" */
					id: parseInt(jsfl.getStyle(dojo.byId(b.id+'Content'),'backgroundImage')),
					position: jsfl.getStyle(dojo.byId(b.id+'Content'),'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
					repeat: jsfl.getStyle(dojo.byId(b.id+'Content'),'backgroundRepeat'), /* "x|y|both|none" */
					ptype: jsfl.getStyle(dojo.byId(b.id+'Content'),'backgroundImage','ext') /* jpg|gif */
				},
				colors: {
					bg: jsfl.getStyle(dojo.byId(b.id+'Content'),'backgroundColor'), /* "#ff9933|0xff9933|transparent",*/
					bar: jsfl.getStyle(dojo.byId(b.id+'Title'),'backgroundColor'), /* "#ff9933|0xff9933|transparent",*/
					header: jsfl.getStyle(dojo.byId(b.id+'Title'),'color'), /* "#ff9933|0xff9933",*/
					content:jsfl.getStyle(dojo.byId(b.id+'Content'),'color') /* "#ff9933|0xff9933",*/
				}
			 });
			})
			
		
		var d = {
			site: {
				image: {
					type:this.getStyle(siteObj,'backgroundImage','type'), /* "disabled|public|user" */
					id: parseInt(this.getStyle(siteObj,'backgroundImage')),
					position: this.getStyle(siteObj,'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
					repeat:  this.getStyle(siteObj,'backgroundRepeat'),/* "x|y|both|none" */
					ptype: jsfl.getStyle(siteObj,'backgroundImage','ext') /* jpg|gif */
				},
				colors: {
					bg: this.getStyle(siteObj,'backgroundColor') /* "#ff9933|0xff9933|transparent",*/
				}
			},
			profile: {
				image:{
					type: this.getStyle(profileObj,'backgroundImage','type'), /* "disabled|public|user" */
					id:  parseInt(this.getStyle(profileObj,'backgroundImage')),/*this.getUserWallpaper('profile')*/
					position: this.getStyle(profileObj,'backgroundPosition'), /* "tl|tc|tr|cl|cc|cr|bl|bc|br" */
					repeat: this.getStyle(profileObj,'backgroundRepeat'),/* "x|y|both|none" */
					ptype: jsfl.getStyle(profileObj,'backgroundImage','ext') /* jpg|gif */
				},
				colors: {
					bg: this.getStyle(profileObj,'backgroundColor') /* "#ff9933|0xff9933|transparent",*/
				}
			},
			boxes: c
			
		};
		
		return JSON.stringify(d);
	},
	openManager: function ()
	{
		var manager = window.open('http://upload.epuls.pl/profile_pictures_manager2.php?lngUID='+this.getUserID(),'manager','toolbar=no,location=no,directories=no,status=no,statusbar=no,menubar=no,scrollbars=no,copyhistory=no,resizable=no,width=820,height=640, fullscreen=no');		
	},
	setUserID: function (userID)
	{
		if(userID == undefined) return;
		this.userID = userID;
	},
	getUserID: function ()
	{
		return this.userID;
	},
	setUserPro: function (lngPro)
	{
		if(lngPro == undefined) return;
		this.lngPro = lngPro;
	},
	getUserPro: function ()
	{
		return this.lngPro;
	},
	showBoxEditor: function (obj, boxID)
	{
		this.writeFlashEditor(boxID);
		_profile.showEditBox(obj);
	},
	writeFlashEditor: function (boxID)
	{
		var fv = {};
		if(boxID != undefined) {
			fv.boxID = boxID;
			this.boxMode = true;
			this.boxId = boxID;
		}
		else 
		{
			this.boxMode = false;
			this.boxId = false;
		}
		
		var p = {wmode:'opaque', allowScriptAcces:"always"};
		swfobject.embedSWF("/images/swf/EditorPanel.swf?flver=1.3.5", "flEditor", 382, 560, "9.0", false, fv, p);
	},
	hidePreloader: function ()
	{
		dojo.byId("flPreloader").style.display = "none";
	},
	reloadEditor: function ()
	{
		jsfl.picsLoaded = false;
		_profile.hideEditProfile();
		if(!this.boxMode)
		{
			_profile.showEditProfile(dojo.byId("aEditprofile"));
		}
		else
		{
			this.showBoxEditor(dojo.byId('bar' + this.boxId), this.boxId);
		}
	}
}

jsfl = new jsFlObj();