/*************************************************
Copyright (C), 2000-2010, Sumavision Tech. Co., Ltd.
File name: 		card_common.js  
Author:			xiayuxiao
Version:		v1.0
Date: 			2013/06/26
Description:  	C355卡页面公用js代码模块
*************************************************/
//type value
var CARD_CONFIG = 1;
var CARD_OTHER_CONFIG = 2;
var CARD_SMPTE_CONFIG = 3;
var PORT_IN_MONITOR = 4;
var PORT_IN_CONFIG = 5;
var PORT_OUT_MONITOR = 6;
var PORT_OUT_CONFIG = 7;
var PORT_SMPTE_OUT_MONITOR = 8;
var PORT_SMPTE_OUT_CONFIG = 9;
var PORT_CON_IN_MONITOR = 10;
var PORT_CON_IN_CONFIG = 11;
var PORT_CON_OUT = 12;
var PORT_DECON_OUT = 13;
var PORT_DECON_IN_MONITOR = 14;
var PORT_DECON_IN_CONFIG = 15;


var identifyData;

var errorEn = ["",
			   "The parameter value is illegal!",
			   "Card function has been changed,press F5 to refresh!",
			   "Port function has been changed,press F5 to refresh!",
			   "Input port is used as muxing!",
			   "Input port is pass-through!",
			   "Output port is used as muxing!",
			   "Output port is pass-through!",
			   "Port backup exists in input port!",
			   "Program backup exists in input port!",
			   "Program backup exists in output port!",
			   "",
			   "Time interval for modifying card type can’t be less than 10s!",
			   "If pcr structure is being adjusted,the switch of Adjust PCR Structure can’t be off!"];

var errorCn = ["",
			   "非法参数值！",
			   "板卡功能已改变，请按F5刷新！",
			   "端口功能已改变，请按F5刷新！",
			   "输入端口已被复用！",
			   "输入端口已透传！",
			   "输出端口已被复用！",
			   "输出端口已透传！",
			   "输入端口已参加端口备份！",
			   "输入端口已参加节目备份！",
			   "输出端口已参加节目备份！",
			   "",
			   "修改板卡类型的时间间隔不能小于10S！",
			   "有PCR结构被调整时不能关闭调整PCR结构功能！"];
			   
var returnError = [errorEn, errorCn];

/*************************************************
Function: 		pageJump
Description: 	用于页面横向跳转的函数
Input: 			index:......
Output: 		无
Return: 		无
Others: 		无
*************************************************/
function pageJump(index)
{
	if(index == PORT_IN_MONITOR)
	{
		self.location.replace("port_in" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
 	}
	else if(index == PORT_IN_CONFIG)
 	{
		self.location.replace("port_in_config" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
 	else if(index == PORT_OUT_MONITOR)
 	{
		self.location.replace("port_out" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_OUT_CONFIG)
 	{
		self.location.replace("port_out_config" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_SMPTE_OUT_MONITOR)
 	{
		self.location.replace("port_out" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_SMPTE_OUT_CONFIG)
 	{
		self.location.replace("port_smpte_out_config" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_CON_IN_MONITOR)
 	{
		self.location.replace("port_con_in" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_CON_IN_CONFIG)
 	{
		self.location.replace("port_con_in_config" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_CON_OUT)
 	{
		self.location.replace("port_con_out" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_DECON_IN_MONITOR)
 	{
		self.location.replace("port_decon_in" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_DECON_IN_CONFIG)
 	{
		self.location.replace("port_decon_in_config" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
	else if(index == PORT_DECON_OUT)
 	{
		self.location.replace("port_decon_out" + pageLanguage[language] + "?slotNo=" + slotNo + "&portNo=" + portNo);
	}
}