﻿/*
Message
Description 알림창을 띄운다
strMsg : 알림문자열
strType : 경고창형식 information confirm yesorno
strTitle : Title Bar에 노출시킬 문구 없는 경우 경고창 형식이 출력됨
*/
function fn_Message(strMsg,strType,strTitle)
{
	var tmpCover = document.createElement("div");
	tmpCover.id = "messageCover";
	tmpCover.className="MyMessageCover";
	
	with(tmpCover.style){
		position ="absolute";
		top  = 0;	
		left = 0;
		width = document.body.clientWidth;
		height = document.body.clientHeight;
		zIndex = 98;
	};
	
	var addedCover = document.body.appendChild(tmpCover);
	

	if(document.all)
	{
		addedCover.style.filter = "alpha(opacity=70)";
	}
	else
	{
		addedCover.style.MozOpacity=70;
	}

	var tmp = document.createElement("div");
	tmp.id = "messageBox";
	with(tmp.style){
		position ="absolute";
		zIndex = 99;
	};
	var tmpInserted = document.body.appendChild(tmp);

	var tmpTop = document.createElement("div");
	tmpTop.className="MyMessageBoxTop";
	if(strTitle!=null)
	{
		tmpTop.innerHTML = strTitle;
	}
	else
	{
		if(strType == "information")
		{
			tmpTop.innerHTML = "알림";
		}
		else if(strType == "confirm")
		{
			tmpTop.innerHTML = "확인";
		}
		else if(strType == "yesorno")
		{
			tmpTop.innerHTML = "확인";
		}
	}
	
	tmpInserted.appendChild(tmpTop);


	var tmpContents = document.createElement("div");
	tmpContents.className="MyMessageBoxContents";

	var tmpInnerContents = document.createElement("div");
	tmpInnerContents.className="MyMessageBoxInnerContents";
	tmpInnerContents.innerHTML = strMsg;
	tmpContents.appendChild(tmpInnerContents);

	tmpInserted.appendChild(tmpContents);


	var tmpButtons =  document.createElement("div");
	tmpButtons.className="MyMessageBoxButtons";
	var insertedButtons = tmpInserted.appendChild(tmpButtons);
    var btnConfirm;
	if(strType == "information")
	{
		btnConfirm=  document.createElement("img");
		btnConfirm.src="/common/img/btn_confirm.gif";
		btnConfirm.style.cursor = "pointer";
		btnConfirm.onclick = function ()
		{
			fn_HideMessage();
			return true;
		}
		insertedButtons.appendChild(btnConfirm);
	}
	else if(strType == "confirm")
	{
		btnConfirm=  document.createElement("img");
		btnConfirm.src="/common/img/btn_confirm.gif";
		btnConfirm.style.cursor = "pointer";
		btnConfirm.onclick = function ()
		{
			fn_HideMessage();
			return true;
		}
		insertedButtons.appendChild(btnConfirm);

		var btnCancel=  document.createElement("img");
		btnCancel.src="/common/img/btn_cancel.gif";
		btnCancel.style.cursor = "hand";
		btnCancel.onclick = function ()
		{
			fn_HideMessage();
			return false;
		}
		insertedButtons.appendChild(btnCancel);
	}
	else if(strType == "yesorno")
	{
		var btnYes=  document.createElement("img");
		btnYes.src="/common/img/btn_confirm.gif";
		btnYes.style.cursor = "pointer";
		btnYes.onclick = function ()
		{
			fn_HideMessage();
			return true;
		}
		insertedButtons.appendChild(btnYes);

		var btnNo=  document.createElement("img");
		btnNo.src="/common/img/btn_cancel.gif";
		btnNo.style.cursor = "pointer";
		btnNo.onclick = function ()
		{
			fn_HideMessage();
			return false;
		}
		insertedButtons.appendChild(btnNo);
	}
	
	//window.attachEvent('onresize',fn_ResizeMessage);	
	window.onresize=fn_ResizeMessage;	
	return true;
}
function fn_HideMessage()
{
    
	document.body.removeChild(document.getElementById('messageCover'));
	document.body.removeChild(document.getElementById('messageBox'));
	
}
function fn_ResizeMessage()
{

	var tmpCover = document.getElementById('messageCover');
	with(tmpCover.style){
		width = document.body.clientWidth;
		height = document.body.clientHeight;
	};

	var tmp = document.getElementById('messageBox');
	with(tmp.style){
		left = (document.body.clientWidth-tmp.clientWidth)/2;
		top  = (document.body.clientHeight-tmp.clientHeight)/2;	
	};
}


