var HTTP = null;
var URL = new String(window.location);

function getHTTP() {
	if (HTTP === null) {
		try {
			HTTP = new XMLHttpRequest();

			return true;
		}

		catch(e) {
			try {
				HTTP = new ActiveXObject('Microsoft.XMLHTTP');

				return true;
			}

			catch(e) {
				return false;
			}
		}
	}

	else return true;
}

function element(id) {
	var element = document.all ? document.all[id] : document.getElementById ? document.getElementById(id) : '';

	return element;
}

function go() {
	var go = element('cat').options[element('cat').selectedIndex].value;

	window.location = '/' + (go != 'All' ? go.replace(/ /g, '+') + '/' : '');
}

function v(obj, id) {
	if (getHTTP()) {
		HTTP.open('GET', URL + '?vid=' + id, true);

		HTTP.onreadystatechange = function() {
			if (HTTP.readyState == 4 && HTTP.status == 200) {
				element('s' + id).innerHTML = HTTP.responseText;
				element('s' + id).parentNode.className = 'sv';
				obj.style.display = 'none';
			}
		};

		HTTP.send(null);
	}

	return false;
}