



//var g_imgsvr = "http://bongbu.anyfinder.co.kr/";
var g_imgDirectory = "/uploadImg/";


function winopen(){ 
//¿µ¹® ÀÔ»çÁö¿ø
var targeturl="https://www2.dsemi.com/kor/career/apply_e_1.asp" // ÀüÃ¼È­¸éÀ¸·Î ¿­¾îÁÙ ÆäÀÌÁö 
newwin=window.open("","","scrollbars") // ½ºÅ©·Ñ¹Ù¸¸ »ý±â°Ô ÇÕ´Ï´Ù 
if (document.all){ 
newwin.moveTo(0,0) 
newwin.resizeTo(screen.width,screen.height) 
} 
newwin.location=targeturl 
} 

function winopenKor(skcABC){ 
//ÇÑ±Û ÀÔ»çÁö¿ø
var targeturl="http://www2.dsemi.com/kor/career/apply_t_1.asp?skcABC=" + skcABC // ÀüÃ¼È­¸éÀ¸·Î ¿­¾îÁÙ ÆäÀÌÁö 
newwin=window.open("","","scrollbars") // ½ºÅ©·Ñ¹Ù¸¸ »ý±â°Ô ÇÕ´Ï´Ù 
if (document.all){ 
newwin.moveTo(0,0) 
newwin.resizeTo(screen.width,screen.height) 
} 
newwin.location=targeturl 
} 

function chkShowNHideOne(obj){
	if(obj.style.display == "none"){
		idDisplayBlock(obj);
	}else{
		idDisplayNone(obj);
	}
}

function idDisplayBlock(obj){
	obj.style.display = "block";
	//inline?
}
function idDisplayNone(obj){
	obj.style.display = "none";
}

function idDisplayBlockNone(objBlock,objNone){

	if(objNone.value == "Á÷Á¢ÀÔ·Â"){
		objNone.style.width=0;
		//objBlock.value = "";
		objBlock.style.visibility = "visible";
		objNone.style.visibility = "hidden";
	}else{
		objBlock.value = objNone.value;
	}
}

function idVisibilityVisible(obj){
	obj.style.visibility = "visible";
}
function idVisibilityHidden(obj){
	obj.style.visibility = "hidden";
}

// popup
function NewWindow(u,n,w,h,f,p,x,y){
	var	ws=window.screen?1:0,
	m=Math,C='center',R='random',M='custom',
	sw=screen.availWidth,
	sh=screen.availHeight,
	T=(p==C&&ws)?(sh-h)/2:(p==R&&ws)?(m.floor(m.random()*(sh-h))):(p==M)?y:100,
	L=(p==C&&ws)?(sw-w)/2:(p==R&&ws)?(m.floor(m.random()*(sw-w))):(p==M)?x:100,
	s='width='+w+',height='+h+',top='+T+',left='+L;s+=(!f||f=='')?'':','+f+',status=yes';win=window.open(u,n,s);if(win.focus)win.focus();
	return win;
}


//ÇÁ¸°Æ® °ú·Ã======================================================
/*
var initBody
function beforePrint()
{ 
alert("11");
initBody = document.body.innerHTML; 
alert("22");
document.body.innerHTML = idPrint.innerHTML; 
alert("33");
} 
function afterPrint()
{ 
	alert("44");
document.body.innerHTML = initBody; 
} 
function printArea()
{ 
beforePrint(); 
window.print(); 

afterPrint();
} 


//¿ø·¡ ¼Ò½º
var initBody
function beforePrint()
{ 
initBody = document.body.innerHTML; document.body.innerHTML = idPrint.innerHTML; 
} 
function afterPrint()
{ 
document.body.innerHTML = initBody; 
} 
function printArea()
{ 
window.print(); 
} 
window.onbeforeprint = beforePrint; 
window.onafterprint = afterPrint; 
*/
///////////////////////////////////////////////////////////////////


function total_search(frm) {

	if(frm.svc_4.value=="") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.");
		frm.svc_4.focus();
		return false;
	}
	
	return true;
}



function changeFrameHeight(){
	self.resizeTo(document.body.scrollWidth,document.body.scrollHeight);
}

function deleteONE(url, target){
	if( !confirm("»èÁ¦ÇÏ°Ú½À´Ï±î?") ){
		return false;
	}
	if(target == ""){
		location.replace(url);
	}else{
		eval(target).location.replace(url);
	}

}
function pop_addr(url){
	NewWindow(url,'pop_addr1',350,296,'scrollbars=no,resizable=no','center');
}
function pop_findPASS(){
	NewWindow('/oral/mypage/pop_findPASS.asp','pop_findPASS1',444,299,'scrollbars=no,resizable=no','center');
}

function pop_findID(){
	NewWindow('/oral/mypage/pop_findID.asp','pop_findID1',444,269,'scrollbars=no,resizable=no','center');
}

function loginPopup(){
	NewWindow('/oral/mypage/pop_login.asp','loginPopup1',444,277,'scrollbars=no,resizable=no','center');
}

function pop_interview(ARTIST_IDX,selNUM){
	NewWindow('/oral/archive/interview_list.asp?svc_9=' + ARTIST_IDX + '&selNUM=' + selNUM,'pop_interview1',912,600,'scrollbars=no,resizable=no','center');

}

function pop_memberAgree(){
	NewWindow('/agri/members/agreement2.asp','pop_memberAgree2',720,520,'scrollbars=no,resizable=no','center');

}

function addrcheckSkc(fieldpostnum,fieldaddr,fieldaddr2  ) {
		var dest = "/agri/members/addrchk.asp?fieldpostnum=" + fieldpostnum + "&fieldaddr=" + fieldaddr + "&fieldaddr2=" + fieldaddr2;
		NewWindow(dest,'ADDWin',500,290,'scrollbars=yes,resizable=no','center');
		//newWin = window.open(dest, "ADDWin", "scrollbars=yes,toolbar=no,location=no,directories=no,width=500,height=290,resizable=no,mebar=no,left=250,top=65");
		//newWin.focus();
	}

function pop_goods_inquiry(shop_idx){
	NewWindow('/agri/ebiz/goods_inquiry_pop.asp?shop_idx=' + shop_idx,'pop_goods_inquiry1',605,630,'scrollbars=no,resizable=no','center');
}


//ÇÃ·¡½¬µî È°¼ºÈ­¸¦ À§ÇÏ¿©
function docWrite(ID){
	document.write(document.getElementById(ID).value);
}




function divinit(f){
	var allheight = document.body.scrollHeight //  + parseInt(document.body.clientHeight) ;
	var allwidth = document.body.scrollWidth	 // + parseInt(document.body.clientWidth) ;
	f.style.width=allwidth; 
	f.style.height=allheight ;
}







function radioBoxCheck(frm,len){
var rrvalue = false;
	for(var i = 0;i<len;i++){	
		if (frm.rpoint[i].checked){
			rrvalue = true; break;
		}
	}
	return rrvalue;
}

