function showLoginPanel(obj)
{
    document.getElementById("loginPanel").style.display = "block" ;
}
function closeLoginPanel()
{
    document.getElementById("loginPanel").style.display = "none" ;
}
function clearInput(value, id)
{
    var input = document.getElementById(id) ;
    if(value == input.value)
        input.value = '' ;
}
function showTenderPopupWindow(link, width, height)
{
    width = (!width || width == 0) ? 580 : width ;
    height = (!height || height == 0) ? 620 : height ;
    var left = parseInt(screen.width / 2 - width / 2) ;
    var top = parseInt(screen.height / 2 - height / 2) ;
  
    if(screen.width < 1024 || screen.height < 756)
    {
        var top = 0 ;
        height = 500 ;
    }
    newOknoPopup = window.open(link, 'PopupWin', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,left=' + left + ',top=' + top + ',width=' + width + ',height=' + height) ;
    newOknoPopup.focus() ;
}
function setCookie(c_name, value, exdays)
{
    var exdate=new Date();
    exdate.setDate(exdate.getDate() + exdays);
    var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
    document.cookie=c_name + "=" + c_value;
}
function getCookie(c_name)
{
    var i,x,y,ARRcookies=document.cookie.split(";");
    for (i=0;i<ARRcookies.length;i++)
    {
        x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
        y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
        x=x.replace(/^\s+|\s+$/g,"");
        if (x==c_name)
        {
            return unescape(y);
        }
    }
}
var cookieName = 'orlen_font_size';
function changeFontSize(newSize)
{
    if (!newSize || !(newSize == '1em' || newSize == '1.2em' || newSize == '1.4em'))
    {
        document.getElementById('fontSmall').style.fontWeight = 'bold';
        return;
    }
    setCookie(cookieName, newSize, 1);

    document.getElementById('fontSmall').style.fontWeight = (newSize == '1em') ? 'bold' : 'normal';
    document.getElementById('fontNormal').style.fontWeight = (newSize == '1.2em') ? 'bold' : 'normal';
    document.getElementById('fontBig').style.fontWeight = (newSize == '1.4em') ? 'bold' : 'normal';

    document.getElementById('content').style.fontSize = newSize;
    document.getElementById('infoGate').style.fontSize = newSize;   //can be NULL
}

