function COM(){var movie_code=document.getElementById('movie').value;$.ajax({type:'post',url:'../comment.php',data:'movie='+movie_code,success:function(msg){$('div#comment').html(msg);}});}
function SetCookie()
{var expire="";var noww=new Date();expire=new Date((new Date()).getTime()+ 3600*60);expire="; expires="+ expire.toGMTString();document.cookie="sikhadi1"+"="+ escape(noww.getTime())+ expire;return true;}
function GetCookie()
{var cookieValue="";var search="sikhadi1"+"=";if(document.cookie.length>0){offset=document.cookie.indexOf(search);if(offset!=-1){offset+=search.length;end=document.cookie.indexOf(";",offset);if(end==-1)end=document.cookie.length;cookieValue=unescape(document.cookie.substring(offset,end))}}
return cookieValue;}
function cmdadd(){$.ajax({type:'post',url:'http://www.sikhadi.com/scode.php',success:function(scode){var icode=document.getElementById('icode').value;var name=document.getElementById('name').value;var email=document.getElementById('email').value;var cmd=document.getElementById('cmd').value;var zmn=new Date((new Date()).getTime());var movie_code=document.getElementById('movie').value;var re=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;if(name==""){alert("Lütfen Adınızı Giriniz.");document.getElementById("name").focus();}
else if(!email.match(re)){alert("Lütfen E-Mail Adresinizi Giriniz.");document.getElementById("email").focus();}else if(cmd==""){alert("Lütfen Yorumuzunu Giriniz.");document.getElementById("cmd").focus();}else if(icode!=scode){alert("Kodunuzu Kotrol Ediniz.");document.getElementById("icode").focus();}else if(GetCookie()==""){SetCookie();$.ajax({type:'post',url:'http://www.sikhadi.com/comment_add.php',data:'movie='+movie_code+'&txt='+cmd+'&name='+name+'&email='+email});document.getElementById('name').value="";document.getElementById('email').value="";document.getElementById('cmd').value="";document.getElementById('icode').value="";yorums_reflesh();refleshh();}else if(GetCookie<zmn){$.ajax({type:'post',url:'http://www.sikhadi.com/comment_add.php',data:'movie='+movie_code+'&txt='+cmd+'&name='+name+'&email='+email});document.getElementById('name').value="";document.getElementById('email').value="";document.getElementById('cmd').value="";document.getElementById('icode').value="";refleshh();}
else{alert("Yorum Göndermek İçin Bir Süre Bekleyiniz.");}}});}
function refleshh(){ref.location.reload(true);}
