function GoTo(url) {

   if (url!="") {
       location.href=url;
   return true;
   }
}


var ns4=(document.layers)? true:false;
var ns6=(document.getElementById)? true:false;
var ie4=(document.all)? true:false;
var ie5=false;


function DoMouseOver(obj) {
   if ( obj.selected==null ) obj.selected=false;
   if ( obj.selected ) { return }
   obj.className='thover';
}


function DoMouseOut(obj) {
   if ( obj.selected==null ) obj.selected=false;
   if ( obj.selected ) { return }
   obj.className='';
}


function MM_findObj(n, d) {

    var p,i,x;

    if (!d) d=document;
    if ( (p=n.indexOf("?"))>0 && parent.frames.length ) {
        d=parent.frames[n.substring(p+1)].document;
        n=n.substring(0,p);
    }
    if ( !(x=d[n]) && d.all ) x=d.all[n];
    for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for (i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
    if (!x && d.getElementById) x=d.getElementById(n);

    return x;
}


function DoClick(button, aform, text) {

    var form   = MM_findObj(aform);

    button.disabled=true;
    button.value=text;
    form.submit();

    return true;
}


/*
   Orjinal Fonksiyon: setPointer / phpMyAdmin
*/
function changebg(theRow, theAction, theDefaultColor, thePointerColor)
{
    var theCells = null;

    if ( (thePointerColor == '' ) || typeof(theRow.style) == 'undefined') {
        return false;
    }

    if ( typeof(document.getElementsByTagName) != 'undefined') {
        theCells = theRow.getElementsByTagName('td');
    } else if (typeof(theRow.cells) != 'undefined') {
        theCells = theRow.cells;
    } else {
        return false;
    }

    var rowCellsCnt  = theCells.length;
    var domDetect    = null;
    var currentColor = null;
    var newColor     = null;
    if ( typeof(window.opera) == 'undefined' && typeof(theCells[0].getAttribute) != 'undefined') {
        currentColor = theCells[0].getAttribute('bgcolor');
        domDetect    = true;
    } else {
        currentColor = theCells[0].style.backgroundColor;
        domDetect    = false;
    }

    if (currentColor == '' || currentColor.toLowerCase() == theDefaultColor.toLowerCase()) {
        if (theAction == 'over' && thePointerColor != '') {
            newColor = thePointerColor;
        }
    } else if (currentColor.toLowerCase() == thePointerColor.toLowerCase()) {
        if (theAction == 'out') {
            newColor = theDefaultColor;
        }
    }

    if (newColor) {
        var c = null;
        if (domDetect) {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].setAttribute('bgcolor', newColor, 0);
            }
        } else {
            for (c = 0; c < rowCellsCnt; c++) {
                theCells[c].style.backgroundColor = newColor;
            }
        }
    }

    return true;
}


function SetStatus(msg) {

    window.status = msg;
}


function ConfirmEntry(msg) {

	return confirm("Seçmiş olduğunuz kayıt silinecektir:\n\n"+msg);
}


function DoFormFocus(obj, def) {

    if ( obj.value==def ) {
        __FromPreValue__ = obj.value;
        obj.value = '';
    } else {
        __FromPreValue__ = '';
    }

    return true;
}


function DoFormBlur(obj) {

    if ( obj.value=='' )
        obj.value = __FromPreValue__;

    return true;
}