var ayrac='.';var bw=null;var aylar=Array('','Ocak','Şubat','Mart','Nisan','Mayıs','Haziran','Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık');var bugun=new Date();var formPasif=0;function none(){}
function bw_check(){var is_major=parseInt(navigator.appVersion);this.nver=is_major;this.ver=navigator.appVersion;this.agent=navigator.userAgent;this.dom=document.getElementById?1:0;this.opera=window.opera?1:0;this.ie5=(this.ver.indexOf("MSIE 5")>-1&&this.dom&&!this.opera)?1:0;this.ie6=(this.ver.indexOf("MSIE 6")>-1&&this.dom&&!this.opera)?1:0;this.ie4=(document.all&&!this.dom&&!this.opera)?1:0;this.ie=this.ie4||this.ie5||this.ie6;this.mac=this.agent.indexOf("Mac")>-1;this.ns6=(this.dom&&parseInt(this.ver)>=5)?1:0;this.ie3=(this.ver.indexOf("MSIE")&&(is_major<4));this.hotjava=(this.agent.toLowerCase().indexOf('hotjava')!=-1)?1:0;this.ns4=(document.layers&&!this.dom&&!this.hotjava)?1:0;this.bw=(this.ie6||this.ie5||this.ie4||this.ns4||this.ns6||this.opera);this.ver3=(this.hotjava||this.ie3);this.opera7=((this.agent.toLowerCase().indexOf('opera 7')>-1) || (this.agent.toLowerCase().indexOf('opera/7')>-1));this.operaOld=this.opera&&!this.opera7;return this;}
function openW(wName,wURL,wAtts ) {var w = window.open(wURL,wName,wAtts);w.focus();}function openHelpW(wName,wURL,wWidth,wHeight ) {var w = window.open(wURL,wName,"width="+wWidth+",height="+wHeight+",resizable=yes,scrollbars=yes,toolbar=no,statusbar=no");w.focus();}
function in_array(arrayObj,pattern) { for ( var i=0;i<arrayObj.length;i++) { if ( arrayObj[i]==pattern ) return i;} return -1;}
function virgulle(s){var a=''; len = s.length; if (!len) return s;for(j=len;j>2;j-=3) { uclu=s.substring(j-3, j); if (a=='') a = uclu; else a= uclu + ayrac + a; }b=s.substring(0, j); if (a=='') a = b; else if (b!='') a = b + ayrac + a;return a;}function unvirgulle(s){var a=''; len = s.length; for(j=0;j<=len;j++) {c=s.substring(j, j+1); if (c!=ayrac) a+=c; }return a;}function virgul_isleri(obj) { if ( sembolEklendi ) obj.value = obj.value.substring(0,1)+virgulle(unvirgulle(obj.value.substring(1))); else obj.value = virgulle(unvirgulle(obj.value));}
function regKontrol( pattern, value){var r = new RegExp( pattern, "g");return r.test( value );}function formatla( str, a) { var eski_ayrac=ayrac;ayrac=a;var new_str=virgulle(str);ayrac=eski_ayrac;return new_str;}
function formGonder() {if ( arguments.length>0 ) form = arguments[0];else form = document.forms[0];if ( !form ) return;form.method='post';form.target = window.name;if ( arguments.length>1 ) form.method = arguments[1];if ( arguments.length>2 ) form.action = arguments[2];if ( arguments.length>3 ) form.target = arguments[3];form.submit();}
function highlight( ID,renk){var sElement=document.getElementById('satir'+ID);if (!sElement) return;var cKids=sElement.childNodes;for (var i=0;i<cKids.length;i++) cKids[i].style.backgroundColor=renk;sElement.style.backgroundColor=renk;}
function focusOther(thisObj, otherObj,len){if ( !thisObj || !otherObj ) return;if ( thisObj.value.length==len ) otherObj.focus();}
function formPasifmi(){ alert('deneme');if (formPasif) document.forms[0].blur();}
function anket(sonuc){openW('anketPenc','','width=300,height=350,scrollbar=yes');document.forms[0].anketSonuc.value = sonuc;document.forms[0].action=SITE_URL+'/anket.php';document.forms[0].target='anketPenc';document.forms[0].submit();}
function confirmBox()
{
	var confirmBoxWidth  = 320;
	var confirmBoxHeigth = 300;
	if ( arguments.length>2 ) confirmBoxWidth  = arguments[2];
	if ( arguments.length>3 ) confirmBoxHeigth = arguments[3];
	var fileName         = '';
	if( document.layers ) return confirm( arguments[0]);
	else
	{
		if( arguments.length == 1)
		{
			var aa=new Array(arguments[0],'Tamam');
			fileName = "dialog_box.html";
		}
		else
		{
			aa=arguments;
			fileName = arguments[1];
		}
		var str = showModalDialog(fileName, aa, "dialogWidth:"+confirmBoxWidth+"px;dialogHeight:"+confirmBoxHeigth+"px;center:yes;help:no;status:no");
		return str ? str : Array(0,0);
	}
}
function hizliAramaYap(form)
{
	if ( form.fsektor.selectedIndex==0 && form.fgun.selectedIndex==0 && form.ftxt.value=='' )
	{
		alert('Arama kriterlerinden en az birini seçmek zorundasınız.');
		form.fsektor.focus();
		return;
	}
	if (form.ftxt.value.length<3)
	{
		alert('En az 3 harfli bir kelime giriniz.');
		form.ftxt.focus();
		return;
	}
	if (form.kullanici) form.kullanici.value ='';
	if (form.sifre) form.sifre.value     ='';
	formGonder(document.forms[0],'get','arama_sonuc.php');
}
