
//ÆË¾÷ ************************************************************************************************************
function popup(popupPage, popupName, wid, hei, lefts, tops, scroll, resizable){
	if ( notice_getCookie( popupName ) != "done" ){
		window.open(popupPage, popupName,'width='+wid+',height='+hei+',left='+lefts+',top='+tops+',marginwidth=0,marginheight=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scroll+',resizable='+resizable);
	} 
}

function notice_getCookie( name ){
	var nameOfCookie = name + "=";
	var x = 0;
	while ( x <= document.cookie.length ){
		var y = (x+nameOfCookie.length);
		if ( document.cookie.substring( x, y ) == nameOfCookie ) {
			if ( (endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
				endOfCookie = document.cookie.length;
			return unescape( document.cookie.substring( y, endOfCookie ) );
		}
		x = document.cookie.indexOf( " ", x ) + 1;
		if ( x == 0 )
			break;
	}
	return "";
}

function toDateString() { //formatTime(date)
	var date = new Date();
    var year  = date.getFullYear();
    var month = date.getMonth() + 1; // 1¿ù=0,12¿ù=11ÀÌ¹Ç·Î 1 ´õÇÔ
    var day   = date.getDate();

    if (("" + month).length == 1) { month = "0" + month; }
    if (("" + day).length   == 1) { day   = "0" + day;   }
	
    return ("" + year + month + day );
}


//popup(ÆäÀÌÁö¸í, ÆË¾÷¸í, °¡·Î, ¼¼·Î, °¡·ÎÀ§Ä¡, ¼¼·ÎÀ§Ä¡, ½ºÅ©·Ñ : yes,no, È®´ë : yes,no)
//secCode - Á÷¿µ¿©ºÎ, usrCode - °­»ç¿©ºÎ

//ÆË¾÷¼³Á¤ - ÃÊµîºÎ *************************************************************************************************

function elePopup(strCkAcaSeq,strCkUserSeq,secCode,usrCode,levelCode){

	var popupUrl = "kps.koreapolyschool.com";
	var popupPage;	

		// 2011 PSSA ¾È³»
		if ("20110322" < toDateString() && toDateString() <= "20110429") {
			if (strCkAcaSeq == "0801001" ){				
					popupPage = '/popup/20110323/popup110323_sp.asp';
					popup('http://' + popupUrl + popupPage,'pop110323_sp','450','378','50','10','no','no');
				
			}else{
					popupPage = '/popup/20110323/popup110323.asp';
					popup('http://' + popupUrl + popupPage,'pop110323','563','532','50','10','no','no');

			}
		}


	if (strCkAcaSeq == '0601003' || strCkAcaSeq == '0512001')
	{	
		popupPage = '/popup/20101111/popup101111.asp';
		popup('http://' + popupUrl + popupPage,'pop52','460','550','600','10','no','no');
	}

	// ¸¶Æ÷, ¼ºµ¿, ºÐ´çÀº IEWC Á¦¿Ü
	/*
	if(strCkAcaSeq != "0611002" && strCkAcaSeq != "0605001" && strCkAcaSeq != "0711002" && strCkAcaSeq != "0601013"){
		if(strCkAcaSeq == "0801001"){		
			popupPage = '/popup/20110715_IEWC/popup110715_sp.asp';
			popup('http://' + popupUrl + popupPage,'pop110715_sp','480','728','530','10','yes','no');
		}else {
			popupPage = '/popup/20110715_IEWC/popup110715.asp';
			popup('http://' + popupUrl + popupPage,'pop110715','480','728','550','10','yes','no');
		}
	}
	*/
	
	// E-poly °áÁ¦ ¾È³» ÆË¾÷
	/*
	if(strCkAcaSeq == "0801001"){
		popupPage = '/popup/20110805/popup110805_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20110805','480','380','10','10','no','no');	
	}
	else{
		popupPage = '/popup/20110805/popup110805.asp';
		popup('http://' + popupUrl + popupPage,'pop20110805','480','380','10','10','no','no');
	}
*/



	if(strCkAcaSeq == "0601012" || strCkAcaSeq == "0701003" || strCkAcaSeq == "0601002" || strCkAcaSeq == "0602001" || strCkAcaSeq == "0706001"){
		popupPage = '/popup/20111109_gm/popup111109_gm.asp';
		popup('http://' + popupUrl + popupPage,'pop20111109','592','551','400','10','no','no');
	}
	
	if ("20111223" <= toDateString() && toDateString() <= "20111225" && strCkAcaSeq != "0801001") {
		popupPage = '/popup/20111223/popup111223.asp';
		popup('http://' + popupUrl + popupPage,'pop20111223','570','330','10','10','no','no');
	}

	if ("20111223" <= toDateString() && toDateString() <= "20111225" && strCkAcaSeq == "0801001") {
		popupPage = '/popup/20111223/popup111223_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20111223','570','250','10','10','no','no');
	}

	// ½Å³âÀÎ»ç
	if ("20111227" <= toDateString() && toDateString() <= "20120113") {
		popupPage = '/popup/20111227/popup111227.asp';
		popup('http://' + popupUrl + popupPage,'pop20111227','397','490','10','10','no','no');
	}
	
	// 2012³â 1ÇÐ±â µî·Ï ÆË¾÷
	if (strCkAcaSeq == "0801001")
	{
		popupPage = '/popup/20120201/popup120201_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20120201_sp','470','360','10','10','no','no');
	}
	else {
		popupPage = '/popup/20120201/popup120201.asp';
		popup('http://' + popupUrl + popupPage,'pop20120201','470','360','10','10','no','no');
	}
	
	popupPage = '/popup/20120201/popup120201_2.asp';
	popup('http://' + popupUrl + popupPage,'pop20120201_2','350','420','510','10','no','no');
}



//popup(ÆäÀÌÁö¸í, ÆË¾÷¸í, °¡·Î, ¼¼·Î, °¡·ÎÀ§Ä¡, ¼¼·ÎÀ§Ä¡, ½ºÅ©·Ñ : yes,no, È®´ë : yes,no)
//secCode - Á÷¿µ¿©ºÎ, usrCode - °­»ç¿©ºÎ

//ÆË¾÷¼³Á¤ - À¯Ä¡ºÎ *************************************************************************************************

function kinPopup(strCkAcaSeq,strCkUserSeq,secCode,usrCode){

	var popupUrl = "kps.koreapolyschool.com";
	var popupPage;

	if ("20111223" <= toDateString() && toDateString() <= "20111225" && strCkAcaSeq != "0801001") {
		popupPage = '/popup/20111223/popup111223.asp';
		popup('http://' + popupUrl + popupPage,'pop20111223','570','330','10','10','no','no');
	}

	if ("20111223" <= toDateString() && toDateString() <= "20111225" && strCkAcaSeq == "0801001") {
		popupPage = '/popup/20111223/popup111223_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20111223','570','250','10','10','no','no');
	}

	// ½Å³âÀÎ»ç
	if ("20111227" <= toDateString() && toDateString() <= "20120113") {
		popupPage = '/popup/20111227/popup111227.asp';
		popup('http://' + popupUrl + popupPage,'pop20111227','397','490','10','10','no','no');
	}

	if (strCkAcaSeq == "0801001" && toDateString() <= "20120131")
	{
		popupPage = '/popup/20120118/popup120118_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20120118_sp','470','385','10','10','no','no');
	}
	else if (toDateString() <= "20120131"){
		popupPage = '/popup/20120118/popup120118.asp';
		popup('http://' + popupUrl + popupPage,'pop20120118','470','385','10','10','no','no');
	}

	// ¼öÁö º°µµ ¿äÃ» ÆË¾÷ °ÔÀç
	if (strCkAcaSeq == "0601008"){
		popupPage = '/popup/20120131/popup120131.asp';
		popup('http://' + popupUrl + popupPage,'pop20120131','500','525','10','10','no','no');
		popupPage = '/popup/20120131/popup120131_2.asp';
		popup('http://' + popupUrl + popupPage,'pop20120131_2','400','328','530','10','no','no');
		popupPage = '/popup/20120131/popup120131_3.asp';
		popup('http://' + popupUrl + popupPage,'pop20120131_3','400','329','955','10','no','no');
	}


}


