var ayrac = '.';
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;};
var bw = new bw_check();
function selectDiv( divName )
{
	if ( bw.ie6 || bw.ns6 ) return document.getElementById(divName);
	else if ( bw.ns4 ) return document.layers[divName];
	else if ( bw.ie ) return document.all[divName];
	else return null;
}
function hideMe( divName ){
  if (bw.ns6 || bw.ie6 ) document.getElementById(divName).style.visibility = 'hidden';
  else { if (bw.ie) document.all[divName].style.visibility = 'hidden';
  	else if (bw.ns4) document.layers[divName].visibility='hide';
  }
}

function showMe(divName){
   if (bw.ns6 || bw.ie6 ) document.getElementById(divName).style.visibility = 'visible';
  else { if (bw.ie) document.all[divName].style.visibility = 'visible';
  	else if (bw.ns4) document.layers[divName].visibility='show';
  }
}
function openW(wName,wURL,wAtts ) {var w = window.open(wURL,wName,wAtts);}
function git(actionPage,ids)
{
	if ( actionPage=='') actionPage     = 'kategori.php';
	if ( ids!='') document.forms[0].kategoriKod.value = ids;
	document.forms[0].action            = actionPage;
	document.forms[0].submit();
}
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) { 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 aramaYap(form)
{
	form.arama_yap.value = '1';
	form.action          = 'arama.php';
	form.submit();
}


function sirala( formAction, siraTip,siraOrder)
{
	var form = document.forms[0];
	form.sira_order.value = siraOrder;
	form.sira_tip.value     = siraTip;
	form.action = formAction;
	form.submit();
}