/************************************************************************
작성목적	: 에러 메시지 상자를 띠운다.
		Parameter :	sInfo - 출력할 메시지
*************************************************************************/
function fn_OpenErrorMessage(strTemp)
{
	try
	{
		var strImsi;
		if(strTemp == null)
			strImsi = window.document.all.errorMessage.value;
		else
			strImsi = strTemp;
			
		//fn_SetProgressbar(false);
		window.showModalDialog("/Common/ErrorMessage.htm",strImsi,fn_MessageBoxStyle());
	}
	catch(exception)
	{
		window.alert("Error ! Please Refresh.." + exception.description);
		//alert(exception.description);
	}
}
/************************************************************************
작업정보 상자를 띠운다.
Parameter :	sInfo - 출력할 메시지
*************************************************************************/
function fn_OpenInformation(sInfo)
{
	try
	{		
		window.showModalDialog("/Common/InformationMessage.htm", sInfo, fn_MessageBoxStyle());
	}
	catch(exception)
	{
		fn_OpenErrorMessage(exception.description);
	}
}


/************************************************************************
질문 상자를 띠운다.
Parameter :	sInfo - 출력할 메시지
Return	  :"ok", "cancel"
*************************************************************************/
function fn_OpenConfirm(sInfo)
{
	try
	{
		var args = new Object();
		args.win = window;
		args.dlgtype= "Q";
		var res = window.showModalDialog("/Common/ConfirmMessage.htm", sInfo,fn_MessageBoxStyle());
		return res;
	}
	catch(exception)
	{
		fn_OpenErrorMessage(exception.description);
	}
}

function fn_MessageBoxStyle()
{
	return "dialogWidth:" + DIALOGWIDTH + "px;dialogHeight:" + (DIALOGHEIGHT - DIALOGSMALLHEIGHT) + "px;status=no;scroll=no";
}

/************************************************************************
자신의 창을 refresh 한다.
*************************************************************************/

function fn_refresh()
{
    location.reload();
}

function fn_ShowModal_Refresh(url,propety)
{
    //window.showModalDialog("dialogTest.aspx"," window","dialogWidth:460px;dialogHeight:230px;status=no;scroll=auto");
    if(window.showModalDialog(url,url,propety))
    {
        window.location.href=window.location.href;
    }
    
}

/************************************************************************
Window.Open
*************************************************************************/
function fn_windowOpen(url,windowname,property)
{
    window.open(url,windowname,property);
}




/************************************************************************
moveElementRelative
    대상 엘리먼트의 좌표를 기준 엘리먼트의 좌표의 상대적인 위치에 배치합니다.
- targetElement     : 대상 엘리먼트
- baseElement       : 기준 엘리먼트
- offsetX           : 기준 엘리먼트의 X좌표로부터의 거리
- offsetY           : 기준 엘리먼트의 Y좌표로부터의 거리
*************************************************************************/
function fn_moveElementRelative(targetElement, baseElement, offsetX, offsetY)
{
    var baseOffset = Sys.UI.DomElement.getLocation(baseElement);
    targetElement.style.left = (baseOffset.x + offsetX) + 'px';
    targetElement.style.top = (baseOffset.y + offsetY) + 'px';
}


/************************************************************************
isDate
    주어진 문자열이 날짜인지 여부를 반환합니다.
    문자열은 Parse 함수에서 분석할 수 있는 형식이어야 합니다.
- strDate           : 체크할 문자열
*************************************************************************/
function fn_isDate(strDate)
{
    var result = new Date(strDate);
    if (result == "NaN")
        return false;
    return true;
}

/************************************************************************
isSsnDateString
    주어진 문자열이 주민등록 번호에 사용될 수 있는 날짜 포맷인지 여부를 반환합니다.
- strDate           : 체크할 문자열
*************************************************************************/
function fn_isSsnDateString(strDate)
{
    if (strDate.length != 6)
    {
        arguments.IsValid = false;
        return false;
    }
    var month = 0;
    month = strDate.substring(2, 4);
    if (month < 1 || month > 12)
    {
        arguments.IsValid = false;
        return false;
    }
    var day = 0;
    day = strDate.substring(4, 6);
    if (day < 1 || day > 31)
    {
        arguments.IsValid = false;
        return false;
    }
    return true;
}



