//<!--
var _BLOG_NO;
function GoUrl(menu)
{
	var GotoPage;
	var isNewWin=false;
	var isbNo=false;
	var targetDoc = this;
	switch (menu)
	{
		case "intro" :
		case "blog_info" : GotoPage = "/blog/blog_info/info.aspx";
			break;
		case "item" : GotoPage = "/blog/item/list.aspx";
			break;
		case "bbs" : GotoPage = "/blog/bbs/list.aspx";
			break;
		case "qna" : GotoPage = "/blog/qna/list.aspx";
			break;
		case "comment" : GotoPage = "/blog/comment/list.aspx";
			break;
		case "g_board" : GotoPage = "/blog/g_book/list.aspx";
			break;
		case "community" : GotoPage = "/blog/sub.aspx";
			break;
		case "g_board" : GotoPage = "/blog/sub.aspx";
			break;
		case "join" : 
			GotoPage = "/pub/join/AgreePub.aspx";
			isNewWin=true;
			break;
		case "mypage" : 
			GotoPage = "/pub/mypage/main.aspx";
			isNewWin=true;
			break;
		case "cart" : 
			GotoPage = "/pub/order/cart.aspx";
			isNewWin=true;
			break;
		case "wishitem" : 
			GotoPage = "/pub/mypage/WishItems.aspx";
			isNewWin=true;
			break;
		case "trace" : 
			GotoPage = "/pub/mypage/OrderList.aspx";
			isNewWin=true;
			break;
		case "customer" : 
			GotoPage = "/pub/customer/main.aspx";
			isNewWin=true;
			break;
		case "manage" : 
			GotoPage = "/cp/main.aspx";
			targetDoc=parent;
			break;
		case "main" : 
			GotoPage = "/blog/main.aspx";
			break;
			
		case "mall_info":
			GotoPage = "/pub/customer/introduce_1.aspx";
			isNewWin=true;
			isbNo=true;
			break;
		case "customer":
			GotoPage = "/pub/customer/main.aspx";
			isNewWin=true;
			isbNo=true;
			break;
		case "person":
			GotoPage = "/pub/customer/person.aspx";
			isNewWin=true;
			isbNo=true;
			break;
		case "agree":
			GotoPage = "/pub/customer/Promise.aspx";
			isNewWin=true;
			isbNo=true;
			break;
		case "cp_ref":
			GotoPage = "/pub/customer/CpReference.aspx";
			isNewWin=true;
			isbNo=true;
			break;
		case "deal_ref":
			GotoPage = "/pub/customer/MarketingReference.aspx";
			isNewWin=true;
			isbNo=true;
			break;
		case "home":
			GotoPage = "/";
			isNewWin=true;
			isbNo=true;
		default : "/blog/main.aspx";
			break;
	}
	if(isNewWin)
	{
		if(isbNo)
		{
			var newWin=window.open(GotoPage,"Main_Window");
		}
		else
		{
			var newWin=window.open(GotoPage+"?bNo="+_BLOG_NO,"Main_Window");
		}
		
		if (newWin !=null) {
			newWin.opener=self;
		}
		newWin.focus();
	}
	else
	{
		targetDoc.location.href = GotoPage+"?bNo="+_BLOG_NO;
	}
}	
function GoBBS(cIdx)
{
	location.href = "/blog/bbs/list.aspx?bNo="+_BLOG_NO+"&cIdx="+cIdx;
}
function neighbor()
{
	var Message = (blog_name+" À»(¸¦) ÀÌ¿ô³ó°¡ ½ÅÃ»À» ÇÏ½Ã°Ú½À´Ï±î?");
		if(confirm(Message)==1)
		{
			OpenWindow("./neighbor/applyform.aspx?cp_user_id="+cp_user_id+"&bNo="+cp_code,"applyfrm",330,380,400,100);	
		}
}
function GoWishCp(cp_code)
{
	if(cp_code!="" || cp_code.length!=0)
	{
		location.href="/blog/main.aspx?bNo="+cp_code;
	}
}
function AddNeighbor()
{
	var url = "/blog/neighbor/ReqNeighbor.aspx?cCode="+_BLOG_NO;
	OpenWindow_noscroll(url,'WishPop','445','360');
}
function AddWishCp()
{
	SetWishSeller(_BLOG_NO);
}

function ZoomImage(imgUrl)
{
	var newWin=window.open("/blog/etc/ZoomImage.aspx?img="+imgUrl,"Detail_view","width=20,height=10,scrollbars=0,resizable=0,left=50,top=50");
	if (newWin !=null)
	{
		newWin.opener=self;
	}
	newWin.focus();
}

function GoList_B(cID)
{	
	document.location.href="/blog/item/list.aspx?bNo="+_BLOG_NO+"&cID="+cID;
}

function GoItem_B(iCode,cID)
{
	try
	{
		var x = Number(document.body.clientWidth);
		var y = Number(document.body.clientHeight) + 100;
		var wWidth = 1000;
		var wHeight = 650;
		x = (x/2)-wWidth/2;
		y = (y/2)- wHeight/2;
		
		x=1;
		y=1;
		wHeight = screen.availHeight-100;
		window.name = 'parent';
		var url="/pub/item/detail.aspx?bNo="+_BLOG_NO+"&iCode="+iCode;	
		//OpenWindowResize(url,"blogDetail",wWidth,wHeight,x,y);
		
		newWin=window.open(url,"blogDetail","status=yes,toolbar=yes,menubar=yes,location=yes,resizable=yes,scrollbars=yes,width="+wWidth+",height="+wHeight+",left="+x+",top="+y+"");
		if (newWin !=null) {
				newWin.opener=self;
		}
		newWin.focus();
	}
	catch(e)
	{
	}
}
function GoCpBlog(cpCode)
{
	//this.parent.location.href=
	location.href="/blog/main.aspx?bNo="+cpCode;
}
function OpenNeighbor()
{
	OpenWindow("/blog/neighbor/PopNeighbor.aspx?bNo="+_BLOG_NO,"NeighborWin","608","400");
}
function ReqHelper()
{
	OpenWindow_noscroll("/blog/etc/ReqHelper.aspx?cCode="+_BLOG_NO,"ReqHelper","445","360");
}
//-->
