//IE,FF 호환 주소복사(강제적이지않음)
function copy_clip(copytext,MSG) {

    if (window.clipboardData) { // IE일 경우
        window.clipboardData.setData("Text", copytext);
    } else if (window.netscape) { // NS일 경우
        // you have to sign the code to enable this, or see notes below
        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');

        // maak een interface naar het clipboard
        var clip = Components.classes['@mozilla.org/widget/clipboard;1'].createInstance(Components.interfaces.nsIClipboard);
        if (!clip) return;

        // maak een transferable
        var trans = Components.classes['@mozilla.org/widget/transferable;1'].createInstance(Components.interfaces.nsITransferable);
        if (!trans) return;

        // specificeer wat voor soort data we op willen halen; text in dit geval
        trans.addDataFlavor('text/unicode');

        // om de data uit de transferable te halen hebben we 2 nieuwe objecten nodig   om het in op te slaan
        var str = new Object();
        var len = new Object();

        var str = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);

        var copytext = copytext;    // 로컬변수에 복사
        str.data = copytext;

        trans.setTransferData("text/unicode",str,copytext.length*2);
        var clipid = Components.interfaces.nsIClipboard;
        if (!clipid) return false;

        clip.setData(trans,null,clipid.kGlobalClipboard);
    }
<!--    alert("Following info was copied to your clipboard:\n\n" + copytext); -->
	    alert(MSG);
    return false;
}


//내 개인 정보 확인
function getCommonConfirmMyInfo(){
	if(isLogin){
		getCommonOpenWindow( chk_my_personal_info, -1,-1,'myinfo');

	}
	else{
		openLoginLayer();
	}
}

/*
 * flag = 시작일 및 종료일 체크여부 -1은 미체크, 1이면 체크
 * strdate = 이벤트 시작일 yyyyMMdd 스타일
 * enddate = 이벤트 종료일
 * sendURL = 팝업을 띄울 주소
 * popup_style = 팝업 스타일 -1이면 상태표시줄이나 위에 메뉴 없고 1이면 그냥 새창 여는 형식
 */
function getCommonOpenWindow( sendURL,popup_style,flag,id,today,strdate,enddate )
{
	 if(parseInt(flag)==1){
		 if( (today>=strdate) && (today<=enddate) ){
			 //이벤트 기간 처리
			 if(popup_style === -1 ){
				 window.open(sendURL, id, 'left=200, top=60, width=460, height=450, toolbar=no, scrollbars=no, status=yes, resizable=no');
			 }
			 else if(popup_style == 1){
				 window.open(sendURL, id, 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes,scrollbars=yes,top=30,left=230');
			 }
		 }
		 else{
			 alert(MSG_EVENT_DATE_END);
		 }
	 }
	 else if(parseInt(flag) ==  -1){
		 if(popup_style === 1 ){
			 window.open(sendURL, id, 'left=200, top=60, width=460, height=450, toolbar=no, scrollbars=no, status=yes, resizable=no');
		 }
		 else if(popup_style == -1){
			 window.open(sendURL, id, 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes,scrollbars=yes,top=30,left=230');
		 }
	 }
	 else{
		 //모르겠다.
	 }
}

//cash refresh
 function setRefreshUserCash(){
			location.href = Domain_THLogin + "/login/login_reflush.do?return_url=" + escape(Domain_HIS);

 }

