﻿// JScript File

// ndmadkit code for cumberland, village voice and fpc
// see /skins/realview/fpc/topcontent.htm for topcontent html
var hostname = location.hostname.toLowerCase();
var hosthref=location.href;
var qs = location.search.toLowerCase();
var section = '';
var TRAKTR_site = '';
var TRAKTR_pn = '';
var bannerimage = "";
var emailalertlink = '<a href="javascript:showregfrm()" style="font-weight:bold;font-size:16px;color:#000000;">Register for email alert to receive your electronic edition each week</a>';
switch (hostname)
{
    // CUMBERLAND
    
    case 'digitaledition.blacktownadvocate.com.au' :case 'property.blacktownadvocate.com.au' :
        section = 'CUMBERLANDCBAG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-BAG.jpg border=0>';
        break;
    case 'digitaledition.hillsshiretimes.com.au' :case 'property.hillsshiretimes.com.au' :
        section = 'CUMBERLANDCHSG.DIGEDITION';
        bannerimage = '<img src=/skins/template/hillshire/Banner-HST.jpg border=0>';
        break;
    case 'digitaledition-innerwest.innerwestcourier.com.au' :
        section = 'CUMBERLANDCIWIWC.DIGEDITION';
        bannerimage = '';
        break;    
        
    case 'digitaledition.hornsbyadvocate.com.au':case 'property.hornsbyadvocate.com.au':
        section = 'CUMBERLANDCHDA.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CH.jpg border=0>';
        break;
        
    case 'digitaledition.innerwesterncourier.com.au':
        section = 'CUMBERLANDCIWCRR.DIGEDITION';
        bannerimage = '';
        break;    
    case 'digitaledition.9to5.com.au':
        section = 'CUMBERLANDC9TO5.DIGEDITION';
        bannerimage = '';
        break;   
            
    case 'digitaledition.innerwestweekly.com.au' :case 'property.innerwestweekly.com.au' :
        section = 'CUMBERLANDCIWW.DIGEDITION';  
        bannerimage = '<img src=/skins/cumberland/images/Banner-CIWW.jpg border=0>';
        break;
        
    case 'digitaledition.northerndistricttimes.com.au' :case 'property.northerndistricttimes.com.au' :
        section = 'CUMBERLANDCNDG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-NDT.jpg border=0>';
        break;
        
    case 'digitaledition.theglebe.com.au' : case 'property.theglebe.com.au' :
        section = 'CUMBERLANDCGWW.DIGEDITION'; 
        bannerimage = '<img src=/skins/cumberland/images/Banner-CTG.jpg border=0>';   
        break;
    
    case 'digitaledition.theweekender.com.au' :
        section = 'QUESTCTWKDR.DIGEDITION'; 
        bannerimage = '<img src=skins/realview/fpc/weekender/weekender-noosa-title.gif border=0>';
        break;
    case 'digitaledition.mypittwater.com.au' :
        section = 'CUMBERLANDCPIT.DIGEDITION'; 
        bannerimage = '';
        break;
    case 'property.lakemacquarienews.com.au' :
        section = 'CUMBERLANDCLKMCQ.DIGEDITION'; 
        bannerimage = '';
        break;    
           
    case 'digitaledition-gosford.expressadvocate.com.au' :
        section = 'CUMBERLANDCEXG.DIGEDITION'; 
        bannerimage = '';
        break;       
         
    case 'digitaledition-wyong.expressadvocate.com.au' :
        section = 'CUMBERLANDCAXG.DIGEDITION'; 
        bannerimage = '';
        break;            
           
    case 'digitaledition.expressadvocate.com.au' :case 'property.expressadvocate.com.au' :
        // need something here for gosford?
        if(qs.indexOf('xml=express_wyong.xml') > -1)
        {
           section = 'CUMBERLANDCAXG.DIGEDITION';
           
        }
        else
        {
           section = 'CUMBERLANDCCCX.DIGEDITION';
           bannerimage = '<img src=/skins/cumberland/images/Banner-CEA.jpg border=0>';
        }
        break;
        
    case 'digitaledition.northshoretimes.com.au' :case 'property.northshoretimes.com.au' :
        section = 'CUMBERLANDCNSG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CNS.jpg border=0>';    
        break;
        
    case 'digitaledition.manlydaily.com.au' :case 'property.manlydaily.com.au' :
        section = 'CUMBERLANDCMAN.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CMD.jpg border=0>';    
        break;
        
    case 'digitaledition.mosmandaily.com.au' :case 'property.mosmandaily.com.au' :
        section = 'CUMBERLANDCMOS.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CMM.jpg border=0>';
        break;
        
    case 'digitaledition.theexpress.com.au' :case 'property.theexpress.com.au' :
        section = 'CUMBERLANDCCBX.DIGEDITION';  
        bannerimage = '<img src=/skins/cumberland/images/Banner-CAX.jpg border=0> ';  
        break;
        
    case 'digitaledition.fairfieldadvance.com.au' :case 'property.fairfieldadvance.com.au' :
        section = 'CUMBERLANDCFAG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CFA.jpg border=0>'; 
        break;
    case 'digitaledition-innercity.innerwestcourier.com.au' :
        section = 'CUMBERLANDCICIWC.DIGEDITION';
        bannerimage = '';
        break;    
        
    case 'digitaledition.liverpoolleader.com.au' :case 'property.liverpoolleader.com.au' :
        section = 'CUMBERLANDCLLG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CLL.jpg border=0>'; 
        break;
        
    case 'digitaledition.macarthurchronicle.com.au' :case 'property.macarthurchronicle.com.au' :
        // need something here for campbelltown?
        if(qs.indexOf('index=caindex.djvu') > -1)
        {
            section = 'CUMBERLANDCCAG.DIGEDITION';   
        }
        else if(qs.indexOf('index=wcindex.djvu') > -1)
        {
            section = 'CUMBERLANDCWCG.DIGEDITION';   
        }
        else
        {
            section = 'CUMBERLANDCCMC.DIGEDITION';     
        }
        bannerimage = '<img src=/skins/cumberland/images/Banner-CCM.jpg border=0>';
        break;
        
    case 'digitaledition.mtdruittstandard.com.au' :case 'property.mtdruittstandard.com.au' :
        section = 'CUMBERLANDCMDG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CS.jpg border=0>';    
        break;
        
    case 'digitaledition.parramattaadvertiser.com.au' :case 'property.parramattaadvertiser.com.au' :
        section = 'CUMBERLANDCPAG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CPA.jpg border=0>';  
        break;
        
    case 'digitaledition.penrithpress.com.au' :case 'property.penrithpress.com.au':
        section = 'CUMBERLANDCPPG.DIGEDITION';
        bannerimage = '<img src=/skins/cumberland/images/Banner-CPP.jpg border=0>';  
        break;
        
    case 'digitaledition.rousehilltimes.com.au' :case 'property.rousehilltimes.com.au' :
        section = 'CUMBERLANDCRHT.DIGEDITION';    
        bannerimage = '<img src=/skins/cumberland/images/Banner-CRT.jpg border=0>';  
        break;


    // VILLAGE VOICE
    case 'digitaledition.balmainvillagevoice.com.au' : case 'drummoyne.villagevoice.com.au' :
        section = 'CUMBERLANDCVVB.DIGEDITION';
        bannerimage = '<a href="http://www.villagevoice.com.au/" target="_blank"><img src="/skins/realview/vv_balmain/balmain-logo.gif" border=0></a>';    
        break;
        
    case 'digitaledition.drummoynevillagevoice.com.au' :case 'digitaledition.drummoynevillagevoice.com.au' :
        section = 'CUMBERLANDCVVD.DIGEDITION';
        bannerimage = '<a href="http://www.villagevoice.com.au/" target="_blank"><img src="/skins/realview/vv_drummoyne/drummoyne-logo.gif" border=0></a>'; 
        break;
        
    case 'digitaledition.randwickvillagevoice.com.au' :
        section = 'CUMBERLANDCVBE.DIGEDITION';
        bannerimage = '<a href="http://www.villagevoice.com.au/" target="_blank"><img src="/skins/realview/vv_estbeaches/beaches-logo.gif" border=0></a>';
        break;
        
    case 'digitaledition.woollahravillagevoice.com.au' :
        section = 'CUMBERLANDCVHA.DIGEDITION';  
        bannerimage = '<a href="http://www.villagevoice.com.au/" target="_blank"><img src="/skins/realview/vv_estharbour/harbour-logo.gif" border=0></a>';
        break;


    // COURIER
    case 'digitaledition.alivesydney.com.au' :
        section = 'CUMBERLANDCCWK.DIGEDITION';    
        break;
        
    case 'digitaledition.centralmag.com.au' :
        section = 'CUMBERLANDCCEN.DIGEDITION';    
        break;
        
    case 'digitaledition.southerncourier.com.au' :
        section = 'CUMBERLANDCSCR.DIGEDITION';    
        break;
        
    case 'digitaledition.wentworthcourier.com.au' :
        section = 'CUMBERLANDCWNC.DIGEDITION';    
        break;
        
    case 'digitaledition.mynorthside.com.au' :
        section = 'CUMBERLANDCNOR.DIGEDITION';
        break;
        
    case 'digitaledition.innerwestcourier.com.au' :    
        if(qs.indexOf('index=iccindex.djvu') > -1)
        {
            section = 'CUMBERLANDCICC.DIGEDITION';   
        }
        else
        {
            section = 'CUMBERLANDCIWC.DIGEDITION';     
        }
        break;


    // MESSENGER

    case 'digitaledition.messengernews.com.au' :
        section = 'MESSENGER.DIGEDITION';    
        break;
        
    case 'countryfooty2009.realviewtechnologies.com' :
        section = 'MESSENGERMCOU.DIGEDITION';    
        break;
        
    case 'digitaledition.leadermessenger.com.au' :
        section = 'MESSENGERMLDR.DIGEDITION';    
        break;
        
    case 'digitaledition.standardmessenger.com.au' :
        section = 'MESSENGERMSTD.DIGEDITION';    
        break;
        
    case 'digitaledition.easterncourier.com.au' :
        section = 'MESSENGERMECO.DIGEDITION';    
        break;
        
    case 'digitaledition.etmessenger.com.au' :
        section = 'MESSENGERMPAY.DIGEDITION';    
        break;

    case 'digitaledition.guardianmessenger.com.au' :
        section = 'MESSENGERMGAR.DIGEDITION';    
        break;

    case 'digitaledition.southerntimes.com.au' :
        section = 'MESSENGERMSTH.DIGEDITION';    
        break;

    case 'digitaledition.hvmessenger.com.au' :
        section = 'MESSENGERMHIL.DIGEDITION';    
        break;

    case 'digitaledition.wktmessenger.com.au' :
        section = 'MESSENGERMWKT.DIGEDITION';    
        break;

    case 'digitaledition.portsidemessenger.com.au' :
        section = 'MESSENGERMPRT.DIGEDITION';    
        break;
    
    case 'digitaledition.citynorthmessenger.com.au' :
        section = 'MESSENGERMCNRTH.DIGEDITION';    
        break;
        
    case 'digitaledition.citymessenger.com.au' :
        section = 'MESSENGERMCTY.DIGEDITION';    
        break;
        
    case 'digitaledition.nrmessenger.com.au' :    
        if(qs.indexOf('index=elzindex.djvu') > -1)
        {
            section = 'MESSENGERMNRE.DIGEDITION';   
        }
        else
        {
            section = 'MESSENGERMNRS.DIGEDITION';     
        }
        break;

    case 'digitaledition.adelaidematters.com.au' :
        section = 'MESSENGERMMDE.DIGEDITION'; 
        break;

    case 'digitaledition.sahomebuyersguide.com.au' :
        section = 'MESSENGERMHME.DIGEDITION';    
        break;

    case 'bidbuyandsave.realviewtechnologies.com' :
        section = 'MESSENGER.DIGEDITION';    
        break;
        
   //Herald sun
   case 'heraldsunformguide.realviewtechnologies.com' :
        section = 'HERALDSUNFORM.DIGEDITION'; 
        TRAKTR_site = 'hwt';
        TRAKTR_pn = "heraldsun | digitaledition || ";
        break;
   case 'dailytelegraphformguide.realviewtechnologies.com' :
        section = 'DAILYTELEGRAPHFORMGUIDE.DIGEDITION'; 
        TRAKTR_site = 'dtm';
        TRAKTR_pn = "dailytelegraph | digitaledition || ";
        break; 
   case 'sass.realviewtechnologies.com' :
        section = 'SASS.DIGEDITION'; 
        break;
   case 'adelaideshopsmart.realviewtechnologies.com' :
        section = 'ADELAIDESHOPSMART.DIGEDITION'; 
        TRAKTR_site = 'adv';
        TRAKTR_pn = "adelaidenow | digitaledition || ";
        break;
   case 'anzacdaymedals.realviewtechnologies.com' :
        section = 'ANZACDAYMEDALS.DIGEDITION'; 
        break;                       
   
};

if(TRAKTR_site == '')
{
    TRAKTR_site = section.replace('.DIGEDITION','');
}
/*
if(hosthref.indexOf('default.aspx')>-1)
        {
        section=section.replace('.DIGEDITION','DFLTASPX.DIGEDITION');
        }  
if(hostname.indexOf('property.')>-1)
        {
        section=section.replace('.DIGEDITION','PRPRTY.DIGEDITION');
        }         
*/

function showregfrm(){
    var features = 'left=0,top=0,screenX=0,screenY=0,scrollbars=yes,status=no,width=600,height=500';
    open('/skins/fpc/registration/register.asp?pub=' + RVKernel.pname + '&pid=' + RVKernel.pid,'regpopup',features); 
};
