function get(eid) {return document.getElementById(eid);}
;
function remapViralLinks() {
	var isIE6 = -1 != navigator.userAgent.indexOf('MSIE 6');
	var vlt = get(vlm.getVlTarget());
	var l = get('pageWrapper').offsetWidth - vlt.offsetWidth - 10;	
	var t = 20;	
	if (isIE6) {
   	vlt.style.height = '1%';				// trigger has-layout for the idiot browser
   	vlt.style.margin = '0 8px 8px 0';	// pad on right 
   }
	vlt.style.left = l + 'px';	
	vlt.style.top = t + 'px';	
}
;
var vlm;	// put into page-global scope

// initialize and attach viral links to page
function initVL() {
	// for C5 sites, themePath will have been pre-declared prior to call to this function;
	// for non-C5 sites, simply set to empty string, and actual, relative path will apply
	if ('undefined' == typeof themePath) themePath = '';
	var relPath = '/images/viralLinking/';
	// arguments: target, imgDir, rows, showAdvice, adviceType (, styles)
	var vlDiv = get('_vlTarget_');
	// render off-page to avoid initial appearance out of position - silly IE6 work-around
	vlDiv.style.left = '-1000px';
	vlm = new ViralLinkManager('',themePath + relPath,1,true,'inline');
	remapViralLinks();
}
;
// in case other onresize handling is required, add this to the list of handlers
if(window.addEventListener) window.addEventListener('resize', remapViralLinks, false); 
else window.attachEvent('onresize', remapViralLinks);

// in case other onload handling is required, add this to the list of handlers
if(window.addEventListener) 
	window.addEventListener('load', initVL, false);	// for compliant (non-IE) browsers
else window.attachEvent('onload', initVL);			// for IE
