﻿//-----------------------------------------------------------------------------------------------------------------------------------
function jsfPIWC(path,wndWidth,wndHeight) // Popup Image Window Centered
{
    var wndLeft = ( screen.width - wndWidth ) / 2;
    var wndTop = ( screen.height - wndHeight ) / 2;
    win = window.open("PopupImage.aspx?path="+path,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no," +
	    "resizable=no,copyhistory=no,width=" + wndWidth +",height=" + wndHeight + ",top=" + wndTop + ",left=" + wndLeft, true  );
    win.focus();
}
//-----------------------------------------------------------------------------------------------------------------------------------
function jsfSHM(id) // Show Hide Menu
{
	if( null != ( o = document.getElementById(id)))
		o.style.display = ( o.style.display == 'none' ) ? '':'none' ;
}
//-----------------------------------------------------------------------------------------------------------------------------------
function jsfSH(id)
{
	if( null != ( o = document.getElementById(id)))
		o.style.display = ( o.style.display == 'none' ) ? '':'none' ;
}
function jsfSC(id, className) // Set Class
{
    if(null != (es = document.getElementsByName('aSM')))
        for(i = 0; i < es.length; i++)
            es[i].className = es[i].className.replace('C','');
    
	if(null != (e = document.getElementById(id)))
	    e.className = className;
}//-----------------------------------------------------------------------------------------------------------------------------------
function jsfS(id) // Show
{
	if( null != ( o = document.getElementById(id)))
		o.style.display = '' ;
}
//-----------------------------------------------------------------------------------------------------------------------------------
function jsfH(id) // Hide
{
	if( null != ( o = document.getElementById(id)))
		o.style.display = 'none' ;
}
//-----------------------------------------------------------------------------------------------------------------------------------
var aMHS = new Array();
(aMHS[0] = new Image()).src = "~/../HE/Gr/Sm/2.gif" ;
(aMHS[1] = new Image()).src = "~/../HE/Gr/Sm/1.gif" ;
//-----------------------------------------------------------------------------------------------------------------------------------
function jsfSMHSM( o, c, id, i ) // Set Menu Horizontal Stairs Main
{
    o.style.color = c ;
	if( null != ( o = document.getElementById(id)))
	    o.src = aMHS[i].src;
}
function jsfSMHS( o, c, bgc, id, i ) // Set Menu Horizontal Stairs
{
    jsfSMHSS( o, c, bgc );

	if( null != ( o = document.getElementById(id)))
	    o.src = aMHS[i].src;
}
function jsfSMHSS( o, c, bgc ) // Set Menu Horizontal Stairs Simple
{
    o.style.color = c ;
    o.style.backgroundColor = bgc ;
}
//-----------------------------------------------------------------------------------------------------------------------------------
var aMSS = new Array();
(aMSS[0] = new Image()).src = "~/../HE/Gr/Sm/2.gif" ;
(aMSS[1] = new Image()).src = "~/../HE/Gr/Sm/1.gif" ;
//-----------------------------------------------------------------------------------------------------------------------------------
function jsfSMSS( o, c, bgc, id, i ) // Set Menu Side Stairs
{
    jsfSMSSS( o, c, bgc );
//    o.style.color = c ;
//    o.style.backgroundColor = bgc ;

	if( null != ( o = document.getElementById(id)))
	    o.src = aMSS[i].src;
}
function jsfSMSSS( o, c, bgc ) // Set Menu Side Stairs Simple
{
    o.style.color = c ;
    o.style.backgroundColor = bgc ;
}
//-----------------------------------------------------------------------------------------------------------------------------------
var aSiteMapImgs = new Array();
(aSiteMapImgs[0] = new Image()).src = "~/../HE/Gr/Bllts/tp.gif" ;
(aSiteMapImgs[1] = new Image()).src = "~/../HE/Gr/Bllts/tm.gif" ;
function jsfSTI(idTable,oImg) // Set Tree Image Plus/Minus
{
	if( null != ( oTable = document.getElementById( idTable )))
			oImg.src = oTable.style.display == 'none' ? aSiteMapImgs[0].src:aSiteMapImgs[1].src
}
//-----------------------------------------------------------------------------------------------------------------------------------
var aMSA = new Array();
(aMSA[0] = new Image()).src = "~/../HE/Gr/Sm/1.gif" ;
(aMSA[1] = new Image()).src = "~/../HE/Gr/Sm/2.gif" ;
function jsfSMSA( o, c, bgc ) // Set Menu Side Stairs
{
    o.style.color = c ;
    o.style.backgroundColor = bgc ;
}
function jsfSMSAI(id,oImg) // Set Side Menu Accordion Image
{
	if( null != ( oTr = document.getElementById(id)))
        oImg.src = oTr.style.display == 'none' ? aMSA[0].src:aMSA[1].src
}
function jsfACC(idTr)
{
    document.getElementById(trDP).style.display='block'
}
//-----------------------------------------------------------------------------------------------------------------------------------
 function csere(melyik,kepnev, img , a) {   
    if (melyik==1) {   
    document.getElementById(img).style.background="url('~/../HE/Gr/Menu/but_a.gif')"; 
    //document.getElementById(a).style.color = "#8F1603";
      
    }   
    else if (melyik==2) {   
    document.getElementById(img).style.background="url('~/../HE/Gr/Menu/but_b.gif')"; 
    //document.getElementById(a).style.color="#0D0D0D"; 
  
    }   
  }   
  //---  Articles POPup - //