/************************************************************************
isSsn
    주어진 두 문자열이 각각 주민등록번호의 첫6자리와 뒷7자리인지 여부를 반환합니다.
- ssn1          : 체크할 문자열
- ssn2          : 체크할 문자열
*************************************************************************/
//주민등록번호 유효성 검사
//function fn_isSsn(ssn1, ssn2) {
//	var resno = ssn1 + '+' + ssn2;
//	// 주민번호의 형태와 7번째 자리(성별) 유효성 검사
//	fmt = /^\d{6}-[1234]\d{6}$/;
//	if (!fmt.test(resno)) {
//		return false;
//	}

//	// 날짜 유효성 검사
//	birthYear = (resno.charAt(7) <= "2") ? "19" : "20";
//	birthYear += resno.substr(0, 2);
//	birthMonth = resno.substr(2, 2) - 1;
//	birthDate = resno.substr(4, 2);
//	birth = new Date(birthYear, birthMonth, birthDate);

//	if ( birth.getYear() % 100 != resno.substr(0, 2) ||
//		birth.getMonth() != birthMonth ||
//		birth.getDate() != birthDate) {
//		return false;
//	}

//	// Check Sum 코드의 유효성 검사
//	buf = new Array(13);
//	for (i = 0; i < 6; i++) buf[i] = parseInt(resno.charAt(i));
//	for (i = 6; i < 13; i++) buf[i] = parseInt(resno.charAt(i + 1));

//	multipliers = [2,3,4,5,6,7,8,9,2,3,4,5];
//	for (i = 0, sum = 0; i < 12; i++) sum += (buf[i] *= multipliers[i]);

//	if ((11 - (sum % 11)) % 10 != buf[12]) {
//		return false;
//	}

//	return true;
//}



/************************************************************************
fn_getQueryStrings
    QueryString을 pair로 구분된 Array로 반환합니다.
************************************************************************/
function fn_getQueryStrings() {
    var args = new Object();
    // Get Query String
    var query = location.search.substring(1); 
    // Split query at the comma
    var pairs = query.split("&"); 

    // Begin loop through the querystring
    for(var i = 0; i < pairs.length; i++) {

         // Look for "name=value"
         var pos = pairs[i].indexOf('='); 
         // if not found, skip to next
         if (pos == -1) continue; 
         // Extract the name
         var argname = pairs[i].substring(0,pos); 
  
         // Extract the value
         var value = pairs[i].substring(pos+1); 
         // Store as a property
         args[argname] = unescape(value); 
     }
   
    return args; // Return the Object
}


/************************************************************************
fn_changeStyle
    주어진 HTML Element node의 style class를 변경합니다.
************************************************************************/
function fn_changeStyle(nodeElement, className)
{
    var attrMax = nodeElement.attributes.length
    for(var i = 0; i < attrMax; ++i)
    {
        var attr = nodeElement.attributes.item(i);
        if(attr.nodeName == 'class')
        {
            attr.value = className;
            return;
        }
    }
}

/************************************************************************
fn_GetLocationHost
    현재 URL을 얻습니다. 예를 들어 'http://localhost'
************************************************************************/
function fn_GetLocationHost()
{
	var str = "" + document.location;
	var header = "http://";
	var header_length = header.length;
	var pos = str.indexOf( "/" , header_length );
	var str_server	= str.substring( 0, pos );

	return str_server;
}


/************************************************************************
fn_Trim
    공백 문자열을 제거합니다.
************************************************************************/
function TrimLeft(str)
{
    var i;
    for(i=0;i<str.length;i++)
        if( str.charAt(i) != ' ' ) break;
    return str.substr(i, str.length-i+1);
}

function TrimRight(str)
{
    var i;
    for(i=str.length-1;i>=0;i--)
    if( str.charAt(i) != ' ' )
        break;
    return str.substr(0, i+1);
}

function fn_Trim(str)
{
    str = TrimLeft(str);
    str = TrimRight(str);
    return str;
}


// thisobj 의 Top
function TnT_get_objTop(thisobj){
	if (thisobj.offsetParent==document.body) return thisobj.offsetTop;
	else return thisobj.offsetTop + TnT_get_objTop(thisobj.offsetParent);
}

// thisobj 의 Left
function TnT_get_objLeft(thisobj){
	if (thisobj.offsetParent==document.body) return thisobj.offsetLeft;
	else return thisobj.offsetLeft + TnT_get_objLeft(thisobj.offsetParent);
}

function copyURL()
{
	var value = $("url_anchor").href;

	copy_clip(value);
	alert("클립보드에 해당 주소가 복사 되었습니다");
}