//ÂÊÁöµî¿¡¼­ ÀüÃ¼¼±ÅÃ ¹öÆ°°ú ¿¬°á
function selectAllCheck(frm,fsname) {
	var fname = frm;
	if(fname.checkAll.value == "N"){
		fname.checkAll.value = "Y"
		checkVal = true;
	}else if(fname.checkAll.value == "Y"){
		fname.checkAll.value = "N"
		checkVal = false;
	}
	for (var i = 0; i < fname.elements.length; i++) {
		if (fname.elements[i].name == fsname) {
			fname.elements[i].checked = checkVal ;
		}
	}
}
//ÂÊÁöµî¿¡¼­ Ã¼Å©¹Ú½º°¡ ¼±ÅÃÀÌ µÇ¾ú´ÂÁö ¾ÈµÇ¾ú´ÂÁö¸¦ È®ÀÎÇÑ´Ù.

function checkboxCheck(frm,fsname){
	    var fname = frm;
		var isCheck = false;
		for (var i = 0; i < fname.elements.length; i++) {
			if (fname.elements[i].name == fsname && fname.elements[i].checked == true) {
				isCheck = true;
				break;
			}
		}

		return isCheck;
}


//·Î±×¾Æ¿ôÃ³¸®
function goLogoutPage(){
	top.main.location.href="/LogOut.jam";
	//top.footer.location.href="/blank.htm";
}



//ÄíÅ°°ü·Ã
function setCookie( name, value, expiredays ){
	var todayDate = new Date();
	todayDate.setDate( todayDate.getDate() + expiredays );
	document.cookie = name + "=" + escape( value ) + "; path=/; expires=" + todayDate.toGMTString() + ";"
	//var cs = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() : "") + ( (domain) ? "; domain=" + domain : "") + ( (secure) ? "; secure" : "");
}


function 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 getDelayDay(day) {
	expires = new Date();
	expires.setTime(expires.getTime() + 24 * 60 * 60 * day * 1000);
	return expires;
}

function deleteCookie (name) {
	document.cookie = name + "=";
}


//ÄíÅ°°ü·Ã ³¡






// ÀÌ¹ÌÁö¸¦ ¿øº»»çÀÌÁî·Î »õÃ¢ ¶ç¿öÁÖ±â
function showPicture(src) { 
	
	if(src != ""){
		var imgObj = new Image(); 
				imgObj.src = src; 
				//alert(imgObj.height);
		var wopt = "scrollbars=yes,status=no,resizable=yes"; 
				wopt += ",width=" + imgObj.width; 
				wopt += ",height=" + imgObj.height; 
		var wbody = "<head><title>¿øº»»çÁøÀÌ¹ÌÁö</title>"; 
				wbody += "<script language='javascript'>"; 
				wbody += "function finalResize(){"; 
				wbody += " var oBody=document.body;"; 
				wbody += " var oImg=document.images[0];"; 
				wbody += " var xdiff=oImg.width-oBody.clientWidth;"; 
				wbody += " var ydiff=oImg.height-oBody.clientHeight;"; 
				wbody += " window.resizeBy(xdiff,ydiff);"; 
				wbody += "}"; 
				wbody += "</"+"script>"; 
				wbody += "</head>"; 
				wbody += "<body onLoad='finalResize()' style='margin:0'>"; 
				wbody += "<a href='javascript:window.close()'><img src='" + src + "' border=0></a>"; 
				wbody += "</body>"; 
				
			//winResult = window.open("about:blank","imageShowAll__",wopt); 
			winResult = NewWindow("about:blank","imageShowAll__",wopt,'center');
			winResult.document.open("text/html", "replace"); 
			winResult.document.write(wbody); 
			winResult.document.close(); 
		return; 
	}else{
		alert('ÀÌ¹ÌÁö°¡ ¾ø½À´Ï´Ù.');
	}
} 










//±ÛÀÚ¼ö Ç¥Çö-----------------------------------------------------------------

var TOG_WORD				= '%0D';

//º¯¼öÀÇ ±æÀÌ¸¦ Ã¼Å©ÇÏ¿© 80byte°¡ ³ÑÀ¸¸é ±æÀÌ¸¦ Àß¶óÁØ´Ù.
function checkMsgLen(obj,sByteLen) {
	var iCounts = new Array();
	iCounts = getByteLen(obj);											//º¯¼öÀÇ ±æÀÌ¸¦ ±¸ÇÏ´Â ÇÔ¼ö
	if (iCounts[0] > sByteLen)
		return false;
	else
		return true;
}

//´Ü¹®¸Þ½ÃÁö¿¡¼­ ¸Þ½ÃÁöÀÇ ±æÀÌ¸¦ Ã¼Å©ÇÏ°í Â¥¸£´Â ÇÔ¼ö
function checkShrtMsgLen(obj,sByteLen,countObj) {
	//alert("aacc");
	var bResult		= checkMsgLen(obj,sByteLen);
	var iCountByte	= 0;
	var sContentMsg	= '';
	if (!bResult){		
		alert(sByteLen + "¹ÙÀÌÆ®¸¦ ÃÊ°úÇÏ¿´½À´Ï´Ù.");
		sContentMsg = cutText(obj,sByteLen);
		obj.value = sContentMsg;
		obj.focus();
		return false;
	}else{
		return true;
	}
	
	
}


//ÇÑ±ÛÀÏ °æ¿ì¿¡´Â 2byte¸¦ ±×¿ÜÀÇ ¹®ÀÚ´Â 1byte·Î °è»êÇÏ¿©  iCounts¿¡ ÀúÀåÇÏ¿© return ÇØÁØ´Ù.
function getByteLen(obj,sMsgLng) {

	var sMsg       = obj.value;
	var sTmpMsg    = '';												//¸Þ½ÃÁö¸¦ ÀÓ½Ã·Î ÀúÀåÇÏ´Â º¯¼ö
	var sTmpMsgLen = 0;													//ÀÓ½Ã·Î ÀúÀåµÈ ¸Þ½ÃÁöÀÇ ±æÀÌ¸¦ ÀúÀåÇÏ´Â º¯¼ö
	var sOneChar   = '';												//ÇÑ¹®ÀÚ¸¦ ÀúÀåÇÏ´Â º¯¼ö
	var iCounts    = new Array();										//ÃÑ ¹ÙÀÌÆ®¿Í ÆäÀÌÁö´ç ¹ÙÀÌÆ® ¼ö¸¦ ÀúÀåÇÏ´Â ¹è¿­

	iCounts[0]=0;														//ÃÑ ¹ÙÀÌÆ®¸¦ ÀúÀå ÇÏ´Â º¯¼ö

	if (sMsgLng != null) {
		sTmpMsg	= new String(sMsgLng);
	}
	else
		sTmpMsg	= new String(sMsg);
	sTmpMsgLen	= sTmpMsg.length;

	for (k = 0 ;k < sTmpMsgLen ;k++) {
		sOneChar = sTmpMsg.charAt(k);
		if (escape(sOneChar) == TOG_WORD) {
			iCounts[0]++;
		}
		else if (escape(sOneChar).length > 4) {
			iCounts[0] += 2;
		}
		else  {
			iCounts[0]++;
		}
	}

	return iCounts;
}

