function NavChange (theBgColor, theTextColor, id)
{
	document.getElementById("td_" + id).style.backgroundColor = theBgColor;
	document.getElementById("a_" + id).style.color = theTextColor;
	document.getElementById("a_" + id).style.backgroundColor = theBgColor;

	return true;
} 


function SwapLED (theForm, theElement, theImage)
{
	if(document.forms[theForm].elements[theElement].options[0].selected == true)
	{
		document.images[theImage].src="/pix/comp_SubNavLeftSpacerPanel.gif";
	}
	else document.images[theImage].src="/pix/comp_led_green_act.gif"

	return true;
}


function SwapSubNavImg (theStatus, theImage)
{
	if (theStatus > 0)
	{
		document.images[theImage].src="/pix/comp_SubNavLeftSpacer.gif";
	}
	else document.images[theImage].src="/pix/comp_TranspSpacer.gif"

	return true;
}


function ToolsEXFOSchieber ()
{
	if(document.forms[theForm].elements[theElement].options[0].selected == true)
	{
		document.images[theImage].src="/pix/comp_SubNavLeftSpacerPanel.gif";
	}
	else
	{
		document.images[theImage].src="/pix/comp_led_green_act.gif"
	}
	return true;
}



function CastEntries ()
{
	var SelectItemsMax;

	SelectItemsMax = dBArray.length;

	for (var SelectItemsCount = 0; SelectItemsCount < SelectItemsMax; SelectItemsCount++)
	{
		NewEntry = new Option(dBArray[SelectItemsCount],dBArray[SelectItemsCount],false,false);
	 	document.ConversionData.dB.options[document.ConversionData.dB.length] = NewEntry;
	}
	
	SelectItemsMax = ITUArray.length;

	for (var SelectItemsCount = 0; SelectItemsCount < SelectItemsMax; SelectItemsCount++)
	{
		NewEntry = new Option(ITUArray[SelectItemsCount],ITUArray[SelectItemsCount],false,false);
 		document.ChannelData.ITU.options[document.ChannelData.ITU.length] = NewEntry;
 	}

	return true;
}


function ShowSelected ()
{
	var dBStat;
	var ITUStat;
		
	dBStat = document.ConversionData.dB.selectedIndex
	ITUStat = document.ChannelData.ITU.selectedIndex
		
	document.ConversionData.PWert.value =PWertArray[dBStat]
	document.ConversionData.Loss.value =LossArray[dBStat]

	document.ChannelData.WaveLength.value =WaveArray[ITUStat]
	document.ChannelData.Frequency.value =FreqArray[ITUStat]

	return true;
}


function LimitSelect (stFrom, stID)
{
	var actionID;
	var destID;

	if(stID > 0)
	{
		// ApplicationSelect
		if(stFrom == 'MarketSelect')
		{
			// alle optionwerte durchlaufen und sie ausblenden und wieder einblenden - sofern einblenden erwuenscht
			for(var i = (document.PanelForm.ApplicationSelect.length - 1); i >= 0; i--)
			{
				document.PanelForm.ApplicationSelect.options[i].style.visibility = "hidden";
				//document.PanelForm.ApplicationSelect.options[i] = null;
				for(var i2 = eval('ApplicationVisible_'+stID+'.length -1'); i2 >= 0; i2--)
				{
					eval('destID = ApplicationVisible_'+stID+'['+i2+']');
					if(document.PanelForm.ApplicationSelect.options[i].value == destID)
					{
						document.PanelForm.ApplicationSelect.options[i].style.visibility = "visible";
					}
				}
			}
		}
	}
}


function wopen(theURL,winName,features) {
	features = features + ",left=0,top=0";
	window.open(theURL,winName,features);
}
