  
function openwin (winname, url, width, height)//½ºÅ©·Ñ¾ø´Â À©µµ¿ì
{
	WinFeatures='status=1,toolbar=0,width='+width+', height='+height;
	var a=window.open(url,winname,WinFeatures);
	a.focus();

	var i=(window.screen.width - width)/2;
	var j=(window.screen.height - height)/2;
	a.moveTo(i,j);

}

function openwin2 (winname, url, width, height)//½ºÅ©·ÑÀÖ´Â À©µµ¿ì
{

	WinFeatures='scrollbars=1,resizable,status=0,toolbar=0,width='+width+', height='+height;
	var a=window.open(url,winname,WinFeatures);
	a.focus();

	var i=(window.screen.width - width)/2;
	var j=(window.screen.height - height)/2;
	a.moveTo(i,j);

}


function openwin4 (user_id,winname, url, width, height)
{
	if (user_id == '')
	{
		alert('·Î±×ÀÎ ÈÄ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù.');
		return;
	}
	WinFeatures='scrollbars=0,status=1,toolbar=0,width='+width+', height='+height;
	var a=window.open(url,winname,WinFeatures);
	a.focus();

	var i=(window.screen.width - width)/2;
	var j=(window.screen.height - height)/2;
	a.moveTo(i,j);
}


function openwin5 (winname, url, width, height) //½ºÄÚ·ÑÀÌ ÀÖ´Â »çÀÌÁî °íÁ¤Ã¢
{
	WinFeatures='scrollbars=1,resizable=0,status=0,toolbar=0,width='+width+', height='+height;
	var a=window.open(url,winname,WinFeatures);
	a.focus();

	var i=(window.screen.width - width)/2;
	var j=(window.screen.height - height)/2;
	a.moveTo(i,j);
}

function moveto(width, height)
{
	i=(window.screen.width - width)/2;
	j=(window.screen.height - height)/2;
	self.moveTo(i,j);
}

function resizewin (width, height)
{
	self.resizeTo(width,height);
	i=(window.screen.width - width)/2;
	j=(window.screen.height - height)/2;
	self.moveTo(i,j);
	self.focus();
}


function ModelessDialog(url, width, height)                                             
{
 showModelessDialog(url,window,"status:false; center: Yes;dialogWidth:"+width+"px;dialogHeight:"+height+"px");
}



//°³³ä°­ÀÇ
function CoursePlayer ( style, cid, mid  )
{
	var width=920;
	var height=730;
	var posx=0;
	var posy=0;  
	
	posx = (screen.width-width)/2;
	posy = (screen.height-height)/2;
	
	position = "width="+width+",height="+height+",scrollbars=no,status=yes";
	url = "/MathZocbo2/Common/player/CMoviePlayer.asp?style="+style+"&cid="+cid+"&mid="+mid;;
	var player =window.open(url,'player',position);
	player.focus();

}




//¹®Á¦Ç®ÀÌ µ¿¿µ»ó Search
function Munjeplayer(MunJeCode)
{
	var width=725;
    var height=730;
    var posx=0;
    var posy=0;

    posx = (screen.width-width)/2-1;
    posy = (screen.height-height)/2-1;

	position = "titlebar=no,toolbar=no,directories=no,status=no,menubar=no,"
							+ "scrollbars=no,resizable=no,width=" + width + ",height=" + height + ",left=" + posx + ",top=" + posy;

	var popup01=window.open('/MathZocbo2/Common/Include/MovePlayer.asp?MunJeCode='+MunJeCode,'popup',position);

}



//°ü¸®ÀÚ  
function APlayer(mmsUrl)
{
	var strFeatures;
	var poup_url;
	var width=725;
    var height=730;
    var posx=0;
    var posy=0;

    posx = (screen.width-width)/2-1;
    posy = (screen.height-height)/2-1;

	poup_url = '/MathZocbo2/Common/Include/APlayer.asp?mmsURL='+mmsUrl;
	strFeatures = " titlebar=no,toolbar=no,directories=no,status=no,menubar=no,"
							+ "scrollbars=no,resizable=no,width=" + width + ",height=" + height + ",left=" + posx + ",top=" + posy;							

	window.open(poup_url, 'popup', strFeatures);

}


