function AdminEnter() {
admin.submit();
}

function setHomepage(f) {
f.style.behavior='url(#default#homepage)';
f.setHomePage('http://www.KinoExpert.ru')
}

function Rate(num) {
var url,choice;
if (document.rate.r1.checked) choice='1';
if (document.rate.r2.checked) choice='2';
if (document.rate.r3.checked) choice='3';
if (document.rate.r4.checked) choice='4';
if (document.rate.r5.checked) choice='5';
url = 'index.asp?comm=4&num=' + num + '&rate=' + choice;
location.replace(url);
}

function SearchFilm(event) {
if (window.event) event = window.event;
if ((event.type != 'keypress') || (event.keyCode == 13)) {
	var film = document.search.film.value;
	if (film == '') return;
	var fop = document.search.fop.checked;
	document.search_submited=true;
	location.href='http://search.kinoexpert.ru/searchrpc/results/?string=' + film + '&colvo=50&start=0&type=1&id=1';
    }
}
	
function SearchActor(event) {
if (window.event) event = window.event;
if ((event.type != 'keypress') || (event.keyCode == 13)) {
	var actor = document.search.actor.value;
	if (actor == '') return;
	var aop = document.search.aop.checked;
	document.search_submited=true;
	location.href='http://search.kinoexpert.ru/searchrpc/results/?string=' + actor + '&colvo=35&start=0&type=2&id=1';
    }
}

function SearchYear(event) {
if (window.event) event = window.event;
if ((event.type != 'keypress') || (event.keyCode == 13)) {
	var year = document.search.year.value;
	if (year == '') return;
	document.search_submited=true;
	location.href='index.asp?comm=1&year=' + year + '&pack=0#1';
    }
}

function SearchJanr() {
var janr,url;
janr = document.search.janr.value;
if (janr != '') {
url = 'index.asp?comm=';
url = url + '1&janr=' + janr + '&pack=0';
location.href=url;
}
}

function SearchComp() {
var comp,url;
comp = document.search.comp.value;
if (comp != '') {
url = 'index.asp?comm=';
url = url + '1&comp=' + comp + '&pack=0';
location.href=url;
}
}

function ShowTV(d,m) {
var url;
tp = prg.value;
url = 'http://AFISHA.km.ru'
if (tp == 'cinema') {
url = 'http://www.km.ru/entertainment/inside.asp?data='+d+'.'+m+'.2004&id_rubr=7AD7EB91E6814AE589E64F57B6D2BE1E';
}
if (tp == 'tv') {
url = 'http://www.km.ru/tv/index.asp?data='+d+'.'+m+'.2004&calendar=on&id_channel=827680C50B8840DBAAA6D0EFC1F650F6';
}
if (tp == 'theatre') {
url = 'http://www.km.ru/entertainment/inside.asp?data='+d+'.'+m+'.2004&id_rubr=A0645356-6F2A-4BA3-9B6F-C9ACD306E764';
}
window.open(url,'KM','scrollbars=yes,resizable=yes,status=yes,toolbar=yes,menubar=yes,directories=yes,titlebar=yes');
}

function TvSearch() {
var txt,url;
txt = searchs.value;
if ((event.type != 'keypress') || (event.keyCode == 13)) {
if (txt != '') {
url = "index.asp?comm=7&str=" + txt;
location.href=url;
}
}
}

function addAct(nm) {
window.external.addFavorite(location.href,nm);
}

function Navig() {
var url = nav.value;
if (url != '') location.replace(url);
}

function addBookmark() { window.external.addFavorite('http://www.KinoExpert.ru/', 'KinoExpert.ru - Энциклопедия театра и кино') }

function AnRate() {
var url = "angolos.asp?";for (i=1;i<11;i++) {
idname = 'id'+i;
if (document.getElementById(idname) !=  null) id = document.getElementById(idname).value;
else break;
url = url + idname + "=" + id + "&rate" + i + "="
for (j=1;j<6;j++)  {
name = 'r' + i + j;
if (document.getElementById(name).checked) url = url + j
}
url = url + "&"		
}	
url = url + "page=" + document.getElementById('page').value;
url = url + "&sort=" + document.getElementById('sort').value;
location.replace(url);
}

function Opros(id) {
url = "result.asp?id="+id+"&rate="
for (i=1;i<6;i++) {
name = 'op'+i
if (document.getElementById(name).checked) url=url+i
}
window.open(url,'Opros','scrollbars=yes,resizable=no,width=600,height=300');void(0);
}

