/* 
 * skrypt do obsługi zakładek w krokach landingpadow
 * HYPERmedia pbudek 09.01.2009
 * 
 */

function initStepTab1() {
	var steptab1 = document.getElementById('steptab1');
	var steptab2 = document.getElementById('steptab2_active');
	var steptab1content = document.getElementById('steptab1_content');
	var steptab2content = document.getElementById('steptab2_content_active');
	
	steptab1.id = 'steptab1_active';
	steptab1.onclick = null; 
	
	steptab2.id = 'steptab2';
	steptab2.onclick = initStepTab2;
		
	steptab1content.id = 'steptab1_content_active';
	steptab2content.id = 'steptab2_content';
} // end of initStepTab1();

function initStepTab2() {
	var steptab1 = document.getElementById('steptab1_active');
	var steptab2 = document.getElementById('steptab2');
	var steptab1content = document.getElementById('steptab1_content_active');
	var steptab2content = document.getElementById('steptab2_content');
	
	steptab1.id = 'steptab1';
	steptab1.onclick = initStepTab1; 
	
	steptab2.id = 'steptab2_active';
	steptab2.onclick = null;
		
	steptab1content.id = 'steptab1_content';
	steptab2content.id = 'steptab2_content_active';
} // end of initStepTab2();

try {
    if (document.getElementById('steptab1') || document.getElementById('steptab2')) {
        $(window).addEvent('load', function(){
        
            if (document.getElementById('mi_active')) 
                document.getElementById('steptab2').onclick = initStepTab2;
            else 
                document.getElementById('steptab1').onclick = initStepTab1;
            
        });
    }
}catch(err){}

