﻿// JScript File

function ov(r)
{
    r.style.backgroundColor='LightSteelBlue';
}

function ot(r)
{
    r.style.backgroundColor='';
}

function oid(s)
{
    window.open("/TradingandStatistics/IndexDetail.aspx?index=" + s,"_blank","width=600,height=500,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no")
} 

function OpenGr(s,m)
{
    window.open("/TradingandStatistics/EmitGraficIntra.aspx?s=" + s + "&m="+ m ,'',"width=850,height=450,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no")
} 

function ow(s,m,t)
{
    if (t==1)
        EmitGraficWindow = window.open('EmitGraficIntra.aspx?s='+s+'&m='+m,'','width=850,height=450,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no');
    else
        EmitGraficWindow = window.open('EmitGraficOnLine.aspx?s='+s+'&m='+m,'','width=1000,height=450,top=200,left=200,toolbars=no,scrollbars=no,status=no,resizable=no');

}

//

function opf()
{
    var opf = window.open('/feedback.aspx','','width=600px,height=520px,top=200px,left=200px,toolbars=no,scrollbars=no,status=no,resizable=no')
}

/*Home page start*/  


//tables : Statistici piete
function divInter(d,a)
{
    if (typeof butt !="undefined" !='')
    {
        butt.style.background  = "#CDDBEB";
        butt.style.color = "#075296";
    }
    last.style.display = "none";
    document.getElementById(d).style.display = "block";
    last=document.getElementById(d);
    a.style.background  = "#075296";
    a.style.color = "white";
    butt = a;
    return false;
}
                                    
             
//tables : Indici grafice                       
function showGrafic(g,r)
{                             
 if (defr != null )  
    defr.className="TD_gray_info";

 defg.style.display="none";    
 if (document.getElementById(g))
 {
     document.getElementById(g).style.display="block"; 
     defg = document.getElementById(g);
 }
 
 document.getElementById(r).className="TD_whiteblue_info";
 defr = document.getElementById(r);
 
}

// scroll functii   
var mq=true;
                             
function marqueemove(d)
{
    document.getElementById(document.getElementById("hScrollID").value).direction=d;
}

function marqueereStop()
{
    mq="false";
    document.getElementById(document.getElementById("hScrollID").value).stop();
}

function toogle()
{
    if (mq )
        document.getElementById(document.getElementById("hScrollID").value).stop();
    else
        document.getElementById(document.getElementById("hScrollID").value).start();
   mq=!mq;
}
                                
/*Hopme page end*/  

/*Tr curente page start*/  

function ht(t)
{
    hideTable(); 
    //t.innerHTML = '[+]'; 
}
 
function st(t,s)
{
    showTable(t,s);
    t.innerHTML = '[..]';
}

function setA(t,s)
{ 
    st(t,s); 

    if (t.id != 'ev')
        {
            t.id = 'ev';
            if (t.addEventListener) 
                t.addEventListener("mouseout",function(){ht(t);} ,false);
            else 
                if (t.attachEvent) 
                    t.attachEvent("onmouseout",function(){ht(t);});
                else 
                    t.onmouseout = function(){ht(t);};
        } 
}

function Set_Cookie( name, value, expires, path, domain, secure ) 
{ 
    var today = new Date();
    today.setTime( today.getTime() );

     
    if ( expires )
    {
    expires = expires * 1000 * 60 * 60 * 24;
    }
    var expires_date = new Date( today.getTime() + (expires) );

    document.cookie = name + "=" +escape( value ) +
    ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
    ( ( path ) ? ";path=" + path : "" ) + 
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ( ( secure ) ? ";secure" : "" );

}

function Get_Cookie( name ) 
{
	
    var start = document.cookie.indexOf( name + "=" );
    var len = start + name.length + 1;
    if ( ( !start ) &&
    ( name != document.cookie.substring( 0, name.length ) ) )
    {
    return null;
    }
    if ( start == -1 ) return null;
    var end = document.cookie.indexOf( ";", len );
    if ( end == -1 ) end = document.cookie.length;
    return unescape( document.cookie.substring( len, end ) );
}

/*Tr curente page end*/  
