function onayla(mesaj,url){
	var text = mesaj;
	var page = url;
	var answer = confirm(mesaj)
	if (answer){ window.location = page;	}
	else{ return; }
	}


function veripen(URL,w,h) {
	day = new Date();
	id = day.getTime();
	var left = (screen.width-w)/2;
	var top = (screen.height-h)/2;
	var URL = URL;
	eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + w + ",height=" + h + ",left=" + left + ",top=" + top + "');");
}

function placeveri(veri,veri2) {
	txt = veri;
	txt2 = veri2;
		window.opener.document.places.locdisp.value = txt;
		window.opener.document.places.location.value = txt2;
		window.close();
		
}

/*
function popUp(URL,type,w,h) {
day = new Date();
id = day.getTime();
var left = (screen.width-w)/2;
var top = (screen.height-h)/2;
var URL = URL + type;
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + w + ",height=" + h + ",left=" + left + ",top=" + top + "');");
}
*/

function spherehide(){
changeDisplay('arts','none');
changeDisplay('literature','none');
changeDisplay('music','none');
changeDisplay('parts','none');
changeDisplay('politic','none');
changeDisplay('spirit','none');
changeDisplay('myth','none');
changeDisplay('science','none');
changeDisplay('tech','none');
changeDisplay('comp','none');
changeDisplay('spor','none');
changeDisplay('phil','none');
changeDisplay('bizniz','none');
changeDisplay('stil','none');
}

function changeDisplay( elementId, setTo ) {
   var theElement;
  if( document.getElementById ) {
    //DOM
    theElement = document.getElementById( elementId );
  } else if( document.all ) {
    //Proprietary DOM
    theElement = document.all[ elementId ];
  }
  if( !theElement ) {
    /* The page has not loaded, or the browser claims to
    support document.getElementById or document.all but
    cannot actually use either */
    return;
  }
  //Reference the style ...
  if( theElement.style ) { theElement = theElement.style; }
  if( typeof( theElement.display ) == 'undefined' ) {
    //The browser does not allow us to change the display style
    //Alert something sensible (not what I have here ...)
    window.alert( 'Your browser does not support this' );
    return;
  }
  //Change the display style
  theElement.display = setTo;
}

// Get base url
url = document.location.href;
xend = url.lastIndexOf("/") + 1;
var base_url = url.substring(0, xend);

function gethandle (url,tip,degisken) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url + "?" + tip + "=" + degisken;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;

        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}
function gethandle2 (url,tip,degisken,tip2,degisken2) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url + "?" + tip + "=" + degisken + '&' + tip2 + "=" + degisken2;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;
//turnonfordebug		alert(url); 
        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}
function konumal (url,tip,degisken,tip2,degisken2) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url + "?" + tip + "=" + degisken + '&' + tip2 + "=" + degisken2;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;
//turnonfordebug		alert(url); 
        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}
function gethandle3b (url,tip,degisken,tip2,degisken2,tip3,degisken3) {
        // Does URL begin with http?
        if (url.substring(0, 4) != 'http') {
                url = base_url + url + "?" + tip + "=" + degisken + '&' + tip2 + "=" + degisken2 + '&' + tip3 + "=" + degisken3;
        }

        // Create new JS element
        var jsel = document.createElement('SCRIPT');
        jsel.type = 'text/javascript';
        jsel.src = url;
//turnonfordebug		alert(url); 
        // Append JS element (therefore executing the 'AJAX' call)
        document.body.appendChild (jsel);
}