function limitOptions(oSel, howmany)
{
var opt, i = 0, msg = '', thismany = howmany, toomany = new Array();
while (opt = oSel.options[i++])
{
if (opt.selected) --howmany;
{
if (howmany < 0)
{
toomany[toomany.length] = opt;
}
}
}
if (howmany < 0)
{
msg += 'The maximum number of selections allowed in this list is ' +
thismany + '.';
msg += '\n\nPlease observe this limit.\n\n';
alert(msg);
i = 0;
while (opt = toomany[i++]) opt.selected = false;
return false;
}
}


function checkList()
{
	selObj = document.getElementById('lister');
	var msg = 'Please make sure you select a region and a category from the select list';
	var count = 0;

	for (i=0; i<selObj.options.length; i++) { 
		if (selObj.options[i].selected) {count++;}
	}
	
	if(count < 2) {
		alert(msg);
		return false;
	}
}

function checkURL()
{
	var el = document.getElementById('url');

	// alert(el.value);

	if (el.value != '')
	{
		if (el.value.indexOf("http") == -1)
		{
			el.value = "http://" + el.value;
			// alert(el.value);
			return true;
		}
	}
}

function checkForm()
{
	if (checkList() == false)
	{
		return false;
	}

	checkURL();
}