var reponse="";function txtuzu(event){var txt_desc=document.getElementById("wysiwyg_textearea");var uz=document.getElementById("uz");var len=60-txt_desc.value.length;if(len<0){len=0}uz.innerHTML="İlanınızın uzunluğu en az 60 harf olmalı : Yazılması gereken harf sayısı :<span style='color:red'>"+len+"<span>"}function sprix(sel){if(sel.value!=5){document.getElementById("div_viprix").style.display="none";fi=document.getElementById("fiorn").style.display="none"}else{document.getElementById("div_viprix").style.display="inline";fi=document.getElementById("fiorn").style.display="block"}return true}function gxhttp(){if(window.XMLHttpRequest){vma=new XMLHttpRequest()}else{if(window.ActiveXObject){vma=new ActiveXObject("Microsoft.XMLHTTP")}else{return false}}return vma}function opt(elt,div){vma=gxhttp();if(!vma){return false}d="n="+elt.name;e="&o="+elt.value;f="/opt.php5?"+d+e;d=null;e=null;vma.open("GET",f,true);vma.onreadystatechange=function anonymous(){if(vma.readyState==4){reponse=vma.responseText;eltdiv=document.getElementById(div);eltdiv.innerHTML=reponse}};vma.send(null);return false}function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!="function"){window.onload=func}else{window.onload=function(){oldonload();func()}}}function selprix(){var rad=document.getElementsByName("Ajout_PrixType");var radprix=document.getElementById("Type5");for(i=0;i<rad.length;i++){rad[i].onclick=function(){if(rad[3].checked==false){radprix.style.display="none"}else{radprix.style.display="block"}}}if(rad[3].checked==false){radprix.style.display="none"}else{radprix.style.display="block"}}function vse(){vma=gxhttp();if(!vma){return false}select=document.getElementById("si");selectilce=document.getElementById("ss");s=select.options[select.selectedIndex].value;if(s!=0){su=document.getElementById("su")}d="s="+s;f="/sehir_xml.php5?"+d;d=null;vma.open("GET",f,true);if(document.all){var httpOb=new ActiveXObject("Microsoft.XMLHTTP");httpOb.Open("POST",f,false);httpOb.send(null);var xmlDoc=new ActiveXObject("Microsoft.XMLDOM");xmlDoc.load(httpOb.responseXML)}else{httpOb=new XMLHttpRequest();httpOb.open("GET",f,false);httpOb.send(null);xmlDoc=httpOb.responseXML}var d="";d='<select id="sels" name="selcp3"><option value="0"></option>';selectilce.innerHTML="";for(i=0;i<xmlDoc.documentElement.childNodes.length;i++){tagname=xmlDoc.documentElement.childNodes[i].tagName;if(tagname!=undefined){if(document.all){deger=xmlDoc.documentElement.childNodes.item(i).text}else{deger=xmlDoc.getElementsByTagName(tagname)[0].childNodes[0].nodeValue}d=d+'<option value="'+tagname+'" >'+deger+"</option>"}}d=d+"</select>";selectilce.innerHTML=d;return true}function shtitbul(n){if(n>=4){d=document.getElementById("sehirid");d.style.visibility="hidden"}var a=document.getElementById("ek_"+n);a.style.visibility="visible";a.style.display="block";return true}function hititbul(n){if(n>=4){d=document.getElementById("sehirid");d.style.visibility="visible"}var a=document.getElementById("ek_"+n);a.style.visibility="hidden";a.style.display="none";return true}function yurtdisi(){var su=document.getElementById("su");var d1=document.getElementById("si");var d2=document.getElementById("ss");var u1=document.getElementById("ulturk");var u2=document.getElementById("ulkibris");d1.style.display="block";d2.style.display="block";u1.style.display="block";u2.style.display="none";if(su.value==9999){d1.style.display="none";d2.style.display="none";u1.style.display="none";u2.style.display="none"}if(su.value==50){d2.style.display="none";u1.style.display="none";u2.style.display="block"}return true}function is_numeric(num){var exp=new RegExp("^[0-9-.]*$","g");return exp.test(num)}function verif_fiyat(e,elt){if(window.event){keynum=e.keyCode}else{if(e.which){keynum=e.which}}valreturn=false;switch(keynum){case 8:case 44:case 46:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 188:case 190:valreturn=keynum;break;case 48:if(elt.value==""){valreturn=false}else{valreturn=keynum}}return valreturn}function verif_tel(e,elt){if(window.event){keynum=e.keyCode}else{if(e.which){keynum=e.which}}valreturn=false;switch(keynum){case 8:case 32:case 40:case 41:case 43:case 45:case 46:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 188:case 190:valreturn=keynum;break}return valreturn}function fiyatformat(elt){retval=elt.value;var rep=new RegExp("[.,]([0-9]{3,})","g");retval=retval.replace(rep,"$1");var rep2=new RegExp("[.,]([0-9]{0,2})[.,]","g");while(rep2.test(retval)){retval=retval.replace(rep2,"$1.")}var rep3=new RegExp("([^0-9,.]+)","g");while(rep3.test(retval)){retval=retval.replace(rep3,"")}var rep4=new RegExp("(^[0.,]+)","g");while(rep4.test(retval)){retval=retval.replace(rep4,"")}elt.value=retval}function verifimaildomen(adres){var tabdomen=Array("hotmail","yahoo","mynet","gmail","wanadoo");var domaine=adres.match(/@([a-z0-9\-]+)/i);domaine=domaine[1];return true}function verifidom(){hititbul("4");ilanmail=document.getElementById("Ajout_Mail").value;if((ilanmail.indexOf("ı")!=-1)||(ilanmail.indexOf("İ")!=-1)||(ilanmail.indexOf("ğ")!=-1)||(ilanmail.indexOf("Ğ")!=-1)||(ilanmail.indexOf("ü")!=-1)||(ilanmail.indexOf("Ü")!=-1)||(ilanmail.indexOf("ö")!=-1)||(ilanmail.indexOf("Ö")!=-1)||(ilanmail.indexOf("ş")!=-1)||(ilanmail.indexOf("Ş")!=-1)||(ilanmail.indexOf("ç")!=-1)||(ilanmail.indexOf("Ç")!=-1)){alert("E-Mail adreslerinin yazımında bazı Türkçe harfler kullanılamıyor!\nE-Mail adresinizinde kullanabileceğiniz harfler:\n\nı yerine i ; İ yerine I\n\nğ yerine g ; Ğ yerine G\n\nü yerine u ; Ü yerine U\n\nö yerine o ; Ö yerine O\n\nş yerine s ; Ş yerine S\n\nç yerine c ; Ç yerine C")}else{if(ilanmail.length>5){var m1=new Array("hotrmail","hotymail","hotmaii","hptmail","hotamil","hotamail","livehotmail","gotmail","hoptmail","hatmail","hotmailc","hotmaili","hotmaik","hotnail","tohmail","hitmail","hotmeil","hotmai","hotmil","hotail","homail","hoymail","htmail","otmail","hotml","hotmal","hotal","hotmali","hormail","h0tmail","hotmnail","htomail","hotnmail","hotmial");var m2=new Array("yhaoo","yaaho","yahhoo","yaho","yaoo","yhoo");var m3=new Array("hmynet","nynet","maynet","mnet","my_net","my-net");var m4=new Array("gmal","mgail","gmial");var m5=new Array("nms","smn","ssm","mms","mns");var domaine=ilanmail.match(/@([a-z0-9\-]+)/i);if(domaine.length!=null){for(i in m1){if(m1[i]==domaine[1]){affdomhata("hotmail",domaine[1])}}for(i in m2){if(m2[i]==domaine[1]){affdomhata("yahoo",domaine[1])}}for(i in m3){if(m3[i]==domaine[1]){affdomhata("mynet",domaine[1])}}for(i in m4){if(m4[i]==domaine[1]){affdomhata("gmail",domaine[1])}}for(i in m5){if(m4[i]==domaine[1]){affdomhata("msn",domaine[1])}}if(ilanmail.indexOf("mynet")!=-1){alert("Mynet kullanicilari \n\n\n Dikkat: ilanlarınızı onaylamak için aktivasyon mailini \"Süzgeç'ten çıkar\" butonuna basmanız yeterlidir. Böylece, ilanıza gelecek cevaplar'ların sürekli olarak posta kutunuza girmesini sağlayabilirsiniz")}}}}return true}function affdomhata(domen,errdomen){alert("Dikkat: \n\nEmail adresinizde yanlışlık olabilir,\nGirdiğiniz email adresi : @"+errdomen+"\nOlabilecek adres : @"+domen+"\n\n Aktivasyon e-maili için yanlışı düzeltmelisiniz. ");return true};
