function feature()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? '' : '');
	}		
	
	return false;
}
function feature5()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? '' : '');
	}		
	
	return false;
}
function feature52()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? '' : '');
	}		
	
	return false;
}
function featurenone()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? 'none' : 'none');
	}		
	
	return false;
}
function regular()
{	
	for (i=0;i<=5;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? '' : '');
	}		
	
	return false;
}
function regularnone()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? 'none' : 'none');
	}		
	
	return false;
}
function regularnone()
{	
	for (i=0;i<=5;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? 'none' : 'none');
	}		
	
	return false;
}
function reciprocal()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? 'none' : 'none');
	}		
	
	return false;
}
function free()
{	
	for (i=0;i<=9;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? 'none' : 'none');
	}		
	
	return false;
}

function setlink(type,num,config)
{	
	for (i=0;i<10;i++)
	{		
		var row = document.getElementById('row'+i);
		var show = row.style.display == '';
		row.style.display = (show ? 'none' : 'none');
		
		var txtbox = document.getElementById('txtbox'+i);
		
			if (i % 2 != 0) {
					if (txtbox.value != "http://") {
						txtbox.value = txtbox.value;
					} else {
						txtbox.value="http://";
					}
			} else {
				if (txtbox.value != "") {
					txtbox.value = txtbox.value;
				} else {
					txtbox.value = "";
				}
			}	
	}	
	
	var radio = document.getElementById(type);
	if (radio.value==0) {
			radio.value=1;
		}
	
	if (type=='feature')
	{
		feature()
	} else 	if (type=='feature52')
	{
		feature52()
	} else 	if (type=='feature5')
	{
		feature5()
	} else if (type=='featurenone')
	{
		featurenone()
	} else if (type=='regular') 
	{
		regular()
	} else if (type=='regularnone')
	{
		regularnone()
	} else if (type=='reciprocal') 
	{
		reciprocal()
	} else if (type=='free') 
	{
		free()
	}

	show_categs(num,config);
}

function show_categs(num,config)
{
	if (config>0) {var cat1 = document.getElementById('cat1');}
	if (config>1) {var cat2 = document.getElementById('cat2');}
	if (config>2) {var cat3 = document.getElementById('cat3');}
	if (config>3) {var cat4 = document.getElementById('cat4');}
	if (config>4) {var cat5 = document.getElementById('cat5');}

	
	if (num=='0') {
      	if (config>0){cat1.disabled = true;}
		if (config>1){cat2.disabled = true;}
		if (config>2){cat3.disabled = true;}
		if (config>3){cat4.disabled = true;}
		if (config>4){cat5.disabled = true;}
		return false;
	}

	if (num=='1') {
      	if (config>0){cat1.disabled = false;}
		if (config>1){cat2.disabled = true;}
		if (config>2){cat3.disabled = true;}
		if (config>3){cat4.disabled = true;}
		if (config>4){cat5.disabled = true;}
		return false;
	}

	if (num=='2') {
      	if (config>0){cat1.disabled = false;}
		if (config>1){cat2.disabled = false;}
		if (config>2){cat3.disabled = true;}
		if (config>3){cat4.disabled = true;}
		if (config>4){cat5.disabled = true;}
		return false;
	}
	if (num=='3') {
      	if (config>0){cat1.disabled = false;}
		if (config>1){cat2.disabled = false;}
		if (config>2){cat3.disabled = false;}
		if (config>3){cat4.disabled = true;}
		if (config>4){cat5.disabled = true;}
		return false;
	}
	if (num=='4') {
      	if (config>0){cat1.disabled = false;}
		if (config>1){cat2.disabled = false;}
		if (config>2){cat3.disabled = false;}
		if (config>3){cat4.disabled = false;}
		if (config>4){cat5.disabled = true;}
		return false;
	}
	if (num=='5') {
      	if (config>0){cat1.disabled = false;}
		if (config>1){cat2.disabled = false;}
		if (config>2){cat3.disabled = false;}
		if (config>3){cat4.disabled = false;}
		if (config>4){cat5.disabled = false;}
		return false;
	}
}
