var d=document,wpop=gpop=pLA='',ie=document.all && !window.opera;

ePL=new Image;
ePL.src='images/bg_eposta3.png';

var divler=[];

function P(t){document.write(t);}
function O(o){return d.getElementById(o);}
function S(o){o.style.display='block';}
function H(o){o.style.display='none';}

function D(n){
	o=O('dersAciklama')
	o.innerHTML='<h3>'+dIsim[n]+'</h3><p>'+dAciklama[n]+'</p>';
	S(o);
}

function Pop(resim,w,h){
	if (document.all) w+=16;
	if (wpop && !wpop.closed) wpop.close();
	wpop=window.open(resim,'','scrollbars=yes,status=yes,directories=no,menubar=no,resizable=yes,toolbar=no,width='+w+',height='+h+',top=60,left=60');
	wpop.document.open();
	wpop.document.write('<html><title>Kendi Expression Center - Fotoğraf Galerisi</title><style>BODY {margin:0; background:url('+resim.href+') no-repeat;}</style><body></body></html>');
	wpop.document.close();
	wpop.focus();
	return false;
}

function ProgramGoster(i){
	ProgramKaldir();
	if (i==0) return;
	txt='';
	nd=0;
	if (ders[i]==undefined){
		alert('Ders programı mevcut değil.');
		return;
	}
	gln=ders[i].length;
	for (j=0; j<gln; j++){ // Beher gün
		x=ders[i][j][0]*71+11; if (!ie) x+=1;
		z1=ders[i][j][1]; if ((z1+'').substring(2,4)=='30') z1+=20;
		z2=ders[i][j][2]; if ((z2+'').substring(2,4)=='30') z2+=20;
		yy=(ie) ? 17 : 16;
		y=(z1-1000)/100*yy+yy;
		h=Math.round((z2-z1)/100*17)-3; if (!ie) h--;
		divler[nd]=document.createElement('div');
		divler[nd].id='tara'+nd;
		divler[nd].className='tara';
		divler[nd].style.left=x+'px';
		divler[nd].style.top=y+'px';
		divler[nd].style.height=h+'px';
		O('taralar').appendChild(divler[nd]);
		nd++;
	}
}

function ProgramKaldir(){
	l=divler.length;
	for (i=0; i<l; i++) O('taralar').removeChild(divler[i]);
	divler=[];
}

function Kay(){
	d.documentElement.scrollTop=390;
}

function GoogleMap(){
	if (GBrowserIsCompatible()){
		var map=new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());

		map.setCenter(new GLatLng(gCenterX,gCenterY),16);
		map.openInfoWindowHtml(new GLatLng(gLat[0],gLng[0]),gInfohtml[0]);
 
		function createMarker(point,number){
			var marker=new GMarker(point);
			GEvent.addListener(marker,"click",function(){marker.openInfoWindowHtml(gInfohtml[number]);});
			return marker;
		}

		l=gLat.length;
		for (i=0; i<l; i++){
			map.addOverlay(createMarker(new GLatLng(gLat[i],gLng[i]),i));
		}
	}
}



function Bulten(){
	if (pLA) return false;
	AjandaKapat();
	pLA=true;
	O('bulten').innerHTML='<div style="width:149px; height:38px; background:url(images/bg_eposta3.png); text-align:center; padding-top:11px;"><form name="fPL" action="bulten.php" onsubmit="if (this.eposta.value!=\'..e-posta adresiniz..\') return true; alert(\'E-posta adresini giriniz\'); return false;" method="post"><input name="eposta" class="i" style="border-width:1px 0 1px 0; font-size:11px; width:100px;" value="..e-posta adresiniz.." onclick="if (this.value==\'..e-posta adresiniz..\') this.value=\'\';"> <input type="submit" class="b" style="width:20px; height:16px;" value="»"></form></div>';
	setTimeout('d.fPL.eposta.focus()',100);
	return false;
}

function YT(dosya,width,height){P('<object width="'+width+'" height="'+height+'"><param name="movie" value="http://www.youtube.com/v/'+dosya+'></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/'+dosya+'" type="application/x-shockwave-flash" wmode="transparent" width="'+width+'" height="'+height+'"></embed></object>');}

function Ajanda(){
	S(O('divAjanda'));
	H(O('ajanda'));
	H(O('ajandaGun'));
	O('bulten').innerHTML='';
	pLA=false;
}

function AjandaKapat(){
	H(O('divAjanda'));
	S(O('ajanda'));
	S(O('ajandaGun'));
}