//80¹ÙÀÌÆ® ÀÌ»ó µÇ¸é º¯¼öÀÇ ±æÀÌ¸¦ ÀÚ¸£´Â ÇÔ¼ö
function cutText(obj,sByteLen) {

	var sTmpMsg			= '';
	var iTmpMsgLen		= 0;
	var sOneChar		= '';
	var iCount			= 0;
	var sOneCharNext	= '';

	sTmpMsg = new String(obj.value);
	iTmpMsgLen = sTmpMsg.length;

	for (var k = 0 ;k < iTmpMsgLen ; k++) {
		sOneChar = sTmpMsg.charAt(k);
		sOneCharNext = sTmpMsg.charAt(k+1);
		if (escape(sOneChar) == TOG_WORD) {
			iCount++;
			if (iCount > sByteLen-1) {
				sTmpMsg = sTmpMsg.substring(0,k);
				break;
			}
		}
		else if (escape(sOneChar).length > 4) {
			iCount += 2;
		}
		else {
			iCount++;
		}
		if (iCount > sByteLen) {
			sTmpMsg = sTmpMsg.substring(0,k);
			break;
		}
	}
	return sTmpMsg;
}

//±ÛÀÚ¼ö Ç¥Çö-----------------------------------------------------------------


/*ÄÄ¸¶Âï±â*/
function goComma(num) 
{ 
	var mod = 0;
	var output = 0;
	num = '' + num;
	if (num.length > 3) {
		mod = num.length % 3;
		output = (mod > 0 ? (num.substring(0,mod)) : '');
		for (i=0 ; i < Math.floor(num.length / 3); i++) {
			if ((mod == 0) && (i == 0))
				output += num.substring(mod+ 3 * i, mod + 3 * i + 3);
			else
				output+= ',' + num.substring(mod + 3 * i, mod + 3 * i + 3);
		}
		return (output);
	}
	else {
		return num;
	}
} 

/*ÄÄ¸¶ »©±â*/
function goCommaDel(num) 
{ 
	return num.replace(",","");
} 





//Å¸°ÙÀ» Ã£À¸¸é ¿ÀÇÂ³Ê ÀÌµ¿, ¾Æ´Ï¸é window.open
function goMainTargetWin(url){
	//alert(opener.name);
	try{
		if(typeof(opener.top.main)=='object'){
			opener.top.main.location.href=url;
			//alert("mainÀÌ¿¡¿ä");			
		}else if(typeof(opener.opener.top.main)=='object'){
			opener.opener.top.main.location.href=url;
		}else if(typeof(opener.opener.opener.top.main)=='object'){
			opener.opener.opener.top.main.location.href=url;
		}else if(typeof(opener.opener.opener.opener.top.main)=='object'){
			opener.opener.opener.opener.top.main.location.href=url;
		}else{
			goNewWin(url);
		}
	} catch (e){
		 //alert ("code:" + e.number +",¼³¸í:" + e.description);
		goNewWin(url);
	}
	window.close();
}


// ************************** URL ÀÎÄÚµù ****************************
function UrlEncode(url) // ¾ÏÈ£È­µ¥ÀÌÅÍ¸¦ À§ÇÑ ÀÚ¹Ù½ºÅ©¸³Æ® UrlEncode
{
	//jurl = encodeURI(jurl); 
	url  = url.split("%").join("%25");
	url  = escape(url);
	url  = url.split("&").join("%26");
	url  = url.split("~").join("%7E");
	url  = url.split("#").join("%23");
	url  = url.split("$").join("%24");
	url  = url.split("(").join("%28");
	url  = url.split(")").join("%29");
	url  = url.split("=").join("%3D");
	url  = url.split("+").join("%2B");
	url  = url.split("/").join("%2F");
	url  = url.split("?").join("%3F");
	url  = url.split("/").join("%2F");
	url  = url.split(";").join("%3B");
	url  = url.split("'").join("%27");
	url  = url.split('"').join("%22");
	url  = url.split(",").join("%2C");
	url  = url.split("<").join("%3C");
	url  = url.split(">").join("%3E");
	url  = url.split("|").join("%7C");

	//url  = url.split("\r\n").join("%13%10");

	return url;
}


function fileCheck(obj, maxSize) {
	if(maxSize == null){
		maxSize = 10240	//10mb
	}
	var objSrc = obj.value
	if(obj.value.isNull()){
		return true;
	}

	pathpoint = objSrc.lastIndexOf('.');
	filepoint = objSrc.substring(pathpoint+1,objSrc.length);
	filetype = filepoint.toLowerCase();

	
	

	if(filetype=='jpg' || filetype=='gif' || filetype=='png' || filetype=='jpeg' || filetype=='bmp') {
		//document.all.update_image_view.innerHTML = "<img src='" + objSrc + "' width='180' height='120' >";
		
		document.all.preImg.src = objSrc;
		var imgPreSize = document.all.preImg.fileSize;
		//alert(imgPreSize);
		if (imgPreSize > maxSize*1024) {
			alert(maxSize + "KB ÀÌÇÏÀÇ ÆÄÀÏ¸¸ ¾÷·Îµå ÇÒ ¼ö ÀÖ½À´Ï´Ù. (ÇöÀç" + parseInt(imgPreSize/1024) + "KB)\n´Ù½Ã È®ÀÎÇØ ÁÖ½Ã±â ¹Ù¶ø´Ï´Ù.");
			//obj.value = "";
			obj.focus();
			return false;
		}
	} else {
		alert('ÀÌ¹ÌÁö ÆÄÀÏ¸¸ ¾÷·Îµå ÇÒ ¼ö ÀÖ½À´Ï´Ù.');
		obj.focus();
		//obj.value = "";
		return false;
	}
	
	return true;
}



//alert.js
/* alert ¶ç¿ì°í ÁÖ¾îÁø°÷À¸·Î focus */
function isNullAlertFocus(obj,msg){		
	if( obj.value.isNull() ){
		AlertFocus(obj,msg)
		return true;
	}else{
		return false;
	}
}

function isNullNoAlert(obj){		
	if( obj.value.isNull() ){
		return true;
	}else{
		return false;
	}
}

function AlertFocus(obj,msg){
	alert(msg);
	obj.focus();
}

/*
function isNullCheckAlertFocus(obj,len,msg){
	var rrvalue = false;
	for(var i = 0;i< len;i++){	
		if (obj[i].checked){
			rrvalue = true; break;
		}
	}
	if(rrvalue != true) {
		AlertFocus(obj,msg)
		return;
	}
}
*/

