	var snd_vol = [20, 40, 60, 80, 100];
/*	var _vod_img = {
		'src': '{%SKIN_ROOT}/img/eye.gif',
		'wd': 15,
		'ht': 15,
		'title': 'Показать ролик по запросу'
	};
*/
	
	function switchRB(id) {
		if(!$('#'+id).length) return;
		var i;
		for(i = 0;i < rb_set.length;i++) {
			if(rb_set[i].box != id /*&& $('#'+rb_set[i].box).length*/) $('#'+rb_set[i].box).hide();
			else /*if($('#rb_header')) */$('#rb_header').html(rb_set[i].header);
		}

		$('#'+id).show();
		if(id == 'schedule') {
			$('#schedule_list').show();
			scrollSchedule();
		} else $('#schedule_list').hide();

	}
	
	function send_feedback(frm) {
//		debugger;
		if(frm.elements['mailto'] != '' && frm.elements['mailto'].value.search(/^[0-9a-z_.-]+@[0-9a-z-]+\.[0-9a-z.-]+$/i) == -1) {
			alert(__lang.err_incorrect_mail);
			return;
		}

		var opt = {
			cname: _CHANNEL_,
			channel: _CHANNEL_,
			_action: frm.elements['_action'].value,
			fio: frm.elements['fio'].value,
			mailto: frm.elements['mailto'].value,
			text: frm.elements['text'].value
		}
		
		$.post(_DOC_ROOT+"/feedback/", opt, function(d, s) {
			if(d.html) document.getElementById('callback').innerHTML = d.html;
			if(d.error) alert(d.error);
		}, 'json');
		
	}

	function feedback_form() {
//debugger;
		document.getElementById('callback').innerHTML = __lang.loading;
		switchRB('callback');
		$.post("/feedback/", { channel: _CHANNEL_ }, function (d, s) {
			if(d.html) document.getElementById('callback').innerHTML = d.html;
			if(d.error) alert(d.error);
		}, 'json');
	}
	
	function onVolumeChanged(p) {
		var i;
		var vol = p.getVolume();
		var ss = document.getElementById('sndswitch');
		for(i = 0;i < snd_vol.length;i ++) {
			if(vol == snd_vol[i]) document.getElementById('snd'+snd_vol[i]).src = _SKIN_ROOT+"/img/snd-knob.gif";
			else document.getElementById('snd'+snd_vol[i]).src = _SKIN_ROOT+"/img/snd-slider.gif";
		}
	}

	function noPluginOops() {
		var box = document.getElementById('tv_set');
		box.style.textAlign = 'center';
		box.style.verticalAlign = 'middle';
		box.style.backgroundColor = 'black';
		box.style.color = 'gray';
		if(navigator.userAgent.search(/MSIE/) != -1) {
			box.innerHTML = __lang.plugin_not_found.MSIE;
		} else {
			box.innerHTML = __lang.plugin_not_found.others;
		}		
	}
