function f()
{
window.external.AddFavorite('http://www.alaturkaonline.com', 'Alaturka Online | Amerika nin ilk Türkçe e-Gazetesi')}

function Kapat(istebu) 
{
document.getElementById(istebu).innerHTML=""
}

function AdreseGit(adres)
{
location.href=adres
}

function onayal(soru,adres)
{
if  (confirm(soru))
{ location.href=adres }
}

function sec(x) {if (!x.contains(event.fromElement)) {x.bgColor="#232D2C";}}
function yok(x) {if (!x.contains(event.toElement)) {x.bgColor="";}}

function psg(adres)
{
window.friendlist.location.href=adres
}

function byebye()
{
window.friendlist.close()
}

function kayityap(){
document.getElementById("kayit").action="uye-kayit.asp";
document.getElementById("kayit").submit();
}

function girisyap(){
document.getElementById("girisyap").action="uye-giris.asp";
document.getElementById("girisyap").submit();
}

function haberEkle(){
document.getElementById("haberform").action="_haber_ekle.asp";
document.getElementById("haberform").submit();
}

function haberTaslak(){
document.getElementById("haberform").action="_haber_taslak.asp";
document.getElementById("haberform").submit();
}

function sifremiunuttum(){
document.getElementById("girisform").action="unuttum.asp";
document.getElementById("girisform").submit();
}

function resimSec(resim1, resim2, resim3, resim4, resim5)
{
window.opener.document.getElementById('imaj1').value=resim1
window.opener.document.getElementById('imaj2').value=resim2
window.opener.document.getElementById('imaj3').value=resim3
window.opener.document.getElementById('imaj4').value=resim4
window.opener.document.getElementById('imaj5').value=resim5
//window.opener.document.forms('form').resim.value=resim
popup = window.open("_dosya.asp","dosya");
popup.close()

}
function resimSec2(resim,alan)
{
window.opener.document.getElementById(alan).value=resim
//window.opener.document.forms('form').resim.value=resim
popup = window.open("_dosya.asp","dosya");
popup.close()

}

function anket(numara)
  {
document.getElementById("anketform").action="anket.asp?"+numara;
document.getElementById("anketform").submit();
  }


function manset(sayfa){
if (document.getElementById(sayfa).style.display == "") txtgosder = "none"; 
else txtgosder = "";
document.getElementById('giris').style.display = "none"
document.getElementById('uyeol').style.display = "none"
document.getElementById('onay').style.display = "none"
document.getElementById('unuttum').style.display = "none"
document.getElementById(sayfa).style.display = txtgosder;
}

function MG(id){
if (document.getElementById(id).style.display == "") txtgosder = "none"; 
else txtgosder = ""; 
document.getElementById(id).style.display = txtgosder;
}

function axsorun()
{alert("Lütfen bağlantinizi kontrol edin.\nSorun devam ediyorsa sorunu bildiren bir mail atin.")
}

var win=null;
sagtaraf=(screen.width-270)

function akutu(adres,isim,en,boy)
{
window.open(adres,isim,'left='+sagtaraf+',top=250,width='+en+',height='+boy+',scrollbars=no')
}

function bkutu(adres,isim,en,boy)
{
window.open(adres,isim,'left=220,top=200,width='+en+',height='+boy+',scrollbars=no')
}


function LinkEkle()
{
var isim= prompt("Link için metin girin","");
if(isim != null && isim != "") {

var adres= prompt("Gidilecek Adresi girin","http://");
if(adres != null && adres != "") {
	document.getElementById("icerik").value +=" [url="+adres+"]"+isim+"[/url] ";
	}
}
}

function KalinKelime()
{
var isim= prompt("Kalin olmasini istediginiz kelimeyi girin","");
if(isim != null && isim != "") {

document.getElementById("icerik").value +=" <b>"+isim+"</b> ";
}
}

function satirAtla()
{

document.getElementById("icerik").value +=" <br />";
}

function italikKelime()
{
var isim= prompt("italik olmasini istediginiz kelimeyi girin.","");
if(isim != null && isim != "") {

document.getElementById("icerik").value +=" <i>"+isim+"</i> ";
}
}

function ResimEkle()
{
var isim= prompt("Resim için adres girin.","");
if(isim != null && isim != "") {

document.getElementById("icerik").value +=" [rsm]"+isim+"[/rsm] ";
}
}

function sg(soru,adres)
{
if(confirm(soru)) 
	{location.href=adres}
}

function sil(adres)
{
if(confirm('Silmek istediğinize emin misiniz?')) 
	{location.href=adres}
}

function akutu(adres,isim,en,boy)
{
window.open(adres,isim,'left='+sagtaraf+',top=250,width='+en+',height='+boy+',scrollbars=no')
}

function DosyaSecme()
{
showModelessDialog("_dosya.asp?", "DosyaYukle", "dialogHeight: 300px; dialogWidth: 250px; resizable: no; help: no; status: no; scroll: no;");
}

var xmlHttp
//XML Objesi
function GetXmlHttpObject()
{ 
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}

function AX(sorgu,bolum)
{

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Hata: 0101 \nGözaticinizin sürümü çok eski.")
return
} 
document.getElementById("miniinfobox").innerHTML="<img src=images/loading.gif border=0>"
var url="ax_"+bolum+".asp"
url=url+"?q="+sorgu
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=bilgiyerlestir
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
	scrollTo(0,0)
}

function bilgiyerlestir() 
{if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		if (xmlHttp.status == 200)
		{
		document.getElementById("miniinfobox").innerHTML=""
		document.getElementById("flashcell").innerHTML=xmlHttp.responseText
		} 
		else
		{document.getElementById("miniinfobox").innerHTML="<a href='#' onclick='axsorun()'>Sayfaya Ulaşilamiyor!</a>";return true;
		}
	}

}


function AX2(sorgu,bolum)
{

xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert ("Hata: 0101 \nGözaticinizin sürümü çok eski.")
return
} 
document.getElementById("miniinfobox").innerHTML="<img src=img/hypno.gif border=0>"
var url="ax_"+bolum+".asp"
url=url+"?q="+sorgu
url=url+"&sid="+Math.random()
xmlHttp.onreadystatechange=mesajyerlestir
xmlHttp.open("GET",url,true)
xmlHttp.send(null)
}

function mesajyerlestir() 
{if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		if (xmlHttp.status == 200)
		{
		document.getElementById("miniinfobox").innerHTML=""
		document.getElementById("mesajlar").innerHTML=xmlHttp.responseText
		} 
		else
		{document.getElementById("miniinfobox").innerHTML="<a href='#' onclick='axsorun()'>Sayfaya Ulaşilamiyor!</a>";return true;
		}
	}

}

        function startCallback() {
            // make something useful before submit (onStart)
            return true;
        }

        function completeCallback(response) {
            // make something useful after (onComplete)
            document.getElementById('nr').innerHTML = parseInt(document.getElementById('nr').innerHTML) + 1;
            document.getElementById('r').innerHTML = response;
        }