//ÀÔ·Â ½Ã ¼ýÀÚ¸¸ °¡´ÉÇÏµµ·Ï ÇÑ´Ù.
//inputÅ×±×¿¡ ÇÑ±ÛÀ» ÀÔ·ÂÇÒ ¼ö ¾øµµ·Ï style='ime-mode:disabled;' Ã³¸®ÇÑ ÈÄ
//onKeyPress="onlyInputNumber();"·Î È£ÃâÇÑ´Ù. ¿£ÅÍ¿¡ ÀÇÇÑ °ª Àü¼ÛÀº °¡´ÉÇÔ
function onlyInputNumber(){
	if ( (event.keyCode < 48 && event.keyCode !=13) || event.keyCode > 57) {
		event.returnValue = false;
		alert("¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä");
	}
}


// À¯È¿ÇÑ(Á¸ÀçÇÏ´Â) ¿ù(êÅ)ÀÎÁö Ã¼Å©
function isValidMonth(mm) {
    var m = parseInt(mm,10);
    return (m >= 1 && m <= 12);
}


// À¯È¿ÇÑ(Á¸ÀçÇÏ´Â) ÀÏ(ìí)ÀÎÁö Ã¼Å©
function isValidDay(yyyy, mm, dd) {
    var m = parseInt(mm,10) - 1;
    var d = parseInt(dd,10);

    var end = new Array(31,28,31,30,31,30,31,31,30,31,30,31);
    if ((yyyy % 4 == 0 && yyyy % 100 != 0) || yyyy % 400 == 0) {
        end[1] = 29;
    }

    return (d >= 1 && d <= end[m]);
}


//¼ýÀÚ¿¡ ÄÞ¸¶ Âï±â======================================================
function addComma(obj,fLen)
{ 

	if(event.keyCode == 37 || event.keyCode == 39 ) 
	{                                              
	   return;
	}

	var fLen = fLen || 2; 


	var strValue = obj.value.replace(/,|\s+/g,'');
	var strBeforeValue = (strValue.indexOf('.') != -1)? strValue.substring(0,strValue.indexOf('.')) :strValue ;
	var strAfterValue  = (strValue.indexOf('.') != -1)? strValue.substr(strValue.indexOf('.'),fLen+1) : '' ;


	if(isNaN(strValue))
	{
	   alert(strValue.concat(' -> ¼ýÀÚ°¡ ¾Æ´Õ´Ï´Ù.'));
		obj.value = "";
	   return false;
	}


	var intLast =  strBeforeValue.length-1;


	var arrValue = new Array;
	var strComma = '';

	for(var i=intLast,j=0; i >= 0; i--,j++)
	{ 
		  
		   if( j !=0 && j%3 == 0) 
		   {   
			   strComma = ',';
		   }
		   else
		   {
			   strComma = '';
		   }
		  
		   
		   arrValue[arrValue.length] = strBeforeValue.charAt(i) + strComma  ;
	}

									   

	obj.value=  arrValue.reverse().join('') +  strAfterValue; 

}
///////////////////////////////////////////////////////////////////








/* ½ºÆäÀÌ½º¹Ù, ÅÇ, ¿£ÅÍ µîÀÇ null °ªÀÎÁö Ã¼Å© */
String.prototype.isNull = function() {
	var thisv = this;
	for (; thisv.indexOf(" ") != -1 ; )	thisv = thisv.replace(" ","");	//½ºÆäÀÌ½º
	for (; thisv.indexOf("	") != -1 ; )	thisv = thisv.replace("	","");	//ÅÇ
	for (; thisv.indexOf("\r\n") != -1 ; )	thisv = thisv.replace("\r\n","");	//¿£ÅÍ
	if( thisv.length > 0 ) return false;
	else return true;
}

/* ¼ýÀÚ·Î¸¸ ±¸¼ºµÇ¾îÀÖ´ÂÁö Ã¼Å© */
String.prototype.isNumber = function() {
	/*var i;
	for(i=0; i < this.length; i++) {
		if ("0123456789".indexOf( this.substring(i, i+1)) < 0) {
			return false;
		}
	}
	return true;
	*/
	if( this.search(/^[0-9]{1,}$/) > -1) return true;
	else return false;
}

/* 4ÀÚ¸® ³âµµ(1000 ~ 2999) ÀÎÁö Ã¼Å©ÇÕ´Ï´Ù. */
String.prototype.isYear = function() {
	if( this.search(/^[1-2]{1}[0-9]{3}$/) > -1) return true;
	else return false;
}

/* ³â¿ùÀÏ(19750819)Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù */
String.prototype.isDate = function() {
	if( this.search(/^[1-2]{1}[0-9]{3}[0-1]{1}[0-9]{1}[0-3]{1}[0-9]{1}$/) > -1) return true;
	else return false;
}

/* ³â¿ùÀÏ(1975-08-19)Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù */
String.prototype.isDate2 = function() {
	//alert(this.substring(9,2));
	if( this.search(/^[1-2]{1}[0-9]{3}\-[0-1]{1}[0-9]{1}\-[0-3]{1}[0-9]{1}$/) > -1 && this.substr(5,2)!="00" && this.substr(8,2)!="00" ) return true;
	else return false;
}

/* ID Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù. */
String.prototype.isID = function() {
	if( this.search(/^[A-Za-z0-9_-]{1,}$/) < 0 || this.isNull() || this.toLowerCase().indexOf("oraksil") > -1 || this.toLowerCase().indexOf("oracsil") > -1 || this.toLowerCase().indexOf("orakcil") > -1 || this.toLowerCase().indexOf("oragsil") > -1 || this.toLowerCase().indexOf("oragcil") > -1 || this.toLowerCase().indexOf("administrat") > -1 || this.toLowerCase().indexOf("gameadmin") > -1 || this.toLowerCase().indexOf("oraksiladmin") > -1 || this.toLowerCase().indexOf("oragciladmin") > -1 || this.toLowerCase().indexOf("oragsiladmin") > -1 || this.toLowerCase().indexOf("orakciladmin") > -1 || this.toLowerCase().indexOf("oracsiladmin") > -1 || this.toLowerCase().indexOf("admin") > -1 || this.toLowerCase().indexOf("administ") > -1 || this.toLowerCase().indexOf("administer") > -1 || this.toLowerCase().indexOf("webmast") > -1 || this.toLowerCase().indexOf("webmaster") > -1 || this.toLowerCase().indexOf("webmasta") > -1 || this.toLowerCase().indexOf("gamemaster") > -1 || this.toLowerCase().indexOf("gamemast") > -1 || this.toLowerCase().indexOf("gamemasta") > -1 || this.toLowerCase().indexOf("game_admin") > -1 || this.toLowerCase().indexOf("gameadmin") > -1 || this.toLowerCase().indexOf("emotion") > -1 || this.toLowerCase().indexOf("e_motion") > -1 || this.toLowerCase().indexOf("supervisor") > -1 || this.toLowerCase().indexOf("manager") > -1) return false;
	else return true;
}

