/*************************************************
Copyright (C), 2000-2010, Sumavision Tech. Co., Ltd.
File name: 		card_common.js  
Author:			xiayuxiao
Version:		v1.0
Date: 			2013/06/8
Description:  	C707卡页面公用js代码模块
*************************************************/
//type value
var CARD_CONFIG = 1;
var PORT_MONITOR = 2;
var PORT_CONFIG = 3;
var PORT_SERVICE = 4;
var PORT_STATISTIC = 5;

var errorEn = ["",
			   "The authorization code is illegal!",
			   "The parameter value is illegal!",
			   "Get program failed!",
			   "The maximum program number of one port is 60!",
			   "The sum of minimum Bitrate and CBR of all the programs under the same port shall not be more than the statmux bitrate of the port!",
			   "The authorization is not enough!"];

var errorCn = ["",
			   "非法授权码！",
			   "非法参数值！",
			   "获取节目失败！",
			   "一个端口下最多不能超过60个节目！",
			   "端口下所有节目的最小码率与固定码率之和不能大于该端口的统计复用码率！",
			   "授权不足！"];
			   
var returnError = [errorEn, errorCn];

/*************************************************
Function: 		pageJump
Description: 	用于页面横向跳转的函数
Input: 			index: 3-PORT_CONFIG; 2-PORT_MONITOR; 4-PORT_SERVICE
Output: 		无
Return: 		无
Others: 		无
*************************************************/
function pageJump(index)
{
	if(index == PORT_CONFIG)
	{
		self.location.replace("port_config" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
 	}
	else if(index == PORT_SERVICE)
 	{
		self.location.replace("port_service" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_STATISTIC)
 	{
		self.location.replace("port_statistic" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
 	else if(index == PORT_MONITOR)
 	{
		self.location.replace("port" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
}