// ¸¶·ç °³³ä °­ÀÇ
function CNPlayer ( style, cid, mid  )
{
	if (cid == '' || mid == '' ){
		alert('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=725;
	var height=730;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/MathZocbo2/Common/Include/CMovePlayer.asp?style="+style+"&cid="+cid+"&mid="+mid;
	var player =window.open(url,'player',position);
	player.focus();

}


// ¸¶·ç °³³ä °­ÀÇ URL
function MMSPlayer ( mmsUrl  )
{
	if (mmsUrl = "" )
	{
			alert('µ¿¿µ»ó Á¤º¸°¡ ¾ø½À´Ï´Ù.');return;
	}
	var strFeatures;
	var poup_url;
	var width=725;
    var height=730;
    var posx=0;
    var posy=0;

    posx = (screen.width-width)/2-1;
    posy = (screen.height-height)/2-1;

	poup_url = '/MathZocbo2/Common/Include/APlayer.asp?mmsURL='+mmsUrl;
	strFeatures = " titlebar=no,toolbar=no,directories=no,status=no,menubar=no,"
							+ "scrollbars=no,resizable=no,width=" + width + ",height=" + height + ",left=" + posx + ",top=" + posy;							

	window.open(poup_url, 'popup', strFeatures);

}


// ¸¶·ç »ùÇÃ °­ÀÇ cid
function MarooSamplePlayer ( cid  )
{

	if (  GetSampleUrl(cid) == '')	{
			alert('µ¿¿µ»ó Á¤º¸°¡ ¾ø½À´Ï´Ù.');
			return;
	}

	var strFeatures;
	var poup_url;
	var width=725;
    var height=730;
    var posx=0;
    var posy=0;

    posx = (screen.width-width)/2-1;
    posy = (screen.height-height)/2-1;

	poup_url = '/MathZocbo2/Common/Include/SamplePlayer.asp?cid='+cid;
	strFeatures = " titlebar=no,toolbar=no,directories=no,status=no,menubar=no,"
							+ "scrollbars=no,resizable=no,width=" + width + ",height=" + height + ",left=" + posx + ",top=" + posy;							

	window.open(poup_url, 'popup', strFeatures);
}



// ¸¶·ç °³³ä °­ÀÇ ÇÃ·¹ÀÌ¾î
function MarooCPlayer ( style , cid  )
{
	if (cid == ''  ){
		alert('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=925;
	var height=730;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/NaeSin/Player/MarooCPlayer.asp?style="+style+"&cid="+cid;
	var player =window.open(url,'player',position);
	player.focus();

}




function GetSampleUrl(cid)
{
	var xdDoc, xhHTTP, sXML;
	var returnvalue;

	sXML = '<function>';
	sXML += '<name>GetSampleUrl</name>';
	sXML += '<param1>'+cid+'</param1>';
	sXML += '<param2></param2>';
	sXML += '<param3></param3>';
	sXML += '<param4></param4>';
	sXML += '<param5></param5>';
	sXML += '<param6></param6>';
	sXML += '</function>';

	xhHTTP = new ActiveXObject ("MSXML2.XMLHTTP");
	xhHTTP.open ("POST","/NaeSin/VodLec/inc/code_wsc.asp",false);
	xhHTTP.setRequestHeader ("SOAPAction","Search");
	xhHTTP.send(sXML);

	xdDoc = new ActiveXObject("Msxml.DOMDocument");
	xdDoc = xhHTTP.responseXML;

	if (xdDoc.documentElement.nodeName == "error")
	{
		alert("error");
	}
	else
	{
		 returnvalue = xdDoc.selectSingleNode("/return/value").text;
	}

	return returnvalue;
}







// ÆÐÅ°Áö °­ÀÇ µ¿¿µ»ó ÇÃ·¹ÀÌ¾î
function PPlayer ( style , cid , mid  , co_code  )
{
	if (cid == '' || mid == ''  ){
		alert('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=935;
	var height=730;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
//	url = "/NaeSin/Player/Player.asp?style="+style+"&cid="+cid+"&mid="+mid+"&co_code="+co_code;
	url = "/NaeSin/Player/MarooPPlayer.asp?style="+style+"&cid="+cid+"&mid="+mid+"&co_code="+co_code;
	var player =window.open(url,'player',position);
	player.focus();

}





//»ùÇÃ ¼±»ý´Ô ¼Ò°³
function SPlayer(mmsurl)
{
	if (mmsurl == ''  ){
		alert('ÁØºñµÈ µ¿¿µ»óÀÌ ¾ø½À´Ï´Ù.');return;
	}

	var width=715;
	var height=720;
	var posx=0;
	var posy=0;  

    posx = (screen.width-width)/2-1;
    posy = (screen.height-height)/2-1;


	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = '/NaeSin/Player/SPlayer.asp?mms='+mmsurl;
	var player =window.open(url,'player',position);
	player.focus();
}



//  °³³ä°­ÀÇ  ¸ÞÀÎ  ³»¿ë  ÇÃ·¹ÀÌ¾î
function NPlayer ( style , cid ,  co_code  )
{
	if (cid == ''  ){
		alert('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=715;
	var height=720;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/NaeSin/Player/NPlayer.asp?style="+style+"&cid="+cid+"&co_code="+co_code;
	var player =window.open(url,'player',position);
	player.focus();

}


//  ¼öÇÐÀÇ Á·º¸ ¸ÞÀÎ ³»¿ë ÇÃ·¹ÀÌ¾î
function MPlayer ( style , cid , mid , co_code  )
{
	if (cid == ''  ){
		alert('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=715;
	var height=720;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/NaeSin/Player/MPlayer.asp?style="+style+"&cid="+cid+"&mid="+mid+"&co_code="+co_code;
	var player =window.open(url,'player',position);
	player.focus();

}



//¼öÇÐÀÇ °í¼ö ÇÃ·¹ÀÌ¾î
function Player ( style, cid , mid , co_code )
{

	if (cid == ''  || mid == ''){
		alert('µ¿¿µ»óÀÌ ¾÷·Îµå ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=725;
	var height=730;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/NaeSin/Player/Player.asp?style="+style+"&cid="+cid+"&mid="+mid+"&co_code="+co_code;
	var player =window.open(url,'player',position);
	player.focus();

}


//KMO ÇÃ·¹ÀÌ¾î
function KPlayer ( style,  mid , co_code )
{

	if ( mid == ''){
		alert('µ¿¿µ»óÀÌ ¾÷·Îµå ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=725;
	var height=730;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/NaeSin/Player/KPlayer.asp?style="+style+"&mid="+mid+"&co_code="+co_code;
	var player =window.open(url,'player',position);
	player.focus();

}


function MyPageNPlayer ( style , cid , co_code  )
{
	if (cid == ''  ){
		alert('¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.');return;
	}

	var width=715;
	var height=720;
	var posx=0;
	var posy=0;  

	posx = (screen.width-width)/2-1;
	posy = (screen.height-height)/2-1;
				  
	position = "width="+width+",height="+height+",scrollbars=no,top="+posy+",left="+posx+",status=yes";
	url = "/NaeSin/Player/MyPageNPlayer.asp?style="+style+"&cid="+cid+"&co_code="+co_code;
	var player =window.open(url,'player',position);
	player.focus();

}


function OpenBook()
{
    var width=400;
    var height=480;
	var cookieId = "book";
	var url = '/NaeSin/VodLec/popup_book.asp';

	posx = (screen.width-width)/2-1;
    posy = (screen.height-height)/2-1;
	popup_Day(url, cookieId, width, height, '0',posx, posy, cookieId);
}

