﻿function ajax(){
    var xmlHttp=null;
    try{
        xmlHttp=new XMLHttpRequest();
    }
    catch (e){
        try{
            xmlHttp=new ActiveXObject('Msxml2.XMLHTTP');
        }
        catch (e){
            xmlHttp=new ActiveXObject('Microsoft.XMLHTTP');
        }
    }
    return xmlHttp;
} 

var div=null;

function divisim(divadi){
	div=divadi;
	return true;
}

function kutudegis(k){
	var dizi = new Array("videokutu","resimkutu","oyunkutu","sozlukkutu","sarkisozukutu");
	for (i=0;i<dizi.length;i++){
		document.getElementById(dizi[i]).style.backgroundColor='#6699ff';
		document.getElementById(dizi[i]).style.borderBottomColor='#ccffff';
	}
	if(k=='video'){
		document.getElementById("videokutu").style.backgroundColor='#99ccff';
		document.getElementById("videokutu").style.borderBottomColor='#99ccff';
		document.getElementById("aramabolum").innerHTML = '<form name="videoaramaformu" id="videoaramaformu" method="get" action="http://video.netevren.com/videolari/"><div style="background-image: url(http://www.netevren.com/simge/arama.gif);width:470px;height:50px;"><div style="float:left;width:65px;">&nbsp;</div><div style="float:left;width:315px;height:50px;line-height:26px;text-align:left;"><b>Video</b><br><input name="v" id="v" type="text" style="background-color:#f5f5f5;border-width:0px;color:#000000;width:300px;"></div><div style="float:left;width:88px;height:50px;line-height:21px;text-align:left;align:left;"><br><img src="http://www.netevren.com/simge/ara.gif" border="0" style="cursor:pointer;" onclick="document.videoaramaformu.submit();"></div></div></form>';	
	}
	else if(k=='resim'){
		document.getElementById("resimkutu").style.backgroundColor='#99ccff';
		document.getElementById("resimkutu").style.borderBottomColor='#99ccff';
		document.getElementById("aramabolum").innerHTML = '<form name="aramaform" method="get" action="http://galeri.netevren.com/etiket/"><div style="background-image: url(http://www.netevren.com/simge/arama.gif);width:470px;height:50px;"><div style="float:left;width:65px;">&nbsp;</div><div style="float:left;width:315px;height:50px;line-height:26px;text-align:left;"><b>Resim</b><br><input name="k" id="k" type="text" style="background-color:#f5f5f5;border-width:0px;color:#000000;width:300px;"></div><div style="float:left;width:88px;height:50px;line-height:21px;text-align:left;align:left;"><br><img src="http://www.netevren.com/simge/ara.gif" border="0" style="cursor:pointer;" onclick="document.aramaform.submit();"></div></div></form>';	
	}
	else if(k=='oyun'){
		document.getElementById("oyunkutu").style.backgroundColor='#99ccff';
		document.getElementById("oyunkutu").style.borderBottomColor='#99ccff';
		document.getElementById("aramabolum").innerHTML = '<form name="aramaform" method="get" action="http://oyun.netevren.com/oyunlari/"><div style="background-image: url(http://www.netevren.com/simge/arama.gif);width:470px;height:50px;"><div style="float:left;width:65px;">&nbsp;</div><div style="float:left;width:315px;height:50px;line-height:26px;text-align:left;"><b>Oyun</b><br><input name="o" id="o" type="text" style="background-color:#f5f5f5;border-width:0px;color:#000000;width:300px;"></div><div style="float:left;width:88px;height:50px;line-height:21px;text-align:left;align:left;"><br><img src="http://www.netevren.com/simge/ara.gif" border="0" style="cursor:pointer;" onclick="document.aramaform.submit();"></div></div></form>';	
	}
	else if(k=='sozluk'){
		document.getElementById("sozlukkutu").style.backgroundColor='#99ccff';
		document.getElementById("sozlukkutu").style.borderBottomColor='#99ccff';
		document.getElementById("aramabolum").innerHTML = '<form name="aramaform" method="get" action="http://sozluk.netevren.com/ara/"><div style="background-image: url(http://www.netevren.com/simge/arama.gif);width:470px;height:50px;"><div style="float:left;width:65px;">&nbsp;</div><div style="float:left;width:315px;height:50px;line-height:26px;text-align:left;"><b>Sözlük</b><br><input name="k" id="k" type="text" style="background-color:#f5f5f5;border-width:0px;color:#000000;width:300px;"></div><div style="float:left;width:88px;height:50px;line-height:21px;text-align:left;align:left;"><br><img src="http://www.netevren.com/simge/ara.gif" border="0" style="cursor:pointer;" onclick="document.aramaform.submit();"></div></div></form>';	
	}
	else if(k=='sarkisozu'){
		document.getElementById("sarkisozukutu").style.backgroundColor='#99ccff';
		document.getElementById("sarkisozukutu").style.borderBottomColor='#99ccff';
		document.getElementById("aramabolum").innerHTML = '<form name="aramaform" method="get" action="http://sarkisozleri.netevren.com/ara/"><input type="hidden" name="nerde" value="sarkici"><div style="background-image: url(http://www.netevren.com/simge/arama.gif);width:470px;height:50px;"><div style="float:left;width:65px;">&nbsp;</div><div style="float:left;width:315px;height:50px;line-height:26px;text-align:left;">&nbsp;<span id="sarkicilink" style="cursor:pointer;" onclick="document.getElementById(\'sarkisozulink\').innerHTML=\'<u>Şarkı Sözü</u>\';this.innerHTML=\'<b>Şarkıcı</b>\';document.aramaform.nerde.value=\'sarkici\';"><b>Şarkıcı</b></span> | <span id="sarkisozulink" style="cursor:pointer;" onclick="document.getElementById(\'sarkicilink\').innerHTML=\'<u>Şarkıcı</u>\';this.innerHTML=\'<b>Şarkı Sözü</b>\';document.aramaform.nerde.value=\'sarkisozu\';"><u>Şarkı Sözü</u></span><br><input name="k" id="k" type="text" style="background-color:#f5f5f5;border-width:0px;color:#000000;width:300px;"></div><div style="float:left;width:88px;height:50px;line-height:21px;text-align:left;align:left;"><br><img src="http://www.netevren.com/simge/ara.gif" border="0" style="cursor:pointer;" onclick="document.aramaform.submit();"></div></div></form>';	
	}
}

function paylasbunu(hedefSite){
	if(hedefSite=='del.icio.us'){
		window.open('http://del.icio.us/post?url='+location.href+'&amp;title='+document.title+'');
	}
	else if(hedefSite=='digg'){
		window.open('http://digg.com/submit?phase=2&amp;url='+location.href+'&amp;title='+document.title+'');
	}
	else if(hedefSite=='technorati'){
		window.open('http://technorati.com/faves?add='+location.href);
	}
	else if(hedefSite=='stumbleupon'){
		window.open('http://www.stumbleupon.com/submit?url='+location.href+'&amp;title='+document.title+'');
	}
	else if(hedefSite=='facebook'){
		window.open('http://www.facebook.com/sharer.php?u='+location.href+'&amp;t='+document.title+'');
	}
	else if(hedefSite=='google'){
		window.open('http://www.google.com/bookmarks/mark?op=edit&amp;bkmk='+location.href+'&amp;title='+document.title+'');
	}
	else if(hedefSite=='yahoo'){
		window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+location.href+'&amp;='+document.title+'');
	}				
}

