var actButtonsArr = null; //\u041C\u0430\u0441\u0441\u0438\u0432 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043A\u043D\u043E\u043F\u043E\u043A, \u0434\u043B\u044F \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0433\u0440\u0430\u0444\u0438\u043A\u043E\u0432var actGraphsArr = null; //\u041C\u0430\u0441\u0441\u0438\u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0432\u0443\u044E\u0449\u0438\u0445 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043E\u0431\u043B\u0430\u0441\u0442\u0435\u0439 - \u0433\u0440\u0430\u0444\u0438\u043A\u043E\u0432var oldMaxHeight = 0; //\u0421\u0442\u0430\u0440\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0440\u0430\u0437\u043C\u0435\u0440\u0430 \u0432\u044B\u0441\u043E\u0442\u044B \u0441\u043E\u0434\u0435\u0440\u0436\u0438\u043C\u043E\u0433\u043E \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044Bfunction  getPageSize(){	var xScroll, yScroll; 		if (window.innerHeight && window.scrollMaxY) {		xScroll = document.body.scrollWidth;		yScroll = window.innerHeight + window.scrollMaxY;	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac		xScroll = document.body.scrollWidth;		yScroll = document.body.scrollHeight;	} else if (document.documentElement && document.documentElement.scrollHeight > document.documentElement.offsetHeight){ // Explorer 6 strict mode		xScroll = document.documentElement.scrollWidth;		yScroll = document.documentElement.scrollHeight;	} else { // Explorer Mac...would also work in Mozilla and Safari		xScroll = document.body.offsetWidth;		yScroll = document.body.offsetHeight;	}	var windowWidth, windowHeight;		if (self.innerHeight) { // all except Explorer		windowWidth = self.innerWidth;		windowHeight = self.innerHeight;	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode		windowWidth = document.documentElement.clientWidth;		windowHeight = document.documentElement.clientHeight;	} else if (document.body) { // other Explorers		windowWidth = document.body.clientWidth;		windowHeight = document.body.clientHeight;	}	// for small pages with total height less then height of the viewport	if(yScroll < windowHeight){		pageHeight = windowHeight;	} else {		pageHeight = yScroll;	}		// for small pages with total width less then width of the viewport	if(xScroll < windowWidth){		pageWidth = windowWidth;	} else {		pageWidth = xScroll;	}	return [pageWidth,pageHeight,windowWidth,windowHeight];}//This function resize the height of content to height of main page if the height of main page greatest then the content height.function ResizeHeight(contID, lmID, gaID){	try	{		var contObj = document.getElementById(contID); //Content body		var lmObj = document.getElementById(lmID); //Left menu body		var gaObj = document.getElementById(gaID); //Graph's body		var maxHeight = 0;				if(lmObj != null)		{			if(gaObj != null)			{				maxHeight = (gaObj.offsetHeight >= lmObj.offsetHeight ? gaObj.offsetHeight : lmObj.offsetHeight);			}			else				{				maxHeight = lmObj.offsetHeight;			}		}		else		{			if(gaObj != null)			{				maxHeight = gaObj.offsetHeight;			}			}					maxHeight = Math.max(maxHeight, contObj.offsetHeight);				if(maxHeight < getPageSize()[1])		{			//\u041D\u0435\u0442 \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E\u0441\u0442\u0438 \u043F\u0435\u0440\u0435\u0441\u0447\u0438\u0442\u044B\u0432\u0430\u0442\u044C \u0432\u044B\u0441\u043E\u0442\u0443, \u0442\u0430\u043A \u043A\u0430\u043A \u043E\u043D\u0430 \u0431\u044B\u043B\u0430 \u0443\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430 \u043F\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0435 - \u0432\u044B\u0445\u043E\u0434\u0438\u043C.			if(oldMaxHeight != 0 && oldMaxHeight<=contObj.offsetHeight)				return;						if(navigator.appName == "Microsoft Internet Explorer")				contObj.style.height = (getPageSize()[1] - 160) + "px";			else				contObj.style.height = (getPageSize()[1] - 195) + "px";								oldMaxHeight = contObj.offsetHeight;			}	}	catch(err)	{		return;	}}//It's function take a navigation by the view.//rowsCount - count rows for displaying,//operatorSign, has a value 1 or -1, depend from the direction of navigation (to the front it's 1 to the back it's -1).function ChangeViewRows(rowsCount, operationSign){	//\u0410\u043D\u0430\u043B\u0438\u0437\u0438\u0440\u0443\u0435\u043C \u0435\u0441\u0442\u044C \u043B\u0438 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 ?OpenView	var currentUrlStr = document.URL;		if(document.getElementById("id_nextRows") == null)		return;		try	{		var currentPathStr = window.location.pathname;		var hostNameStr = window.location.hostname;			if(currentUrlStr.toLowerCase().indexOf("?openview") == -1)		{			//\u0422\u0430\u043A\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u043D\u0435\u0442, \u0437\u043D\u0430\u0447\u0438\u0442 \u0432\u0438\u0434, \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043F\u0435\u0440\u0432\u044B\u0439 \u0440\u0430\u0437 - \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0435 30 \u0441\u0442\u0440\u043E\u043A			currentUrlStr += "?OpenView&Start=31&Count=" + rowsCount;							window.location.href = currentUrlStr;		}		else		{			//\u0422\u0430\u043A\u0430\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0435\u0441\u0442\u044C, \u0438\u0449\u0435\u043C \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 Start \u0438 \u043F\u0440\u0438\u0431\u0430\u0432\u043B\u044F\u0435\u043C \u043A \u043D\u0435\u043C\u0443 Count			if(currentUrlStr.toLowerCase().indexOf("&count=") == -1 || currentUrlStr.toLowerCase().indexOf("&start=") == -1)			{				//\u0422\u0430\u043A\u0438\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u043D\u0435\u0442, \u0437\u043D\u0430\u0447\u0438\u0442 \u0432\u0438\u0434 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043F\u0435\u0440\u0432\u044B\u0439 \u0440\u0430\u0437				currentPathStr += "?OpenView&Start=31" + "&Count=" + rowsCount;				window.location.href = "http://" + hostNameStr + currentPathStr;			}			else			{				//\u0422\u0430\u043A\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0435\u0441\u0442\u044C, \u0432\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C \u043F\u0440\u0438\u0431\u0430\u0432\u043B\u0435\u043D\u0438\u0435				var currentUrlByStartArr = currentUrlStr.toLowerCase().split("&start=");				var currentStartParamArr = currentUrlByStartArr[1].toLowerCase().split("&count=");				var nowStart = parseInt(currentStartParamArr[0]) + (rowsCount*operationSign)									window.location.href = "http://" +  hostNameStr + currentPathStr + "?OpenView&Start=" + nowStart + "&Count=" + rowsCount;			}		}	}	catch(e)	{		window.location.href = currentUrlStr;	}}//It's function take a regulation of navigation rows hiding. (<< Previous 30, Next 30 >>)function CheckStartParam(){	var currentUrlStr = document.URL;		if(document.getElementById("id_nextRows") == null)		return;		try	{		//\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u043C \u0435\u0441\u0442\u044C \u043B\u0438 \u0432 \u0441\u0442\u0440\u043E\u043A\u0435 \u0430\u0434\u0440\u0435\u0441\u0430 \u043A\u043E\u043C\u0430\u043D\u0434\u0430 ?OpenView		if(currentUrlStr.toLowerCase().indexOf("?openview") == -1)		{			//\u0422\u0430\u043A\u043E\u0439 \u043A\u043E\u043C\u0430\u043D\u0434\u044B \u043D\u0435\u0442, \u0437\u043D\u0430\u0447\u0438\u0442 \u0432\u0438\u0434 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043F\u0435\u0440\u0432\u044B\u0439 \u0440\u0430\u0437, \u0441\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 \u0441\u0440\u043E\u043A\u0438			document.getElementById("id_prevRows").style.display = "none";			document.getElementById("id_nextRows").style.display = "block";		}		else		{			//\u0422\u0430\u043A\u0430\u044F \u043A\u043E\u043C\u0430\u043D\u0434\u0430 \u0435\u0441\u0442\u044C, \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u043C \u0435\u0441\u0442\u044C \u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B Start \u0438 Count			if(currentUrlStr.toLowerCase().indexOf("&count=") == -1 || currentUrlStr.toLowerCase().indexOf("&start=") == -1)			{				//\u0422\u0430\u043A\u0438\u0445 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u043E\u0432 \u043D\u0435\u0442, \u0437\u043D\u0430\u0447\u0438\u0442 \u0432\u0438\u0434 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u043F\u0435\u0440\u0432\u044B\u0439 \u0440\u0430\u0437, \u0441\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0440\u043E\u043A\u0438				document.getElementById("id_prevRows").style.display = "none";				document.getElementById("id_nextRows").style.display = "block";			}			else			{				//\u0422\u0430\u043A\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u0435\u0441\u0442\u044C, \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u0435\u043C \u043D\u0435 \u043D\u0430\u0445\u043E\u0434\u0438\u0442\u0441\u044F \u043B\u0438 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440 Start \u0432 \u0441\u0430\u043C\u043E\u043C \u043D\u0430\u0447\u0430\u043B\u0435				var currentUrlByCountArr = currentUrlStr.toLowerCase().split("&count=");				var currentUrlByStartArr = currentUrlStr.toLowerCase().split("&start=");				var currentStartParamArr = currentUrlByStartArr[1].toLowerCase().split("&count=");								if(currentStartParamArr[0] == "1")				{					//\u0421\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0441\u0441\u044B\u043B\u043A\u0443 \u043D\u0430 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0435 \u0441\u0442\u0440\u043E\u043A\u0438					document.getElementById("id_prevRows").style.display = "none";					document.getElementById("id_nextRows").style.display = "block";				}				else				{					//\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0432\u0441\u0435 \u0441\u0441\u044B\u043B\u043A\u0438					document.getElementById("id_prevRows").style.display = "block";					document.getElementById("id_nextRows").style.display = "block";				}			}			}	}	catch(e)	{		return;	}}	function LoadButtonsArr(){	try	{		var currButton = document.getElementById("id_b_0.1");		var currGraph = document.getElementById("id_l_0.1");		var currIndex = 0;				//\u0412\u044B\u043F\u043E\u043B\u043D\u044F\u0435\u043C \u0440\u0430\u0437\u043E\u0432\u0443\u044E \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0443 \u043C\u0430\u0441\u0441\u0438\u0432\u0430 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043A\u043D\u043E\u043F\u043E\u043A \u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u0431\u043B\u043E\u043A\u043E\u0432 - \u0433\u0440\u0430\u0444\u0438\u043A\u043E\u0432		if(currGraph != null)		{			actButtonsArr = [];			actGraphsArr = [];		}						while(currGraph != null)		{			actButtonsArr[currIndex] = document.getElementById("id_b_"+currIndex+".1");			actGraphsArr[currIndex] = document.getElementById("id_l_"+currIndex+".1");								currGraph = document.getElementById("id_l_"+(++currIndex)+".1");		}	}	catch(err)	{		return;	}}	function SwitchGraph(event){	try	{		var event = event || window.event;		var clickedElem = event.target || event.srcElement;		var oldBIndex = -1;		var tmpArr1 = null;		var tmpArr2 = null;					if(clickedElem.id != "")		{			//\u041C\u0435\u043D\u044F\u0435\u043C \u0441\u0442\u0430\u0440\u0443\u044E \u043A\u043D\u043E\u043F\u043A\u0443 \u043D\u0430 \u043D\u0435 \u0430\u043A\u0442\u0438\u0432\u043D\u0443\u044E.			tmpArr1 = clickedElem.id.split("_");			tmpArr2 = tmpArr1[tmpArr1.length-1].split(".");			oldBIndex = parseInt(tmpArr2[0]);			actButtonsArr[oldBIndex].parentNode.className = "CNonActButton";			actGraphsArr[oldBIndex].style.display = "none";								//\u0412\u044B\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u043C \u043D\u043E\u0432\u0443\u044E \u0430\u043A\u0442\u0438\u0432\u043D\u0443\u044E \u043A\u043D\u043E\u043F\u043A\u0443 \u0438 \u043D\u043E\u0432\u044B\u0439 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0431\u043B\u043E\u043A - \u0433\u0440\u0430\u0444\u0438\u043A			clickedElem.parentNode.className = "CActButton";			document.getElementById("id_l_"+oldBIndex+"."+tmpArr2[1]).style.display = "block";								//\u041C\u0435\u043D\u044F\u0435\u043C \u0441\u0442\u0430\u0440\u0443\u044E \u0430\u043A\u0442\u0438\u0432\u043D\u0443\u044E \u043A\u043D\u043E\u043F\u043A\u0443 \u043D\u0430 \u043D\u043E\u0432\u0443\u044E \u0438 \u0441\u0442\u0430\u0440\u044B\u0439 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u0431\u043B\u043E\u043A - \u0433\u0440\u0430\u0444\u0438\u043A \u043D\u0430 \u043D\u043E\u0432\u044B\u0439			actButtonsArr[oldBIndex] = clickedElem;			actGraphsArr[oldBIndex] = document.getElementById("id_l_"+oldBIndex+"."+tmpArr2[1]);		}	}	catch(err)	{		return;	}}//It's function make checks for fill the form's datafunction CheckSubsFields(){	try	{		var errMsg = "";		if(document.getElementById("id_Name").value == "")			errMsg += "Name / Surname";		if(document.getElementById("id_Company").value == "")			if(errMsg != "")				errMsg += ", company";			else				errMsg += "company";			if(document.getElementById("id_Specialization").value == "")				if(errMsg != "")					errMsg += ", position (title)";				else					errMsg += "position (title)";			if(document.getElementById("id_Email").value == "")				if(errMsg != "")					errMsg += ", e-mail";				else					errMsg += "e-mail";			if(document.getElementById("id_Phone").value == "")				if(errMsg != "")					errMsg += ", tel";				else					errMsg += "tel";			if(document.getElementById("id_PostalAddr").value == "")				if(errMsg != "")					errMsg += ", address";				else					errMsg += "address";			if(document.getElementById("id_City").value == "")				if(errMsg != "")					errMsg += ", city";				else					errMsg += "city";			if(document.getElementById("id_Country").value == "")				if(errMsg != "")					errMsg += ", country";				else					errMsg += "country";								// \u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430, \u0437\u0430\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u044F \u0441\u0435\u043A\u0446\u0438\u0438 \u0421\u043F\u0435\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0432 \u041F\u0440\u043E\u0431\u043D\u043E\u043C \u0434\u043E\u0441\u0442\u0443\u043F\u0435			if(document.getElementById("id_tableSpecAll") != null)				{									if (document.getElementById("id_inquiryCarTC").checked == false							&& document.getElementById("id_inquiryBr").checked== false							&& document.getElementById("id_inquiryOS").checked== false							&& document.getElementById("id_inquiryAg").checked== false							&& document.getElementById("id_inquiryPSC").checked== false							&& document.getElementById("id_inquiryIB").checked== false							&& document.getElementById("id_inquiryCon").checked== false							&& document.getElementById("id_inquiryOtherSpec").value== "")								if(errMsg != "")									errMsg += ", specialization";								else									errMsg += "specialization";			}			if(document.getElementById("id_ccnumber") != null && document.getElementById("id_ccnumber").value == "")				if(errMsg != "")					errMsg += ", Credit Card Number";				else					errMsg += "Credit Card Number";								if(document.getElementById("id_ccname") != null && document.getElementById("id_ccname").value == "")				if(errMsg != "")					errMsg += ", Cardholders Name as it appears exactly on the card";				else					errMsg += "Cardholders Name as it appears exactly on the card";								if(document.getElementById("id_billingaddress") != null && document.getElementById("id_billingaddress").value == "")				if(errMsg != "")					errMsg += ", Full Billing Address, where the card is registered";				else					errMsg += "Full Billing Address, where the card is registered";				if(document.getElementById("id_ccinumber") != null && document.getElementById("id_ccinumber").value == "")				if(errMsg != "")					errMsg += ", Credit Card Identification Number";				else					errMsg += "Credit Card Identification Number";				if(errMsg != "")			{				errMsg = "You need fill fileds: " + errMsg;										alert(errMsg);										return false;			}			else			{				return true;			}	}	catch(err)	{		return false;	}}