var win=null;
//document.domain = "www.manas.kg";  // Gerekirse değiştirilmelidir.

function Browser() {
        var b=navigator.appName;
        if (b=="Netscape") this.b="ns";
        else if ((b=="Opera") || (navigator.userAgent.indexOf("Opera")>0)) this.b = "opera";
        else if (b=="Microsoft Internet Explorer") this.b="ie";
        if (!b) { alert('HATA [ERROR]\n\nBelirlenemeyen tarayici. Bu tarayıcı desteklenmiyor!\n[Unidentified browser. This browser is not supported!]'); window.location="http://www.netscape.com/download/"; }
        this.version=navigator.appVersion;
        this.v=parseInt(this.version);
        this.ns=(this.b=="ns" && this.v>=4);
        this.ns4=(this.b=="ns" && this.v==4);
        this.ns6=(this.b=="ns" && this.v==5);
        this.nsv=this.ns?this.ns6?6:this.ns4?4:this.v:0;
        this.iev=this.ie6?6:this.ie55?5.5:this.ie5?5:this.v;
        this.ie=(this.b=="ie" && this.v>=4);
        this.ie4=(this.version.indexOf('MSIE 4')>0);
        this.ie5=(this.version.indexOf('MSIE 5')>0);
        this.ie55=(this.version.indexOf('MSIE 5.5')>0);
        this.ie5=(!this.ie55 && this.version.indexOf('MSIE 5')>0);
        this.ie6=(this.version.indexOf('MSIE 6')>0);
        this.iev=this.ie?this.ie6?6:this.ie55?5.5:this.ie5?5:this.v:0;
        this.opera=(this.b=="opera");
        this.dom=document.getElementById?1:0;
        this.def=(this.ie||this.dom); // most used browsers, for faster if loops
        var ua=navigator.userAgent.toLowerCase();
        if (ua.indexOf("win")>-1) this.platform="win32";
        else if (ua.indexOf("linux")>-1) this.platform="linux";
        else if (ua.indexOf("mac")>-1) this.platform="mac";
        else this.platform="other";
}
is = new Browser();

function browsertest() {
        bw="";
        bw+="-----------------\n";
        bw+="is.b="+is.b+"\n";
        bw+="is.version="+is.version+"\n";
        bw+="is.v="+is.v+"\n";
        bw+="is.platform="+is.platform+"\n";
        bw+="-----------------\n";
        bw+="is.dom="+is.dom+"\n";
        bw+="is.def="+is.def+"\n";
        bw+="-----------------\n";
        bw+="is.ie="+is.ie+"\n";
        bw+="is.iev="+is.iev+"\n";
        bw+="is.ie4="+is.ie4+"\n";
        bw+="is.ie5="+is.ie5+"\n";
        bw+="is.ie55="+is.ie55+"\n";
        bw+="is.ie6="+is.ie6+"\n";
        bw+="-----------------\n";
        bw+="is.ns="+is.ns+"\n";
        bw+="is.nsv="+is.nsv+"\n";
        bw+="is.ns4="+is.ns4+"\n";
        bw+="is.ns6="+is.ns6+"\n";
        bw+="-----------------\n";
        bw+="is.opera="+is.opera+"\n";
        alert(bw);
}
//browsertest();
if(is.ns4) { alert('HATA [ERROR]\n\nBu tarayici desteklenmiyor, Lütfen yenisini kurun!\n[This browser is not supported. Please install a new one!]'); window.location="http://www.netscape.com/download/"; }


function pagetop() {
        window.scroll(0,0);
}

function anasayfa() {
        location.href="/";
}

function popwin(url,w,h,r){
        var winpop = window.open(url,"popwin","toolbar=0,width=" +w+ ",height=" +h+ ",location=0,directories=0,status=0,menubar=0,scrollbars="+r+",resizable=0,copyhistory=1");winpop.focus();
}

function hakkinda() {
        if(win!=null) win.close();
        win=self.open('hakkinda.html',"","toolbar=no,width=312,height=320,left=80,top=80,directories=no,menubar=no,scrollbars=no,resizable=no");
}

function yardim(yrd) {
        if(win!=null) win.close();
        win=self.open('yardim'+yrd+'.html',"","toolbar=no,width=312,height=320,left=80,top=80,directories=no,menubar=no,scrollbars=no,resizable=no");
}


function GetRule(ruleName,param){
  var styleSheet=null;
  var Rules=new Array();
  var styleCount=0;
  rrn=ruleName.toLowerCase();
  for (var ssIndex=0; ssIndex<document.styleSheets.length; ssIndex++){
    styleSheet=document.styleSheets[ssIndex];
    rules_length=is.ie?styleSheet.rules.length:styleSheet.cssRules.length;
//ax="";
    for (var rIndex=0; rIndex<rules_length; rIndex++) {
      ruleget=is.ie?styleSheet.rules[rIndex]:styleSheet.cssRules[rIndex];
      rrt=ruleget.selectorText.toLowerCase();
//if (rIndex>0) ax+=rrt+"\n";
      if (rrt==rrn || rrt=="."+rrn || rrt=="#"+rrn) {
        Rules[styleCount]=ruleget;
        styleCount++;
                                if(param==1) break;
      }
    }
//alert(ax);
  }
  return Rules;
}

function renkal(trenk) {
//  window.onerror = err
  bgr = GetRule(trenk,1)[0].style.backgroundColor;
  if(bgr) return bgr; else return "#FFFFFF";
}

/*
function xrenkler() {
        rnk_bgc = GetRule("bgc5",1)[0].style.backgroundColor;
}
*/

function mover(obj) {
        obj.style.backgroundColor = rnk_bgc;
        obj.style.cursor = "hand";
        obj.onmouseout=function(){mout(obj);}
//  obj.focus();
//  alert(obj.style.cursor);
}

function mout(obj) {
        obj.style.backgroundColor = "";
//        obj.style.color = "";
        obj.style.cursor = "default";
}

var rnk_bgc = renkal("bgc5");