//************************************************************************************
//* Copyright (c) 2006-2007 Nokia Corporation.
//*
//* This material, including documentation and any related computer programs,
//* is protected by copyright controlled by Nokia. All rights are reserved.
//* Copying, including reproducing, storing, adapting or translating,
//* any or all of this material requires the prior written consent of Nokia.
//* This material also contains confidential information, which may not be
//* disclosed to others without the prior written consent of Nokia.
//*
//* DESCRIPTION
//* -------------------------------------------------------------------------
//* This script is to be used for header and footer presentation and localized
//* contents rendering. This contains base url. Please configure this setting
//* to the matching environment which you are testing.
//* -------------------------------------------------------------------------
//*
//* CHANGE HISTORY
//* -------------------------------------------------------------------------
//*
//* Version | Date      | Developer     | Changes
//* 1.0     | 08/01/2007| Keo           | Initial creation
//* 2.0     | 10/04/2007| Damdoar       | Localized and major changes to revision
//*                                       one.
//* 3.11
//* -------------------------------------------------------------------------
//************************************************************************************
var baseURLDomain = "http://www.n-gage.com";
var secureBaseURLDomain = "https://new.arena.n-gage.com";

//var baseURLDomain = "int.arena.n-gage.com/ngi/ngage/web"; //for store


function getBaseURL(){
    //Change this String accordingly
    //Domain of the server
    return baseURLDomain;
}//getBaseURL

function getSecureBaseURL(){
    //Change this String accordingly
    //Domain of the server
    return secureBaseURLDomain;
}//getSecureBaseURL

function getPreURL(){
    //Change this String accordingly
    //Application
    var preURL = "/ngi/ngage/web";
//    var preURL = "/ngi";
//    var preURL = "";
    return preURL;
}//getPreURL

function getContextPath(){
    //collect this first part of getPreURL(), this is the context path
    if (getPreURL() == ""){return "";}
    var aPath = getPreURL().split("/");
    if (aPath.length <= 2){return getPreURL();}
    return "/" + aPath[1];
}//getPreURL


function getExternalURL(){
    //Change this String accordingly; urls to return after login
    var baseURLDomain = "qa.store.n-gage.com";
    var urlPath = "/qa/(rw1xc4vhwbvhus45p1a0re55)/main/store.aspx";
    var baseURL = location.protocol + "//" + baseURLDomain;
    if (location.port == "80" || location.port == "443" || location.port == "") {
        //no need to appen
    } else {
        baseURL += ":" + location.port;
    }
    return baseURL + urlPath;
}//getExternalURL

/***************
/* For Store
/***************/
function getStoreURL()
{
 var protocol=location.protocol=="https:"?"https://":"http://"
 var storeURL = protocol + "qa.store.n-gage.com/dev/main/setToken.aspx";
 return storeURL;
}

function getAjaxUrl()
{
 var protocol=location.protocol=="https:"?"https://":"http://"
 var storeURL = protocol + "qa.store.n-gage.com/dev/main/ajaxServices.aspx";
 return storeURL;
}
/***************
/* End For Store
/***************/

