
function bodyOnload()
{
	// ·ÎÄÃÀÏ¶§´Â ¿¡·¯³ª¼­ Á¦¿Ü
	if ( document.location.host.indexOf( "localhost" ) == -1 )
	{
		document.domain = "ingopress.com";
	}
}

function title_onClick()
{
	var host = document.all.hdHost.value;

	location.href = "http://" + host + ".ingopress.com";	
}

function title_onMouseOver( This )
{
	var host = document.all.hdHost.value;
	This.style.cursor='hand';
	window.status = "http://" + host + ".ingopress.com";
}

function TrackBackUrlCopy( This, bgColor )
{
	This.style.backgroundColor = bgColor;	
}

function TackBackShowHide()
{
	try
	{
		if ( document.all.tbTrackBack.style.display.length == 0 || document.all.tbTrackBack.style.display == "inline" )
		{	
			document.all.tbTrackBack.style.display = "none";
		}
		else
		{
			document.all.tbTrackBack.style.display = "inline";		
		}
	}
	catch(e){}
}

function CommentShowHide()
{
	try
	{
		if ( document.all.tbCommentMain.style.display.length == 0 || document.all.tbCommentMain.style.display == "inline" )
		{	
			document.all.tbCommentMain.style.display = "none";
		}
		else
		{
			document.all.tbCommentMain.style.display = "inline";		
		}
	}
	catch(e){}		
}

function Search()
{
	var SearchValue = trim( document.all.txtSearch.value );
	if ( SearchValue.length == 0 || SearchValue.length < 2 )
	{
		alert( "°Ë»ö¾î¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä(2±ÛÀÚÀÌ»ó)" );
		document.all.txtSearch.focus();
		return false;
	}
	
	location.href = "/find/" + SearchValue;
}

function calMainOnSelectionChanged( strSelDate )
{
	location.href = "/date/" + strSelDate;
}

function Tag( idx )
{
	var host = document.all.hdHost.value;
	var Url = "http://www.ingopress.com/Blog/Tag.aspx?idx={0}&host={1}";
	if ( document.location.host.indexOf( "localhost" ) >= 0 )
	{
		Url = "../Tag.aspx?idx={0}&host={1}";
	}	
	
	Url = Url.replace( /\{0\}/, idx );
	Url = Url.replace( /\{1\}/, host );

	location.href = Url;
}

function CommentPopReply( IdxBlog, IdxComment, MIdxBlog )
{
	var Url = "http://www.ingopress.com/Blog/PopCommentReply.aspx?idx={0}&cidx={1}&midx={2}";
	if ( document.location.host.indexOf( "localhost" ) >= 0 )
	{
		Url = "../PopCommentReply.aspx?idx={0}&cidx={1}&midx={2}";
	}

	Url = Url.replace( /\{0\}/, IdxBlog );
	Url = Url.replace( /\{1\}/, IdxComment );
	Url = Url.replace( /\{2\}/, MIdxBlog );
	
	PopCenterOpenWname( Url, 400, 420, "Comment" );
}

function CommentPopDeletePassword( IdxComment, MIdxBlog )
{
	var Url = "http://www.ingopress.com/Blog/PopCommentDelete.aspx?cidx={0}&midx={1}";
	if ( document.location.host.indexOf( "localhost" ) >= 0 )
	{
		Url = "../PopCommentDelete.aspx?cidx={0}&midx={1}";
	}

	Url = Url.replace( /\{0\}/, IdxComment );
	Url = Url.replace( /\{1\}/, MIdxBlog );	
	
	PopCenterOpenWname( Url, 400, 230, "Password" );	
}

function CommentDelete( IdxBlog, IdxComment, MIdxBlog )
{
	var Url = "http://www.ingopress.com/Blog/CommentDelete.aspx?idx={0}&cidx={1}&midx={2}";
	if ( document.location.host.indexOf( "localhost" ) >= 0 )
	{
		Url = "../CommentDelete.aspx?idx={0}&cidx={1}&midx={2}";
	}

	Url = Url.replace( /\{0\}/, IdxBlog );
	Url = Url.replace( /\{1\}/, IdxComment );
	Url = Url.replace( /\{2\}/, MIdxBlog );
	
	location.href = Url;
}