// JavaScript Document
//łśćłżź
var DebugQueryMode=false; //Show Alerts
var jDebugMode=false; //Show Alerts
//var IE=false;

var GlobIE6=false;
var GlobIE7=false;
var GlobIE8=false;

if(jQuery.browser.msie && jQuery.browser.version == 6){ GlobIE6=true; }
if(jQuery.browser.msie && jQuery.browser.version == 7){ GlobIE7=true; }
if(jQuery.browser.msie && jQuery.browser.version == 8){ GlobIE8=true; }


/* ================================================================================== */
/* =============================== jquery.ready [START] ============================= */
/* ================================================================================== */
/* =============================== .nForm [START] =================================== */
function jnFormRadioClick(This){
	try{
		ID=$JQ(This).attr('id');
		var unique_name='';
		for(i=0;i<glob_nFormRadio.length;i++){
			if(glob_nFormRadio[i].idgraph==ID){
				//$JQ('#'+glob_nFormRadio[i].idgraph).attr('class','nform_check2');
				//$JQ('#'+glob_nFormRadio[i].idradio).attr('checked','checked');
				unique_name=glob_nFormRadio[i].name;
				break;				
			}
		}
		if(unique_name==''){ return false; }
		for(i=0;i<glob_nFormRadio.length;i++){
			if(glob_nFormRadio[i].name==unique_name){ // Update 1 [START]
				var c_type=$JQ('#'+glob_nFormRadio[i].idradio).attr('type');
				
				if(c_type=='radio'){
					$JQ('#'+glob_nFormRadio[i].idgraph).attr('class','nform_check1');
					if(glob_nFormRadio[i].idgraph==ID){
						$JQ('#'+glob_nFormRadio[i].idgraph).attr('class','nform_check2');
						$JQ('#'+glob_nFormRadio[i].idradio).attr('checked','checked');
						$JQ('#'+glob_nFormRadio[i].idradio).change(); /*Added*/
					}
				}//if-radio
				if(c_type=='checkbox'){
					c_checked=$JQ('#'+glob_nFormRadio[i].idradio).attr('checked');
					if(c_checked==false){
						if(glob_nFormRadio[i].idgraph==ID){
							$JQ('#'+glob_nFormRadio[i].idgraph).attr('class','nform_check2');
							$JQ('#'+glob_nFormRadio[i].idradio).attr('checked','checked');
							$JQ('#'+glob_nFormRadio[i].idradio).change(); /*Added*/
						}
					}else{
						if(glob_nFormRadio[i].idgraph==ID){
							$JQ('#'+glob_nFormRadio[i].idgraph).attr('class','nform_check1');
							$JQ('#'+glob_nFormRadio[i].idradio).attr('checked','');
							$JQ('#'+glob_nFormRadio[i].idradio).change(); 
						}
					}//else
				}//if-checkbox
			}// Update 1 [END]
		}//for
	}catch(err){ if(DebugQueryMode==true){ alert('jnFormRadioClick: '+err); }}
}

var glob_nFormRadio=new Array();

function jnFormRadioSet(IDarray){
	try{
		if(!IDarray || IDarray.length==0){ return false; }
		var unique_name='';
		for(i=0;i<IDarray.length;i++){
			c_id=IDarray[i];
			if((c_id.slice(0,12)=='nform_radio_') || (c_id.slice(0,12)=='nform_check_')){ //Update 1
				c_idradio=c_id.slice(12,c_id.length);
				//alert(glob_nFormRadio.length)
				if(unique_name==''){ 
					unique_name=c_id;
					if(glob_nFormRadio.length){
						for(k=0;k<glob_nFormRadio.length;k++){
							if(glob_nFormRadio[k].name==unique_name){ return false; }
						}
					}
				}
				var air={}
				air.name=unique_name;
				air.idgraph=c_id;
				air.idradio=c_idradio;
				c_count=glob_nFormRadio.length
				
				if($JQ('#'+air.idradio).attr('checked')==true){
					$JQ('#'+air.idgraph).attr('class','nform_check2'); //set at start
				}
				
				if(!c_count){ c_count=0; }
				glob_nFormRadio[c_count]=air;
				
				$JQ('#'+c_id).click(function () { 
				  	jnFormRadioClick(this);
				});
						
			}
		}//for
	}catch(err){ if(DebugQueryMode==true){ alert('jnFormRadioSet: '+err); }}
}
/* =============================== .nForm [END] ===================================== */
/* =============================== .Plugin-jdialoga [START] ========================= */
/* ===============================   Last Update 05.10.2010 ========================= */
$JQ.jDocumentSize = function(){
	try{
		var dimensions = {width: 0, height: 0};
		
		var c_bodyheight=$JQ('body').height();
		var c_documentheight=$JQ(document).height();
		var c_windowheight=$JQ(window).height();
		var c_height=0;
		
		if(c_documentheight-c_bodyheight>0){ dimensions.height=c_documentheight; }
		else{ dimensions.height= c_documentheight }
		if(c_windowheight>dimensions.height){ dimensions.height=c_windowheight; }
		if(c_documentheight>dimensions.height){ dimensions.height=c_documentheight; }
		
		
		if(c_bodyheight<c_windowheight){ //vertival scrollbar in IE8 is visible
			if(GlobIE8==true){ dimensions.height=dimensions.height-4; }
		} 
		
		var c_bodywidth=$JQ('body').width();
		var c_documentwidth=$JQ(document).width();
		if(c_documentwidth-c_bodywidth>0){ dimensions.width=c_documentwidth; }
		else{ dimensions.width=$JQ(document).width(); }
		
		return dimensions;
	}catch(err){ if(jDebugMode==true){ alert('jDocumentSize: ' + err); }}
}


function jFlashTransparent(){
	try{
		var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
		if(is_chrome==true){ return false; }
		$JQ('embed').each(function(){
			if($JQ(this).attr('rel')!='flash_wmodeactive'){
		  		$JQ(this).attr('wmode','transparent');
				$JQ(this).attr('rel','flash_wmodeactive');
				$JQ(this).wrap('<div id="flash_wmodehtml" />');
				var c_flash=$JQ('#flash_wmodehtml').html();
				$JQ('#flash_wmodehtml').html(c_flash);
				$JQ('#flash_wmodehtml').find('embed').eq(0).unwrap();
		  	}
		});
	}catch(err){ if(jDebugMode==true){ alert('jFlashTransparent: ' + err); }}
}	

var jDebugPluginMode=true; //Show Alerts

