// JavaScript Document

//Tasting Table Start
 
//////////////////////////////////////////////////////////////////
// we need the Ektron served holder and the TT served iframe to be
// sub-domains of each other and also tell the browser it's OK for
// them to talk to each other
//////////////////////////////////////////////////////////////////
document.domain="golfpartnersclub.com";
var _site = 'http://www.golfpartnersclub.com'
 
 
///////////////////////////////////////////////////////////////////////
// displayArticleDetail:  
// We want to display a larger iframe containing the selected articles details
// (and also change the page layout a bit).
// Since the article detail is served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displayArticleDetail(inEdition, inArticleId, inNavSection, inName) 
{ 
       var ektronUrl = _site+'/tips/detail.aspx';
       window.location = ektronUrl + "?editionName=" + inEdition + '&articleId=' + inArticleId + '&navSection=' + escape(inNavSection) + '&articleName=' + escape(inName);
       //http://enews.golfpartnersclub.com/entry_by_section/golf/all/1/all/all/all/content_by_section
       //http://enews.golfpartnersclub.com/entry_detail/golf/259
       //?editionName=golf&articleId=259&navSection=Travel&articleName=Put-Up-or-Shut-Up+Cup+in+Wales
} 
 
///////////////////////////////////////////////////////////////////////
// displaySearchResults:  
// We want to display a larger iframe containing the search results
// (and also change the page layout a bit).
// Since the search results are served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displaySearchResults(inEdition,inSearchTerm) 
{ 
       var ektronUrl = _site+'/main/search.aspx';
       window.location = ektronUrl+"?editionName="+inEdition+'&searchTerm='+inSearchTerm;
} 
 
///////////////////////////////////////////////////////////////////////
// displayArticleArchive:  
// We want to display a larger iframe containing the selected articles details
// (and also change the page layout a bit).
// Since the article detail is served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displayArticleArchive(inNavSection) 
{ 
       var ektronUrl = _site+'/articles/archive.aspx';
       window.location = ektronUrl+"?navSection="+escape(inNavSection);
} 
 
///////////////////////////////////////////////////////////////////////
// displayAgendaDetail:  
// We want to display a larger iframe containing the selected multi-part details
// (and also change the page layout a bit).
// Since the multi-part article detail is served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displayAgendaDetail(inEdition, inArticleId, inNavSection, inName) 
{ 
       var ektronUrl = _site+'/articles/articles.aspx';
       window.location = ektronUrl+"?editionName="+inEdition+'&articleId='+inArticleId+'&navSection='+escape(inNavSection)+'&articleName='+escape(inName);
} 
 
///////////////////////////////////////////////////////////////////////
// displayArticleShare:  
// We want to display a larger iframe containing the selected articles details
// (and also change the page layout a bit).
// Since the article detail is served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displayArticleShare(inArticleId) 
{ 
       var ektronUrl = _site+'/main/ftf.aspx';
       window.location = ektronUrl+"?contentType=1&contentId="+inArticleId;
} 
 
///////////////////////////////////////////////////////////////////////
// displayArticleShare:  
// We want to display a larger iframe containing the selected articles details
// (and also change the page layout a bit).
// Since the article detail is served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displayAgendaShare(inArticleId) 
{ 
       var ektronUrl = _site+'/main/ftf.aspx';
       window.location = ektronUrl+"?contentType=2&contentId="+inArticleId;
} 
 
///////////////////////////////////////////////////////////////////////
// displaySubscribe:  
// We want to display a larger iframe containing the selected articles details
// (and also change the page layout a bit).
// Since the article detail is served by the TT platform, we will display a new
// Ektron holder page which contains a resized iframe.  The input parameters
// to this function are needed for the iframe's src attribute, so they will be passed
// to the Ektron page.
//////////////////////////////////////////////////////////////////////
function displaySubscribe() 
{ 
 
    var ektronUrl = _site+'/main/subscribe.aspx';
       window.location = ektronUrl;
} 
 
//Tasting Table End