// 말풍선 on/off
document.write("<div id='TnT_TempLayer' style='width:50px; position:absolute; visibility:hidden; z-Index:11; padding:0;'></div>");
document.write("<div id='TnT_TempLayer2' style='position:absolute; visibility:hidden; z-Index:11;left:500px;top:500px; padding:0;'></div>");
function balloon_on(str,obj){
    
	var alt_balloon=document.getElementById('TnT_TempLayer2');
	
	alt_balloon.style.left=obj.getBoundingClientRect().left+document.documentElement.scrollLeft-20+"px";
	alt_balloon.style.top=obj.getBoundingClientRect().top-25+document.documentElement.scrollTop+"px";
	alt_balloon.innerHTML="<table cellpadding=0 cellspacing=0 border=0><tr><td width=4 hight=21><img src=/Img/Layer/alt_left.gif style=vertical-align:middle></td><td background=/Img/Layer/alt_center.gif style='color:#000000; font-size:8pt; letter-spacing:-1; font-family:돋움;'><nobr>&nbsp;"+str+"&nbsp;</nobr></td><td width=5 hight=21><img src=/Img/Layer/alt_right.gif align=absmiddle></td></tr></table>";
	
	//alt_balloon.style.left=TnT_get_objLeft(obj)+obj.getBoundingClientRect().left;
	//alt_balloon.style.top=TnT_get_objTop(obj)-20-obj.getBoundingClientRect().top;
	
	 //+ (document.documentElement.scrollLeft || document.body.scrollLeft)
	
	//alert(alt_balloon.style.visibility);
	alt_balloon.style.visibility = 'visible';
	
}function balloon_off(){document.getElementById('TnT_TempLayer2').style.visibility = 'hidden';}


/*
IWINDOW(아이템 창) 레이어 생성 스크립트

	활용 가능한 변수
		* this_skin  :  본 스킨 디렉토리에 대한 경로( ....technote/skin_board/스킨명/ )
		* this_url  :  현재 출력된 보드의 주소( ....technote/board.php?board=보드명&page=3&....  )
		* TnTimgurl  : 공용 img 디렉토리 주소(....technote/img/)
		* is_Admin  :  관리자 로그인 상태이면 == 1
		* is_Member  :  회원 로그인 상태이면 == 1

	주의 및 참고
		* 태그내의 name=' '   혹은   id=' '   는 임의 삭제,수정 하면 안됨.
		* 쌍따옴표는 삽입하지 말것.
		* 소스 수정후 출력 확인시에는 부라우저에서 '새로고침'을 할것.
		* 단지 이미지 변경이 목적이라면 본 소스는 수정하지 말고,
			....technote/skin_board/스킨명/Img/Iwindow/immg/  내의 이미지 파일을 교체할것.
		* 기타 자세한 설명 : 사용자매뉴얼→[12,응용,확장]→[iwindow 아이템 창]
*/



document.write("<style type=text/css> ");
document.write(" .trsp_frame{filter:alpha(opacity=90); opacity:0.90;} "); // 테두리 투명도
document.write(" .trsp_body{filter:alpha(opacity=96); opacity:0.96;} "); // 본문 투명도
document.write(" </style>");


