//Условные обозначения :смена цвета ссылки при наведении = SCSPN
//Условные обозначения :смена цвета ссылки при отведении = SCSPO
//katrochka.tpl

function SCSPNkartochka(UrlId, UrlIdGlobal)
	{
		
			
		document.getElementById('list'+ UrlId).className = "SpanColorText Rowggg";
	}
		
function SCSPOkartochka(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('list'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}

function SCSPNkartochka1(UrlId, UrlIdGlobal)
	{
		
			
		document.getElementById('kartocka1'+ UrlId).className = "SpanColorText Rowggg";
	}
		
function SCSPOkartochka1(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('kartocka1'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}

	
//kartochkaprod.tpl	
	
function SCSPNkartochkaprod(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('kartochkaprod'+ UrlId).className = "SpanColorText Rowggg";
	}
		
function SCSPOkartochkaprod(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('kartochkaprod'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}	
	
	
	
	//ListProd.tpl
	
	
	
	function GrabAjaxKartochkaProd(UrlId, UrlIdGlobal)
	{
			
  	$.ajax(
  			{
              async: false,
              timeout: 3000,
              type: 'GET',
              url: 'http://'+document.location.host+'/script/kartochkaprodproizv.grab.ajax.php',
              data: {
                  UrlRn: UrlId,
                  UrlIdGlobal: UrlIdGlobal
              },
              beforeSend: function(){
                document.getElementById('DivSourceBackground').className = "DivSourceBackground";
                document.getElementById('DivSource').className = "DivSource";
                document.getElementById('DivSource').innerHTML = 'Загрузка…';
              },
              success: function(answ){
                document.getElementById('DivSourceBackground').className = "";
                document.getElementById('DivSource').className = "";
                document.getElementById('KartochkaContent').innerHTML = answ;
                
              }
            }
            
          
		);
		
		SelectRowProd(UrlId);
   // HTML_AJAX.grab('http://'+document.location.host+'/script/kartochkaprodproizv.grab.ajax.php?UrlRn='+UrlId+'&UrlIdGlobal='+UrlIdGlobal, callback);
  	 
   
	}
	
	
	function GrabAjaxKartochkaPrimProd(UrlId, UrlIdGlobal)
	{
				
  	$.ajax(
  	 {
              async: false,
              timeout: 3000,
              type: 'GET',
              url: 'http://'+document.location.host+'/script/kartochkaprod.grab.ajax.php',
              data: {
                  UrlRn: UrlId,
                  UrlIdGlobalname: UrlIdGlobal
              },
              beforeSend: function(){
                document.getElementById('DivSourceBackground').className = "DivSourceBackground";
                document.getElementById('DivSource').className = "DivSource";
                document.getElementById('DivSource').innerHTML = 'Загрузка…';
              },
              success: function(answ){
                document.getElementById('DivSourceBackground').className = "";
                document.getElementById('DivSource').className = "";
                document.getElementById('KartochkaContent').innerHTML = answ;
                
              }
            }
            
            
  	);
  
  	SelectRowPrimProd(UrlId);
 
   // HTML_AJAX.grab('http://'+document.location.host+'/script/kartochkaprod.grab.ajax.php?UrlRn='+UrlId+'&UrlIdGlobal='+UrlIdGlobal, callback);
  	
	
		
	}
	
function SelectRowProd(UrlId)
	{
		
		if ('' != document.getElementById('FormHidName').value)
		{
			document.getElementById(document.getElementById('FormHidName').value).className = document.getElementById('FormHidValue').value;
		}
		var VarElement = document.getElementById('TrGreed'+UrlId);
		document.getElementById('FormHidName').value = 'TrGreed'+UrlId;
		document.getElementById('FormHidValue').value = VarElement.className;
		VarElement.className = "RowActiveC";
				
	}
	
	
	 function SelectRowPrimProd(UrlId)
	{  
		
		
		if ('' != document.getElementById('FormHidName').value)
		{
			document.getElementById(document.getElementById('FormHidName').value).className = document.getElementById('FormHidValue').value;
		}
		var VarElement = document.getElementById('DivGreed'+UrlId);
		document.getElementById('FormHidName').value = 'DivGreed'+UrlId;
		document.getElementById('FormHidValue').value = VarElement.className;
		VarElement.className = "RowActiveC";
		
	}
	
	/*
	
	function SCSPNListProd1(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('Tr'+ UrlId).className = "SpanColorText Rowggg";
		alert(UrlId);
	}
		
	
	
	function  SCSPOListProd1(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('Tr'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}	
	
	
	
	function  SCSPNListProd2(UrlId, UrlIdGlobal)
	{
		
		document.getElementById('Div'+ UrlId).className = "SpanColorText Rowggg";
	}
		
	function  SCSPOListProd2(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('Div'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}*/	
	
	//kartockaprodproizv
	
	function SCSPNkartockaprodproizv(UrlId, UrlIdGlobal)
	{
		
		document.getElementById('kartockaprodproizv'+ UrlId).className = "SpanColorText Rowggg";
	}
		
function SCSPOkartockaprodproizv(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('kartockaprodproizv'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}	
	
	
	//List.tpl
	
	function GrabAjaxKartochka(UrlId, UrlIdGlobal)
	{
	
		var callback = function(result) 
		{
			
        document.getElementById('KartochkaContent').innerHTML = result;
  	}
  	SelecRow(UrlId);
 
    HTML_AJAX.grab('http://'+document.location.host+'/script/kartochka.grab.ajax.php?UrlRn='+UrlId+'&UrlIdGlobal='+UrlIdGlobal, callback);
  	
	}
	
	function SelecRow(UrlId)
	{
		
		if ('' != document.getElementById('FormHidName').value)
		{
			document.getElementById(document.getElementById('FormHidName').value).className = document.getElementById('FormHidValue').value;
		}
		var VarElement = document.getElementById('TrGreed'+UrlId);
		document.getElementById('FormHidName').value = 'TrGreed'+UrlId;
		document.getElementById('FormHidValue').value = VarElement.className;
		VarElement.className = "RowActiveC";
	}
	
	
	
	function SCSPNList(UrlId, UrlIdGlobal)
	{
					
		document.getElementById('list'+ UrlId).className = "SpanColorText Rowggg";
	}
		
function SCSPOList(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('list'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}	
	
	//ListSearch.tpl
	
	
	function SmenaCvetaStroki(UrlId, UrlIdGlobal)
	{
						
			if ('' != document.getElementById('FormHidName').value)
		{
			document.getElementById(document.getElementById('FormHidName').value).className = document.getElementById('FormHidValue').value;
		}
		var VarElement = document.getElementById('TrGreed'+UrlId);
		document.getElementById('FormHidName').value = 'TrGreed'+UrlId;
		document.getElementById('FormHidValue').value = VarElement.className;
		VarElement.className = "RowActiveC";
	
	}
		
	function GreenNameStrnaved (UrlId, UrlIdGlobal)
	{
		
		document.getElementById('greennamestr'+ UrlId).className = "SpanColorText  Rowggg ";
	}
	
	function GreenNameStrbeznaved (UrlId, UrlIdGlobal)
	{
		document.getElementById('greennamestr'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}
	
	function GreenProdStrnaved (UrlId, UrlIdGlobal)
	{
		
		document.getElementById('greenprodstr'+ UrlId).className = "SpanColorText  Rowggg";
	}
	
	function GreenProdStrbeznaved (UrlId, UrlIdGlobal)
	{
		document.getElementById('greenprodstr'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}
	
	function GreenNumStrnaved (UrlId, UrlIdGlobal)
	{
		
		document.getElementById('greennumstr'+ UrlId).className = "Rowggg";
	}
	
	function GreenNumStrbeznaved (UrlId, UrlIdGlobal)
	{
		document.getElementById('greennumstr'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}
	
	function GreenDatStrnaved (UrlId, UrlIdGlobal)
	{
		
		document.getElementById('greendatstr'+ UrlId).className = "Rowggg";
	}
	
	function GreenDatStrbeznaved (UrlId, UrlIdGlobal)
	{
		document.getElementById('greendatstr'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC";
	}
	
	
	//ListSost.tpl
	
	function SmenaCvetaStroki(UrlId, UrlIdGlobal)
	{
		
						
			if ('' != document.getElementById('FormHidName').value)
		{
			document.getElementById(document.getElementById('FormHidName').value).className = document.getElementById('FormHidValue').value;
		}
		var VarElement = document.getElementById('TrGreed'+UrlId);
		document.getElementById('FormHidName').value = 'TrGreed'+UrlId;
		document.getElementById('FormHidValue').value = VarElement.className;
		VarElement.className = "RowActiveC";

		}
		
function SCSPNListSost1(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('listsost1'+ UrlId).className = "Rowggg ColorGreen ";
	}
		
function SCSPOListSost1(UrlId, UrlIdGlobal)
	{
			
		document.getElementById('listsost1'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC ColorBlack";
	}

	
	function SCSPNListSost2(UrlId, UrlIdGlobal)
	{
		
		document.getElementById('listsost2'+ UrlId).className = "Rowggg ColorGreen1 ";
	}
	
	function SCSPOListSost2(UrlId, UrlIdGlobal)
	{
		
		document.getElementById('listsost2'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC ColorBlack ";
	}
	
	
	function SCSPNListSost3(UrlId, UrlIdGlobal)
	{
		
		document.getElementById('listsost3'+ UrlId).className = "Rowggg ColorGreen1 ";
	}
	
	function SCSPOListSost3(UrlId, UrlIdGlobal)
	{
		
		document.getElementById('listsost3'+ UrlId).className = "QFnttTRowOddC QFprodaT QFprodaC ColorBlack";
	}
	
