function openwindowtocenter( url, winName, width, height) 
{
	xposition=0; yposition=0;
	if ((parseInt(navigator.appVersion) >= 4 ))
	{
	  //xposition = (screen.width - width) / 2;
	  xposition = (window.screen.availWidth - width) / 2;
	  yposition = (window.screen.availWidth - height) / 2;
	}
	yposition = 0;
	  theproperty= "width=" + width + "," 
	+ "height=" + height + "," 
	+ "location=0," 
	+ "menubar=0,"
	+ "resizable=1,"
	+ "scrollbars=yes,"
	+ "status=0," 
	+ "titlebar=0,"
	+ "toolbar=0,"
	+ "hotkeys=0,"
	+ "screenx=" + xposition + "," 
	+ "screeny=" + yposition + "," 
	+ "left=" + xposition + "," 
	+ "top=" + yposition; 
	window.open( url,winName,theproperty );
}
function openOutSideTeacher(us_id){
   var URL = "TeacherPoolManageControl?flag=privateinfo&us_id="+us_id;	
   openwindowtocenter(URL,"",600,500); 
}
function _openCourse(gd_id) {
	var URL = "LessonPoolManageControl?flag=LessonsDetail&gd_id="+gd_id;
	openwindowtocenter(URL,"",500,500);
} 
function _openLesson(ls_id) {
	var URL = "LessonPoolManageControl?flag=LessonsDetail&ls_id="+ls_id;	
	openwindowtocenter(URL,"",500,500);
} 
function _openLessonPackage(ls_id) {
	var URL = "LessonPoolManageControl?flag=LessonPackageDetail&ls_id="+ls_id;	
	openwindowtocenter(URL,"",500,500);
} 
function tuserDetailList(id) {
	var URL = "PrivateInfoManageControl?flag=list2&userid="+id;
	openwindowtocenter(URL,"",690,480);
} 
function openTrainingClass(tc_id,type) {
	var URL = "TrainingClassDetailList.jsp?flag=list&tc_id="+tc_id+"&type="+type;
	openwindowtocenter(URL,"",690,480);
}
function openwindowtocenterDefault( url, winName) {
	openwindowtocenter(url, winName, window.screen.availWidth-8,window.screen.availHeight-35);
}
//进入课堂
function _enterCourse(le_id,tl_id,type,tc_id,isStation,isEnty){
	var URL = "LessonStudyControl?flag=study&tl_id="+tl_id+"&le_id="+le_id+"&isStation="+isStation+"&tc_id="+tc_id+"&type="+type+"&isEnty="+isEnty;
	openwindowtocenterDefault(URL,"");
}
//老师进入课堂
function _enterCourse_Tea(le_id,tl_id,type,tc_id){
	var URL = "LessonStudyControl?flag=teach&tl_id="+tl_id+"&le_id="+le_id+"&type="+type+"&tc_id="+tc_id;
	openwindowtocenterDefault(URL,"");
}
