// 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">&#35762;&#24231;</span>');
	$('#hover_text').html('&#35762;&#24231;&#28085;&#30422;&#21508;&#31181;&#21508;&#26679;&#30340;&#20027;&#39064;&#65292;&#21253;&#25324;&#35752;&#35770;&#26102;&#20107;&#12289;&#33521;&#22269;&#29983;&#27963;&#21644;&#25991;&#21270;&#65292;&#20197;&#21450;&#33521;&#35821;&#35821;&#35328;&#12290;');
	//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">&#19968;&#23545;&#19968;&#25945;&#23398;</span>');
	$('#hover_text').html('&#32769;&#24072;&#22312;&#21644;&#20320;&#21327;&#21830;&#20043;&#21518;&#20026;&#20320;&#24320;&#35774;&#37327;&#36523;&#23450;&#21046;&#30340;&#35838;&#31243;&#65292;&#22521;&#20859;&#20320;&#30340;&#33521;&#35821;&#35821;&#35328;&#25216;&#33021;&#12290;');
	//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">&#25351;&#23548;&#24335;&#23398;&#20064;</span>');
	$('#hover_text').html('&#32769;&#24072;&#20250;&#20026;&#20320;&#35268;&#21010;&#27599;&#21608;&#30340;&#20010;&#20154;&#23398;&#20064;&#35745;&#21010;&#65292;&#20320;&#29992;&#33258;&#24049;&#30340;&#26102;&#38388;&#23436;&#25104;&#12290;&#20320;&#21487;&#20197;&#22312;&#23398;&#20064;&#20013;&#24515;&#65292;&#20063;&#21487;&#20197;&#22312;&#23478;&#37324;&#23436;&#25104;&#23398;&#20064;&#35745;&#21010;&#12290;&#20320;&#30340;&#20986;&#21220;&#29575;&#20250;&#34987;&#35760;&#24405;&#19979;&#26469;&#65292;&#36827;&#24230;&#20063;&#20250;&#24471;&#21040;&#34913;&#37327;&#12290;');
	//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">&#24341;&#23548;&#24335;&#33258;&#23398;</span>');
	$('#hover_text').html('&#21033;&#29992;&#23398;&#20064;&#20013;&#24515;&#30340;&#21508;&#31181;&#23398;&#20064;&#26448;&#26009;&#21644;&#25945;&#24072;&#30340;&#24314;&#35758;&#12290;&#27599;&#38376;&#24341;&#23548;&#24335;&#23398;&#20064;&#30340;&#23398;&#26102;&#30001;&#26657;&#26041;&#25512;&#33616;&#65292;&#19981;&#36807;&#20854;&#20182;&#26102;&#20505;&#20320;&#20063;&#21487;&#20197;&#36827;&#20837;&#23398;&#20064;&#20013;&#24515;&#12290;');
	//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">&#22242;&#20307;&#25945;&#23398;</span>');
	$('#hover_text').html('&#21644;&#32769;&#24072;&#21450;&#21516;&#23398;&#19968;&#36215;&#19978;&#35838;&#12290;');
	//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';
}
