function radio(li, input, val)
	{
        var obj=getElementsByClass('active',null,'li'); var len=obj.length;
		for (j=0; j<len; j++)
			{
				obj[j].className="radio"
			}
		li.className="active";
		document.getElementById(input).value=val;
	}

// Функция взятия элементов по классу и их обработка


// Обработка массива элементов, взятых по классу



// Функция взятия элементов по классу, возвращает массив элементов
function getElementsByClass(searchClass,node,tag)
	{
	    var classElements = new Array();
	    if (node == null) {node = document;}
	    if (tag == null) {tag = '*';}
	    var els = node.getElementsByTagName(tag);
	    var elsLen = els.length;
	    var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	    for (i = 0, j = 0; i < elsLen; i++)
	    {
	        if ( pattern.test(els[i].className) )
	           {
	            classElements[j] = els[i];
				j++;
	        }
	    }
	    return classElements;
	}

onload = function() {
	var e, i = 0;
	while (e = document.getElementsByTagName ('B') [i++]) {
		if (e.className == 'switch') {
		e.onclick = function () {
			this.className = this.className == 'switch' ? 'switch off' : 'switch';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = x.className == 'show' ? 'hide' : 'show';
			}
		}
	}
}


onload = function() {
	var e, i = 0;
	while (e = document.getElementsByTagName ('B') [i++]) {
		if (e.className == 'p_switch') {
		e.onclick = function () {
			this.className = this.className == 'p_switch' ? 'p_switch p_off' : 'p_switch';
			x=this.nextSibling;
			while (x.nodeType!=1) {
				x=x.nextSibling;
				}
			x.className = x.className == 'p_show' ? 'p_hide' : 'p_show';
			}
		}
	}
}
/*
onload = function() {

	var e, i = 0;

	while (e = document.getElementsByTagName ('B') [i++]) {

		if (e.className == 'switch') {

		e.onclick = function () {

			this.className = this.className == 'switch' ? 'switch off' : 'switch';

			x=this.nextSibling;

			while (x.nodeType!=1) {

				x=x.nextSibling;

				}

			x.className = x.className == 'show' ? 'hide' : 'show';

			}

		}

	}

}


*/