function redirect(URLStr) { location.href = URLStr; }
function yofusDiy(category,googds_sn,subject_id,style_id)
{
 var yofusCom = null;
 try
 {
 	yofusCom = new ActiveXObject("YofusIE.CoIEHelper");
 }catch(e)
 {}

 if(yofusCom != null)
 {
  try
  {
	//alert("安装了有福艺术家软件,准备打开有福艺术家");
	yofusCom.Diy(category,googds_sn,subject_id,style_id); //直接用插件打开yofusart软件，客户端打开相应产品
	//yofusCom.Diy(style_id); //直接用插件打开yofusart软件，客户端打开产品对应的风格
	return false;
  }catch(e)
  {
	  alert(e);
	  return true;
  }
 }
 else
 {
  alert("制作此类产品，首次需要下载安装[有福艺术家软件]，点击确定后去下载页面");
  //var gotourl = "download.php";
  //redirect(gotourl);
  return true;
 }
}

function goods_style(page, sn, gid, type, sid)
{
	var styleInfo = new Object();

	styleInfo.page = page;
	styleInfo.sn   = sn;
	styleInfo.gid  = gid;
	styleInfo.type = type;
	styleInfo.sid  = sid;

	Ajax.call('goods.php?act=style', 'sinfo=' + styleInfo.toJSONString(), goodsStyleResponse, 'GET', 'JSON');
}

function goodsStyleResponse(result)
{
  if (result.err_msg)
  {
	return false;
  }
  try
  {
      document.getElementById("style").innerHTML = (typeof result == "object") ? result.content : result;
  }
  catch (ex) { }
}