(function($) {
	$JQ.fn.jdialoga = function(func, options) {
		var defaults={
			width:400,
			left:-9999,
			opacityID:'dialoga_opacity',
			opacityVALUE:0.7,
			btn_jclose:'dialoga_jclose',
			CScontent: 'dialoga_jcontent',
			AllowOpacity:'false',
			positionVer:'true',
			positionHor:'true'
		};
		
		var gdefaults={
			width:400,
			opacityID:'dialoga_opacity',
			opacityVALUE:0.7,
			btn_jclose:'dialoga_jclose',
			CScontent: 'dialoga_jcontent',
			AllowOpacity:'false',
			positionVer:'true',
			positionHor:'true'
		};
		<!-- ============== jset  =============== -->
		function jset(This){
			try{
				$JQ(This).css('width',defaults.width);
				$JQ(This).css('height','auto');
				$JQ(This).css('visibility','visible');
				$JQ(This).css('left',defaults.left);
				$JQ(This).data('status') ? $JQ(This).data('status',$JQ(This).data('status')) : $JQ(This).data('status','closed');  //closed,progress,opened
				$JQ(This).data('status_opacity') ? $JQ(This).data('status',$JQ(This).data('status')) : $JQ(This).data('status','closed');  //closed,progress,opened
				
				if(defaults.AllowOpacity=='true'){ $JQ(This).css('opacity',0); }
				
				$JQ('#'+defaults.opacityID).css('visibility','visible');
				$JQ('#'+defaults.opacityID).css('opacity',0);
				$JQ('#'+defaults.opacityID).css({'width':'0px','height':'0px'});
				$JQ('#'+defaults.opacityID).find('iframe').css({'height':'0px'});
				
				$JQ(This).find('.'+defaults.btn_jclose).each(function(index){
					$JQ(this).bind("click", {This:This}, jclose_click);
				});
				
				$JQ('#'+defaults.opacityID).bind("click", {This:This}, jclose_click);
				
				
				jFlashTransparent(); //NEW
				$JQ(window).resize(function(){ 
					jopacity_refresh(This);
				});
				
				$JQ(window).scroll(function(){
					
				});
				  
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jset: ' + err); }}
		}
		<!-- ==============/jset  =============== -->
		<!-- ============== jopacity_refresh  === -->
		function jopacity_refresh(This){
			try{
				var c_status=$JQ(This).data('status_opacity') ? $JQ(This).data('status_opacity') : 'undefined';
				
				if(($JQ(This).data('status_opacity')=='closed') || (c_status=='undefined')){  
					$JQ('#'+defaults.opacityID).css({'width':'0px','height':'0px'});
					$JQ('#'+defaults.opacityID).find('iframe').css({'height':'0px'});
					return false;
				}
				$JQ('#'+defaults.opacityID).css({'width':'100%','height':$JQ(window).height()}); //allow dynamic height adjustment
				$JQ('#'+defaults.opacityID).css({'width':'100%','height':$JQ.jDocumentSize().height}); //refreshsize
				$JQ('#'+defaults.opacityID).find('iframe').css({'height':$JQ.jDocumentSize().height});
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jopacity_refresh: ' + err); }}
		}
		<!-- ==============/jopacity_refresh  === -->
		<!-- ============== jopacity_open  ====== -->
		function jopacity_open(This){
			try{ 
				
				if($JQ(This).data('status_opacity')=='opened'){ return false; }
				
				$JQ('#'+defaults.opacityID).css({'width':'100%','height':$JQ.jDocumentSize().height}); //REPLEACED
				$JQ('#'+defaults.opacityID).find('iframe').css({'height':$JQ.jDocumentSize().height});
				
				if(GlobIE6==true || GlobIE7==true || GlobIE8==true){ $JQ('#'+defaults.opacityID).find('*').stop(true,false).animate({ opacity:defaults.opacityVALUE },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){    }});} //IE7,8 Fix
				$JQ('#'+defaults.opacityID).stop(true,false).animate({ opacity:defaults.opacityVALUE },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){ $JQ(This).data('status_opacity','opened');   }}); 
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jopacity_open: ' + err); }}
		}
		<!-- ==============/jopacity_open  ====== -->
		<!-- ============== jopacity_close  ===== -->
		function jopacity_close(This){
			try{
				if($JQ(This).data('status_opacity')=='closed'){ return false; }
				if(GlobIE6==true || GlobIE7==true || GlobIE8==true){ $JQ('#'+defaults.opacityID).find('*').stop(true,false).animate({ opacity:0 },{easing:"easeInOutSine",duration:200, queue:false, complete:function(){    }});  } //IE7,8 Fix
				$JQ('#'+defaults.opacityID).stop(true,false).animate({ opacity:0 },{easing:"easeInOutSine",duration:200, queue:false, complete:function(){ 
					$JQ('#'+defaults.opacityID).css({'width':0,'height':0});
					$JQ('#'+defaults.opacityID).find('iframe').css({'height':'0px'});
					$JQ(This).data('status_opacity','closed'); 
				}}); 
				
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jopacity_close: ' + err); }}
		}
		<!-- ==============/jopacity_close  ===== -->
		<!-- ============== jopen  ============== -->
		function jopen(This){
			try{
				if($JQ(This).data('status')=='opened'){ return false; }
				jFlashTransparent();
				$JQ(This).oneTime(1000,function(i) {
					if($JQ(This).data('status')=='opened'){ return false; }
					$JQ(This).everyTime(100,function(i){ jcenter(This); });
					//jFlashTransparent();
					jcenter(This, true);
					if(defaults.AllowOpacity=='true'){ 
						if(GlobIE6==true || GlobIE7==true || GlobIE8==true){ $JQ(This).find('*').stop(true,false).animate({ opacity:1 },{easing:"easeInOutSine",duration:200, queue:false, complete:function(){  
							$JQ(This).find('.jitemhover *').stop(true,false).trigger('mouseleave');  
						}});
						
					} //IE7,8 Fix
						$JQ(This).stop(true,false).animate({ opacity:1 },{easing:"easeInOutSine",duration:600, queue:false, complete:function(){ $JQ(This).data('status','opened');    }}); 
					}else{ $JQ(This).data('status','opened'); }
				});//oneTime
				jopacity_open(This); //ACTIVATE
				
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jopen: ' + err); }}
		}
		<!-- ==============/jopen  ============== -->
		<!-- ============== jcenter  ============ -->
		function jcenter(This,Override){
			try{
				if(typeof(Override)=="undefined" || Override==null){ Override=false; }
				var c_left=0;
				var c_top=0;
				c_left=parseInt($JQ.jDocumentSize().width/2)-parseInt($JQ(This).width()/2);
				
				if($JQ(window).height() > $JQ(This).height()){
					c_top=parseInt($JQ(window).height()/2)- parseInt($JQ(This).height()/2)+$JQ(window).scrollTop();
				}else{ c_top=0; }

				if(($JQ(This).data('status')=='opened') || (Override==true)){
					if(($JQ(This).data('status')=='opened') && (defaults.positionHor=='true' || defaults.positionVer=='true')){ 
						if($JQ(This).is(':animated')){ return false; } 
						$JQ(This).stop(true,false); 
					}
					
					if(defaults.positionHor=='true'){ 
						if(Override==true){ $JQ(This).css('left',c_left); }
						else{ $JQ(This).animate({ 'left':c_left },{easing:"easeOutSine",duration:300, queue:false, complete:function(){    }}); }
					}
					if(defaults.positionVer=='true'){
						if(Override==true){ $JQ(This).css('top',c_top); }
						else{ $JQ(This).animate({ 'top':c_top },{easing:"easeOutSine",duration:300, queue:false, complete:function(){    }});  } //easeInOutSine
					} //jopacity_open ADDED
					jopacity_refresh(This);
				}
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jcenter: ' + err); }}
		}
		<!-- ==============/jcenter  ============ -->
		<!-- ============== jclose_click  ======= -->
		function jclose_click(event){
			try{
				jclose(event.data.This);
				return false;
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jclose_click: ' + err); }}
		}
		<!-- ==============/jclose_click  ======= -->
		<!-- ============== jclose  ============= -->
		function jclose(This){
			try{
				
				$JQ(This).stopTime();
				if(defaults.AllowOpacity=='true'){
					if(GlobIE6==true || GlobIE7==true || GlobIE8==true){ $JQ(This).find('*').stop(true,false).animate({ opacity:0 },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){    }});   } //IE7,8 Fix
					$JQ(This).stop(true,false).animate({ opacity:0 },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){ 
						jopacity_close(This);
						$JQ(This).css('left',defaults.left); 
						jcontent(This,'&nbsp;'); 
						$JQ(This).data('status','closed');
						
					}});//animate
				}else{ 
					$JQ(This).data('status','closed'); 
					$JQ(This).oneTime(200,function(i){ 
						if($JQ(This).data('status')=='closed'){ $JQ(This).css('left',defaults.left); jcontent(This,'&nbsp;'); }
					 });  
				 }
				
				jopacity_close(This);
				
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jclose: ' + err); }}
		}
		<!-- ==============/jclose  ============= -->
		<!-- ============== jcontent  =========== -->
		function jcontent(This, Content){
			try{
				try{ Content=Content.replace(/\n/g,'<br />'); }catch(errs){}
				var c_obj=$JQ(This).find('.'+defaults.CScontent).eq(0);
				$JQ(c_obj).empty();
				$JQ(c_obj).html(Content);
				
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jcontent: ' + err); }}
		}
		<!-- ==============/jcontent  =========== -->
		<!-- ============== jaddcontent  ======== -->
		function jaddcontent(This, Content){
			try{
				try{ Content=Content.replace(/\n/g,'<br />'); }catch(errs){}
				var element=$JQ(This).find('.'+defaults.CScontent).eq(0);
				Content=Content+'<br />'+$JQ(element).html();
				$JQ(element).html(Content);
			}catch(err){ if(jDebugPluginMode==true){ alert('jdialoga-jaddcontent: ' + err); }}
		}
		<!-- ==============/jaddcontent  ======== -->
		
		
		return this.each(function(){
			$JQ(this).data('defaults_width', $JQ(this).data('defaults_width') ? $JQ(this).data('defaults_width') : gdefaults.width );
			$JQ(this).data('defaults_opacityID', $JQ(this).data('defaults_opacityID') ? $JQ(this).data('defaults_opacityID') : gdefaults.opacityID );
			$JQ(this).data('defaults_opacityVALUE', $JQ(this).data('defaults_opacityVALUE') ? $JQ(this).data('defaults_opacityVALUE') : gdefaults.opacityVALUE );
			$JQ(this).data('defaults_btn_jclose', $JQ(this).data('defaults_btn_jclose') ? $JQ(this).data('defaults_btn_jclose') : gdefaults.btn_jclose );
			$JQ(this).data('defaults_CScontent', $JQ(this).data('defaults_CScontent') ? $JQ(this).data('defaults_CScontent') : gdefaults.CScontent );
			$JQ(this).data('defaults_AllowOpacity', $JQ(this).data('defaults_AllowOpacity') ? $JQ(this).data('defaults_AllowOpacity') : gdefaults.AllowOpacity );
			$JQ(this).data('defaults_positionVer', $JQ(this).data('defaults_positionVer') ? $JQ(this).data('defaults_positionVer') : gdefaults.positionVer );
			$JQ(this).data('defaults_positionHor', $JQ(this).data('defaults_positionHor') ? $JQ(this).data('defaults_positionHor') : gdefaults.positionHor );
			
			if(options){ $JQ(this).data('defaults_width', options.width>gdefaults.width ? options.width : gdefaults.width );}
		 	if(options){ $JQ(this).data('defaults_opacityID', options.opacityID!='' ? options.opacityID : gdefaults.opacityID );}
			if(options){ $JQ(this).data('defaults_opacityVALUE', options.opacityVALUE>=0 ? options.opacityVALUE : gdefaults.opacityVALUE );}
			if(options){ $JQ(this).data('defaults_btn_jclose', options.btn_jclose!='' ? options.btn_jclose : gdefaults.btn_jclose );}
			if(options){ $JQ(this).data('defaults_CScontent', options.CScontent!='' ? options.CScontent : gdefaults.CScontent );}
			if(options){ $JQ(this).data('defaults_AllowOpacity', options.AllowOpacity!='' ? options.AllowOpacity : gdefaults.AllowOpacity );}
			if(options){ $JQ(this).data('defaults_positionVer', options.positionVer!='' ? options.positionVer : gdefaults.positionVer );}
			if(options){ $JQ(this).data('defaults_positionHor', options.positionHor!='' ? options.positionHor : gdefaults.positionHor );}
			
			defaults.width= $JQ(this).data('defaults_width');
			defaults.opacityID= $JQ(this).data('defaults_opacityID');
			defaults.opacityVALUE= $JQ(this).data('defaults_opacityVALUE');
			defaults.btn_jclose= $JQ(this).data('defaults_btn_jclose');
			defaults.CScontent= $JQ(this).data('defaults_CScontent');
			defaults.AllowOpacity= $JQ(this).data('defaults_AllowOpacity');
			defaults.positionVer= $JQ(this).data('defaults_positionVer');
			defaults.positionHor= $JQ(this).data('defaults_positionHor');
			
			switch(func){
				case 'set': 	jset(this);  break;
				case 'open': 	jopen(this); break;
				case 'close': 	jclose(this); break;
				case 'content': 	jcontent(this,options); break;
				case 'addcontent': 	jaddcontent(this,options); break;
				default: break;
			}//switch
		
		});//each
	};//function
 })(jQuery);
/* =============================== .Plugin-jdialoga [END] =========================== */
/* =============================== .jMenuSet [START] ================================ */
function jMenuSet(ID, PaddingWidth){
	try{
		if(!ID || ID==''){ return false; }
		if(!PaddingWidth || PaddingWidth==''){ PaddingWidth=-1; }
		
		var elements = $JQ('#'+ID).find('li');
		var c_widthmain=$JQ('#'+ID).find('ul').attr('offsetWidth');
		var c_width=0;
		
		//BC function catSetSelectedCSSItem(menuid){} - removes onmouseout
		if($JQ(elements).length<=0){ return false; }
		var c_links=document.getElementById(ID).getElementsByTagName('li');
		for(var i=0; i<c_links.length;i++){
			c_links[i].onmouseout= function(){}
		}
		//BC function catSetSelectedCSSItem(menuid){} - removes onmouseout
		
		$JQ(elements).each(function(index){
			if($JQ(this).attr('id')!=''){
				var c_href=$JQ(this).find('a').eq(0).attr('href');
				$JQ(this).find('a').eq(0).css('display','none');
				$JQ(this).append('<a class="insert" href="'+c_href+'"><img src="/bc_graph/shared/empty.gif" alt="" /></a>')
			}
		});
		
		return; //turns off first,last
		for(var i=0; i<elements.length; i++){
			c_width+=$JQ(elements).eq(i).attr('offsetWidth');
			if(i==0){ $JQ(elements).eq(i).attr('class','first'); }
			if(i==(elements.length-1)){ 
				$JQ(elements).eq(i).attr('class','last');
				var c_newwidth=c_widthmain-c_width+$JQ(elements).eq(i).attr('offsetWidth');
				
				var c_linknum=0;
				if($JQ(elements).eq(i).find('a').length>1){ c_linknum=1; } //in case if there is an image file
				var c_link=$JQ(elements).eq(i).find('a').eq(c_linknum);
				
				$JQ(elements).eq(i).css('width', c_newwidth);
				if(PaddingWidth==-1){ c_newwidth=c_newwidth-parseInt($JQ(c_link).css('padding-left'))-parseInt($JQ(c_link).css('padding-right')); }
				else{ c_newwidth=c_newwidth-parseInt(PaddingWidth); }
				$JQ(c_link).css('width', c_newwidth);
			}
		}//for
		
	}catch(err){ if(jDebugMode==true){ alert('jMenuSet: ' + err); }}
}

function jMenuSetActive(ID, IDbread){
	try{
		if(!ID || ID==''){ return false; }
		if(!IDbread || IDbread==''){ return false; }
		if($JQ('#'+IDbread).find('a').length<1){ return false; }
		var c_breadname=$JQ('#'+IDbread).find('a').eq(0).text().toUpperCase();
		var c_breadhref=$JQ('#'+IDbread).find('a').eq(0).attr('href').toUpperCase();
		var c_breadfolder='';
		var c_name='';
		var c_alternate=-1;
		var elements = $JQ('#'+ID).find('li');
		
		if((c_breadhref.charAt(0)=='/') && c_breadhref.lastIndexOf('/')>1) {
			c_breadfolder=c_breadhref.slice(1,c_breadhref.lastIndexOf('/'));
		}
		for(var i=0; i<elements.length; i++){
			c_name=$JQ(elements).eq(i).find('a').eq(0).text().toUpperCase();
			c_href=$JQ(elements).eq(i).find('a').eq(0).attr('href').toUpperCase();
			
			//if(c_name==c_breadname){ 
			if(c_href==c_breadhref){ 
				if($JQ(elements).eq(i).hasClass('active')==false){
					$JQ(elements).eq(i).addClass('active');
				}
				return;
			}
			if(c_href.slice(1,c_href.lastIndexOf('/'))==c_breadfolder){ c_alternate=i; }
		}//for
		
		if(c_alternate>-1){ $JQ(elements).eq(c_alternate).addClass('active'); }
		
	}catch(err){ if(jDebugMode==true){ alert('jMenuSetActive: ' + err); }}
}

function jMenuSetBCReset(ID){
	try{
		if(!ID || ID==''){ return false; }
		
		var elements = $JQ('#'+ID).find('li');
		//BC function catSetSelectedCSSItem(menuid){} - removes onmouseout
		if($JQ(elements).length<=0){ return false; }
		var c_links=document.getElementById(ID).getElementsByTagName('li');
		for(var i=0; i<c_links.length;i++){
			c_links[i].onmouseout= function(){}
		}
		//BC function catSetSelectedCSSItem(menuid){} - removes onmouseout
		
	}catch(err){ if(jDebugMode==true){ alert('jMenuSetBCReset: ' + err); }}
}
/* =============================== .jMenuSet [END] ================================== */
/* =============================== .SliderMVA [START] =============================== */
function jSliderMVA_Set(event){
	try{//[Last Update: 16.stycznia.2010]
		var Data=event.data.Data;
		
		if(jQuery.data(document.body,Data.IDslide).PERM!=true){ return false; }
		else{ jQuery.data(document.body,Data.IDslide,{PERM:false}); }
		
		$JQ('#'+Data.IDlink+' li').attr('class','');
		$JQ('#'+Data.IDlink+' li').eq(event.data.LINKindex).attr('class','active');
		var c_fullwidth=parseInt($JQ('#'+Data.IDslide+' ul').css('width'));
		var c_width=parseInt($JQ('#'+Data.IDslide+' li').eq(0).attr('offsetWidth'));
		var c_left=parseInt($JQ('#'+Data.IDslide+' ul').css('left'));
		
		var c_newlt=event.data.LINKindex*c_width*(-1);
		var c_newheight=$JQ('#'+Data.IDslide+' li').eq(event.data.LINKindex).attr('offsetHeight');
		
		$JQ('#'+Data.IDslide+' ul').animate({ left:c_newlt },{easing:"easeInOutExpo",duration:1000, queue:false, complete:function(){ jQuery.data(document.body,Data.IDslide,{PERM:true});  }}); 
		$JQ('#'+Data.IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_Set: ' + err); }}
}

function jSliderMVA_Direction(event){
	try{//[Last Update: 16.stycznia.2010]
		var Data=event.data.Data;
		var c_direction=event.data.Direction;
		var elements=$JQ('#'+Data.IDlink+' li');
		var c_active=-1;
		
		for(var i=0;i<elements.length;i++){
			if($JQ(elements).eq(i).attr('class')=='active'){  c_active=i; break; }
		}
		if(c_active==-1){ alert('MVA Error: #50'); return false;  }
		
		switch(c_direction) {
			case 'next': if(c_active<elements.length-1){ c_active+=1; }else{ c_active=0; }  break;
			case 'prev': if(c_active>=1){ c_active-=1; }else{ c_active=elements.length-1; }  break;
			default: return false;
		}
		if(c_active>=0 && c_active<elements.length){ $JQ(elements).eq(c_active).click(); }
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_Direction: ' + err); }}
}
			
			
function jSliderMVA(Data){
	try{//[Last Update: 14.luty.2011]
		if(!Data || Data==''){ return false; }
		if(!Data.IDprev || Data.IDprev==''){ return false; }
		if(!Data.IDnext || Data.IDnext==''){ return false; }
		if(!Data.IDlink || Data.IDlink==''){ return false; }
		if(!Data.IDslide || Data.IDslide==''){ return false; }
		if(!Data.Num || Data.Num==''){ Data.Num=-1; }else{ Data.Num=parseInt(Data.Num); }
		if(!Data.AdditionalFields || Data.AdditionalFields==''){ Data.AdditionalFields=0; }
		if((Data.AdditionalFields<0) || (isNaN(Data.AdditionalFields)==true)){ Data.AdditionalFields=0; } //Data.AdditionalFields - Display Additional Fields (for 4 boxes Data.AdditionalFields=3)
		if(!Data.Timer || Data.Timer==''){ Data.Timer=false; }
		
		var c_total=$JQ('#'+Data.IDslide+' li').length; //setWidth
		var c_width=parseInt($JQ('#'+Data.IDslide).find('li').eq(0).attr('offsetWidth'));
		var c_height=parseInt($JQ('#'+Data.IDslide).find('li').eq(0).attr('offsetHeight'));
		if(c_total<=0 || c_width<=0){ return false; }

		$JQ('#'+Data.IDslide).animate({ height:c_height },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		$JQ('#'+Data.IDslide+' ul').css('width',parseInt(c_total*c_width));
		$JQ('#'+Data.IDslide+' ul').css('left',0);
		
		
		var elements=$JQ('#'+Data.IDlink+' li');
		//Added auto links creation
		if(elements.length==0){ 
			$JQ('#'+Data.IDlink).empty();
			$JQ('#'+Data.IDlink).append('<ul></ul>');
			
			for(var i=0;i<parseInt(c_total-Data.AdditionalFields);i++){
				$JQ('#'+Data.IDlink).find('ul').eq(0).append('<li><a href="#"><img src="'+GlobPathEmptyGif+'" alt="" /></a></li>');
			}
			elements=$JQ('#'+Data.IDlink+' li');
		}
		//Added auto links creation
		$JQ(elements).attr('class','');
		
		var c_newlength=elements.length+Data.AdditionalFields;	//Update positioning
		//if((Data.Num>0 && Data.Num<elements.length) && (c_total==elements.length)){ //Update positioning Before
		if((Data.Num>0 && Data.Num<elements.length) && (c_total==c_newlength)){ 	//Update positioning After
			$JQ(elements).eq(Data.Num).attr('class','active');
			$JQ('#'+Data.IDslide+' ul').css('left',parseInt((-1)*Data.Num*c_width));
			
		}else{ $JQ(elements).eq(0).attr('class','active'); }
		
		jQuery.data(document.body,Data.IDslide,{PERM:true});
		for(var i=0; i<elements.length; i++){
			$JQ(elements).eq(i).bind("click", {Data:Data, LINKindex:i}, jSliderMVA_Set);
		}
		
		$JQ('#'+Data.IDprev).bind("click", {Data:Data, Direction:'prev'}, jSliderMVA_Direction);
		$JQ('#'+Data.IDnext).bind("click", {Data:Data, Direction:'next'}, jSliderMVA_Direction);
		
		if(Data.Timer==true){ jSliderMVA_TimerSet(Data); }
		
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA: ' + err); }}
}

function jSliderMVA_TimerSet(Data){
	try{//[Last Update: 16.stycznia.2010]
		if(!Data || Data==''){ return false; }
		if(!Data.IDprev || Data.IDprev==''){ return false; }
		if(!Data.IDnext || Data.IDnext==''){ return false; }
		if(!Data.IDlink || Data.IDlink==''){ return false; }
		if(!Data.Duration || Data.Duration==''){ return false; }
		if(Data.Duration<=0){ return false; }
		
		$JQ('#'+Data.IDprev).add('#'+Data.IDnext).bind("mouseover", {Data:Data}, jSliderMVA_TimerOver);
		$JQ('#'+Data.IDprev).add('#'+Data.IDnext).bind("mouseout", {Data:Data}, jSliderMVA_TimerOut);
		
		$JQ('#'+Data.IDslide).add('#'+Data.IDlink+' a').bind("mouseover", {Data:Data}, jSliderMVA_TimerOver);
		$JQ('#'+Data.IDslide).add('#'+Data.IDlink+' a').bind("mouseout", {Data:Data}, jSliderMVA_TimerOut);
		
		jSliderMVA_setTimerPerm(Data,true);
		Data.Status='firstrun';
		jSliderMVA_Timer(Data);
		return true;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_TimerSet: ' + err); }}
}

function jSliderMVA_setTimerPerm(Data,Value){
	try{//[Last Update: 16.stycznia.2010]
		if(!Data || Data==''){ return false; }
		if(!Data.IDslide || Data.IDslide==''){ return false; }
		if(typeof(Value)=="undefined" || Value==null){ return false; }
		if((Value!=true) && (Value!=false)){ return false; }
		
		var c_date = new Date();
		var c_datemls = c_date.valueOf()
		
		$JQ('#'+Data.IDslide).data('jSliderMVA_TimerPerm',Value);
		$JQ('#'+Data.IDslide).data('jSliderMVA_TimerPermTimeSet',c_datemls);
		
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_setTimerPerm: ' + err); }}
}

function jSliderMVA_TimerOver(event){
	try{//[Last Update: 16.stycznia.2010]
		var Data=event.data.Data;
		jSliderMVA_setTimerPerm(Data,false);
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_TimerOver: ' + err); }}
}

function jSliderMVA_TimerOut(event){
	try{//[Last Update: 16.stycznia.2010]
		var Data=event.data.Data;
		jSliderMVA_setTimerPerm(Data,true);
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_TimerOut: ' + err); }}
}

function jSliderMVA_Timer(Data){
	try{//[Last Update: 16.stycznia.2010]
		if(!Data || Data==''){ return false; }
		if(!Data.IDprev || Data.IDprev==''){ return false; }
		if(!Data.IDnext || Data.IDnext==''){ return false; }
		if(!Data.Duration || Data.Duration==''){ return false; }
		if(Data.Duration<=0){ return false; }
		if(!Data.Status || Data.Status==''){ Data.Status=''; }
		
		var TimerPerm=$JQ('#'+Data.IDslide).data('jSliderMVA_TimerPerm') ? true : false;
		
		if((TimerPerm==true) && (Data.Status!='firstrun')){
			
			var c_date = new Date();
			var c_datemls = c_date.valueOf()
			var c_oldmls=parseInt($JQ('#'+Data.IDslide).data('jSliderMVA_TimerPermTimeSet'));
			var c_diff=c_datemls-c_oldmls
			
			var c_duration=Data.Duration;
			if(c_diff<Data.Duration){ c_duration=parseInt(Data.Duration-c_diff); }
			else{ $JQ('#'+Data.IDnext).click(); }
			$JQ(this).oneTime(c_duration,function(i){ jSliderMVA_Timer(Data); });
			return;
		}else{
			Data.Status='right'; 
			$JQ(this).oneTime(Data.Duration,function(i){ jSliderMVA_Timer(Data); });
		}
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA_Timer: ' + err); }}
}
/* =============================== .SliderMVA [END] ================================= */
/* =============================== .jSliderMVA2 [START] ============================= */
function jSliderMVA2_Set(event){
	try{//[Last Update: 21.listopada.2010]
		var IDlink=event.data.IDlink;
		var IDslide=event.data.IDslide;
		
		if(jQuery.data(document.body,IDslide).PERM!=true){ return false; }
		else{ jQuery.data(document.body,IDslide,{PERM:false}); }
		
		
		$JQ('#'+IDlink+' li').attr('class','');
		$JQ('#'+IDlink+' li').eq(event.data.LINKindex).attr('class','active');
		var c_fullwidth=parseInt($JQ('#'+IDslide+' .ul2').css('width'));
		var c_width=parseInt($JQ('#'+IDslide+' .li2').eq(0).attr('offsetWidth'));
		var c_left=parseInt($JQ('#'+IDslide+' .ul2').css('left'));
		
		var c_newlt=event.data.LINKindex*c_width*(-1);
		var c_newheight=$JQ('#'+IDslide+' .li2').eq(event.data.LINKindex).attr('offsetHeight');
		//$JQ('#'+IDslide+' ul').animate({ left:c_newlt },{easing:"easeOutElastic",duration:1500, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		//$JQ('#'+IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		
		//$JQ('#'+IDslide+' .ul2').animate({ left:c_newlt },{easing:"easeInOutExpo",duration:1000, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		
		if(GlobIE8==true){ $JQ('#'+IDslide+' .ul2').find('*').not('.jitemhover img').animate({ opacity:0 },{easing:"easeOutSine",duration:300, queue:false }); } //IE8 Path
		$JQ('#'+IDslide+' .ul2').animate({ opacity:0 },{easing:"easeOutSine",duration:300, queue:false, complete:function(){
			$JQ('#'+IDslide+' .ul2').css('left',c_newlt);
			if(GlobIE8==true){ $JQ('#'+IDslide+' .ul2').find('*').not('.jitemhover img').animate({ opacity:1 },{easing:"easeInSine",duration:700, queue:false }); } //IE8 Path
			$JQ('#'+IDslide+' .ul2').animate({ opacity:1 },{easing:"easeInSine",duration:700, queue:false, complete:function(){ jQuery.data(document.body,IDslide,{PERM:true});  }}); 
		}}); 
		$JQ('#'+IDslide).animate({ height:c_newheight },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		//easeInOutExpo
		//alert(c_active);
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Set: ' + err); }}
}

function jSliderMVA2_Direction(event){
	try{
		var IDlink=event.data.IDlink;
		var c_direction=event.data.Direction;
		
		var elements=$JQ('#'+IDlink+' li');
		var c_active=-1;
		
		for(var i=0;i<elements.length;i++){
			if($JQ(elements).eq(i).attr('class')=='active'){  c_active=i; break; }
		}
		if(c_active==-1){ alert('MVA2 Error: #50'); return false;  }
		
		switch(c_direction) {
			case 'next': if(c_active<elements.length-1){ c_active+=1; }else{ c_active=0; }  break;
			case 'prev': if(c_active>=1){ c_active-=1; }else{ c_active=elements.length-1; }  break;
			default: return false;
		}
		//alert('ter:'+c_active+' - direction:'+c_direction); 
		if(c_active>=0 && c_active<elements.length){ $JQ(elements).eq(c_active).click(); }
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Direction: ' + err); }}
}
			
			
function jSliderMVA2(IDprev, IDnext, IDlink, IDslide, Num){
	try{ 
		if(!IDprev || IDprev==''){ return false; }
		if(!IDnext || IDnext==''){ return false; }
		if(!IDlink || IDlink==''){ return false; }
		if(!IDslide || IDslide==''){ return false; }
		if(!Num || Num==''){ Num=-1; }else{ Num=parseInt(Num); }
		
		//alert('test');
		//
		
		var c_total=$JQ('#'+IDslide+' .li2').length; //setWidth
		var c_width=parseInt($JQ('#'+IDslide).find('.li2').eq(0).attr('offsetWidth'));
		if(Num>-1){ var c_height=parseInt($JQ('#'+IDslide).find('.li2').eq(Num).attr('offsetHeight')); }
		else{ var c_height=parseInt($JQ('#'+IDslide).find('.li2').eq(0).attr('offsetHeight')); }
		if(c_total<=0 || c_width<=0){ return false; }

		$JQ('#'+IDslide).animate({ height:c_height },{easing:"swing",duration:750, queue:false, complete:function(){     }}); //setHeight
		$JQ('#'+IDslide).find('.ul2').eq(0).css('width',parseInt(c_total*c_width));
		$JQ('#'+IDslide).find('.ul2').eq(0).css('left',0);
		
		
		
		var elements=$JQ('#'+IDlink+' li');
		$JQ(elements).attr('class','');
		if((Num>0 && Num<elements.length) && (c_total==elements.length)){ 
			$JQ(elements).eq(Num).attr('class','active');
			$JQ('#'+IDslide+' .ul2').css('left',parseInt((-1)*Num*c_width));
			
		}else{ $JQ(elements).eq(0).attr('class','active'); }
		
		jQuery.data(document.body,IDslide,{PERM:true});
		for(var i=0; i<elements.length; i++){
			//alert($JQ(elements).eq(i).attr('rel'))
			var c_rel=$JQ(elements).eq(i).find('a').eq(0).attr('rel'); //Added for BEAUTE PACIFIQUE
			if(!c_rel){  //Added for BEAUTE PACIFIQUE
				$JQ(elements).eq(i).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, LINKindex:i}, jSliderMVA2_Set);
			}else{
				$JQ(elements).eq(i).find('a').eq(0).bind("click",function(){ return false; }); //Added for BEAUTE PACIFIQUE
			}
		}
		
		$JQ('#'+IDprev).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, Direction:'prev'}, jSliderMVA2_Direction);
		$JQ('#'+IDnext).bind("click", {IDprev:IDprev, IDnext:IDnext, IDlink:IDlink, IDslide:IDslide, Direction:'next'}, jSliderMVA2_Direction);
		
		jItemHoverAnimation(IDprev);
		jItemHoverAnimation(IDnext);
		//alert($JQ('#'+IDslide+' ul').css('width'));
		//for(var i=0;i<elements.length;i++){
			
		
		var c_found=false;
		for(var i=0; i<GlobalMVA2Change.length; i++){
			if(GlobalMVA2Change[i]==IDslide){ c_found=true; break; }
		}
		if(c_found==false){
			//alert('sleeper');
			GlobalMVA2Change[GlobalMVA2Change.length]=IDslide;
			jSliderMVA2_Change(IDlink, IDslide);
		}
		//alert(GlobalMVA2Change[0].IDlink);
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2: ' + err); }}
}

var GlobalMVA2Change=new Array();
function jSliderMVA2_Change(IDlink, IDslide){
	try{
		if(!IDlink || IDlink==''){ return false; }
		if(!IDslide || IDslide==''){ return false; }
		//alert('test');
		
		elements=$JQ('#'+IDlink+' li');
		var c_found=false;
		for(var i=0; i<elements.length; i++){
			if($JQ(elements).eq(i).attr('class')=='active'){ c_found=true; break; }
		}
		
		if(c_found==true){
			var c_height=parseInt($JQ('#'+IDslide).find('.li2').eq(i).attr('offsetHeight')); 
			$JQ('#'+IDslide).animate({ height:c_height },{easing:"swing",duration:750, queue:false, complete:function(){ self.setTimeout("jSliderMVA2_Change('"+IDlink+"','"+IDslide+"')", 100);  }}); //setHeight /*Changed from 500ms to 100ms*/
		}else{ self.setTimeout("jSliderMVA2_Change('"+IDlink+"','"+IDslide+"')", 100); } /*Changed from 500ms to 100ms*/
		
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Change: ' + err); }}
}
/*
function jSliderHrefLocation(Addons){
	try{
		if(!Addons || Addons==''){ return false; }
		switch(Addons.charAt(0)){
			case '#': break;
			//case '?': break;
			default: return false;
		}
		
		 var c_url=window.location.toString();
         var c_varexists=c_url.indexOf('#');
		 
		 if(c_varexists>0){
			var c_newurl=c_url.slice(0,c_varexists);
			window.location=c_newurl+Addons;
		 }else{ window.location+=Addons; }
		
		
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderHrefLocation: ' + err); }}
}
*/
var GlobalSliderMVA2_TimerPerm=false;
function jSliderMVA2_TimerSet(IDprev, IDnext, IDlink, IDslide, Duration){ //Added IDslide in TruBlu
	try{
		if(!IDprev || IDprev==''){ return false; }
		if(!IDnext || IDnext==''){ return false; }
		if(!IDlink || IDlink==''){ return false; }
		if(!Duration || Duration==''){ return false; }
		if(Duration<=0){ return false; }
	
		$JQ('#'+IDprev).bind("mouseover", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOver);
		$JQ('#'+IDprev).bind("mouseout", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOut);
		
		$JQ('#'+IDnext).bind("mouseover", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOver);
		$JQ('#'+IDnext).bind("mouseout", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOut);
		
		$JQ('#'+IDslide).bind("mouseover", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOver); //Added in TruBlu
		$JQ('#'+IDslide).bind("mouseout", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOut); //Added in TruBlu
		
		$JQ('#'+IDlink).find('a').bind("mouseover", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOver);
		$JQ('#'+IDlink).find('a').bind("mouseout", {IDprev:IDprev, IDnext:IDnext, Duration:Duration}, jSliderMVA2_TimerOut);
		
		GlobalSliderMVA2_TimerPerm=true;
		jSliderMVA2_Timer(IDprev, IDnext, Duration, 'firstrun');
		return true;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_TimerSet: ' + err); }}
}

function jSliderMVA2_TimerOver(event){
	try{
		GlobalSliderMVA2_TimerPerm=false;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_TimerOver: ' + err); }}
}

function jSliderMVA2_TimerOut(event){
	try{
		GlobalSliderMVA2_TimerPerm=true;
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_TimerOut: ' + err); }}
}

function jSliderMVA2_Timer(IDprev, IDnext, Duration, Status){
	try{
		if(!IDprev || IDprev==''){ return false; }
		if(!IDnext || IDnext==''){ return false; }
		if(!Duration || Duration==''){ return false; }
		if(Duration<=0){ return false; }
		if(!Status || Status==''){ Status=''; }
		
		if((GlobalSliderMVA2_TimerPerm==true) && (Status!='firstrun')){
			$JQ('#'+IDnext).click();
			self.setTimeout("jSliderMVA2_Timer('"+IDprev+"','"+IDnext+"',"+Duration+")",  Duration);
			return;
		}else{ self.setTimeout("jSliderMVA2_Timer('"+IDprev+"','"+IDnext+"',"+Duration+")",  Duration); }
		//self.setTimeout("jSliderMVA2_Timer('"+IDprev+"','"+IDnext+"',"+Duration+")", 3000);
		
	}catch(err){ if(jDebugMode==true){ alert('jSliderMVA2_Timer: ' + err); }}
}
/* =============================== .jSliderMVA2 [END] =============================== */
/* =============================== .jImageLoader [START] ============================ */
function jImageLoader_Download(Data,Counter){ 
	try{//[Last Update: 06.listopada.2010]
		if(!Data.This || Data.This==''){ return false; }
		if(!Data.Mode || Data.Mode==''){ return false; }
		if(!Data.TAG || Data.TAG==''){ return false; }
		if(!Counter || Counter==''){ Counter=0; }
		if(Counter>=2){ return false; }
		//alert(Data.SRCorigin);
		//if(!Data.SRC){ return false; }
		
		//alert(Data.SRC);
		
		//$JQ.ajaxSetup({ cache: false });
		//$JQ.ajax({ cache: false, global:false });
		var img = new Image();
		//$JQ.ajaxSetup({ cache:false, global:false });
		$JQ(img).load(function(){
			//$JQ(Data.This).append(img);//alert($JQ(Data.This).attr('class'));
			$JQ(Data.This).animate({ opacity:0 },{easing:"easeInOutSine",duration:200, queue:false, complete:function(){   
				if(Data.Anime==true){ $JQ(Data.This).removeClass('jimgload_animebefore'); }
				if(Data.TAG=='img'){ $JQ(Data.This).attr('src',Data.SRC); }
				else{ $JQ(Data.This).css('background-image',Data.SRCorigin); }
				$JQ(Data.This).animate({ opacity:1 },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){   }});
			}});//animate
		}).error(function(){
			$JQ(Data.This).animate({ opacity:0 },{easing:"easeInOutSine",duration:200, queue:false, complete:function(){
				if(Data.Anime==true){ 
					$JQ(Data.This).removeClass('jimgload_animebefore');
					$JQ(Data.This).addClass('jimgload_animeerror');
				}
				$JQ(Data.This).oneTime(10000,function(i){
					Counter++;
					jImageLoader_Download(Data,Counter);
				});//oneTime
				$JQ(Data.This).animate({ opacity:1 },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){   }});
				
			}});//animate
		}).attr('src',Data.SRC);
	}catch(err){ if(jDebugMode==true){ alert('jImageLoader_Download: ' + err); }}
}


function jImageLoader_Set(Name,Mode,Anime,Timer){ 
	try{//[Last Update: 06.listopada.2010]
		if(!Name || Name=='' || Name.length<2){ return false; }
		if(!Mode || Mode==''){ Mode='series'; } //inactive
		if(typeof(Anime)=="undefined" || Anime==null){ Anime=false; }
		if(!Timer || Timer==''){ Timer=false; }
		
		switch(Name.charAt(0)){
			case '.': break;
			case '#': break;
			//default: Name='#'+Name;
		}
		
		switch(Mode.toLowerCase()){
			case 'series': break;
			case 'parallel': break;
			default: Mode='series';
		}
		
		//$JQ(Name).attr('src','/bc_graph/shared/empty.gif');
		//$JQ(Name).css('display','block');
		
		$JQ(Name).each(function(index){
			var This=this;
			var c_src='';
			var c_srcorigin='';
			var c_tagname=$JQ(this).get(0).tagName.toLowerCase();
			
			$JQ(this).data('jImageLoader_status', $JQ(this).data('jImageLoader_status') ? $JQ(this).data('jImageLoader_status') : 'start' );
			if($JQ(this).data('jImageLoader_status')!='start'){ return true; }
			else{ $JQ(this).data('jImageLoader_status','end'); }
			
			if(c_tagname=='img'){ 
				c_src=$JQ(this).attr('src');
				$JQ(this).attr('src','/bc_graph/shared/empty.gif');
			}
			else{ 
				c_src=$JQ(this).css('background-image'); 
				c_srcorigin=c_src;
				c_src=c_src.slice(c_src.indexOf('(')+1,c_src.lastIndexOf(')')); 
				c_src=c_src.replace(/"/g,''); 
				$JQ(this).css('background-image','url("/bc_graph/shared/empty.gif")');
			}
			
			$JQ(this).css({'opacity':0,'display':'block'});
			if(Anime==true){ $JQ(this).addClass('jimgload_animebefore'); }
			$JQ(this).stop(true,false).animate({ opacity:1 },{easing:"easeInOutSine",duration:400, queue:false, complete:function(){   
				jImageLoader_Download({This:This, Mode:Mode, Anime:Anime, SRC:c_src, TAG:c_tagname, SRCorigin:c_srcorigin});
			}});//animate
		});
		
		if(Timer==true){
			$JQ(this).oneTime(1000,function(i){ if(GlobIE6!=true){ jImageLoader_Set('.jimgload','',true,true); } });
		}
	}catch(err){ if(jDebugMode==true){ alert('jImageLoader_Set: ' + err); }}
}
/* =============================== .jImageLoader [END] ============================== */
/* =============================== .jRedisplayBlock [START] ========================= */
function jRedisplayBlockClick(event){
	try{
		var ID=event.data.ID;
		var IDshow=event.data.IDshow;
		var IDhide=event.data.IDhide;
		var IDpgtop=event.data.IDpgtop;
		var IDpgbottom=event.data.IDpgbottom;
		var IDheight=event.data.IDheight;
		//alert(IDheight);
		//IDheight+=30;
		//alert(IDheight);
		var c_status=jQuery.data(document.body, 'RedisplayBlockClick_'+ID);
		if(!c_status || c_status==false){ jQuery.data(document.body, 'RedisplayBlockClick_'+ID, true); c_status=true; }
		else{ jQuery.data(document.body, 'RedisplayBlockClick_'+ID, false); c_status=false; }
		
		if(c_status==false){
			$JQ('#'+IDhide).animate({ opacity:0 },{easing:"easeInOutExpo", duration:100, queue:false, complete:function(){  
					$JQ('#'+ID).animate({ opacity:0, height:0, 'paddingTop':0, 'paddingBottom':0 },{easing:"easeInOutExpo", duration:1300, queue:false, complete:function(){
						$JQ('#'+IDhide).css('display','none');
						$JQ('#'+IDshow).css('opacity',0);
						$JQ('#'+IDshow).css('display','block'); 
						$JQ('#'+IDshow).animate({ opacity:1 },{easing:"easeInOutExpo", duration:500, queue:false, complete:function(){  }});
					}}); //animate																							 
			}}); //animate
			
			/*
			$JQ('#'+ID).animate({ opacity:0, height:0, 'paddingTop':0, 'paddingBottom':0 },{easing:"easeInOutExpo", duration:1500, queue:false, complete:function(){
				$JQ('#'+IDshow).css('display','block');
				$JQ('#'+IDhide).css('display','none');
			}});
			*/
			
		}else{
			//====================== //Path (Dynamic Height)
			$JQ('#'+ID).css('height','auto'); //update
			var c_height=parseInt($JQ('#'+ID).height());
			$JQ('#'+ID).css('height',0);
			IDheight=c_height;
			//====================== //Path (Dynamic Height)
			$JQ('#'+IDshow).animate({ opacity:0 },{easing:"easeInOutExpo", duration:100, queue:false, complete:function(){  
					$JQ('#'+ID).animate({ opacity:1, height:IDheight, 'paddingTop':IDpgtop, 'paddingBottom':IDpgbottom },{easing:"easeInOutExpo", duration:1300, queue:false, complete:function(){  
						$JQ('#'+IDshow).css('display','none');
						$JQ('#'+IDhide).css('opacity',0);
						$JQ('#'+IDhide).css('display','block');
						$JQ('#'+ID).css('height','auto'); //Path (Dynamic Height) 
						$JQ('#'+IDhide).animate({ opacity:1 },{easing:"easeInOutExpo", duration:500, queue:false, complete:function(){  }});
					}}); //animate																							 
			}}); //animate
			/*
			$JQ('#'+ID).animate({ opacity:1, height:IDheight, 'paddingTop':IDpgtop, 'paddingBottom':IDpgbottom },{easing:"easeInOutExpo", duration:1500, queue:false, complete:function(){  
				$JQ('#'+IDshow).css('display','none');
				$JQ('#'+IDhide).css('display','block');
			}});
			*/
		}
		
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jRedisplayBlockClick: ' + err); }}
}

function jRedisplayBlock(ID,IDshow,IDhide){
	try{
		if(!ID || ID==''){ return false; }
		if(!IDshow || IDshow==''){ return false; }
		if(!IDhide || IDhide==''){ return false; }
		
		//$JQ('#'+ID).css('display','none');
		$JQ('#'+ID).css('display','block'); //update
		$JQ('#'+ID).css('height','auto'); //update
		$JQ('#'+IDshow).css('display','block');
		$JQ('#'+IDhide).css('display','none');
		
		var c_height=parseInt($JQ('#'+ID).height());
		$JQ('#'+ID).css('display','none'); //update
		//$JQ('#'+ID).css('padding-top',14);
		
		var c_pgtop=parseInt($JQ('#'+ID).css('padding-top'));
		var c_pgbottom=parseInt($JQ('#'+ID).css('padding-bottom'));
		
		var c_pgtop=0; //Only For WOLFGANG'S MOVERS
		var c_pgbottom=0; //Only For WOLFGANG'S MOVERS
		
		$JQ('#'+ID).css('height',0);
		$JQ('#'+ID).css('paddingTop',0);
		$JQ('#'+ID).css('paddingBottom',0);
		$JQ('#'+ID).css('opacity',0);
		
		$JQ('#'+IDshow).bind("click", {ID:ID, IDshow:IDshow, IDhide:IDhide, IDpgtop:c_pgtop, IDpgbottom:c_pgbottom, IDheight:c_height}, jRedisplayBlockClick);
		$JQ('#'+IDhide).bind("click", {ID:ID, IDshow:IDshow, IDhide:IDhide, IDpgtop:c_pgtop, IDpgbottom:c_pgbottom, IDheight:c_height}, jRedisplayBlockClick);
		
	}catch(err){ if(jDebugMode==true){ alert('jRedisplayBlock: ' + err); }}
}

function jRedisplayBlockStatus(ID){
	try{
		if(!ID || ID==''){ return false; }
		var c_status=jQuery.data(document.body, 'RedisplayBlockClick_'+ID);
		if(!c_status){ c_status=false; }
		return c_status;
		
	}catch(err){ if(jDebugMode==true){ alert('jRedisplayBlockStatus: ' + err); }}
}
/* =============================== .jRedisplayBlock [END] =========================== */
/* =============================== .jBC_ajaxSendForm [START] ======================== */
function jBC_ajaxSystemMessage(c_text){
	try{
		jBC_ajaxSystemMessage.success='';
		jBC_ajaxSystemMessage.message='';
		if(!c_text || c_text==''){ return false; }
		
		c_text=c_text.substring(c_text.lastIndexOf("{")+1, c_text.indexOf("}"));
		c_success=c_text.substring(c_text.indexOf(":")+2, c_text.lastIndexOf(",")).toLowerCase();
		c_message=c_text.substring(c_text.lastIndexOf('":')+3, c_text.lastIndexOf('"'));
		if((c_success!='false') && (c_success!='true')){ return false; }
		jBC_ajaxSystemMessage.success=c_success;
		jBC_ajaxSystemMessage.message=c_message;
		
		return true;
	}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSystemMessage: ' + err); }}
}

function jBC_ajaxFormProcessV2Response(c_text){
	try{
		jBC_ajaxFormProcessV2Response.success='';
		
		if(!c_text || c_text==''){ return false; }
		
		c_text=c_text.substring(c_text.lastIndexOf("{")+1, c_text.indexOf("}"));
		c_success=c_text.substring(c_text.indexOf(":")+2, c_text.indexOf(",")).toLowerCase();
		
		
		var c_idname='"success":';
		c_success=c_text.slice(c_text.indexOf(c_idname)+c_idname.length+1, c_text.length);
		c_success=c_success.slice(0,c_success.indexOf(','));
		
		if((c_success!='false') && (c_success!='true')){ return false; }
		
		var c_idname='"entityId":';
		c_entityId=c_text.slice(c_text.indexOf(c_idname)+c_idname.length+2, c_text.length);
		c_entityId=c_entityId.slice(0,c_entityId.indexOf('",'));
		
		
		var c_idname='"objectTypeId":';
		c_objectTypeId=c_text.slice(c_text.indexOf(c_idname)+c_idname.length+2, c_text.length);
		c_objectTypeId=c_objectTypeId.slice(0,c_objectTypeId.indexOf('",'));
		
		var c_idname='"objectId":';
		c_objectId=c_text.slice(c_text.indexOf(c_idname)+c_idname.length+2, c_text.length);
		c_objectId=c_objectId.slice(0,c_objectId.indexOf('",'));
		
		var c_idname='"message":';
		c_message=c_text.slice(c_text.indexOf(c_idname)+c_idname.length+2, c_text.length);
		c_message=c_message.slice(0,c_message.indexOf('"'));
		
		jBC_ajaxSystemMessage.success=c_success;
		jBC_ajaxSystemMessage.entityId=c_entityId;
		jBC_ajaxSystemMessage.objectTypeId=c_objectTypeId;
		jBC_ajaxSystemMessage.objectId=c_objectId;
		jBC_ajaxSystemMessage.message=c_message;
		
		return true;
	}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSystemMessage: ' + err); }}
}

function jBC_ajaxSendForm(ID,Data){ //Note: Data added
	try{//[Last Update: 28.listopada.2010]
		if(!ID || ID==''){ return false; }
		if(typeof(Data)=="undefined" || Data==null){ var Data=new Array(); }
		if(!Data.SuccessText || Data.SuccessText==''){ Data.SuccessText='<b class="color_green">Your message hes been send.</b>'; }
		var $c_form = $JQ('#'+ID);
		var c_action=$c_form.attr('action');
		if((c_action.length>1) && (c_action.charAt(0)=='#')){ c_action=c_action.slice(1,c_action.length); }

		$JQ.ajax({
			type: 'POST',
			url: c_action,
			data: $c_form.serialize(),
			dataType: "JSON", 
			global: false,
			success: function(msg){
					
					var general_phrasestart='<!-- [[jBC_general(START)]] -->';
					var general_phraseend='<!-- [[jBC_general(END)]] -->';
					
					if((msg.indexOf(general_phrasestart)>-1) && (msg.indexOf(general_phraseend)>-1)){
						var c_info=msg.slice(msg.indexOf(general_phrasestart)+general_phrasestart.length, msg.indexOf(general_phraseend)+general_phraseend.length);
						var c_info=c_info.replace('error','color_red');
						alert(c_info);
						return false;
					}
					
					if(msg.indexOf('"SystemMessage"')>-1){
						var c_err=jBC_ajaxSystemMessage(msg);
						if(c_err){ alert('<b class="color_red">'+jBC_ajaxSystemMessage.message+'</b>'); }
						else{ alert('<b class="color_red">Unknown System Error Occured</b> - Please Try Again.');	}
						return false;
					}
					
					if(msg.indexOf('"FormProcessV2Response"')>-1){
						var c_err=jBC_ajaxFormProcessV2Response(msg);
						if(c_err){ 
							//alert('<b class="color_green">Your message hes been send.</b>');
							alert(Data.SuccessText);
							$c_form.find('input[type="reset"]').eq(0).trigger('click');
						}else{ alert('<b class="color_red">Unknown Response Error Occured</b> - Please Try Again.');	}
						return false;
					}
					alert('<b class="color_red">Response hasn&acute;t been detected.</b><br />'+msg);
			},
			error: function(msg){
					var c_err=jBC_ajaxSystemMessage(msg.responseText);
					if(c_err){ alert('<b class="color_red">'+jBC_ajaxSystemMessage.message+'</b>'); }
					else{ alert('<b class="color_red">Unknown Error Occured</b> - Please Try Again.');	}
			}
		});
	}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSendForm: ' + err); }}
}
/* =============================== .jBC_ajaxSendForm [END] ========================== */
/* =============================== .jReboxA [START] ================================= */
function jReboxA_ClickA0(event){
	try{
		var ID=event.data.ID;
		var Duration=event.data.Duration;
		var Num=event.data.Num;
		var LINKindex=event.data.LINKindex;
		
		
		var elements = $JQ('#'+ID+' .li0');
		var c_ul01;
		
		for(var i=0;i<elements.length;i++){
			c_ul01=$JQ(elements).eq(i).find('.ul01').eq(0);
			if(LINKindex==i){
				c_height=$JQ(c_ul01).height();
				if(c_height==0){
					$JQ(c_ul01).css('height','auto');
					c_height=$JQ(c_ul01).height();
					$JQ(c_ul01).css('height',0);
					$JQ(c_ul01).animate({ height:c_height },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }});
				}
			}else{
			
				//c_height=$JQ(c_ul01).height();
				//if(c_height>0){ alert(c_height+' - '+i); }
				$JQ(c_ul01).animate({ height:0 },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }});
			}
		}
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jReboxA: ' + err); }}
}

function jReboxA(ID, Duration, Num){
	try{
		if(!ID || ID==''){ return false; } 
		if(!Duration || Duration==''){ Duration=300; }
		if(!Num || Num==''){ Num==-1; } 
		
		var elements = $JQ('#'+ID+' .li0');
		var c_ul01;
		var c_height=0;
		for(var i=0;i<elements.length;i++){
			c_ul01=$JQ(elements).eq(i).find('.ul01').eq(0);
			$JQ(c_ul01).css('height','auto');
			c_height=$JQ(c_ul01).height();
			$JQ(c_ul01).css('height',0);
			if((Num>=0) && (Num==i)){ $JQ(c_ul01).animate({ height:c_height },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }}); }
		}
		
		var elements = $JQ('#'+ID+' .a0');
		for(var i=0;i<elements.length;i++){
			$JQ(elements).eq(i).bind("click", {ID:ID, Duration:Duration, Num:Num, LINKindex:i}, jReboxA_ClickA0);
		}
	}catch(err){ if(jDebugMode==true){ alert('jReboxA: ' + err); }}
}
/* =============================== .jReboxA [END] =================================== */
/* =============================== .jReboxB [START] ================================= */
function jReboxB_ClickA0(event){
	try{
		var ID=event.data.ID;
		var Duration=event.data.Duration;
		var Num=event.data.Num;
		var LINKindex=event.data.LINKindex;
		
		
		var elements = $JQ('#'+ID+' .li0');
		var c_ul01;

		for(var i=0;i<elements.length;i++){
			c_ul01=$JQ(elements).eq(i).find('.ul01').eq(0);
			if(LINKindex==i){
				c_height=$JQ(c_ul01).height();
				if(c_height==0){
					$JQ(c_ul01).css('height','auto');
					c_height=$JQ(c_ul01).height();
					$JQ(c_ul01).css('height',0);
					$JQ(c_ul01).stop(true,false).animate({ height:c_height },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }});
				}else{
					$JQ(c_ul01).stop(true,false).animate({ height:0 },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }});
				}
			}else{
			
				//c_height=$JQ(c_ul01).height();
				//if(c_height>0){ alert(c_height+' - '+i); }
				$JQ(c_ul01).stop(true,false).animate({ height:0 },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }});
			}
		}
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jReboxB: ' + err); }}
}

function jReboxB(ID, Duration, Num){
	try{ 
		if(!ID || ID==''){ return false; } 
		if(!Duration || Duration==''){ Duration=300; }
		//if(!Num || Num==''){ Num=-1; } 
		if(typeof(Num)=="undefined" || Num==null){ Num=-1;  } /*Path for Num=0*/
		
		var elements = $JQ('#'+ID+' .li0');
		var c_ul01;
		var c_height=0;
		for(var i=0;i<elements.length;i++){
			c_ul01=$JQ(elements).eq(i).find('.ul01').eq(0);
			$JQ(c_ul01).css('height','auto');
			c_height=$JQ(c_ul01).height();
			$JQ(c_ul01).css('height',0);
			if((Num>=0) && (Num==i)){ $JQ(c_ul01).stop(true,false).animate({ height:c_height },{easing:"easeInOutSine",duration:Duration, queue:false, complete:function(){    }}); }
			
		}
		
		var elements = $JQ('#'+ID+' .a0');
		for(var i=0;i<elements.length;i++){
			$JQ(elements).eq(i).bind("click", {ID:ID, Duration:Duration, Num:Num, LINKindex:i}, jReboxB_ClickA0);
		}
	}catch(err){ if(jDebugMode==true){ alert('jReboxB: ' + err); }}
}
/* =============================== .jReboxB [END] =================================== */
/* =============================== .jBC_ajaxSlider [START] ========================== */
$JQ.jBC_ajaxSliderAnimation = function(This,Order){
	try{
		if(!This || This==''){ return false; }
		if(!Order || Order==''){ return false; }
		
		var c_id=jQuery.data(This,'IDslider-animation');
		if(!c_id || c_id==''){ return false; }
		var c_left=$JQ(This).offset().left;
		var c_top=$JQ(This).offset().top;
		c_left+=$JQ(This).width();
		
		switch(Order) {
			case 'open': 	if($JQ('#'+c_id).length==0){
								$JQ('body').append('<div id="'+c_id+'" class="ajax_loadera"><div class="ajax_loadera-anime"></div></div>');
								c_top=c_top-$JQ('#'+c_id).height();
								$JQ('#'+c_id).css({'opacity':0,'left':c_left,'top':c_top})
							}
							$JQ('#'+c_id).stop(true,false).animate({ opacity:1},{easing:"easeInOutSine",duration:400, queue:false, complete:function(){ 	}});
							break;
							
			case 'close':  	$JQ('#'+c_id).stop(true,true).animate({ opacity:0},{easing:"easeInOutSine",duration:2000, queue:false, complete:function(){ $JQ('#'+c_id).remove(); 	}});
							break;
			default: return false;
		}
		
	}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSliderAnimation: ' + err); }}
}
function jBC_ajaxSliderClick(event){
	try{
		var Index=event.data.Index;
		var IDdialog=event.data.IDdialog;
		var c_href=$JQ(this).attr('href');
		var This=$JQ(this);
		
		if(c_href=='' || c_href=='#'){ return false; }
		jQuery.data(This,'IDslider-animation','ajax_loadera-jslider_'+Index);
		
		//var c_href='orderRetrievev2-test.aspx';
		$JQ.ajax({
			url: c_href,
			global: false,
			cache: false,
			type: 'POST',
			beforeSend: function(){
				//alert(event.pageX +', '+ event.pageY+' ['+$JQ(This).position().left+','+$JQ(This).position().top+']');
				//alert($JQ(This).offset().left+','+$JQ(This).offset().top); // "DIV"
				$JQ.jBC_ajaxSliderAnimation(This,'open');
			},
			success: function(msg){
				try{
					//if(msg.indexOf('<body>')==-1){ alert('<b class="color_red">Unable to display selected page.</b><br />Incorrect data format.'); return false; }
					//var c_body=msg.slice(msg.indexOf('<body>')+6,msg.lastIndexOf('</body>'));
					c_body=msg;
					var c_dialogcontent=$JQ('#'+IDdialog).find('.'+IDdialog+'_jcontent').eq(0);
					$JQ(c_dialogcontent).empty();
					$JQ(c_dialogcontent).append(c_body);
					$JQ('#'+IDdialog).jdialoga('open');
				}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSliderClick-success: ' + err); }}
			},
			error: function(msg){
				alert('<b class="color_red">Unable to load page.</b><br />The page doesn&prime;t exist, or<br /> there is the problem with internet connection.');
			},
			complete: function(msg){
				$JQ.jBC_ajaxSliderAnimation(This,'close');
			}
		});
		
		return false;
	}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSliderClick: ' + err); }}
}

function jBC_ajaxSliderSet(Rel, IDdialog){
	try{
		if(!Rel || Rel==''){ return false; }
		if(!IDdialog || IDdialog==''){ return false; }
		var elements=$JQ.find('a[rel='+Rel+']');
		if(elements.length<=0){ return false; }
		
		
		$JQ(elements).each(function(index){
			if($JQ(this).hasClass('ajax_sliderclick')==false){
				$JQ(this).bind("click", {Index:index, IDdialog:IDdialog}, jBC_ajaxSliderClick);
				$JQ(this).addClass('ajax_sliderclick');
			}
		});
		
		return false; 
	}catch(err){ if(jDebugMode==true){ alert('jBC_ajaxSliderSet: ' + err); }}
}
/* =============================== .jBC_ajaxSlider [END] ============================ */
/* =============================== .jCommentBlogRecreate [START] ==================== */
function jCommentBlogRecreate(mainClass, ID, firstcommentID){
	try{
		var c_name, c_date, c_rate, c_cont, container;
		if($JQ('#tag_commentlist').html()=='{tag_commentlist,date}'){ return false; } //New line, checks if comments are not disabled
		var main=$JQ('.'+mainClass);
		if(main.length>1){ $JQ(main).css('display','none'); return false; }
		$JQ(main).eq(0).css('display','block');
		//var old=$JQ('.comment-container');
		var old=$JQ('.blog-comment-container');
		for(i=0;i<old.length;i++){
			c_flag=$JQ('.blog-comment-container:eq('+i+') .header .flag').html();
			c_name=$JQ('.blog-comment-container:eq('+i+') .header .name').html();
			c_date=$JQ('.blog-comment-container:eq('+i+') .header .date').html();
			c_rate=$JQ('.blog-comment-container:eq('+i+') .header .rating').html();
			c_cont=$JQ('.blog-comment-container .content:eq('+i+')').html();
			
			container='<div class="combox_title"><div class="c_name">' + c_flag + ' ' + c_name + ' ' + c_rate + '</div><div class="c_date">' + c_date + '</div></div>';
			container+='<div class="combox">' + c_cont + '</div>';
			
			$JQ('#'+ID).append(container);
			if(i==0){ $JQ('#'+firstcommentID).html(c_cont); }
		}
		
		if(old.length<=0){ 
			container='<p align="center">Post has no comments.</p>';
			$JQ('#'+ID).append(container);
			$JQ('#'+firstcommentID).html(container);
		}
		
	}catch(err){ if(jDebugMode==true){ alert('jCommentBlogRecreate: '+err); }}
}
/* =============================== .jCommentBlogRecreate [END] ====================== */
/* =============================== .single [START] ================================== */
function jSetBlur(Timer){ 
	try{//[Last Update: 09.listopada.2010]
		
		$JQ('a').each(function(index){
			$JQ(this).data('jSetBlur_status', $JQ(this).data('jSetBlur_status') ? $JQ(this).data('jSetBlur_status') : 'start' );
			if($JQ(this).data('jSetBlur_status')!='start'){ return true; }
			else{ $JQ(this).data('jSetBlur_status','end'); }
			$JQ(this).focus(function(){ $JQ(this).blur() });
		});
	
		if(Timer==true){
			$JQ(this).oneTime(1000,function(i){ jSetBlur(Timer) });
		}
		
	}catch(err){ if(jDebugMode==true){ alert('jSetBlur: ' + err); }}
}

function jItemHoverAnimation(Name, Duration, Timer){ 
	try{//[Last Update: 09.listopada.2010]
		if(!Name || Name=='' || Name.length<2){ return false; }
		if(!Duration || Duration==''){ Duration=300; }
		if(!Timer || Timer==''){ Timer=false; }

		switch(Name.charAt(0)){
			case '.': break;
			case '#': break;
			default: Name='#'+Name;
		}
		
		$JQ(Name).each(function(index){
			$JQ(this).data('jItemHoverAnimation_status', $JQ(this).data('jItemHoverAnimation_status') ? $JQ(this).data('jItemHoverAnimation_status') : 'start' );
			if($JQ(this).data('jItemHoverAnimation_status')!='start'){ return true; }
			else{ $JQ(this).data('jItemHoverAnimation_status','end'); }
			if($JQ(this).find('*').length==0){
				$JQ('<img src="/bc_graph/shared/empty.gif" alt="" />').appendTo(this);
			}
			
			$JQ(this).find('img').css('opacity',0);
			$JQ(this).find('img').css('visibility','visible');
			$JQ(this).find('input').css('opacity',0);
			$JQ(this).find('input').css('visibility','visible');
			$JQ(this).hover(function(){
				$JQ(this).find('img').eq(0).stop(true,false).animate({ opacity:1 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
				$JQ(this).find('input').eq(0).stop(true,false).animate({ opacity:1 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
			},function(){
				$JQ(this).find('img').eq(0).stop(true,false).animate({ opacity:0 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
				$JQ(this).find('input').eq(0).stop(true,false).animate({ opacity:0 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
			});//hover
		});
		
		if(Timer==true){
			$JQ(this).oneTime(1000,function(i){ jItemHoverAnimation(Name, Duration, Timer); });
		}
		
	}catch(err){ if(jDebugMode==true){ alert('jItemHoverAnimation: ' + err); }}
}

function jSpecificItemHoverAnimation(Data, Duration){
	try{ 
		if(!Data.IDlink || Data.IDlink==''){ return false; }
		if(!Data.IDimg || Data.IDimg==''){ return false; }
		if(!Duration || Duration==''){ Duration=300; }
		
		
		$JQ('#'+Data.IDimg).css('opacity',0);
		$JQ('#'+Data.IDimg).css('visibility','visible');
		
		$JQ('#'+Data.IDlink).hover(function(){
			if(GlobIE7==true || GlobIE8==true){ $JQ('#'+Data.IDimg).find('*').stop(true,false).animate({ opacity:1 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }}); } //IE7,8 Fix
			$JQ('#'+Data.IDimg).stop(true,false).animate({ opacity:1 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
		},function(){
			if(GlobIE7==true || GlobIE8==true){ $JQ('#'+Data.IDimg).find('*').stop(true,false).animate({ opacity:0 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }}); } //IE7,8 Fix
			$JQ('#'+Data.IDimg).stop(true,false).animate({ opacity:0 },{easing:"swing",duration:Duration, queue:false, complete:function(){    }});
		});
	}catch(err){ if(jDebugMode==true){ alert('jSpecificItemHoverAnimation: ' + err); }}
}

function jLightboxFinder(Data){
	try{//[Last Update: 03.stycznia.2011]
		if(!Data.Relpart || Data.Relpart==''){ return false; }
		if(!Data.Duration || Data.Duration==''){ Data.Duration=1000; }
		if(!Data.Timer || Data.Timer==''){ Data.Timer=false; }
		
		$JQ('a').each(function(index){
			var c_rel=$JQ(this).attr('rel');
			if(c_rel.length>=Data.Relpart.length){
				if(c_rel.indexOf(Data.Relpart)==0){
					$JQ(this).data('jLightboxFinder_status', $JQ(this).data('jLightboxFinder_status') ? $JQ(this).data('jLightboxFinder_status') : 'start' );
					if($JQ(this).data('jLightboxFinder_status')!='start'){ return true; } 
					//$JQ(this).lightBox();
					$JQ('a[rel='+c_rel+']').lightBox(); //Update
					$JQ(this).data('jLightboxFinder_status','done');
				}
			}
		});
		
		if(Data.Timer==true){
			$JQ(this).oneTime(Data.Duration,function(i){ jLightboxFinder(Data); });
		}
		
	}catch(err){ if(jDebugMode==true){ alert('jLightboxFinder: ' + err); }}
}

function jMinHeight(Name, Height){
	try{
		if(!Name || Name=='' || Name.length<2){ return false; }
		if(!Height || Height=='' || Height<=0){ return false; }
		
		switch(Name.charAt(0)){
			case '.': break;
			case '#': break;
			default: Name='#'+Name;
		}
		
		var elements=$(Name);
		var c_height;
		
		for(var i=0; i<elements.length;i++){
			//c_height=parseInt($(Name).eq(i).css('height'));
			c_height=parseInt($(Name).eq(i).height()); //IE6 Path;
			if(c_height<Height){ $(Name).eq(i).css('height',Height); }
		}
		return true;
	}catch(err){ if(jDebugMode==true){ alert('jMinHeight: ' + err); }}
}

function jSetClickFalse(Data){ 
	try{//[Last Update: 27.listopada.2010]
		if(!Data.Relpart || Data.Relpart==''){ return false; }
		if(!Data.Duration || Data.Duration==''){ Data.Duration=1000; }
		if(!Data.Timer || Data.Timer==''){ Data.Timer=false; }
		
		$JQ('a[rel='+Data.Relpart+']').each(function(index){
			$JQ(this).data('jSetClickFalse_status', $JQ(this).data('jSetClickFalse_status') ? $JQ(this).data('jSetClickFalse_status') : 'start' );
			if($JQ(this).data('jSetClickFalse_status')!='start'){ return true; } 
			$JQ(this).bind("click",{},function(){ return false; });
		});
		
		if(Data.Timer==true){
			$JQ(this).oneTime(Data.Duration,function(i){ jSetClickFalse(Data) });
		}
		
	}catch(err){ if(jDebugMode==true){ alert('jSetClickFalse: ' + err); }}
}

function jTextClear(Data){
	try{//[LAST UPDATE: 18.listopada.2010, NOTE: Compatible with IE6]
		if(!Data.Text || Data.Text==''){ return false; }
		if(!Data.AllowedChars || Data.AllowedChars==''){ return false; }
		if(Data.AllowedChars.length<=0){ return false; }
		//Data.Text=Data.Text.toString();
		//alert(Data.Text.length);
		var c_newtext='';
		var c_found=false;
		for(var i=0;i<Data.Text.length;i++){
			Data.Text.charAt(i);
			c_found=false;
			for(var k=0;k<Data.AllowedChars.length;k++){
				if(Data.AllowedChars.charAt(k)==Data.Text.charAt(i)){ c_found=true; break; }
			}
			if(c_found==true){c_newtext=c_newtext+Data.Text.charAt(i); }
		}
		return c_newtext;
		
	}catch(err){ if(jDebugMode==true){ alert('jTextClear: ' + err); }}
}

$JQ(document).ready(function(){
	//jTopAnimation();
	//jMenuAnimation('menul');
});
/* =============================== .single [END] ==================================== */
/* =============================== .Disabled [START] ================================ */
/*
function jAjaxClearboxCleaner(){
	try{
		var elements=$JQ('.jAjaxDone').find('a');
		for(i=0;i<elements.length;i++){
			c_rev=$JQ(elements).eq(i).attr('rev');
			if(c_rev.toLowerCase()=='clearbox'){
				$JQ(elements).eq(i).click(function () { return false; });
			}
		}
		
		setBlur();
		
	}catch(err){ if(DebugQueryMode==true){ alert('jAjaxClearboxCleaner: '+err); }}
}
*/
/* =============================== .Disabled [END] ================================== */
/* ================================================================================== */
/* =============================== jquery.ready [END] =============================== */
/* ================================================================================== */