function jsfPopupArticleResponse(aid,rid,wndWidth,wndHeight) // Popup Article Response
{
    var wndLeft = ( screen.width - wndWidth ) / 2;
    var wndTop = ( screen.height - wndHeight ) / 2;
    win = window.open("PopupArticleResponse.aspx?aid=" + aid + "&rid=" + rid,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no," +
	    "resizable=no,copyhistory=no,width=" + wndWidth +",height=" + wndHeight + ",top=" + wndTop + ",left=" + wndLeft, true);
    win.focus();
}
//- change img---//
var a4 = new Array();
(a4[0] = new Image()).src = "~/../HE/Gr/Default/icon_4.gif";
(a4[1] = new Image()).src = "~/../HE/Gr/Default/icon_4B.gif";
//------------------------------------------------
var a3 = new Array();
(a3[0] = new Image()).src = "~/../HE/Gr/Default/icon_3.gif";
(a3[1] = new Image()).src = "~/../HE/Gr/Default/icon_3B.gif";
//------------------------------------------------
var a2 = new Array();
(a2[0] = new Image()).src = "~/../HE/Gr/Default/icon_2.gif";
(a2[1] = new Image()).src = "~/../HE/Gr/Default/icon_2B.gif";
//------------------------------------------------
var a1 = new Array();
(a1[0] = new Image()).src = "~/../HE/Gr/Default/icon_1.gif";
(a1[1] = new Image()).src = "~/../HE/Gr/Default/icon_1B.gif";
//------------------------------------------------
var aSMenu = new Array();
(aSMenu[0] = new Image()).src = "~/../HE/Gr/Menu/but_a.gif";
(aSMenu[1] = new Image()).src = "~/../HE/Gr/Menu/but_b.gif";
//------------------------------------------------


    function jsfSIS( array, o, i ) // Set Image Source
    {
	    o.src = array[i].src ;
    }
 
 function jsfPopupProduct(id,wndWidth,wndHeight) // Popup Image Window Centered
{
    var wndLeft = ( screen.width - wndWidth ) / 2;
    var wndTop = ( screen.height - wndHeight ) / 2;
    win = window.open("PopupProduct.aspx?pid="+id,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes," +
	    "resizable=no,copyhistory=no,width=" + wndWidth +",height=" + wndHeight + ",top=" + wndTop + ",left=" + wndLeft, true  );
    win.focus();
}   