function LoadCluster()
{
    var size = 0;
    
    if (typeof(window['m_strClusterItemCount']) != "undefined" )
    {
        size = m_strClusterItemCount;
		
        if (m_strClusterItemCount > 0)
        {
            for (var i=0; i<size; i++)
            {
                var val = m_strClusterSysIDArray[i][0];
                var txt = m_strClusterSysIDArray[i][1];
                var newOption = new Option(txt, val, false, false);
                document.getElementById('SelCluster').options[i] = newOption;
            }
            
            ShowClusterRadioButton();  
        }
        else {
            document.AquaQuestion.searchchoice[1].disabled = true;
        }
    }
}

function ShowClusterRadioButton()
{
	if (document.getElementById)
	{ // DOM3 = IE5, NS6
		document.getElementById('DivClusterChoice').style.visibility = 'visible';
		document.getElementById('DivClusterChoice').style.display = 'block';
	}
	else
	{ 
		if (document.layers)
		{ // Netscape 4 
			document.DivClusterChoice.visibility = 'visible';
			 document.DivClusterChoice.display = 'block';
		} 
		else
		{ // IE 4 
			document.all.DivClusterChoice.style.visibility = 'visible';
			document.all.DivClusterChoice.style.display = 'block';
		}
	}
}

function Radio1Click()
{
	//HideorShowSearchOption(true);
	//EnableSearchOption(true);
	HideorShowClusterDropdown(false);
}

function Radio2Click()
{
	//HideorShowSearchOption(true);
	//EnableSearchOption(false);
	HideorShowClusterDropdown(false);
}

function ClusterClick()
{
	//HideorShowSearchOption(false);
	HideorShowClusterDropdown(true);
	DisableSearch2();
}

function EnableSearchOption(boolvalue)
{
	if (boolvalue)
	{
		if (document.getElementById)
		{ // DOM3 = IE5, NS6
			document.getElementById('Select2').disabled = false;
			document.getElementById('dropdownoption').disabled = false;
		}
		else
		{ 
			if (document.layers)
			{ // Netscape 4 

              document.Select2.disabled = false;
              document.dropdownoption.disabled = false;
			} 
			else
			{ // IE 4 
 
             document.all.Select2.disabled = false;
             document.all.dropdownoption.disabled = false;
			}
		}
	}
	else
	{
		if (document.getElementById)
		{ // DOM3 = IE5, NS6
			document.getElementById('Select2').disabled = true;
			document.getElementById('dropdownoption').disabled = true;
		}
		else
		{ 
			if (document.layers)
			{ // Netscape 4 

              document.Select2.disabled = true;
              document.dropdownoption.disabled = true;
			} 
			else
			{ // IE 4 
 
             document.all.Select2.disabled = true;
             document.all.dropdownoption.disabled = true;
			}
		}
	}
}

function HideorShowSearchOption(boolvalue)
{
	if (boolvalue)
	{
		if (document.getElementById)
		{ // DOM3 = IE5, NS6
			document.getElementById('dropdownoption').style.visibility = 'visible';
			document.getElementById('dropdownoption').style.display = 'block';
		}
		else
		{ 
			if (document.layers)
			{ // Netscape 4 
				document.dropdownoption.visibility = 'visible';
				 document.dropdownoption.display = 'block';
			} 
			else
			{ // IE 4 
				document.all.dropdownoption.style.visibility = 'visible';
				document.all.dropdownoption.style.display = 'block';
			}
		}
	}
	else
	{
		if (document.getElementById)
		{ // DOM3 = IE5, NS6
			document.getElementById('dropdownoption').style.visibility = 'hidden';
			document.getElementById('dropdownoption').style.display = 'none';
		}
		else
		{ 
			if (document.layers)
			{ // Netscape 4 
				document.dropdownoption.visibility = 'hidden';
				 document.dropdownoption.display = 'none';
			} 
			else
			{ // IE 4 
				document.all.dropdownoption.style.visibility = 'hidden';
				document.all.dropdownoption.style.display = 'none';
			}
		}
	}
}

function HideorShowClusterDropdown(boolvalue)
{
	if (boolvalue)
	{
		if (document.getElementById)
		{ // DOM3 = IE5, NS6
			if (document.getElementById('SelCluster').length > 0)
			{
				document.getElementById('DivCluster').style.visibility = 'visible';
				document.getElementById('DivCluster').style.display = 'block';
			}
			
		}
		else
		{ 
			if (document.layers)
			{ // Netscape 4 
				if (document.SelCluster.length > 0)
				{
					document.DivCluster.visibility = 'visible';
					document.DivCluster.display = 'block';
				} 
			}
			else
			{ // IE 4 
				 if (document.all.SelCluster.length > 0)
				{
					document.all.DivCluster.style.visibility = 'visible';
					document.all.DivCluster.style.display = 'block';
				}
			}
		}
	}
	else
	{
		if (document.getElementById)
		{ // DOM3 = IE5, NS6
			if (document.getElementById('SelCluster').length > 0)
			{
				document.getElementById('DivCluster').style.visibility = 'hidden';
				document.getElementById('DivCluster').style.display = 'none';
			}
			
		}
		else
		{ 
			if (document.layers)
			{ // Netscape 4 
				if (document.SelCluster.length > 0)
				{
					document.DivCluster.visibility = 'hidden';
					document.DivCluster.display = 'none';
				} 
			}
			else
			{ // IE 4 
				 if (document.all.SelCluster.length > 0)
				{
					document.all.DivCluster.style.visibility = 'hidden';
					document.all.DivCluster.style.display = 'none';
				}
			}
		}
	}
}

function DisableSearch2()
{
	if (document.getElementById)
	{ // DOM3 = IE5, NS6
		document.getElementById('Select2').disabled = true;
	}
	else
	{ 
		if (document.layers)
		{ // Netscape 4 

          document.Select2.disabled = true;
		} 
		else
		{ // IE 4 

         document.all.Select2.disabled = true;
		}
	}
}