﻿//-----------------------------------------------------------------------------------------------------------------------------------
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 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' ;
}
function toggleDiv(id)
{
      if(document.getElementById(id).style.display = 'block')
      {
        document.getElementById(id).style.display = 'none';
      }
      else if(document.getElementById(id).style.display = 'none')
      {
        document.getElementById(id).style.display = 'block';
      }
}
//-----------------------------------------------------------------------------------------------------------------------------------
var aMHS = new Array();
(aMHS[0] = new Image()).src = "~/../HE/GrNew/Sm/2.gif" ;
(aMHS[1] = new Image()).src = "~/../HE/GrNew/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/GrNew/Sm/2.gif" ;
(aMSS[1] = new Image()).src = "~/../HE/GrNew/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/GrNew/Sm/1.gif" ;
(aMSA[1] = new Image()).src = "~/../HE/GrNew/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'
}
//-----------------------------------------------------------------------------------------------------------------------------------

 //MenuBtn Change//
    
var a1 = new Array();
(a1[0] = new Image()).src = "~/../HE/Gr/Btns/BM/1/a1.gif";
(a1[1] = new Image()).src = "~/../HE/Gr/Btns/BM/2/a1.gif";
(a1[2] = new Image()).src = "~/../HE/Gr/Btns/BM/3/a1.gif";
//------------------------------------------------
var a2 = new Array();
(a2[0] = new Image()).src = "~/../HE/Gr/Btns/BM/1/a2.gif";
(a2[1] = new Image()).src = "~/../HE/Gr/Btns/BM/2/a2.gif";
(a2[2] = new Image()).src = "~/../HE/Gr/Btns/BM/3/a2.gif";
//------------------------------------------------
var a3 = new Array();
(a3[0] = new Image()).src = "~/../HE/Gr/Btns/BM/1/a3.gif";
(a3[1] = new Image()).src = "~/../HE/Gr/Btns/BM/2/a3.gif";
(a3[2] = new Image()).src = "~/../HE/Gr/Btns/BM/3/a3.gif";
//------------------------------------------------
var a4 = new Array();
(a4[0] = new Image()).src = "~/../HE/Gr/Btns/BM/1/a4.gif";
(a4[1] = new Image()).src = "~/../HE/Gr/Btns/BM/2/a4.gif";
(a4[2] = new Image()).src = "~/../HE/Gr/Btns/BM/3/a4.gif";
//------------------------------------------------
var a5 = new Array();
(a5[0] = new Image()).src = "~/../HE/Gr/Btns/BM/1/a5.gif";
(a5[1] = new Image()).src = "~/../HE/Gr/Btns/BM/2/a5.gif";
(a5[2] = new Image()).src = "~/../HE/Gr/Btns/BM/3/a5.gif";
//------------------------------------------------
var a6 = new Array();
(a6[0] = new Image()).src = "~/../HE/Gr/Btns/BM/1/a6.gif";
(a6[1] = new Image()).src = "~/../HE/Gr/Btns/BM/2/a6.gif";
(a6[2] = new Image()).src = "~/../HE/Gr/Btns/BM/3/a6.gif";
//------------------------------------------------
var aContact = new Array();
(aContact[0] = new Image()).src = "~/../HE/Gr/Contact/send.gif";
(aContact[1] = new Image()).src = "~/../HE/Gr/Contact/send_b.gif";
(aContact[2] = new Image()).src = "~/../HE/Gr/Contact/send_b.gif";
//------------------------------------------------

var aPlay = new Array();
(aPlay[0] = new Image()).src = "~/../HE/Gr/Product/play.gif";
(aPlay[1] = new Image()).src = "~/../HE/Gr/Product/play_b.gif";
(aPlay[2] = new Image()).src = "~/../HE/Gr/Product/play_b.gif";
//------------------------------------------------

var aBack = new Array();
(aBack[0] = new Image()).src = "~/../HE/Gr/Product/back.gif";
(aBack[1] = new Image()).src = "~/../HE/Gr/Product/back_b.gif";
(aBack[2] = new Image()).src = "~/../HE/Gr/Product/back_b.gif";
//------------------------------------------------

var aMagic = new Array();
(aMagic[0] = new Image()).src = "~/../HE/Gr/Default/logo_magic_concepts.jpg";
(aMagic[1] = new Image()).src = "~/../HE/Gr/Default/logo_magic_concepts_b.jpg";
//------------------------------------------------
var aRubik = new Array();
(aRubik[0] = new Image()).src = "~/../HE/Gr/Default/logo_rubiks.jpg";
(aRubik[1] = new Image()).src = "~/../HE/Gr/Default/logo_rubiks_b.jpg";
//------------------------------------------------
var aPB = new Array();
(aPB[0] = new Image()).src = "~/../HE/Gr/Default/logo_pb.jpg";
(aPB[1] = new Image()).src = "~/../HE/Gr/Default/logo_pb_b.jpg";
//------------------------------------------------


    function jsfSIS( array, o, i ) // Set Image Source
    {
	    o.src = array[i].src ;
    }
    
    
  //---  Articles POPup - //
  
function jsfPopup(cid,aid,wndWidth,wndHeight) // Popup Image Window Centered
{
    var wndLeft = ( screen.width - wndWidth ) / 2;
    var wndTop = ( screen.height - wndHeight ) / 2;
    win = window.open("PopupArticles.aspx?cid="+cid +"&aid="+aid,"","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 jsfPopup2(id,aid,p,wndWidth,wndHeight) // Popup Image Window Centered
{
    var wndLeft = ( screen.width - wndWidth ) / 2;
    var wndTop = ( screen.height - wndHeight ) / 2;
    win = window.open("PopupArticlesPlus.aspx?id="+id +"&aid="+aid+"&p="+p,"","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 jsfPMovie(path,wndWidth,wndHeight) // Popup Image Window Centered
{
    var wndLeft = ( screen.width - wndWidth ) / 2;
    var wndTop = ( screen.height - wndHeight ) / 2;
    win = window.open("PopupMovie.aspx?path="+path,"","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes," +
	    "resizable=yes,copyhistory=no,width=" + wndWidth +",height=" + wndHeight + ",top=" + wndTop + ",left=" + wndLeft, true  );
    win.focus();
}
