// JScript File
var scroll = 'no';
var styling = '';
switch (ESBannerType)
{
	case 0:
		ESHeight = '114px';
		ESWidth = '468px';
		break;
	case 1:
		ESHeight = '60px';
		ESWidth= '234px';
		break;
	case 2:
		ESHeight = '174px';
		ESWidth = '744px';
		break;
	case 3:
		ESHeight = '800px';
		ESWidth = '120px';
		break;
	case 4:
		ESHeight = '775px';
		ESWidth = '160px';
		break;
	case 5:
	    ESWidth = '685px'
	    ESHeight = '1100px'
	    scroll = 'NO'
	    //styling = 'border: solid 1px #2277aa;'
}

var ExtraOptions ='';
if (!(typeof(ESWidth_Custom) === "undefined")) { 
    if (ESWidth_Custom!='') { 
        ESWidth = (ESWidth_Custom + 15)+'px'; 
        ExtraOptions += '&width=' + ESWidth_Custom +'px';
    }
}
if (!(typeof(ESHeight_Custom) === "undefined")) {
     if (ESHeight_Custom!='') { 
        ESHeight =  (ESHeight_Custom + 15)+'px' ;
        ExtraOptions += '&height=' + ESHeight_Custom+'px';
     }
}

if (!(typeof(ESNumBooks) === "undefined")) { 
    if (ESNumBooks!='') {ExtraOptions += '&booknum='+ ESNumBooks;}
}
if (!(typeof(ESBranding) === "undefined")) { 
    if (ESBranding!='') {ExtraOptions += '&brand='+ ESBranding;}
}


document.write('<iframe id="affwrapperiframe" name="affwrapperiframe" style="' + styling + '" src="http://www.earthscan.co.uk/EsAffiliate/bannerhtml.aspx?aff=' + escape(ESAffiliateID) + '&bannertype=' + ESBannerType + ExtraOptions + '" height="' + ESHeight + '" width="' + ESWidth + '" frameborder="0" scrolling="' + scroll + '" marginwidth="0" marginheight="0 hspace="3" vspace="3" style="padding:0px;margin:0px;"></iframe>');


