//새창 및 새창의 페이지 이동 컨트롤 
function controlNewWindow(strType, strURL, strConf)
{
	if (strType == "new")
 		window.open(strURL, null, strConf);
 	else
 		document.location.href = strURL;
}

function insertImage(strViewerName, strObjectName)
{
	var sttURL	= "";

	strURL	= "../../file/registerImageFile.php?ViewerName=" + strViewerName + "&objName=" + strObjectName;
	
	controlNewWindow('new', strURL, 'height=115,width=300,status=yes,toolbar=no,menubar=no,location=no');		
	//controlNewWindow('new', '../../file/registerImageFile.php', 'height400=,width=500,status=yes,toolbar=no,menubar=no,location=no');
}

function setImageName(strViewName, strObjectName, strFilePath, strFileName)
{
	var frm			= document.frmRegister;

	var objViewer	= document.getElementById(strViewName); 

	objViewer.src			= "http://" + strFilePath + "/" + strFileName;
	objViewer.style.display	= "block";

	var objParam	= document.getElementById(strObjectName);
	objParam.value	= strFileName;
}

//POST로 값 넘기면서 페이지 이동
function goMovePage(strURL, strPageCode)
{
	if ((strURL == "") || (strURL == null))
	{
		alert("잘못된 경로로 접속하셨습니다.\r\n다시 시도하시기 바랍니다.");
		return;
	}
	
  var frm       = document.frmRegister;
  
  if (frm == null)
  {
    document.location.href    = strURL;
    return;
  }
    
	document.frmRegister.method	= "post";
	document.frmRegister.action	= strURL;
	document.frmRegister.submit();
}

function addBookMark()
{
	var strUrl		= "http://www.mopen.co.kr";
	var	strTitle	= "mopen";
	window.external.AddFavorite(strUrl, strTitle);
}

function alertMessage(strMessage)
{
	alert(strMessage);
}

function goProductURL(strURL)
{
  window.open(strURL);
}
