var origW, origH;
origW = null;
origH = null;

function AdvertImageClicked(imgId)
{
    var img = document.getElementById(imgId);
    
    if (img != null)
    {
        var w = parseInt(img.style.width.replace("px", ""));
        var h = parseInt(img.style.height.replace("px", ""));

        if (origW == null)
        {
            origW = w;
        }
        if (origH == null)
        {
            origH = h;
        }
        
        //window.status = w + "," + h;
        
        w += 30;
        h += 30;
        
        img.style.width  = w + "px";
        img.style.height = h + "px";
    }
}

function AdvertImageMouseOut(imgId)
{
    var img = document.getElementById(imgId);
    
    if (img != null)
    {
        if(origW != null)
        {
            img.style.width  = origW;
            origW = null;
        }
        if(origH != null)
        {
            img.style.height = origH;
            origH = null;
        }        
    }
}

// -----------
// BANMAN code
// -----------
function writeBanManCode(zoneId,siteId)
{
    var browName     = navigator.appName;
    var browDateTime = (new Date()).getTime();
    var browVersion  = parseInt(navigator.appVersion);
    var ua           = navigator.userAgent.toLowerCase();
    var adcode       = '';

    if (browName=='Netscape')
    {
        if (browVersion>=5)
        {
            document.write('<ifr'+'ame src="http://banman.nepsecure.co.uk/ad.aspx?ZoneID=' + zoneId + '&Task=Get&Browser=NETSCAPE6&SiteID=' + siteId + '&X=' + browDateTime + '" width=120 height=60 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No></ifr'+'ame>');
        }
        else if ((browVersion>=4)&&(ua.indexOf("mac")==-1))
        {
            document.write('<S'+'CRIPT src="http://banman.nepsecure.co.uk/ad.aspx?ZoneID=' + zoneId + '&Task=Get&Browser=NETSCAPE4&SiteID=' + siteId + '">');
            document.write('</'+'scr'+'ipt>');
            document.write(adcode);
        }
        else if (browVersion>=3)
        {
            document.write('<A HREF="http://banman.nepsecure.co.uk/ad.aspx?ZoneID=' + zoneId + '&Task=Click&Mode=HTML&SiteID=' + siteId + '&PageID=' + browDateTime + '&RandomNumber=' + browDateTime + '" target="_new"><IMG SRC="http://banman.nepsecure.co.uk/ad.aspx?ZoneID=' + zoneId + '&Task=Get&Mode=HTML&SiteID=' + siteId + '&PageID=' + browDateTime + '&RandomNumber=' + browDateTime + '" width="120" height="60" border="0"></A>');
        }
    }
    if (browName=='Microsoft Internet Explorer')
    {
        document.write('<ifr'+'ame src="http://banman.nepsecure.co.uk/ad.aspx?ZoneID=' + zoneId + '&Task=Get&SiteID=' + siteId + '&X=' + browDateTime + '" width=120 height=60 Marginwidth=0 Marginheight=0 Hspace=0 Vspace=0 Frameborder=0 Scrolling=No></ifr'+'ame>');
    }
}
// e.g. writeBanManCode(2700,47);
