	function launchCenter(url, name, width, height, isScrollBar) 
	{
		
		var str = "height=" + height + ",innerHeight=" + height;
		str += ",width=" + width + ",innerWidth=" + width;
		str += ",scrollbars=" + ((isScrollBar) ? "yes" : "no");

		if (window.screen) 
		{
			var ah = screen.availHeight - 30;
			var aw = screen.availWidth - 10;

			var xc = (aw - width) / 2;
			var yc = (ah - height) / 2;

			str += ",left=" + xc + ",screenX=" + xc;
			str += ",top=" + yc + ",screenY=" + yc;
		}
		var win = window.open(url, name, str);
		win.focus();
		return win;
	}

	function openGuestWriteInfo()
	{
		launchCenter('/blog/admin/pop_guestwrite_info.html', 'guestwrite',340, 166, false)
	}

	function openLicenseInfo()
	{
		launchCenter('/blog/admin/pop_License_info.html', 'postlicense', 362, 325, false)
	}

	function openFileUpload(UserID, FileLoc, fMethod, isImage)
	{
		if (isImage)
		{
			launchCenter('/include/fileupload/imageupload.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, "ImageUpload", 555, 480, false);
		}
		else
		{
			launchCenter('/include/fileupload/fileupload.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, 'fileupload', 362, 185, false)
		}
	}
   
   	function openFileUpload1(UserID, FileLoc, fMethod, isImage)
	{
		if (isImage)
		{
			launchCenter('active.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, "ImageUpload", 710, 570, false);
		}
		else
		{
			launchCenter('/include/fileupload/fileupload.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, 'fileupload', 362, 185, false)
		}
	}


	   	function openFileUpload2(UserID, FileLoc, fMethod, isImage)
	{
		if (isImage)
		{
			launchCenter('active.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, "ImageUpload", 710, 570, false);
		}
		else
		{
			launchCenter('/include/fileupload/fileupload.asp?UserID=' + UserID + "&FileLoc=" + FileLoc + "&fMethod=" + fMethod, 'fileupload', 362, 185, false)
		}
	}



	function openPostPrint(BlogID, OID)
	{
		launchCenter('/blog/post/post_view_print.asp?BlogID=' + BlogID + '&OID=' + OID, 'postview', 600, 650, true)
	}

	function openPostScrap(BlogID, OID)
	{
		launchCenter('/blog/post/post_scrap.asp?BlogID=' + BlogID + '&OID=' + OID, 'winscrap', 398, 440, false)
	}

	function openBlogFamily(BlogID)
	{
		launchCenter('/blog/other/Blog_Family.asp?BlogURL=' + BlogID, 'winfamily', 400, 180, false)
	}

	function foreign(theURL,winName)
	{ 
	  window.open(theURL,winName,"top=0,left=0,scrollbars=yes,width=620,height=650");
	}

	function poplogin(){
		/*
		var win = window.open('','plogin','width=500,height=380,scrollbars=0');
		win.document.write("<form name='frmLogin' method='post' action='http://www.sarang.org/login/OP_login.asp'>");
		win.document.write("<input type='hidden' name='save_flag' value='sub'>")
		win.document.write("<input type='hidden' name='ipserver' value='blog.godpia.com'>")
		win.document.write("<input type='hidden' name='ishref' value='" + top.location.href + "'>")
		//win.document.write("<input type='hidden' name='ishref' value='http://blog.godpia.com/login/popuplogin.asp'>")
		win.document.write("<input type='hidden' name='sp_vi' value='NO'>")
		win.document.write("</form>")
		win.document.write("<script>document.frmLogin.submit()</script>")
		*/
		 
		// window.open('http://www.sarang.org/login/OP_login.asp?ishref=http://blog.godpia.com/login/sublogin.asp?url_flag=<%=Request.ServerVariables("PATH_INFO")%>?<%=replace(Request.ServerVariables("QUERY_STRING"),"&","!!")%>','plogin','width=500,height=380,scrollbars=0');
//window.open('http://www.sarang.org/login/OP_login.asp?ishref=http://blog.godpia.com/login/sublogin.asp?url_flag=<%=Request.ServerVariables("PATH_INFO")%>?<%=replace(Request.ServerVariables("QUERY_STRING"),"&","!!")%>','plogin','width=500,height=380,scrollbars=0');

		}
	function loginout()
	{
	  top.location.replace("/login/logout.asp?ishref=" + top.location.href);
	}

	function sendFamilyApproval(fUserID)
	{
		launchCenter('Family_State_Approval.asp?FamilyUserID=' + fUserID, 'FamilyKind', 300, 120, false);
	}

	function openFamilyDelete(fUserID)
	{
		launchCenter('/blog/main/Family_State_Delete.asp?FamilyUserID=' + fUserID, 'FamilyKind', 300, 120, false);
	}
    
	function openFamilyApp_NODel(fUserID)
	{
		launchCenter('/blog/main/Family_App_Delete.asp?FamilyUserID=' + fUserID, 'FamilyKind', 300, 120, false);
	}

	function openFamilyJoinOpen(fUserID)
	{
		launchCenter('/blog/main/Family_JoinPop.asp?FamilyUserID=' + fUserID, 'Family', 450, 200, false);
	}

    function openFamilyReJection(fUserID)
	{
		launchCenter('/blog/main/Family_Join_Reject.asp?FamilyUserID=' + fUserID, 'Family', 450, 200, false);
	}


	function openFamilyDeleteOpen(fUserID)
	{
		launchCenter('/blog/main/Family_DeletePop.asp?FamilyUserID=' + fUserID, 'Family', 450, 200, false);
	}

	function openMainImage()
	{
		return launchCenter('', 'MainImage', 600, 410, false);
	}

	function openPostWrite(BlogID, TrackbackURL)
	{
		launchCenter('/blog/post/post_write.asp?BlogID=' + BlogID + "&WinType=out&TrackbackURL=" + escape(TrackbackURL), 'PostWrite', 590, 600, true);
	}

	function openQT(idx)
	{
		launchCenter('/blog/qt/qt_print.asp?idx=' + idx, "qt", 590, 600, true)
	}

	function openHelp(idx)
	{
		launchCenter('/blog/main/guide_help_pop.asp?idx=' + idx, "help", 800, 610, true)
	}