var gotSinepedi=false;var lastMovieid=null;var lastCommentid=null;var lastTheatreid=null;function showOtherPubdates(){var a=document.getElementById("otherPubdatesLink");var b=document.getElementById("otherPubdates");b.style.display="inline";a.style.display="none"}function selectedSeansCity(a,b){var c=b.options[b.selectedIndex].value;if(c!=-1){window.location=a+c}}function getReplyDialog(c,a,b){var e=document.getElementById("replydialog_"+c);if(e.style.display=="inline"){e.style.display="none"}else{lastCommentid=c;var d="/includes/ajax/movie/getReplyDialog.php?commentid="+c+"&movieid="+a+"&movieurl="+b;xmlHttp=getXmlHttpObject(gotReplyDialog);xmlHttp.open("GET",d,true);xmlHttp.send(null)}}function closeReplyDialog(a){var b=document.getElementById("replydialog_"+a);if(b.style.display=="inline"){b.style.display="none"}}function gotReplyDialog(){var a=document.getElementById("replydialog_"+lastCommentid);if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){a.innerHTML=xmlHttp.responseText;a.style.display="inline";tinyMCE.init({mode:"exact",theme:"advanced",elements:"commentReplyTextarea_"+lastCommentid,theme_advanced_toolbar_location:"top",theme_advanced_toolbar_align:"left",theme_advanced_buttons1:"bold,italic",theme_advanced_buttons2:"",theme_advanced_buttons3:"",entity_encoding:"raw",height:"200px",width:"500px",setup:function(b){b.onKeyUp.add(function(d,g){var c=tinyMCE.activeEditor.getContent({format:"raw"});c=c.replace(/(<([^>]+)>)/ig,"");c=c.replace(/&nbsp;/g,"");var f=document.getElementById("charCount");f.value=1000-c.length;if(c.length>1000){c=c.substring(0,1000);tinyMCE.execCommand("mceSetContent",false,c)}})}})}}function hideSpoilers(c,a){var g=document.getElementById("spoilerwall_"+c);var b=document.getElementById("commentli_"+c);var e=document.getElementById("replies_"+c);var f=document.getElementById("spoilerwarn_"+c);if(e!=null){e.style.display="none"}f.style.display="none";g.style.display="inline";b.className="spoilercommentcontainer";var d="/includes/ajax/movie/hideSpoilers.php?id="+a;xmlHttp=getXmlHttpObject(toggledSoilers);xmlHttp.open("GET",d,true);xmlHttp.send(null)}function displaySpoilers(c,a){var g=document.getElementById("spoilerwall_"+c);var b=document.getElementById("commentli_"+c);var e=document.getElementById("replies_"+c);var f=document.getElementById("spoilerwarn_"+c);if(e!=null){e.style.display="inline"}f.style.display="inline";g.style.display="none";b.className="shownspoilercomment";var d="/includes/ajax/movie/displaySpoilers.php?id="+a;xmlHttp=getXmlHttpObject(toggledSoilers);xmlHttp.open("GET",d,true);xmlHttp.send(null)}function toggledSoilers(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){}}}function submitGoingToMovie(b,l){lastTheatreid=b;var m=document.getElementById("invitefriends_indicator_"+b);var h=document.getElementById("invitedfriends_"+b);options=h.options;var o="";for(i=0;i<options.length;i++){if(i!=options.length-1){o+=options[i].value+":"}else{o+=options[i].value}}var k=document.getElementById("invitefriends_seans_list_"+b);lis=k.childNodes;var d=null;for(i=0;i<lis.length;i++){var n=lis[i];var p=n.childNodes;for(j=0;j<p.length;j++){var e=p[j];if(e.type=="radio"&&e.name=="times_"+b){if(e.checked){d=e.value}}}}if(d==null){alert("Gitmek istediğiniz seansı seçmeniz gerekmektedir!");return}var c=document.getElementById("invitedate_"+b).value;if(c.length!=10){alert("Girdiğiniz tarih yanlış!");return}var g=true;if(o!=""){var f="Arkadaşlarınıza bu filme birlikte gitmek istediğinizi belirten davetiye gönderilecek,\nDevam etmek istiyor musunuz?";g=confirm(f)}if(g){m.style.display="inline";var a="/includes/ajax/movie/submitGoingToMovie.php?movieid="+l+"&theatreid="+b+"&seansid="+d+"&friends="+o+"&date="+c;xmlHttp=getXmlHttpObject(submitedGoingToMovie);xmlHttp.open("GET",a,true);xmlHttp.send(null);pageTracker._trackEvent("movie","invitefriends","movie-"+lastMovieid+"-theatre-"+b+"-time-"+d+"-friends-"+o,lastMovieid)}}function submitedGoingToMovie(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var a=document.getElementById("invite_screen_"+lastTheatreid);a.innerHTML="Filme gidiş bilgileriniz başarıyla kayıt edildi."}}function openinviteScreen(a){lastTheatreid=a;var b=document.getElementById("invite_screen_"+a);b.style.display="block";pageTracker._trackEvent("movie","openinvite","movie-"+lastMovieid+"-theatre-"+a,lastMovieid)}function hideinviteScreen(a){lastTheatreid=a;var b=document.getElementById("invite_screen_"+a);b.style.display="none"}function removeFriendFromList(a){var b=document.getElementById(a);options=b.options;for(i=0;i<options.length;i++){if(options[i].selected){b.remove(i);i--}}for(i=0;i<options.length;i++){options[i].selected=true}}function findValue(a){if(a==null){return alert("Sonuç Bulunamadı")}var c=a.extra;var b=c[2];var e=c[1];var d=document.getElementById("invitedfriends_"+lastTheatreid);addItem(e,b,d)}function selectItem(a){findValue(a)}function formatItem(a){return'<img style="border:2px solid #CA7E00" src="'+img+a[1]+'"><span style="margin-bottom:5px;padding-left:10px">'+a[0]+"</span>"}function toggleSinepediContr(a){if(!gotSinepedi){var b="/includes/ajax/movie/getSinepediContr.php?id="+a;xmlHttp=getXmlHttpObject(gotSinepediContr);xmlHttp.open("GET",b,true);xmlHttp.send(null)}else{toggleContent("sinepedipeoples","togglesinepedipeoples")}pageTracker._trackEvent("movie","sinepedi","movieid-"+a,a)}function gotSinepediContr(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var a=document.getElementById("sinepedipeoples");a.innerHTML=xmlHttp.responseText;toggleContent("sinepedipeoples","togglesinepedipeoples");gotSinepedi=true}}function getMovieNextPictures(a,d,e){var b=document.getElementById("pictureNavindicator");b.style.display="inline";var c="/includes/ajax/movie/getNextMoviePictures.php?movieid="+a+"&name="+encodeURI(d)+"&count="+e;xmlHttp=getXmlHttpObject(gotMovieNextPictures);xmlHttp.open("GET",c,true);xmlHttp.send(null);pageTracker._trackEvent("movie","nextimages","movieid-"+a,a)}function gotMovieNextPictures(){var a=document.getElementById("pictureNavindicator");if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var b=document.getElementById("pictureNav");b.innerHTML=xmlHttp.responseText;a.style.display="none"}}function getMoviePrevPictures(a,d,e){var b=document.getElementById("pictureNavindicator");b.style.display="inline";var c="/includes/ajax/movie/getPrevMoviePictures.php?movieid="+a+"&name="+encodeURI(d)+"&count="+e;xmlHttp=getXmlHttpObject(gotMoviePrevPictures);xmlHttp.open("GET",c,true);xmlHttp.send(null);pageTracker._trackEvent("movie","previmages","movieid-"+a,a)}function gotMoviePrevPictures(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){var a=document.getElementById("pictureNav");a.innerHTML=xmlHttp.responseText;indicator.style.display="none"}}function addMovieToFavorites(a){var b="/includes/ajax/movie/addMovieToFavs.php?id="+a;xmlHttp=getXmlHttpObject(addedMovieToFavorites);xmlHttp.open("GET",b,true);xmlHttp.send(null);pageTracker._trackEvent("movie","addfavorite","movieid-"+a,a)}function addedMovieToFavorites(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){var b=document.getElementById("favanchor_"+lastMovieid);b.innerHTML="favorilerimden çıkar";b.onclick=function(){removeMovieFromFavorites(lastMovieid)}}}}function removeMovieFromFavorites(a){var b="/includes/ajax/movie/removeMovieFromFavs.php?id="+a;xmlHttp=getXmlHttpObject(removedMovieToFavorites);xmlHttp.open("GET",b,true);xmlHttp.send(null);pageTracker._trackEvent("movie","removefavorite","movieid-"+a,a)}function removedMovieToFavorites(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){var b=document.getElementById("favanchor_"+lastMovieid);b.innerHTML="favorilerime ekle";b.onclick=function(){addMovieToFavorites(lastMovieid)}}}}function removeMovieRating(a){var b="/includes/ajax/movie/removeVote.php?id="+a;xmlHttp=getXmlHttpObject(removedMovieRating);xmlHttp.open("GET",b,true);xmlHttp.send(null)}function removedMovieRating(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){var a=document.getElementById("myvote");a.style.display="none"}}}function rateMovieComment(a,c){lastCommentid=a;var b="/includes/ajax/movie/rateMovieComment.php?id="+a+"&rating="+c+"&movieid="+lastMovieid;xmlHttp=getXmlHttpObject(ratedMovieComment);xmlHttp.open("GET",b,true);xmlHttp.send(null);pageTracker._trackEvent("movie","commentrating","value-"+c,c)}function ratedMovieComment(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){var b=document.getElementById("comment_vote_count_"+lastCommentid);var a=parseInt(b.innerHTML);a++;b.innerHTML=a}}}function rateMovie(b){var a="/includes/ajax/movie/rateMovie.php?id="+lastMovieid+"&rating="+b;xmlHttp=getXmlHttpObject(ratedMovie);xmlHttp.open("GET",a,true);xmlHttp.send(null);pageTracker._trackEvent("movie","rating","movieid-"+lastMovieid,lastMovieid)}function ratedMovie(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){var b=document.getElementById("votecount");var a=parseInt(b.innerHTML);a++;b.innerHTML=a}}};