	function mainMenu() {
		i=1;
		while (document.getElementById('main_menu_link'+i)){
			if(document.getElementById('main_menu_div'+i)) {
				main_menuWidth=document.getElementById('main_menu_div'+i).clientWidth;
				main_menuLeft=document.getElementById('main_menu_div'+i).offsetLeft;
				main_menuSpase=main_menuLeft+main_menuWidth-780;
				if (main_menuSpase>0) {
					document.getElementById('main_menu_div'+i).style.marginLeft='-'+main_menuSpase+'px';
				}
			}
			i++;
		}
	}
	function checkbox(obj, obj2) {
		obj.style.backgroundPosition=obj.style.backgroundPosition=="0px -100px"?"":"0px -100px";
		document.getElementById(obj2).click();
		}
	function radio(obj, obj2, obj3) {
		if (obj3) document.getElementById(obj2+obj3).checked = 1;
		for (n=1; document.getElementById(obj+n); n++) {
			document.getElementById(obj+n).style.backgroundPosition=document.getElementById(obj2+n).checked?"0px -100px":"";
		}
	}
	function shfaq(obj, obj2) {
		obj.innerHTML=obj.innerHTML=="Скрыть ответ:"?"Просмотреть ответ":"Скрыть ответ:";
		document.getElementById(obj2).className=document.getElementById(obj2).className=="dn"?"":"dn";
		}
	function photo(obj, obj2, obj3) {
		i=1;
		while (document.getElementById(obj+i)){
			document.getElementById(obj+i).style.zIndex="100";
			document.getElementById(obj2+i).style.borderColor="#ffffff";
			i++;
		}
		document.getElementById(obj+obj3).style.zIndex="1000";
		document.getElementById(obj2+obj3).style.borderColor="#000000";
	}
