// JavaScript Document

var countryNum = 7;
var pTypeNum = 5;
var sProviderNum = 4;

function checkAll(str)
{
	var count = 0;
	
	if(str == "c")
		count = countryNum;
	else if(str == "p")
		count = pTypeNum;
	else if(str == "s")
		count = sProviderNum;
	
	if(document.getElementById(str + "0").checked == 1)
	{
		for(i=1; i<=count; i++ )
		{
			document.getElementById(str + i).checked = 1;
		}
	}
	else
	{
		for(i=1; i<=count; i++ )
		{
			document.getElementById(str + i).checked = 0;
		}
	}
}

function disableSALL(str)
{
	document.getElementById(str).checked = 0;
}

function validate()
{
	countryCombo = document.getElementById("countryCombo");
	
	pTypeCombo = document.getElementById("pTypeCombo");
	
	sProviderCombo = document.getElementById("sProviderCombo");
	
	cVal = countryCombo.options[countryCombo.selectedIndex].value;
	
	pVal = pTypeCombo.options[pTypeCombo.selectedIndex].value;
	
	sVal = sProviderCombo.options[sProviderCombo.selectedIndex].value;
	
	if(cVal == "" && pVal == "" && sVal == "")
		return false;
	
	else 
	{
		window.open('about:blank','wintarget');
		return true;
	}
}
