// JavaScript Document
var Xcoord = 270;
var Ycoord;
var x = 1;

//returns the width of the browser

function GetWidth()
{
        var x = 0;
        if (self.innerHeight)
        {
                x = self.innerWidth;
        }
        else if (document.documentElement && document.documentElement.clientHeight)
        {
                x = document.documentElement.clientWidth;
        }
        else if (document.body)
        {
                x = document.body.clientWidth;
      	}
		return x;
};

function lectures(e){
	Ycoord = e.pageY - 60;
	MidWidth = GetWidth() / 2;
	Xcoord = ((window.Event) ? e.pageX : event.clientX) - MidWidth + 475; //position of event - MidWidth + 520(half of template width)
	//Xcoord = e.pageX / 2;
	obj = 'hover_box';
	document.getElementById(obj).style.top = Ycoord + "px";
	document.getElementById(obj).style.left = Xcoord + "px";
	//alert('fired' + Ycoord + ' ' + Xcoord + " X = " + x);
	//alert(x);
	$('#hover_heading').html('<span style="color:#66cc00">Dersler</span>');
	$('#hover_text').html('Bunlar g&uuml;ncel geli&#351;melerden Britanya ya&#351;am&#305; ile k&uuml;lt&uuml;r&uuml;ne ve &#304;ngilizce diline kadar bir&ccedil;ok de&#287;i&#351;ik konuyu kapsar.');
	//if (x%2 == 0) {setYLVisible(obj);}
	if (document.getElementById(obj).style.visibility = 'hidden'){		
	setYLVisible(obj);
	};
	x= x+1;	
};

function one2one(e){
	Ycoord = e.pageY - 60;
	MidWidth = GetWidth() / 2;
	Xcoord = ((window.Event) ? e.pageX : event.clientX) - MidWidth + 475; //position of event - MidWidth + 520(half of template width)
	//Xcoord = e.pageX / 2;
	obj = 'hover_box';
	document.getElementById(obj).style.top = Ycoord + "px";
	document.getElementById(obj).style.left = Xcoord + "px";
	//alert('fired' + Ycoord + ' ' + Xcoord + " X = " + x);
	//alert(x);
	$('#hover_heading').html('<span style="color:#ffcc00">1&rsquo;e 1 ders</span>');
	$('#hover_text').html('Bir &ouml;&#287;retmen &#304;ngilizcenizi geli&#351;tirmek i&ccedil;in size dan&#305;&#351;arak ve size &ouml;zel bir program haz&#305;rlar.');
	//if (x%2 == 0) {setYLVisible(obj);}
	if (document.getElementById(obj).style.visibility = 'hidden'){	
	setYLVisible(obj);
	};
	x= x+1;	
};

function dstudy(e){
	Ycoord = e.pageY - 60;
	MidWidth = GetWidth() / 2;
	Xcoord = ((window.Event) ? e.pageX : event.clientX) - MidWidth + 475; //position of event - MidWidth + 520(half of template width)
	//Xcoord = e.pageX / 2;
	obj = 'hover_box';
	document.getElementById(obj).style.top = Ycoord + "px";
	document.getElementById(obj).style.left = Xcoord + "px";
	//alert('fired' + Ycoord + ' ' + Xcoord + " X = " + x);
	//alert(x);
	$('#hover_heading').html('<span style="color:#ff0099">Y&ouml;nlendirilmi&#351; &ccedil;al&#305;&#351;ma</span>');
	$('#hover_text').html('&Ouml;&#287;retmeniniz her hafta kendinize ait zaman&#305;n&#305;zda tamamlaman&#305;z amac&#305;yla sizin i&ccedil;in ki&#351;iselle&#351;tirilmi&#351; bir &ccedil;al&#305;&#351;ma program&#305; belirleyecektir.  Bunu &ccedil;al&#305;&#351;ma merkezinde veya evde tamamlayabilirsiniz.  Devaml&#305;l&#305;&#287;&#305;n&#305;z kaydedilecek ve ilerlemeniz &ouml;l&ccedil;&uuml;lecektir.');
	//if (x%2 == 0) {setYLVisible(obj);}
	if (document.getElementById(obj).style.visibility = 'hidden'){	
	setYLVisible(obj);
	};
	x= x+1;
};

function gstudy(e){
	Ycoord = e.pageY - 60;
	MidWidth = GetWidth() / 2;
	Xcoord = ((window.Event) ? e.pageX : event.clientX) - MidWidth + 475; //position of event - MidWidth + 520(half of template width)
	//Xcoord = e.pageX / 2;
	obj = 'hover_box';
	document.getElementById(obj).style.top = Ycoord + "px";
	document.getElementById(obj).style.left = Xcoord + "px";
	//alert('fired' + Ycoord + ' ' + Xcoord + " X = " + x);
	//alert(x);
	$('#hover_heading').html('<span style="color:#339966">Rehberlik e&#351;li&#287;inde &ccedil;al&#305;&#351;ma</span>');
	$('#hover_text').html('&Ccedil;al&#305;&#351;ma merkezindeki &ccedil;e&#351;itli &ouml;&#287;renim materyalleri ve &ouml;&#287;retmenlerin tavsiyelerinden yararlan&#305;n.  Her kurs i&ccedil;in rehberlik ile ders &ccedil;al&#305;&#351;ma saatleri bizim &ouml;nerimiz olup &ccedil;al&#305;&#351;ma merkezinden di&#287;er zamanlarda da yararlanabilirsiniz.');
	//if (x%2 == 0) {setYLVisible(obj);}
	if (document.getElementById(obj).style.visibility = 'hidden'){	
	setYLVisible(obj);
	};
	x= x+1;
};

function group(e){
	Ycoord = e.pageY - 60;
	MidWidth = GetWidth() / 2;
	Xcoord = ((window.Event) ? e.pageX : event.clientX) - MidWidth + 475; //position of event - MidWidth + 520(half of template width)
	//Xcoord = e.pageX / 2;
	obj = 'hover_box';
	document.getElementById(obj).style.top = Ycoord + "px";
	document.getElementById(obj).style.left = Xcoord + "px";
	//alert('fired' + Ycoord + ' ' + Xcoord + " X = " + x);
	//alert(x);
	$('#hover_heading').html('<span style="color:#ff6600">Grup dersleri</span>');
	$('#hover_text').html('Zaman&#305;n&#305;z s&#305;n&#305;fta &ouml;&#287;retmeninizle ve &ouml;&#287;renci arkada&#351;lar&#305;n&#305;zla ge&ccedil;er.');
	//if (x%2 == 0) {setYLVisible(obj);}
	if (document.getElementById(obj).style.visibility = 'hidden'){	
	setYLVisible(obj);
	};
	x= x+1;
	};






function setDim (id_d, h) {  
document.getElementById(id_d).style.height=h + "px";
//alert("setDim Fired");
}

function getDim (id) {  
document.getElementById(id).style.height="auto";
// match box models
if (document.all) {
gh = document.getElementById(id).offsetHeight+10;
}
else {
gh = document.getElementById(id).offsetHeight;
}

if (/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)){
	//alert("isIE");
	h = gh-30;
}
else {	
h = gh-20;
}

//alert ("getDim fired h = " + h);


switch (id)
{
	case "hover_box":
	setDim("hover_box_l", h);
	setDim("hover_box_r", h);
	break;
	
}

}



function setYLVisible(obj)
{
	getDim(obj);
	obj = document.getElementById(obj);
	obj.style.visibility = (obj.style.visibility == 'visible') ? 'hidden' : 'visible';
}
