function hatterprg(link){
   document.getElementById("hatterprgfr").src="http://www.filmkatalogus.hu/"+link+"&t="+Date();
}

function kep(file,x,y){
   window.open(file,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width="+String(x+40)+",height="+String(y+40));
}

function ajanlo_submit(nev,email){
   hatterprg("_ajanlo.php?nev1="+document.getElementById("nev1").value+
                         "&email1="+document.getElementById("email1").value+
                         "&nev2="+document.getElementById("nev2").value+
                         "&email2="+document.getElementById("email2").value);
}

function ajanl(nev,email){
   old=document.getElementById("ajanlo").innerHTML;
   s="<DIV ID='hiba' CLASS=hiba></DIV>"+
     "<TABLE><FORM NAME='ajanlo' METHOD=POST>"+
     "<INPUT TYPE=HIDDEN NAME='ajanlas' VALUE='1'>"+
     "<TR><TD>Teljes neved:</TD><TD><INPUT TYPE=TEXT ID='nev1' SIZE='30' VALUE='"+nev+"' CLASS='text'></TD></TR>"+
     "<TR><TD>E-mail címed:</TD><TD><INPUT TYPE=TEXT ID='email1' SIZE='40' VALUE='"+email+"' CLASS='text'></TD></TR>"+
     "<TR><TD>Ismerősöd keresztneve:</TD><TD><INPUT TYPE=TEXT ID='nev2' SIZE='30' VALUE='' CLASS='text'></TD></TR>"+
     "<TR><TD>Ismerősöd e-mail címe:</TD><TD><INPUT TYPE=TEXT ID='email2' SIZE='40' VALUE='' CLASS='text'></TD></TR>"+
     "<TR><TD COLSPAN=2 ALIGN=CENTER><INPUT TYPE=BUTTON ID='ment' VALUE='Ajánlás küldése' onClick='ajanlo_submit(\""+nev+"\",\""+email+"\");' CLASS='button'></TD></TR>"+
     "</FORM></TABLE>";

   document.getElementById("ajanlo").innerHTML=s;
}

function figyelo(szid){
   hatterprg("_figyelo.php?p1="+String(szid)+"&p2="+((document.getElementById("figyelo").checked==true)?"1":"0"));
}

function filmfigyelo(fid){
   hatterprg("_filmfigyelo.php?p1="+String(fid)+"&p2="+((document.getElementById("figyelo").checked==true)?"1":"0"));
}

function szemelyfigyelo(szid){
   hatterprg("_szemelyfigyelo.php?p1="+String(szid)+"&p2="+((document.getElementById("figyelo").checked==true)?"1":"0"));
}
   

var aktdvd=0;
function dvdrotate(){
   if(document.images.dvdpic.complete){
      aktdvd++; if(aktdvd>=dvds.length) aktdvd=0;
      document.images.dvdpic.src="http://www.filmkatalogus.hu/dvd-"+String(dvds[aktdvd])+".jpg";
      setTimeout("dvdrotate()",3000);
   }
   else
      setTimeout("dvdrotate()",1000);
}

function timewrite(id){
   minutes=Math.floor(hatravan/60);
   secs=Math.floor(hatravan-(minutes*60));
   document.getElementById(id).innerHTML=String(minutes)+" perc "+((secs<10)?((secs<1)?"00":"0"+String(secs)):String(secs))+" másodperc";
}

function timedown(){ 
   hatravan--;
   timewrite("idohatra");
   if(hatravan>0) setTimeout("timedown()",1000);
}

function timedown2(){ 
   timewrite("idohatra2");
   if(hatravan>0) setTimeout("timedown2()",1000);
}

