﻿
// JS support file for pages with dynamic tabs

function EDCDynamicTabSwap(strTab,strTabCount) {
	var iTabCount = Number(strTabCount);
	for (var iTab=1;iTab<=iTabCount;iTab++) {
		document.getElementById('tab-'+iTab+'-on').style.display = ( ( strTab == iTab ) ? 'block' : 'none' );
		document.getElementById('tab-'+iTab+'-off').style.display = ( ( strTab == iTab ) ? 'none' : 'block' );
		document.getElementById('tab-'+iTab+'-content').style.display = ( ( strTab == iTab ) ? 'block' : 'none' );
	}
}

function EDCDynamicTabSwapWithPrefixInline(strPrefix,strTab,strTabCount) {
	var iTabCount = Number(strTabCount);
	for (var iTab=1;iTab<=iTabCount;iTab++) {
		document.getElementById(strPrefix+'-tab-'+iTab+'-on').style.display = ( ( strTab == iTab ) ? 'inline' : 'none' );
		document.getElementById(strPrefix+'-tab-'+iTab+'-off').style.display = ( ( strTab == iTab ) ? 'none' : 'inline' );
		document.getElementById(strPrefix+'-tab-'+iTab+'-content').style.display = ( ( strTab == iTab ) ? 'inline' : 'none' );
	}
}