
// resize fix for ns4
var origWidth, origHeight;
if (document.layers) {
	origWidth = window.innerWidth; origHeight = window.innerHeight;
	window.onresize = function() { if (window.innerWidth != origWidth || window.innerHeight != origHeight) history.go(0); }
}

// preload images to be written to layer
var imgAr = new Array(
	"../../images/heron.gif",
	"../../images/smile.gif"	
);

if (document.images) {
	var imgs = new Array();
	for (var i=0; i<imgAr.length; i++) {
  	imgs[i] = new Image(); 
		imgs[i].src = imgAr[i];
  }
}

// content to be written to infoDiv onmouseover of links
var msg1 = '<a href="http://www.cybermarkinc.com/banman.asp?ZoneID=0&BannerID=169&AdvertiserID=31&CampaignID=268&Task=Click&Mode=TEXT&SiteID=163" target="_blank"><img src="images/clip-comp-ad2.jpg" width="250" height="300" alt="" border="0" onmouseout="hideInfo()"></a>';
var msg2 = '<a href="http://www.referagift.com" target="_blank"><img src="images/clip-gift-ad2.jpg" width="250" height="300" alt="" border="0" onmouseout="hideInfo()"></a>';
var msg3 = '<a href="http://www.cybermarkinc.com/banman.asp?ZoneID=0&BannerID=167&AdvertiserID=29&CampaignID=264&Task=Click&Mode=TEXT&SiteID=161" target="_blank"><img src="images/clip-vita-ad2.jpg" width="250" height="300" alt="" border="0" onmouseout="hideInfo()"></a>';
var msg4 = '<a href="http://www.cybermarkinc.com/banman.asp?ZoneID=0&BannerID=168&AdvertiserID=4&CampaignID=267&Task=Click&Mode=TEXT&SiteID=164" target="_blank"><img src="images/clip-debt-ad2.jpg" width="250" height="300" alt="" border="0" onmouseout="hideInfo()"></a>';

function initInfoLyr() {
	// arguments: id, width, height
	// Set width and height to suit your content
	infoLyr = new writeObj('infoDiv',140,100);
}

function showInfo(txt,x,y) {
	if (!infoLyr) return;
	// your content can have class applied here if your messages
	// are all to be formatted the same
	// or messages could have class applied in variables above
	var cntnt = '<div class="info">' + txt + '</div>';
	infoLyr.writeLyr(cntnt);
  infoLyr.shiftTo(x,y);	
	infoLyr.show();
}


function hideInfo() {
	if (!infoLyr) return;
	infoLyr.hide();
}

window.onload=initInfoLyr;