// iwindow 생성
function create_iwindow(no,css){

	var tempobj=document.createElement('div');
	tempobj.setAttribute('id','TnTeIwin'+no);
	if(css) tempobj.style.cssText=css;
	tempobj.style.position='absolute';
	tempobj.style.padding='0px 0px 0px 0px';
	tempobj.style.visibility='visible';

	tempobj.innerHTML=""+
	"  <table border=0 cellpadding=0 cellspacing=0 onmouseover=set_iwindow_focus_change('"+no+"')>"+

	"    <tr id='TnTeiwinTopTr"+no+"'>"+
	"        <td class=trsp_frame width=10 height=27><img src="+this_skin+"/Img/Iwindow/immg/box1.gif></td>"+
	"        <td class=trsp_frame id='TnTeiwinToptd"+no+"' valign=top height=27 style='padding-top:4;' background="+this_skin+"/Img/Iwindow/immg/box2.gif>"+

	"           <table width=100% border=0 cellpadding=0 cellspacing=0><tr>"+
	"                <td onmousedown='DragResize_DN(0,event)' onmouseup='DragResize_UP()' width='99%' class='TnT_Layer_dragin'><"+it_img_tag+" src="+this_skin+"/Img/Iwindow/immg/title_default.gif border=0 id='TnTeiwintitle"+no+"' class='TnT_Layer_dragin' align=absmiddle></td>"+
	"                <td style='cursor:pointer; display:none;' onClick='TnT_layer_help()' id='TnTeiwinhelp"+no+"'><img src="+this_skin+"/Img/Iwindow/immg/btn_quest.gif class='TnT_Top_button' onmouseover=top_btn_act(this) onmouseout=top_btn_act(this)></td>"+
	"                <td style='cursor:pointer; display:none;' onClick='iwindow_ENLARGE()' id='TnTeiwinlarge"+no+"'><img src="+this_skin+"/Img/Iwindow/immg/btn_enlarg.gif class='TnT_Top_button' onmouseover=top_btn_act(this) onmouseout=top_btn_act(this)></td>"+
	"                <td style='cursor:pointer' onClick='iwindow_CLOSE()'  id='TnTeiwinclose"+no+"'><img src="+this_skin+"/Img/Iwindow/immg/btn_close.gif onmouseover=top_btn_act(this) onmouseout=top_btn_act(this)></td>"+
	"            </tr></table>"+

	"        </td>"+
	"        <td class=trsp_frame width=10 height=27><img src="+this_skin+"/Img/Iwindow/immg/box3.gif></td>"+
	"    </tr>"+

	"    <tr id='TnTeiwin2stTr"+no+"' style='display:none'>"+
	"        <td class=trsp_frame width=10 height=10><img src="+this_skin+"/Img/Iwindow/immg/box1_1.gif></td>"+
	"        <td class=trsp_frame height=10 background="+this_skin+"/Img/Iwindow/immg/box2_1.gif></td>"+
	"        <td class=trsp_frame width=10 height=10><img src="+this_skin+"/Img/Iwindow/immg/box3_1.gif></td>"+
	"    </tr>"+

	"    <tr>"+
	"        <td class=trsp_frame width=10 background="+this_skin+"/Img/Iwindow/immg/box4.gif></td>"+
	"        <td class=trsp_body bgcolor=#ffffff id='TnTeiwinCenter"+no+"' width=50 height=50>"+
	"                <iframe id='TnTeIwinframeid"+no+"' name='TnTeIwinframename"+no+"' frameBorder='0' scrolling='auto' width='100%' height='100%' onmouseover=drag_time_true()></iframe>"+
	"        </td>"+
	"        <td class=trsp_frame width=10 background="+this_skin+"/Img/Iwindow/immg/box5.gif></td>"+
	"      </tr>"+

	"    <tr>"+
	"        <td class=trsp_frame width=10 height=10><img src="+this_skin+"/Img/Iwindow/immg/box6.gif></td>"+
	"        <td class=trsp_frame height=10 background="+this_skin+"/Img/Iwindow/immg/box7.gif></td>"+
	"        <td class=trsp_frame width=10 height=10><"+it_img_tag+" src="+this_skin+"/Img/Iwindow/immg/box8.gif border=0 style='cursor:se-resize;' class=TnT_Layer_dragin onmousedown='DragResize_DN(1,event)' onmouseup='DragResize_UP()'></td>"+
	"    </tr>"+

	"  </table>";

	document.body.appendChild(tempobj);
	set_iwindow_focus_change(no);
}


iwinzidx=10;
tntactiwin='';
function set_iwindow_focus_change(no){
	if(tntactiwin=='TnTeIwin'+no) return;
	iwindowLAYER=document.getElementById('TnTeIwin'+no);
	iwindowTopTr=document.getElementById('TnTeiwinTopTr'+no);
	iwindowToptd=document.getElementById('TnTeiwinToptd'+no);
	HideBox_title=document.getElementById('TnTeiwintitle'+no);
	layer_help_btn=document.getElementById('TnTeiwinhelp'+no);
	layer_large_btn=document.getElementById('TnTeiwinlarge'+no);
	layer_close_btn=document.getElementById('TnTeiwinclose'+no);
	iwindowTopTr2=document.getElementById('TnTeiwin2stTr'+no);
	TntiwindowTable=document.getElementById('TnTeiwinCenter'+no);
	HideBox_id=document.getElementById('TnTeIwinframeid'+no);
	HideBox_name=eval('frames.TnTeIwinframename'+no);
	if(iwindowLAYER.style.zIndex<iwinzidx)iwindowLAYER.style.zIndex=++iwinzidx;
	tntactiwin='TnTeIwin'+no;
}

// 우.상단 버튼 onmouse over/out
function top_btn_act(img_this){
	img_this.src=(img_this.src.match(/2\.gif$/))?img_this.src.replace(/2\.gif$/,'.gif') : img_this.src.replace(/\.gif$/,'2.gif');
}

