var xmlHttp=null;var domain="http://www.sinemalar.com/";var img="http://www.sinemalar.com/";var previous=null;var lastCommentid=null;var lastAnchor=null;var lastUrl=null;var embedPlayers=new Array();var embedTitles=new Array();var embedUrls=new Array();var embedids=new Array();function trim(a){return a.replace(/^\s*|\s*$/g,"")}function goTo(a){window.location=a}function submitForm(b){var a=document.getElementById(b);a.submit()}function fbs_click(){u=location.href;t=document.title;window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t),"sharer","toolbar=0,status=0,width=626,height=436");return false}function fbs_share(a,b){window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(a)+"&t="+encodeURIComponent(b),"sharer","toolbar=0,status=0,width=626,height=436");return false}function focusinput(a,b){var c=document.getElementById(b);if(c.value==a){c.value="";c.style.color="#333333"}}function focusoutinput(a,b){var c=document.getElementById(b);if(c.value==""){c.value=a;c.style.color="#999999"}}function copyCode(a){a.select();if(navigator.appName=="Microsoft Internet Explorer"){var b=window.clipboardData.setData("Text",a.value);if(b==true){alert("Kopyalandı")}}}function findValueSearch(a){if(a==null){return alert("Sonuç Bulunamadı")}var b=a.extra;var c=b[1];lastUrl=b[4];if(c!=null&&c.length>=1){logSearch(c,searchType)}}function selectItemSearch(a){if(a!=null){findValueSearch(a)}}function formatItemSearch(a){var b='<div style="width:100%"><div style="float:left;width:40%">';if(a[4]!=""){return b+'<img width="60" style="border:2px solid #CA7E00" src="'+img+a[3]+'"></div><div style="float:left;margin-top:30px;text-align:center;width:50%;font-weight:bold">'+a[0]+" ("+a[4]+")</div></div>"}else{return b+'<img width="60" style="border:2px solid #CA7E00" src="'+img+a[3]+'"></div><div style="float:left;margin-top:30px;text-align:center;width:50%;font-weight:bold">'+a[0]+"</div></div>"}}function addItem(f,e,d){if(d==null){return}var c=false;for(var a=0;a<d.options.length;a++){if(d.options[a].value==e){c=true}}if(c==false){var b=new Option(f,e);d[d.length]=b;d[d.length-1].selected=true}}function checkReturnToSearchKeywordFooter(b){var a;if(b&&b.which){a=b.which}else{a=b.keyCode}if(a==13){searchKeywordFooter();return false}else{return true}}function searchKeywordFooter(){var a=document.getElementById("footerKw").value;if(trim(a)!=""){window.location=domain+"filmler/"+encodeURI(a)+"/"}}function checkReturnToSearchKeyword(b){var a;if(b&&b.which){a=b.which}else{a=b.keyCode}if(a==13){searchKeyword();return false}else{return true}}function searchSimiliarKeyword(){var a=document.getElementById("headSearchKw").value;domain="http://www.sinemalar.com/";if(trim(a)!=""){if(searchType==0){window.location=domain+"filmler/detayli/"+encodeURI(a)+"/"}else{if(searchType==1){window.location=domain+"diziler/detayli/"+encodeURI(a)+"/"}else{if(searchType==2){window.location=domain+"sanatcilar/detayli/"+encodeURI(a)+"/"}else{if(searchType==7){window.location=domain+"salonlar/detayli/"+encodeURI(a)+"/"}}}}}}function searchKeyword(){var a=document.getElementById("headSearchKw").value;domain="http://www.sinemalar.com/";if(trim(a)!=""){if(searchType==0){window.location=domain+"filmler/"+encodeURI(a)+"/"}else{if(searchType==1){window.location=domain+"diziler/"+encodeURI(a)+"/"}else{if(searchType==2){window.location=domain+"sanatcilar/"+encodeURI(a)+"/"}else{if(searchType==3){window.location=domain+"fragmanlar/"+encodeURI(a)+"/"}else{if(searchType==4){window.location=domain+"gruplar/"+encodeURI(a)+"/"}else{if(searchType==6){window.location=domain+"haberler/"+encodeURI(a)+"/"}else{if(searchType==7){window.location=domain+"salonlar/"+encodeURI(a)+"/"}}}}}}}}}function setselection(a){var c="http://www.sinemalar.com/";var b=$("#headSearchKw")[0].autocompleter;b.flushCache();switch(a){case"filmara":searchType=0;b.setUrl(c+"includes/ajax/common/autoCompMovie.php");pageTracker._trackEvent("common","selectsearch","searchtype-film",0);$("#searchbutton").attr("value",$("#filmara").text());break;case"diziara":searchType=1;b.setUrl(c+"includes/ajax/common/autoCompTv.php");pageTracker._trackEvent("common","selectsearch","searchtype-dizi",1);$("#searchbutton").attr("value",$("#diziara").text());break;case"sanatciara":searchType=2;b.setUrl(c+"includes/ajax/common/autoCompArtist.php");pageTracker._trackEvent("common","selectsearch","searchtype-sanatci",2);$("#searchbutton").attr("value",$("#sanatciara").text());break;case"fragmanara":searchType=3;pageTracker._trackEvent("common","selectsearch","searchtype-fragman",3);$("#searchbutton").attr("value",$("#fragmanara").text());break;case"grupara":searchType=4;pageTracker._trackEvent("common","selectsearch","searchtype-grup",4);$("#headSearchKw").autocomplete();$("#searchbutton").attr("value",$("#grupara").text());break;case"uyeara":searchType=5;pageTracker._trackEvent("common","selectsearch","searchtype-uye",5);$("#searchbutton").attr("value",$("#uyeara").text());break;case"haberara":searchType=6;pageTracker._trackEvent("common","selectsearch","searchtype-haber",6);$("#searchbutton").attr("value",$("#haberara").text());break;case"salonara":searchType=7;b.setUrl(c+"includes/ajax/common/autoCompTheatre.php");pageTracker._trackEvent("common","selectsearch","searchtype-salon",7);$("#searchbutton").attr("value",$("#salonara").text());break;default:alert("Bir hata olustu! l�tfen daha sonra tekrar deneyin.");break}$("#searchselection").hide()}function toggleContent(b,a){if(!($("#"+b).is(":visible"))){$("#"+b).show();$("#"+a).addClass("hidecontent")}else{$("#"+b).hide();$("#"+a).removeClass("hidecontent")}}function setplaylist(f,c){var d=document.getElementById("firstplaylistitem");if(jQuery(d.parentNode).hasClass("nowplaying")){jQuery(d.parentNode).removeClass("nowplaying");previous=d}if(previous!=null){jQuery(previous.parentNode).removeClass("nowplaying");previous=f;jQuery(f.parentNode).addClass("nowplaying");var e=document.getElementById("ontheatresplayer");e.innerHTML=embedPlayers[c];var b=document.getElementById("fragmanShareAnchor");var a=embedids[c];b.onclick=function(){fbs_share(embedUrls[c],embedTitles[c]);pageTracker._trackEvent("facebook","movie","fragman-fragman",a)}}}function informComment(d,b){lastCommentid=b;var a=document.getElementById("exp_"+b);var e=document.getElementById("reason_"+b);var f=null;if(e.value==5){f=a.value}else{f=e.value}var c="";if(d==0){c="/includes/ajax/common/informComment.php?commentid="+b+"&type="+d+"&reason="+encodeURI(f)+"&movieid="+lastMovieid}else{c="/includes/ajax/common/informComment.php?commentid="+b+"&type="+d+"&reason="+encodeURI(f)}xmlHttp=getXmlHttpObject(informedComment);xmlHttp.open("GET",c,true);xmlHttp.send(null)}function informedComment(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){closeinformDialog(lastCommentid)}}}function getCommentRatings(c,a){lastCommentid=a;var b=null;if(c==0){b="/includes/ajax/common/getCommentVotes.php?commentid="+a+"&type="+c+"&subjectid="+lastMovieid}else{b="/includes/ajax/common/getCommentVotes.php?commentid="+a+"&type="+c}xmlHttp=getXmlHttpObject(gotCommentRatings);xmlHttp.open("GET",b,true);xmlHttp.send(null);pageTracker._trackEvent("common","commentratings","type-"+c,c)}function gotCommentRatings(){var a=document.getElementById("whoiscommented_"+lastCommentid);if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){a.innerHTML=xmlHttp.responseText;a.style.display="block"}}function hideCommentRatings(a){var b=document.getElementById("whoiscommented_"+a);b.style.display="none"}function deleteComment(e,a,d){var c=confirm("Bu yorumu ve bağlı olan tüm cevapları silmek istediğinize emin misiniz?");if(c){lastAnchor=d;lastCommentid=a;var b=null;if(e==0){b="/includes/ajax/common/deleteComment.php?commentid="+a+"&type="+e+"&movieid="+lastMovieid}else{b="/includes/ajax/common/deleteComment.php?commentid="+a+"&type="+e}xmlHttp=getXmlHttpObject(deletedComment);xmlHttp.open("GET",b,true);xmlHttp.send(null)}}function deletedComment(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){lastAnchor.innerHTML="Silindi";$("#commentli_"+lastCommentid).hide()}}}function deletePicture(e,d,c){var b=confirm("Bu resmi silmek istediğinize emin misiniz?");if(b){lastAnchor=c;var a="/includes/ajax/common/deletePicture.php?pictureid="+d+"&type="+e;xmlHttp=getXmlHttpObject(deletedPicture);xmlHttp.open("GET",a,true);xmlHttp.send(null)}}function deletedPicture(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){lastAnchor.innerHTML="silindi"}}}function cancelCommentInform(c,e,a){var b="/admin/comments/ajax.php";var d="op=cancelInform&commentid="+e+"&type="+c+"&movieid="+a;lastCommentid=e;$.post(b,d,function(f){if(trim(f)=="1"){$("#commentli_"+lastCommentid).remove()}})}function confirmComment(d,a,c){var b=confirm("Bu yorumu ve bağlı olan tüm cevapları silmek istediğinize emin misiniz?");if(b){lastAnchor=c;lastCommentid=a;if(d==0){url="/includes/ajax/common/confirmComment.php?commentid="+a+"&type="+d+"&movieid="+lastMovieid}else{url="/includes/ajax/common/confirmComment.php?commentid="+a+"&type="+d}xmlHttp=getXmlHttpObject(confirmedComment);xmlHttp.open("GET",url,true);xmlHttp.send(null)}}function confirmedComment(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){lastAnchor.innerHTML="Onaylandı";$("#commentli_"+lastCommentid).hide()}}}function logSearch(c,b){var a="/includes/ajax/common/storeSearchTerm.php?kw="+encodeURI(c)+"&type="+b;xmlHttp=getXmlHttpObject(logedSearch);xmlHttp.open("GET",a,true);xmlHttp.send(null)}function logedSearch(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){goTo(lastUrl)}}}function checkFacebookShare(d,b,c){var a="/includes/ajax/common/checkShareOnFacebook.php?objectid="+d+"&type="+b+"&count="+c;xmlHttp=getXmlHttpObject(checkedFacebookShare);xmlHttp.open("GET",a,true);xmlHttp.send(null)}function checkedFacebookShare(){if(xmlHttp.readyState==4||xmlHttp.readyState=="complete"){if(trim(xmlHttp.responseText)=="0"){fbs_click()}else{if(trim(xmlHttp.responseText)=="-1"){alert("Aynı objeyi bir günde en fazla bir kere paylaşabilirsiniz.\nDilerseniz facebookta paylaşım yapabilirsiniz ama bunun için puan kazanmayacaksınız.");fbs_click()}else{if(trim(xmlHttp.responseText)=="-2"){alert("Üst üste paylaşmadan önce 5 dk beklemeniz gerekmektedir.\nDilerseniz facebookta paylaşım yapabilirsiniz ama bunun için puan kazanmayacaksınız.");fbs_click()}}}}}function clickedinformReason(b,c){var a=document.getElementById("exp_"+b);var d=document.getElementById("reason_"+b);d.value=c.value;if(d.value==5){a.disabled=false}else{a.disabled=true}}function openinformDialog(a){$("#informdialog_"+a).toggle()}function closeinformDialog(a){$("#informdialog_"+a).hide()}function getXmlHttpObject(c){var a=null;if(navigator.userAgent.indexOf("MSIE")>=0){var b="Msxml2.XMLHTTP";if(navigator.appVersion.indexOf("MSIE 5.5")>=0){b="Microsoft.XMLHTTP"}try{a=new ActiveXObject(b);a.onreadystatechange=c;return a}catch(d){alert("Hata. ActiveX desteği devre dışı bırakılmış olabilir.");return null}}if(navigator.userAgent.indexOf("Mozilla")>=0){a=new XMLHttpRequest();a.onload=c;a.onerror=c;return a}if(navigator.userAgent.indexOf("Opera")>=0){a=new XMLHttpRequest();a.onload=c;a.onerror=c;return a}return null}function togglehelpinfoboxes(b,c){boxes=new Array();boxes.push("ssst");boxes.push("useragreet");boxes.push("privacyt");boxes.push("commentrulest");boxes.push("usingt");boxes.push("copyrightt");boxes.push("userpointt");boxes.push("pointt");links=new Array();links.push("sss");links.push("useragree");links.push("privacy");links.push("commentrules");links.push("using");links.push("copyright");links.push("userpoint");links.push("point");for(var a=0;a<boxes.length;a++){$("#"+boxes[a]).hide();$("#"+links[a]).removeClass("selectedaddinfo")}$("#"+b).show();$("#"+c).addClass("selectedaddinfo")}window.onload=(function(){try{}catch(a){}});