
/**
* 选择栏目(多选)
*
* 参数 textInput, 用于显示作者姓名, 以逗号分隔, 无实际意义.
* 参数 valueInput, 用于显示作者编号, 以逗号分隔.
*
**/
function jSelectChannel(textInput, valueInput)
{
	var tInput = document.getElementById(textInput);
	var vInput = document.getElementById(valueInput);

	if(tInput==null || vInput==null) return ;

	//var returnData = jOpen("/pub/user.do?sysCmd=select&selectedAuthorID="+ vInput.value +"&time="+ new Date(), "", 490, 430, 1);
	var returnData = jOpen("/admin/article/pubChannel/Com_forward.do?selectedChannelId="+ vInput.value +"&time="+ new Date(), "", 500, 420, 1);
	//alert("returnData = "+ returnData);
	if(returnData != null)
	{
		vInput.value = returnData[0];
		tInput.value = returnData[1];
	}
}

function jOnePage()
{
	jOpen("/Untitled-2.html", "", 506, 555, 1);
}

function jOpen(url,id,width,height,openStat)
{
	var qgExploer = navigator.appName;
	if(qgExploer == "Microsoft Internet Explorer")
	{
		width = width - 6;
		height = height - 55;
		return showModalDialog(url,window,"dialogWidth:"+ width +"px;dialogHeight:"+ height +"px;help:no;scroll:yes;status:yes;resizable:no");
	}
	else
	{
		qinggan_left = (screen.width-width)/2;
		qinggan_top = (screen.height-height)/2;
		qinggan_win_option = "location=no,menubar=no,toolbar=no,dependance=yes,dialog=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,scrollbars=yes,z-look=yes,width="+ width +",height="+ height +",top="+ qinggan_top +",left="+ qinggan_left
		window.open(url,id,qinggan_win_option);
	}
}


/**
*自适应高度
**/
function SetCwinHeight(obj)
{
  var cwin=obj;
  if (document.getElementById)
  {
    if (cwin && !window.opera)
    {
      if (cwin.contentDocument && cwin.contentDocument.body.offsetHeight)
        cwin.height = cwin.contentDocument.body.offsetHeight; 
      else if(cwin.Document && cwin.Document.body.scrollHeight)
        cwin.height = cwin.Document.body.scrollHeight;
    }
  }
}
