// Copyright 1999-2002 Alexandre CABADET - HEADWAY CREATIVE


var isOpenwinLoaded = false;


///////////////////////////////////////////////////////////
// Window functions
///////////////////////////////////////////////////////////
function openWin(url, windowname, w, h)
{
    newWin=window.open(url, windowname, "scrollbars=yes,width="+w+",height="+h+",resizable=1");
    if (newWin) newWin.focus(true);
}

function calculateDimension(w, h)
{
    widthWin = w;
    heightWin = h;
    leftWin = (screen.availWidth-widthWin)/2;
    topWin = (screen.availHeight-heightWin)/2;
}

function openGcs()
{
    calculateDimension(650, 450);
    newWin=window.open('infos/gcs.html', "gcsWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=yes");
    if (newWin) newWin.focus(true);
}

function openAbout()
{
    calculateDimension(500, 300);
    newWin=window.open('infos/about.html', "aboutWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=no");
    if (newWin) newWin.focus(true);
}

function openLegal()
{
    calculateDimension(500, 300);
    newWin=window.open('infos/legal.html', "legalWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=no");
    if (newWin) newWin.focus(true);
}

function openSecure()
{
    calculateDimension(650, 480);
    newWin=window.open('infos/secure.html', "secureWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=yes");
    if (newWin) newWin.focus(true);
}

function openSupport(lg)
{
    var page;
    page = 'infos/support.html';
    if (lg) page = '/' + lg + '/' + page;

    calculateDimension(500, 200);
    newWin=window.open(page, "supportWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=no");
    if (newWin) newWin.focus(true);
}

function openHistory()
{
    calculateDimension(500, 450);
    newWin=window.open('infos/history.html', "historyWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=yes");
    if (newWin) newWin.focus(true);
}

function openLicense()
{
    calculateDimension(500, 470);
    newWin=window.open('infos/license.html', "licenseWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=yes");
    if (newWin) newWin.focus(true);
}

function openRecommend()
{
    calculateDimension(510, 400);
    newWin=window.open('infos/recommend.html', "recommendWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=no");
    if (newWin) newWin.focus(true);
}

function openCommitment()
{
    calculateDimension(650, 450);
    newWin=window.open('infos/commitment.html', "commitmentWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=yes");
    if (newWin) newWin.focus(true);
}

function openRecruitment()
{
    calculateDimension(510, 450);
    newWin=window.open('infos/recruitment.html', "recruitmentWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=no");
    if (newWin) newWin.focus(true);
}

function openTestimonies()
{
    calculateDimension(500, 450);
    newWin=window.open('infos/testimonies.html', "testimoniesWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=0,scrollbars=no");
    if (newWin) newWin.focus(true);
}

function openBasketPopup()
{
    calculateDimension(300, 150);
    newWin=window.open('basket_thanks.html', "basketWin", "width="+widthWin+",height="+heightWin+",left="+leftWin+",top="+topWin+",resizable=no,scrollbars=no,titlebar=no,toolbar=no,status=no,menubar=no");
    if (newWin) newWin.focus(true);
}


///////////////////////////////////////////////////////////
// The following codeline must be the last one !!!
///////////////////////////////////////////////////////////
isOpenwinLoaded = true;