String.prototype.isID222 = function() {
	if( this.search(/^[A-Za-z0-9_-]{1,}$/) < 0 || this.isNull() ) return false;
	else return true;
}

/* PassWord Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù. */
String.prototype.isPW = function() {
	if( this.search(/^[A-Za-z0-9_\-\!@#]{1,}$/) < 0 || this.isNull() ) return false;
	else return true;
}

/* ÀÌ¸ÞÀÏ Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù. */
String.prototype.isEmail = function() {
	if( this.search(/[A-Za-z0-9_\-]{1,}@[A-Za-z0-9_\-]{1,}\.[A-Za-z]{1,}$/) > -1 ) return true;
	else if( this.search(/[A-Za-z0-9_]{1,}@[A-Za-z0-9_-]{1,}\.[A-Za-z]{2,}\.[A-Za-z]{2,}$/) > -1 ) return true;
	else return false;
}

/* ÀüÈ­¹øÈ£ Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù. (02-1234-5678) */
String.prototype.isPhone = function() {
	if( this.search(/^0[0-9]{1,3}\-[0-9]{2,4}\-[0-9]{4}$/) > -1 ) return true;
	else return false;
}

/* ÇÚµåÆù ¹øÈ£ Çü½Ä¿¡ ¸Â´ÂÁö Ã¼Å©ÇÕ´Ï´Ù. (016-123-4567) */
String.prototype.chkcp = function() {
	if( this.search(/^01[16790]{1}\-[0-9]{3,4}\-[0-9]{4}$/) > -1 ) return true;
	else return false;
}

/*Html °Ë»ç*/
String.prototype.isHtml = function() {
	if( this.search(/(<){1}(\/)?font(\s*)(\S*)(>){1}/gi) > -1 || this.search(/(<){1}(\/)?img(\s*)(\S*)(>){1}/gi) > -1 || this.search(/(<){1}(\/)?a(\s*)(\S*)(>){1}/gi) > -1) return false;
	else return true;
}

/* ÁÖ¹Îµî·Ï¹øÈ£¸¦ Ã¼Å©ÇÕ´Ï´Ù. (123456-1234567)*/
String.prototype.chkjumin = function() {
	var ssn_first, ssn_second;
	var chk_sum = 0, ii, dbl_num = 2, n_num, rem;
	
	if( this.search(/^[0-9]{6}\-[1-4][0-9]{6}$/) > -1 ) {
		ssn_first = parseInt( this.substring(0,1) );
		ssn_second = parseInt( this.substring(7,8) );
		
		if( ( (ssn_first > 0) && ((ssn_second > 0) && (ssn_second < 3)) ) 
		 || ( (ssn_first == 0) && ((ssn_second > 2) && (ssn_second < 5)) ) ) {
			for( ii = 0; ii < 13; ii++) {
				if(ii != 6) {
					if(dbl_num > 9) { dbl_num = 2; }
					n_num = parseInt( this.substring(ii, ii+1) );
					chk_sum += dbl_num * n_num;
					dbl_num++;
				}
			}
			rem = (11 - (chk_sum % 11)) % 10;

			if( rem == parseInt(this.substring(13,14)) ) { return true; }
			else { return false; }
			
		} else { return false; }
	} else { return false; }
}



var NUM = "0123456789";	
var SALPHA = "abcdefghijklmnopqrstuvwxyz";
var ALPHA = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"+SALPHA;
var EMAIL = "!#$%&*+-./=?@^_`{|}"+NUM+ALPHA;
var PASSWORD = "!@.#,$%^*&_-" + ALPHA + NUM;
var ERRORMSG = "";
var WSPACE  = " \f\r\n\t\v";
var WENTER2  = "\r\n\r\n";	//¿£ÅÍ2¹ø(¿£ÅÍ3¹øÀ» ¿£ÅÍ2¹øÀ¸·Î ¹Ù²Þ)
var WENTER3  = "\r\n\r\n\r\n"; //¿£ÅÍ3¹ø
var BPROCESSING = 0;
var WAPDEFAULTTOTAL = "\"\\\$#\t\"'";
var WAPDEFAULTTOTALCR = "\"\\\/$#\t\"'";
var WAPDEFAULTTOTALNCR = "\"\\\/$#\t\"'";
var WAPDEFAULTTOTALCRZZOKJI = "\"\\\/$#\t\"'";
var WAPDEFAULTTOTALALERT = "\\\,',$,#,\" ÀÎ½ÄÇÒ ¼ö ¾ø´Â Æ¯¼ö¹®ÀÚ,TabÅ°µî";
var WAPDEFAULTTOTALALERTCR = "\\\,',/,$,#,\" ÀÎ½ÄÇÒ ¼ö ¾ø´Â Æ¯¼ö¹®ÀÚ,TabÅ°µî";
var WAPDEFAULTTOTALALERTCRZZOKJI = "\\\,',/,$,#,\" ÀÎ½ÄÇÒ ¼ö ¾ø´Â Æ¯¼ö¹®ÀÚ,TabÅ°µî";
var WAPDEFAULTTOTALNCRALERT = "\\\,',/,$,#,\" ÀÎ½ÄÇÒ ¼ö ¾ø´Â Æ¯¼ö¹®ÀÚ,Enter,TabÅ°µî";

function CheckBAN (s,ban) {
	var i;
	for(i=0; i<s.length; i++) {
		if (ban.indexOf( s.substring(i, i+1)) >= 0) {
			return false;
		}
	}

	return true;
}

/*
if(!CheckBAN(WhisperContents.value,WAPDEFAULTTOTAL)){
				alert("Ã¤ÆÃ±Û¿¡ ÀÔ·ÂÇÒ ¼ö ¾ø´Â ¹®ÀÚ ["+WAPDEFAULTTOTALALERT+"] °¡ ÀÖ½À´Ï´Ù.");
				WhisperContents.focus();
				return false;	
			}



*/





function setsubcategory(subcategory, index, firstValue, firstText, arrValue) {
	//alert("½ÃÀÛ");
	selectCnt = subcategory[0].length;
	//alert(selectCnt);
		if (selectCnt == null) {
			
				listcount = subcategory.length;

				for (i = 0; i < listcount; i++) {
					subcategory.options[0] = null;
				}

				if (index < 1) {
					subcategory.options[0] = new Option(firstText, firstValue);
				} else {
					for (i = 0; i <= arrValue[index-1].length; ++i) {
						//alert(arrValue[index-1][i-1][1]);
						var options;
						if (i == 0) {
							options = new Option(firstText, firstValue);
						} else {
							options = new Option( arrValue[index-1][i-1][1], arrValue[index-1][i-1][0] );
						}
						subcategory.options[i] = options;
					}
				}
				return;
		}

		selectCnt = subcategory.length;

		for (x = 0; x < selectCnt; x++) {

			listcount = subcategory[x].length;

			for (i = 0; i < listcount; i++) {
				subcategory[x].options[0] = null;
			}

			if (index < 1) {
				subcategory[x].options[0] = new Option(firstText, firstValue);
			} else {
				for (i = 0; i <= arrValue[index-1].length; ++i) {
					var options;
					if (i == 0) {
						options = new Option(firstText, firstValue);
					} else {
						options = new Option( arrValue[index-1][i-1][1], arrValue[index-1][i-1][0] );
					}
					subcategory[x].options[i] = options;
				}
			}
		
		}
}


function setSelectedIndexValue(selectObj, selValue)
{
	var i;

	for (i=0; i < selectObj.length; i++)
	{
		if (selValue == selectObj.options[i].value)
		{
			selectObj.selectedIndex = i;
			break;
		} 
	}
}



//°íÁ¤µÈ height=110¿¡¼­ ³ÐÀÌ°¡ 110À» ³ÑÀ¸¸é ³ÐÀÌ¸¦ 110À¸·Î ÇÏ°í ³ôÀÌ¸¦ ÁÙÀÓ
function AutoResize(objImg,MaxWidth) {
	var nowWidth = objImg.width;
    if(nowWidth > MaxWidth) {
		objImg.height-=objImg.height*(nowWidth-MaxWidth)/nowWidth;
		objImg.width=MaxWidth;     
		//objImg.width='100';     
		
    }

}

//°íÁ¤µÈ width=110¿¡¼­ ³ôÀÌ°¡ 110À» ³ÑÀ¸¸é ³ôÀÌ¸¦ 110À¸·Î ÇÏ°í ³ÐÀÌ¸¦ ÁÙÀÓ
function AutoResizeHeight(objImg,MaxHeight) {
	var nowHeight = objImg.height;
    if(nowHeight > MaxHeight) {
		objImg.width-=objImg.width*(nowHeight-MaxHeight)/nowHeight;
		objImg.height=MaxHeight;     
		//objImg.width='100';     
		
    }

}



function view_movie(Lo,W,H){
document.write('<OBJECT id=MPlayer name=wm_01 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95 width="'+W+'" height="'+H+'" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" height=230 VIEWASTEXT>');
document.write('<PARAM NAME="AudioStream" VALUE="-1">');
document.write('<PARAM NAME="AutoSize" VALUE="-1">');
document.write('<PARAM NAME="AutoStart" VALUE="-1">');
document.write('<PARAM NAME="AnimationAtStart" VALUE="0">');
document.write('<PARAM NAME="AllowScan" VALUE="1">');
document.write('<PARAM NAME="AllowChangeDisplaySize" VALUE="1">');
document.write('<PARAM NAME="AutoRewind" VALUE="1">');
document.write('<PARAM NAME="Balance" VALUE="0">');
document.write('<PARAM NAME="BaseURL" VALUE="">');
document.write('<PARAM NAME="BufferingTime" VALUE="5">');
document.write('<PARAM NAME="CaptioningID" VALUE="">');
document.write('<PARAM NAME="ClickToPlay" VALUE="0">');
document.write('<PARAM NAME="CursorType" VALUE="0">');
document.write('<PARAM NAME="CurrentPosition" VALUE="-1">');
document.write('<PARAM NAME="CurrentMarker" VALUE="0">');
document.write('<PARAM NAME="DefaultFrame" VALUE="">');
document.write('<PARAM NAME="DisplayBackColor" VALUE="0">');
document.write('<PARAM NAME="DisplayForeColor" VALUE="16777215">');
document.write('<PARAM NAME="DisplayMode" VALUE="0">');
document.write('<PARAM NAME="DisplaySize" VALUE="0">');
document.write('<PARAM NAME="Enabled" VALUE="-1">');
document.write('<PARAM NAME="EnableContextMenu" VALUE="0">');
document.write('<PARAM NAME="EnablePositionControls" VALUE="-1">');
document.write('<PARAM NAME="EnableFullScreenControls" VALUE="1">');
document.write('<PARAM NAME="EnableTracker" VALUE="1">');
document.write('<PARAM NAME="InvokeURLs" VALUE="-1">');
document.write('<PARAM NAME="Language" VALUE="-1">');
document.write('<PARAM NAME="Mute" VALUE="0">');
document.write('<PARAM NAME="PlayCount" VALUE="1">');
document.write('<PARAM NAME="PreviewMode" VALUE="1">');
document.write('<PARAM NAME="Rate" VALUE="1">');
document.write('<PARAM NAME="SAMILang" VALUE="">');
document.write('<PARAM NAME="SAMIStyle" VALUE="">');
document.write('<PARAM NAME="SAMIFileName" VALUE="">');
document.write('<PARAM NAME="SelectionStart" VALUE="-1">');
document.write('<PARAM NAME="SelectionEnd" VALUE="-1">');
document.write('<PARAM NAME="SendOpenStateChangeEvents" VALUE="-1">');
document.write('<PARAM NAME="SendWarningEvents" VALUE="-1">');
document.write('<PARAM NAME="SendErrorEvents" VALUE="-1">');
document.write('<PARAM NAME="SendKeyboardEvents" VALUE="0">');
document.write('<PARAM NAME="SendMouseClickEvents" VALUE="1">');
document.write('<PARAM NAME="SendMouseMoveEvents" VALUE="0">');
document.write('<PARAM NAME="SendPlayStateChangeEvents" VALUE="-1">');
document.write('<PARAM NAME="ShowCaptioning" VALUE="0">');
document.write('<PARAM NAME="ShowControls" VALUE="1">');
document.write('<PARAM NAME="ShowAudioControls" VALUE="1">');
document.write('<PARAM NAME="ShowDisplay" VALUE="0">');
document.write('<PARAM NAME="ShowGotoBar" VALUE="false">');
document.write('<PARAM NAME="ShowPositionControls" VALUE="-1">');
document.write('<PARAM NAME="ShowStatusBar" VALUE="1">');
document.write('<PARAM NAME="ShowTracker" VALUE="1">');
document.write('<PARAM NAME="TransparentAtStart" VALUE="-1">');
document.write('<PARAM NAME="VideoBorderWidth" VALUE="0">');
document.write('<PARAM NAME="VideoBorderColor" VALUE="255">');
document.write('<PARAM NAME="VideoBorder3D" VALUE="-1">');
document.write('<PARAM NAME="Volume" VALUE="-480">');
document.write('<PARAM NAME="WindowlessVideo" VALUE="-1">');
document.write('</OBJECT>');
}

/*
HTMLElement.prototype.insertAdjacentElement = function(where,parsedNode){ 
	switch (where){ 
		case 'beforeBegin': 
			this.parentNode.insertBefore(parsedNode,this) 
			break; 
		case 'afterBegin': 
			this.insertBefore(parsedNode,this.firstChild); 
			break; 
		case 'beforeEnd': 
			this.appendChild(parsedNode); 
			break; 
		case 'afterEnd': 
			if (this.nextSibling) this.parentNode.insertBefore(parsedNode,this.nextSibling); 
			else this.parentNode.appendChild(parsedNode); 
			break; 
	} 
} 

HTMLElement.prototype.insertAdjacentHTML = function(where,htmlStr) { 
	var r = this.ownerDocument.createRange(); 
	r.setStartBefore(this); 
	var parsedHTML = r.createContextualFragment(htmlStr); 
	this.insertAdjacentElement(where,parsedHTML) 
}     


HTMLElement.prototype.insertAdjacentText = function(where,txtStr){ 
	var parsedText = document.createTextNode(txtStr) 
	this.insertAdjacentElement(where,parsedText) 
} 
*/






var request;

function createRequest() {
  try {
    request = new XMLHttpRequest();
  } catch (trymicrosoft) {
    try {
      request = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (othermicrosoft) {
      try {
        request = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (failed) {
        request = false;
      }
    }
  }

  if (!request)
    alert("Error initializing XMLHttpRequest!");
}

function getCustomerInfo(selDate) {
	createRequest();
     //var phone = document.getElementById("phone").value;
     //var url = "/skcj/xmlHttpCall.asp?phone=" + escape(phone);
	 var url = "/skcj/xmlHttpCall.asp?selDate=" + escape(selDate);
     request.open("GET", url, true);
     request.onreadystatechange = updatePage;
     request.send(null);

/*

var xmlString = "<profile>" +
    "  <firstName>" + escape(firstName) + "</firstName>" +
    "  <lastName>" + escape(lastName) + "</lastName>" +
    "  <street>" + escape(street) + "</street>" +
    "  <city>" + escape(city) + "</city>" +
    "  <state>" + escape(state) + "</state>" +
    "  <zip-code>" + escape(zipCode) + "</zip-code>" +
    "</profile>";


// Open a connection to the server
  xmlHttp.open("POST", url, true);

  // Tell the server you're sending it XML
  xmlHttp.setRequestHeader("Content-Type", "text/xml");

  // Set up a function for the server to run when it's done
  xmlHttp.onreadystatechange = confirmUpdate;

  // Send the request
  xmlHttp.send(xmlString);

*/
}




function getCustomerInfo(selDate) {
	createRequest();
     //var phone = document.getElementById("phone").value;
     //var url = "/skcj/xmlHttpCall.asp?phone=" + escape(phone);
	 var url = "/skcj/xmlHttpCall.asp?selDate=" + escape(selDate);
     request.open("GET", url, true);
     request.onreadystatechange = updatePage;
     request.send(null);

/*

var xmlString = "<profile>" +
    "  <firstName>" + escape(firstName) + "</firstName>" +
    "  <lastName>" + escape(lastName) + "</lastName>" +
    "  <street>" + escape(street) + "</street>" +
    "  <city>" + escape(city) + "</city>" +
    "  <state>" + escape(state) + "</state>" +
    "  <zip-code>" + escape(zipCode) + "</zip-code>" +
    "</profile>";


// Open a connection to the server
  xmlHttp.open("POST", url, true);

  // Tell the server you're sending it XML
  xmlHttp.setRequestHeader("Content-Type", "text/xml");

  // Set up a function for the server to run when it's done
  xmlHttp.onreadystatechange = confirmUpdate;

  // Send the request
  xmlHttp.send(xmlString);

*/
}


function updatePage() {
     if (request.readyState == 4) {
		if (request.status == 200) {
			var response = request.responseText.split("|");
			document.getElementById("CAL11").innerHTML = response[0];
			document.getElementById("CAL22").innerHTML = response[1];
			document.getElementById("CAL33").innerHTML = response[2];
			/*
			document.getElementById("order").value = response[0];
			document.getElementById("CAL11").innerHTML =
			response[1].replace(/\n/g, "<br />");
			*/
		} else {
			alert("status is " + request.status);
		}
	 }
/*
var response =BinDecode( request.responseBody );

*/
/*
//ÀÀ´ä XML
<ratings><show><title>Alias</title><rating>6.5</rating>
</show><show><title>Lost</title><rating>14.2</rating></show><show>
<title>Six Degrees</title><rating>9.1</rating></show></ratings>

		 var xmlDoc = request.responseXML;

      var showElements = xmlDoc.getElementsByTagName("show");
      for (var x=0; x<showElements.length; x++) {
        // We know that the first child of show is title, and the second is rating
        var title = showElements[x].childNodes[0].value;
        var rating = showElements[x].childNodes[1].value;

        // Now do whatever you want with the show title and ratings
*/
      
}












//getCookie

/*»çÀÌÆ®º°*/
//alert("fdfd");
/*
var loadingTime = 0;
document.attachEvent('onreadystatechange', abc1234 );
function abc1234(){

	//alert(document.readyState);
	if (document.readyState == "complete"){
		//alert("asdas");
		loadingTime = loadingTime + 1
		if (typeof(sel_search) == "object" && loadingTime==1)
		{
			new Selectbox('sel_search');
			//alert('bbb');
		}
		
	}
}
*/


//getCookie

/*»çÀÌÆ®º°*/
//alert("fdfd");
var loadingTime = 0;
document.attachEvent('onreadystatechange', abc1234 );
function abc1234(){

	//alert(document.readyState);
	if (document.readyState == "complete"){
		//alert("asdas");
		loadingTime = loadingTime + 1
		try{
			new Selectbox('sel_search');
		}catch(e){
			try{
				new Selectbox('sel_search');
			}catch(e){
				try{
						new Selectbox('sel_search');
					}catch(e){
						try{
							new Selectbox('sel_search');
						}catch(e){
							//alert(e);
						}
					}
			}
		}
		
	}
}


function GoOpenSalesNew(idPerf){
	hframe.location.replace('/html/chkBookPerfID.asp?Id=' + idPerf);
	//location.replace('/html/chkBookPerfID.asp?Id=' + idPerf);
}

function GoOpenSalesNew2(idPerf){
	/*if(idUser==''){
		goLoginInPageNew();
	}else{*/
		var openWidth = 998;
		var openHeight = 525;
	
		var winwidth = (screen.width - openWidth) / 2; 
		var winheight = (screen.height - openHeight) / 2; 
		var wini = window.open('/Home/PerfSale/PerfSalePage.aspx?Id='+idPerf,'perfSale','width='+openWidth+',height='+openHeight+',left='+winwidth+',top='+winheight);
		wini.focus();
	//}
}

//ÇöÀçÆäÀÌÁö¿¡¼­ ¸µÅ© Å¬¸¯À¸·Î ´ÙÀ½ÆäÀÌÁö·Î ÀÌµ¿ÇÏÁö ¾Ê°í ·Î±×ÀÎ Ã¼Å© ÇÒ °æ¿ì Ã³¸® ÇÔ¼ö
function chkNowPageLogin(subid,strFunction,beforeLoginPage){
	if(subid ==''){
		location.href="/html/member/01_01_member_login.asp?beforeLoginPage=" + UrlEncode(beforeLoginPage);
	}else{
		//location.href=strUrl;
		eval(strFunction);
	}
}


//´ë°üÈ¸¿øÀ¸·Î ·Î±×ÀÎÇÞ°Å³ª ÀÏ¹ÝÈ¸¿øÀ¸·Î ·Î±×ÀÎ ¾ÈÇßÀ»°æ¿ì..
function chkNowPageLogin2(rentid,subid,strFunction,beforeLoginPage){
	if(rentid !=''){
		alert("°í°´´ÔÀº ´ë°üÈ¸¿øÀ¸·Î ·Î±×ÀÎ ÇÏ¼Ì½À´Ï´Ù.\n¿¹¸Å¸¦ ÇÏ½Ç·Á¸é ÀÏ¹ÝÈ¸¿øÀ¸·Î ·Î±×ÀÎÈÄ ÀÌ¿ë °¡´ÉÇÕ´Ï´Ù.");
		location.href="/html/member/01_01_member_login.asp?beforeLoginPage=" + UrlEncode(location.href);
	} else if(subid ==''){
		//location.href="/html/member/01_01_member_login.asp?beforeLoginPage=" + UrlEncode(beforeLoginPage);
		//ÀÌ¹Ì encodeµÇ¼­ ³Ñ¾î¿È
		location.href="/html/member/01_01_member_login.asp?beforeLoginPage=" + beforeLoginPage;
	}else{
		//alert(strUrl);
		//location.href=strUrl;
		eval(strFunction);
	}
}



function gomyZzim(id,code){
	
	hframe.location.href = "/html/performances/goMyZzim.asp?id=" + id + "&code=" + code;
}

function goUrlYear(obj){
	location.href = obj.value;
}

function showView(a)	{
	Obj = document.getElementById(a);
	Obj.style.display = 'block';
}
function hideView(a)	{
	Obj = document.getElementById(a);
	Obj.style.display = 'none';
}


function topSearchCate(svc_15, svc_4){

	//location.href='/html/search/03_search.asp?sel_search=' + svc_15 + '&search01=' + svc_4;
	location.href='/html/search/03_search.asp?svc_4=' + svc_4;
}



function getPerfInfo(datestr1, datestr2, datestr3, e, layerID) {
	createRequest();
     //var phone = document.getElementById("phone").value;
     //var url = "/skcj/xmlHttpCall.asp?phone=" + escape(phone);

	var selDate = ""+datestr1 + datestr2 + datestr3;

	

	 var url = "/html/main/xmlHttpGetPerfInfo.asp?selDate=" + escape(selDate);
	 //alert(url);
     request.open("GET", url, false);
	
	 request.send(null);

	var response = request.responseText
	if( response == 0 ){
		alert(datestr1 + "/" + datestr2 + "/" + datestr3 + "³¯¿¡ °ø¿¬/Àü½Ã/¹®È­¿¹¼ú±³À°ÀÌ ¾ø½À´Ï´Ù.");
		return false;
	}else{
		location.href = "/html/program/calendar_list.asp?svc_17=" + selDate;
	}
	/*
		var response = request.responseText.split("|");
		var htmlstr = "";
		if ( response[0] == "Y" && response[1] == "Y")
		{ 

			htmlstr = htmlstr + "<div class='layCalendar'><p class=''><a href='/html/performances/01_03_performances_aram.asp?svc_1=°ø¿¬&svc_9=543&svc_13=" + datestr1 + "&svc_14=" + datestr2 + "'>°ø¿¬º¸±â</a></p>";
			htmlstr += "<p class=''><a href='/html/performances/01_04_performances_aram.asp?svc_1=Àü½Ã&svc_9=543&svc_13=" + datestr1 + "'>Àü½Ãº¸±â</a></p>";
			htmlstr += "</div>";

		}else if ( response[0] == "Y" )
		{
			htmlstr += "<div class='layCalendar'><p class=''><a href='/html/performances/01_03_performances_aram.asp?svc_1=°ø¿¬&svc_9=543&svc_13=" + datestr1 + "&svc_14=" + datestr2 + "'>°ø¿¬º¸±â</a></p>";
			htmlstr += "</div>";
		}else if ( response[1] == "Y" )
		{
			htmlstr += "<div class='layCalendar'><p class=''><a href='/html/performances/01_04_performances_aram.asp?svc_1=Àü½Ã&svc_9=543&svc_13=" + datestr1 + "'>Àü½Ãº¸±â</a></p>";
			
			htmlstr += "</div>";
		}else{
			return false;
		}
		layerID.innerHTML = htmlstr;

		showmenu(e, layerID)
	*/

}

function goGenreUrl(selObj){
		//alert(selObj.value);
	var svc_15Value = selObj.value.split("|")[0];
	var deptLevel = selObj.value.split("|")[1];



	if (svc_15Value == "1167")	//°­ÁÂ
	{
		//location.href="/html/education/02_01_education_list.asp";
		location.href="/html/education/edu_main_bridge.asp";
		return false;
	}else if(svc_15Value == "1168"){
		location.href="/html/performances/01_04_performances_aram.asp?svc_1=Àü½Ã&svc_9=543";
		return false;
	}

	if (deptLevel == "")
	{
		location.href="/html/performances/03_01_performances_opera.asp";
	}else if(deptLevel == "1")
	{
		location.href="/html/performances/03_02_performances_opera.asp?svc_15=" + svc_15Value + "&sel_search=" + svc_15Value;
	}else{
		location.href="/html/performances/03_03_performances_opera.asp?svc_15=" + svc_15Value + "&sel_search=" + svc_15Value;
	}
}


function chkInputEnter(sel_search,search01){
	if ( event.keyCode ==13 ) {
		topSearchCate(sel_search,search01)
	}
}

function downFile(code, whereis,fileName){
	if(fileName == ""){
		alert("ÆÄÀÏÀÌ ¾ø½À´Ï´Ù.");
		return false;
	}
	//alert("aa" + fileName + "bb");
	location.href="/common/file_down.asp?code=" + code + "&whereis=" + whereis;
}


function findUser(id, wdate){
	NewWindow('/skcj/goMem/mem_popup.asp?CusId=' + id + '&RegDate=' + wdate,'',620,606,'scrollbars=no,resizable=no','center');
}

function findPerf(){
	NewWindow('/skcj/webbook/perf_search.asp','findPerf1',720,740,'scrollbars=no,resizable=no','center');
}

function findPerf2(idxValue,value2){
	NewWindow('/skcj/webbook/perf_search.asp?svc_21=' + idxValue + '&svc_22=' + value2,'findPerf1',720,740,'scrollbars=no,resizable=no','center');
}