// iwindow 내 스크롤바
// iwindow 출력소스(html)의 자바스크립트 에 document.write(parent.iwindow_SCROLL()); 해 줘야 적용됨
function iwindow_SCROLL(){
	return '<style type=text/css> body{'	+
	' scrollbar-face-color:			#e8f1fd;' +
	' scrollbar-3dlight-color:	#ffffff;' +
	' scrollbar-highlight-color:	#ffffff;' +
	' scrollbar-shadow-color:	#cde1fb;' +
	' scrollbar-darkshadow-color:#ffffff;' +
	' scrollbar-track-color:		#ffffff;' +
	' scrollbar-arrow-color:		#bed6f9;' +
	'}</style>';
}


// option value
function value_renwl(setvalue,setdefault){
	if(!setvalue)setvalue=setdefault;
	if(setvalue=='yes' || setvalue=='y' || setvalue=='true' || parseInt(setvalue)==1) return true;
	return false;
}
// option str
function TnT_option_set_chk(str){
	if(!str) return '';
	return str.replace(/^\s+/,'').replace(/\s+$/,'').replace(/\s+\,\s+/,',').replace(/\s+=\s+/g,'=');
}

//URL 주소 복사
function copyUrl(url)
{
	window.clipboardData.setData('Text',url);
	window.alert('트랙백 주소가 복사되었습니다.');
}

//Div 숨기기
function hideDiv(id)
{
	document.getElementById(id).style.display = "none";
}

//Div 보여주기
function showDiv(obj,id)
{

    document.getElementById(id).style.display = "block";
    document.getElementById(id).style.left=document.documentElement.scrollLeft+obj.getBoundingClientRect().left-10+"px";
    document.getElementById(id).style.top=document.documentElement.scrollTop+obj.getBoundingClientRect().top+30+"px";
}
function resizeFrame(iframeObj){
    var innerBody = iframeObj.contentWindow.document.body;

    var innerHeight = innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight + 50);
    var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);

    iframeObj.style.height = innerHeight + "px";
    iframeObj.style.width = innerWidth + "px";
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_blockHideLayers() { //v6.0
  var i,p,v,obj,args=MM_blockHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) 
    { obj=obj.style; 
    v=(v=='block')?'block':(v=='hide')?'none':v; }
    
    obj.display=v; }
}
function showUserLayer(posx,posy)
{
    //alert('');
    document.getElementById('dvLayerInfo').style.left=posx+'px';
    document.getElementById('dvLayerInfo').style.top=posy+'px';
    
    document.getElementById('flyout').style.left=posx+'px';
    document.getElementById('flyout').style.top=posy+'px';
    document.getElementById('flyout').style.position = 'absolute';
    
    //document.getElementById('dvLayerInfo').style.display="block";
}
 function Cover(bottom, top, ignoreSize) {
                var location = Sys.UI.DomElement.getLocation(bottom);
                top.style.position = 'absolute';
                top.style.top = location.y + 'px';
                top.style.left = location.x + 'px';
                if (!ignoreSize) {
                    top.style.height = bottom.offsetHeight + 'px';
                    top.style.width = bottom.offsetWidth + 'px';
                }
            }
            function LinkView(url, boardidx) {
                window.open(url, boardidx, 'scrollbars=yes,resizable=yes,toolbar=no,top=200,left=300,width=700,height=800');
            }
            function SilverlightChat(url, winName) {
                window.open(url, winName, 'left=0, top=0, width=619, height=790,scrollbars=no,resizable=yes');
            }
            function FindID(url, winName) {
                window.open(url, winName, 'left=0, top=0, width=400, height=250,scrollbars=no,resizable=yes');
            }

            function txtCheck(id) {
                if (document.getElementById(id).value == "") {
                    alert('글 내용을 작성해 주세요');
                    return false;
                }
                return true;
            }

            function setFocus(id) {
                document.getElementById(id).focus();
            }

            function ShowCommentReply(id, obj, id2) {
                document.getElementById("txtCommentIdx").value = id;
                showDiv(obj, 'divCommentReply');

                document.getElementById(id2).focus();
            }
            function LinkView(url, boardidx) {
                window.open(url, boardidx, 'scrollbars=yes,resizable=yes,toolbar=no,top=200,left=300,width=700,height=800');
            }
            function SilverlightChat(url, winName) {
                window.open(url, winName, 'left=0, top=0, width=600, height=700,scrollbars=no,resizable=no');
            }
