/**
 * Media Browser  v. 1.0
 * @author info@reddesigngroup.com
 */

 
function get(name) {
	var q = unescape(location.search.substring(1)).split(/[=&]/);
	for (var j=0; j<q.length; j++) {
		if (q[j] == name) {
			return q[j+1];
		}
	}
	return null;
}

function SetAllCheckBoxes(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}