//popup(ÆäÀÌÁö¸í, ÆË¾÷¸í, °¡·Î, ¼¼·Î, °¡·ÎÀ§Ä¡, ¼¼·ÎÀ§Ä¡, ½ºÅ©·Ñ : yes,no, È®´ë : yes,no)

//ÆË¾÷¼³Á¤ - ETI, MPOLY *************************************************************************************************

function mPolyPopup(strCkAcaSeq,strCkUserSeq,secCode,usrCode){

	var popupUrl = "kps.koreapolyschool.com";
	var popupPage;
	
	
	// 2011³â 2ÇÐ±â E-Poly °áÁ¦ ¾È³» ÆË¾÷
	if ("20110607" <= toDateString() && toDateString() <= "20110715")
	{
		popupPage = '/popup/20110530/popup110530.asp';
		popup('http://' + popupUrl + popupPage,'pop20110530','430','420','10','10','no','no');
	}	 
	

	// 2011 PSSA ¾È³»
	if ("20110322" < toDateString() && toDateString() <= "20110429") {
		popupPage = '/popup/20110323/popup110323.asp';
		popup('http://' + popupUrl + popupPage,'pop110323','563','532','78','10','no','no');
	}

	// Àü»ê ÀÛ¾÷ ¾È³» ÆË¾÷
	if ("20110724" < toDateString() && toDateString() < "20110730") {
		popupPage = '/popup/20110725/popup110725.asp';
		popup('http://' + popupUrl + popupPage,'pop20110725','500','480','10','10','no','no');
	}
	

	if(strCkAcaSeq == "0601012" || strCkAcaSeq == "0701003" || strCkAcaSeq == "0601002" || strCkAcaSeq == "0602001" || strCkAcaSeq == "0706001"){
		popupPage = '/popup/20111109_gm/popup111109_gm.asp';
		popup('http://' + popupUrl + popupPage,'pop20111109','592','551','400','10','no','no');
	}


	if ("20111223" <= toDateString() && toDateString() <= "20111225" && strCkAcaSeq != "0801001") {
		popupPage = '/popup/20111223/popup111223.asp';
		popup('http://' + popupUrl + popupPage,'pop20111223','570','330','10','10','no','no');
	}

	if ("20111223" <= toDateString() && toDateString() <= "20111225" && strCkAcaSeq == "0801001") {
		popupPage = '/popup/20111223/popup111223_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20111223','570','250','10','10','no','no');
	}

	// ½Å³âÀÎ»ç
	if ("20111227" <= toDateString() && toDateString() <= "20120113") {
		popupPage = '/popup/20111227/popup111227.asp';
		popup('http://' + popupUrl + popupPage,'pop20111227','397','490','10','10','no','no');
	}

	if (strCkAcaSeq == "0801001" && toDateString() <= "20120131")
	{
		popupPage = '/popup/20120118/popup120118_sp.asp';
		popup('http://' + popupUrl + popupPage,'pop20120118_sp','470','385','10','10','no','no');
	}
	else if (toDateString() <= "20120131"){
		popupPage = '/popup/20120118/popup120118.asp';
		popup('http://' + popupUrl + popupPage,'pop20120118','470','385','10','10','no','no');
	}

	
}

