        // general variables
		var ie = (document.all) ? 1 : 0;
		var p = (ie) ? "filter" : "MozOpacity";

        inShow = true;
        ind = 0;
        visPanel = 1;
        
        // news slides variables
        n_inShow = true;
        n_ind = -1;
        n_visPanel = 1;
        
        // projects sildes variables
        p_inShow = true;
        p_ind = -1;
        p_visPanel = 1;
        
        // charts sildes variables
        c_inShow = true;
        c_ind = -1;
        c_visPanel = 1;

        function startShow(pnl,ctrlID,max,s_type)
        {
            if(s_type == 'n')
                inShow = n_inShow;
            else if((s_type == 'p'))
                inShow = p_inShow;
            else if((s_type == 'c'))
                inShow = c_inShow;
                
            if(inShow)
            {
            	if(s_type == "p")
            	{
	                incSlide(pnl,ctrlID,max,s_type);
	                //setTimeout(function(){startShow(pnl,ctrlID,max,s_type)}, 12000);
                }
                else if(s_type == "n" || s_type == "c")
                {
	                incSlide(pnl,ctrlID,max,s_type);
                }
            }
        }
        
        function nextSlide(pnl,ctrlID,max,s_type)
        {
            if(s_type == 'n')
                n_inShow = false;
            else if((s_type == 'p'))
                p_inShow = false;
            else if((s_type == 'c'))
                c_inShow = false;
                
            incSlide(pnl,ctrlID,max,s_type);
        }
        
        function prevSlide(pnl,ctrlID,max,s_type)
        {
            if(s_type == 'n')
                n_inShow = false;
            else if((s_type == 'p'))
                p_inShow = false;
            else if((s_type == 'c'))
                c_inShow = false;

            decSlide(pnl,ctrlID,max,s_type);
        }
        
        function setSlide(pnl,ctrlID,p_ind,max,s_type)
        {
            if(s_type == 'n')
                n_inShow = false;
            else if((s_type == 'p'))
                p_inShow = false;
            else if((s_type == 'c'))
                c_inShow = false;

            swichSlides(pnl,p_ind,ctrlID,max,s_type);
        }
        
        function incSlide(pnl,ctrlID,max,s_type)
        {
            if(s_type == 'n')
            {
                if(n_ind+1==max)
                    n_ind = 0;
                else
                    n_ind++
                swichSlides(pnl,n_ind,ctrlID,max,s_type);
            }
            else if(s_type == 'p')
            {
                if(p_ind+1==max)
                    p_ind = 0;
                else
                    p_ind++
                swichSlides(pnl,p_ind,ctrlID,max,s_type);
            }
            else if(s_type == 'c')
            {
                if(c_ind+1==max)
                    c_ind = 0;
                else
                    c_ind++
                swichSlides(pnl,c_ind,ctrlID,max,s_type);
            }
        }
        
        function decSlide(pnl,ctrlID,max,s_type)
        {
            if(s_type == 'n')
            {
                if(n_ind==0)
                    n_ind = max-1;
                else
                    n_ind--;   
                swichSlides(pnl,n_ind,ctrlID,max);
            }
            else if(s_type == 'p')
            {
                if(p_ind==0)
                    p_ind = max-1;
                else
                    p_ind--;   
                swichSlides(pnl,p_ind,ctrlID,max);
            }
            else if(s_type == 'c')
            {
                if(c_ind==0)
                    c_ind = max-1;
                else
                    c_ind--;   
                swichSlides(pnl,c_ind,ctrlID,max);
            }
        }
        
        function swichSlides(pnl,ind,ctrlID,max,s_type)
        {
            for(i=0;i<max;i++)
                document.getElementById(ctrlID+'_btn'+i).className = "";
            document.getElementById(ctrlID+'_btn'+ind).className = "active";

            for(i=0;i<=200;i++)
            {
                setTimeout("setTrans(" + i + ",'" + pnl + "','" + s_type + "','"+ctrlID+"',"+ind+")",(i*5));
            }                 

        }
        
        function setTrans(t,pnl,s_type,ctrlID,ind)
        {
            	if(t < 100)
            	{
            		document.getElementById(pnl).style[p]= (ie) ? "alpha(opacity="+(100-t)+")" : (100-t)/100;
//	                document.getElementById(pnl).style.filter='alpha(opacity='+(100-t)+')';
				}
                else if(t == 100)
                {
                	var htmlVal = document.getElementById(ctrlID+'_hdn'+ind).value
                	document.getElementById(pnl).innerHTML = htmlVal;
                }
                else
                {
            		document.getElementById(pnl).style[p]= (ie) ? "alpha(opacity="+(t-100)+")" : (t-100)/100;
//                	document.getElementById(pnl).style.filter='alpha(opacity='+(t-100)+')';
				}
        }
        
        function DecodeHTML(html)
        {
        	while(html.indexOf("&lt;")!=-1)	
        	{
        		html.replace("&lt;","<");
        	}
        	return html;
        }
