function out(str,satir)
{
	if(str.style.backgroundColor!="#fffff4")
	{
		if(satir%2)
			{str.style.backgroundColor='#FFFFFF';}
		else
			{str.style.backgroundColor='#e7f0f8';}
	}
}
function sec(obj,satir)
{
if(obj.checked)
	document.getElementById("str"+satir).style.backgroundColor='#fffff4';
else
{
	if(satir%2)
		document.getElementById("str"+satir).style.backgroundColor='#FFFFFF';
	else
		document.getElementById("str"+satir).style.backgroundColor='#F2F9F8';
}
}
function ogretmenlerimiz(okulkodu)
{
  window.open('http://www.okulweb.com/ogretmenlerimiz/default.asp?okulkodu='+okulkodu,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=670,height=510,resizable=0');
}
function ogrencilerimiz(okulkodu)
{
  window.open('http://www.okulweb.com/ogrencilerimiz/default.asp?okulkodu='+okulkodu,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=670,height=510,resizable=0');
}

function anketdurum(id)
{
  window.open('anketdurum.asp?id='+id,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=450,height=500,resizable=1');
}
function foto(id)
{
  window.open('foto.asp?fid='+id,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=800,height=630,resizable=1');
}

function arkadasagonder(lnk)
{
  window.open('arkadasa_gonder.asp?lnk='+lnk,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=560,height=300,resizable=0');
}
function over(str)
{
	if(str.style.backgroundColor!="#f2fd97")
		str.style.backgroundColor='#e8fafe';
}

function out(str,satir)
{
	if(str.style.backgroundColor!="#f2fd97")
	{
		if(satir%2)
			{str.style.backgroundColor='#ffffff';}
		else
			{str.style.backgroundColor='#f8f7f7';}
	}
}
function sec(obj,satir)
{
if(obj.checked)
	document.getElementById("str"+satir).style.backgroundColor='#f2fd97';
else
{
	if(satir%2)
		document.getElementById("str"+satir).style.backgroundColor='#ffffff';
	else
		document.getElementById("str"+satir).style.backgroundColor='#f8f7f7';
}
}
function sifregonder()
{
  window.open('sifregonder.asp','','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=400,height=200,resizable=0');
}
function sifredegistir()
{
  window.open('sifredegistr.asp','','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=380,height=250,resizable=0');
}
function sepete_ekle(obj,urun_id)
{
	siparis_adet=document.getElementById('siparis_adet'+urun_id)
	strURL="minisepet.asp?urun_id="+urun_id+"&sp_adet="+siparis_adet.value+"&act=Add"
	obj.href=strURL
} 
function sepete_ekle_d(obj,urun_id)
{
	strURL="minisepet.asp?urun_id="+urun_id+"&act=Add"
	obj.href=strURL
} 
function sepete_at()
{
	eski=frm_liste.__VIEWSTATE.name;
	frm_liste.__VIEWSTATE.name='NOVIEWSTATE';
	frm_liste.action='minisepet.asp?act=Addp&method=post';
	frm_liste.target='frm_sepet';
	frm_liste.submit();
	
	frm_liste.action='';
	frm_liste.target='';
	frm_liste.__VIEWSTATE.name=eski
	eski="";
}
function hemen_satin_al()
{
	eski=frm_liste.__VIEWSTATE.name;
	frm_liste.__VIEWSTATE.name='NOVIEWSTATE';
	frm_liste.action='siparis.aspx?act=Add&method=post';
	frm_liste.submit();
}

function secilenleri_sepete_at()
{
	for(i=0;i<frm_liste.elements.length;i++)
	{
		if(frm_liste.elements(i).name.indexOf("stok_kod")>0)
		{
			if(frm_liste.elements(i).checked==true)
			{
				stok_kod=frm_liste.elements(i).value;
				alert(stok_kod)
			}
			
		}
	}
}

function fadet(urun_id)
{
	siparis_adet=document.getElementById("siparis_adet"+urun_id)
}



FadeObjects = new Object();
FadeTimers = new Object();

function Fade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){
        setTimeout("Fade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }

    clearTimeout(FadeTimers[object.sourceIndex]);

    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        FadeObjects[object.sourceIndex]=object;
        FadeTimers[object.sourceIndex]=setTimeout("Fade(FadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
}

function siparisver(spr)
{
  window.open('siparisver.asp?spr='+spr,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=900,height=700,resizable=0');
}
function dataprint(id)
{
  window.open('dataprint.asp?id='+id,'','toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,width=560,height=300,resizable=1');
}
function datayorumekle(id)
{
  window.open('datayorumekle.asp?id='+id,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=560,height=300,resizable=0');
}

function urunyorumekle(id)
{
  window.open('urunyorumekle.asp?id='+id,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=560,height=300,resizable=0');
}

function urunprint(id)
{
  window.open('urunprint.asp?id='+id,'','toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,width=800,height=568,resizable=1');
}
function hepsini_sec2(){ 
    var d=document, CurMode; 
    var ChkId="hepsini_sec"; 
     
    var ChkArr=d.getElementsByTagName("input")
    var CurMode=d.getElementById(ChkId).checked;
    for (var i=0;i<ChkArr.length;i++){ 
        if(ChkArr[i].type=="checkbox")ChkArr[i].checked=CurMode; 
    } 
} 
function dataprint(id)
{
  window.open('dataprint.asp?id='+id,'','toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=1,width=560,height=300,resizable=1');
}
function deftereYaz()
{
  window.open('defter_yaz.asp','','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=540,height=395,resizable=0');
}

function defterOku(id)
{
  window.open('defter_oku.asp?id='+id,'','toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,width=540,height=300,resizable=0');
}

var popUpWin=0;
function YeniPencere(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'directories=0,status=0,menubar=0,personalbar=no,scrollbars=1,resizable=0,toolbar=no,location=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function changer(URLNavigation) 
	{
		if (URLNavigation != "") {
			top.location.href = URLNavigation;
		}
	}
function numbersonly(myfield, e, dec)
{
var key;
var keychar;

if (window.event)
   key = window.event.keyCode;
else if (e)
   key = e.which;
else
   return true;
keychar = String.fromCharCode(key);

if ((key==null) || (key==0) || (key==8) || 
    (key==9) || (key==13) || (key==27) )
   return true;

else if ((("0123456789,").indexOf(keychar) > -1))
   return true;

else if (dec && (keychar == "."))
   {
   myfield.form.elements[dec].focus();
   return false;
   }
else
   return false;
}
function NewsOvrTAB(src)
{	if(!src.contains(event.fromElement))
	src.style.backgroundColor='#e4e2e2';
	src.style.cursor='hand';}

function NewsOutTAB(src)
{	if(!src.contains(event.toElement))	
	src.style.backgroundColor='';}
	
function authorChange(type, yazarid, yzrfoto, makaleid, baslik, tarih)
{
	document.getElementById("author_img_" + type).src = 'resize.aspx?adres=images/yazarlar/' + yzrfoto + "&gen=90&yuk=77";	
	document.getElementById("author_article_title_" + type).innerHTML = '<a class="l4" href="yazi.asp?id=' + makaleid + '" title="' + baslik + '">' + baslik + "</a>";
	document.getElementById("author_article_date_" + type).innerHTML = tarih;
}

        function RefreshImage(valImageId) {
            var objImage = document.getElementById(valImageId)
            if (objImage == undefined) {
                return;
            }
            var now = new Date();
            objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
        }