function mPolyPopup_2(strCkAcaSeq,strCkUserSeq,secCode,usrCode){
	var popupUrl = "kps.koreapolyschool.com";
	var popupPage;	

	
	// ±¸¹Ì ½Å±Ô Ä·ÆÛ½º È«º¸
	/*
	if ("20110914" < toDateString() && toDateString() <= "20111030") {
		popupPage = '/popup/20110915/popup111018_MPOLY.asp';
		popup('http://' + popupUrl + popupPage,'pop20111018','342','397','530','10','no','no');
	}
	*/

	
}


function mPolyPopup1(strCkAcaSeq,strCkUserSeq,secCode,usrCode){

	var popupUrl = "kps.koreapolyschool.com";
	var popupPage;
	
	//MÆú¸® ½ÃÀÛ½Ã ÆË¾÷ 2010-06-28

	   popupPage = '/popup/20100126/popup100126.asp';
	   popup('http://' + popupUrl + popupPage,'pop31','400','250','0','0','no','no');

	
}

//popup(ÆäÀÌÁö¸í, ÆË¾÷¸í, °¡·Î, ¼¼·Î, °¡·ÎÀ§Ä¡, ¼¼·ÎÀ§Ä¡, ½ºÅ©·Ñ : yes,no, È®´ë : yes,no)

//ÆË¾÷¼³Á¤ - FLI *************************************************************************************************

function fliPopup(strCkAcaSeq,strCkUserSeq,secCode,usrCode){

	var popupUrl = "kps.koreapolyschool.com";
	var popupPage;

  
}






