/**
* Shows the e-mail popup
*/
function emailAdvertiserPopup(year, edition, adid, typeId, searchType, cape, section) {
w = 540;
h = 540;
l = (screen.width - w) / 2;
t = (screen.height - h) / 2;
if (typeId == 4 || typeId == 14 || typeId == 15)
{
emailScript = "/emailadvertiser.mm.php";
}
else
{
emailScript = "/emailadvertiser.php";
}
win = window.open(emailScript + "?cape="+cape+"&year="+year+"&edition="+edition+"&adid="+adid+"&searchtype="+searchType+"§ion="+section, "emailadvertiser"+adid,"menubar=0,resizable=1,top="+t+",left="+l+",scrollbars=1,width="+w+",height="+h+"");
win.focus();
}
function catFoundPopup() {
var d = popupOpen("about:blank", "catFound", 550, 200).document;
d.open();
d.write(
''
+ '
'
+ ' Categories Found '
+ ' '
+ ''
+ ''
+ ' '
+ ' '
+ ' '
+ ' [ Close ]'
+ ' '
+ ' '
+ ' '
+ ' '
+ getObject('catFoundAll').innerHTML
+ ' '
+ ' '
+ '
'
+ ''
+ '');
d.close();
}
/**
* An object for the browsing of extra ad images
*/
function ExtraImages(imageBaseUrl,imageAssetBaseUrl,imageList,container){
this.imageBaseUrl = imageBaseUrl;
this.imageAssetBaseUrl = imageAssetBaseUrl;
this.imageList = imageList;
this.Max = this.imageList.length;
if (this.imageList.length>4){this.Max=4;}
this.container = container;
this.firstImage = 0;
this.buildBasicOutput = function(){
var s = [], sI = 0;
s[sI++] = "";
getObject(this.container).innerHTML = s.join('');
}
this.showImage = function(imgNum){
var img = this.imageBaseUrl + "large/" + this.imageList[this.firstImage + imgNum - 1];
popupOpen(img, img, 230, 300);
}
this.updateDisplay = function(){
for (i=1, df=this.firstImage;
i <= 4 && df < this.imageList.length;
++i, ++df){
getObject("extraImage" + i).src = this.imageBaseUrl + "internet/" + this.imageList[df];
getObject("extraImageName" + i).innerHTML = "" + (df + 1) + " / " + this.imageList.length;
}
if (this.firstImage > 0){
getObject("extraImageNavPrevious").innerHTML = "<< Previous ";
}
else{
getObject("extraImageNavPrevious").innerHTML = "<< Previous ";
}
if (this.firstImage + 4 < this.imageList.length){
getObject("extraImageNavNext").innerHTML = "Next >> ";
}
else{
getObject("extraImageNavNext").innerHTML = "Next >>";
}
}
this.goRight = function(){
if (this.firstImage + 4 < this.imageList.length){
++this.firstImage;
this.updateDisplay();
}
}
this.goLeft = function(){
if (this.firstImage > 0){
--this.firstImage;
this.updateDisplay();
}
}
}