function doPromoLink(newLink, type_id, tag_id) {	
		
	if (newLink.length < 1) {		
		return;
	}		
	
	var mis_attributes = '' ;
	var temp = '&' ;		
	
	if ((newLink.indexOf('?') < 0) && (newLink.indexOf('&#63') < 0)) {	
		temp = '?' ;
	}						
			
	if ((location.href.indexOf('navigation/home/index.do') > 0 || location.href.indexOf('entersite.do') > 0) && (!type_id.length < 1) && (!tag_id.length < 1)) {
		mis_attributes = temp + 'Page_promo_id=' + tag_id + '&Mis_item_id=' + type_id + '&Mis_item_loc_id=3';
	} else if ((location.href.indexOf('navigation/zone/index.do') > 0) && (!type_id.length < 1) && (!tag_id.length < 1)) {
		mis_attributes = temp + 'Page_promo_id=' + tag_id + '&Mis_item_id=' + type_id + '&Mis_item_loc_id=4';
	} else if ( (!type_id.length < 1) && (!tag_id.length < 1) && (location.href.indexOf('tabloid') != -1) ) {
		mis_attributes = '&Page_promo_id=' + tag_id + '&Mis_item_id=' + type_id + '&Mis_item_loc_id=7';
	}		
	
	var path = '';
	
	if (newLink.indexOf("STDINTERNAL") >=0) {
		path = domain; <!--FROM external imported variable in JSP-->
		newLink = newLink.substring(newLink.indexOf("STDINTERNAL")+11);
	} else if (newLink.indexOf("SSLINTERNAL") >=0) {
		path = domain; <!--FROM external imported variable in JSP-->
		newLink = newLink.substring(newLink.indexOf("SSLINTERNAL")+11);	
	} else if (newLink.toLowerCase().indexOf("http") >=0) {
		path = '';							
	} else {
		path = context; <!--FROM external imported variable in JSP-->
	}
	
	if (newLink.indexOf("tabloid_terms") != -1 ) {		
		window.open(path+newLink,'terms1','status=no,toolbar=no,location=no,directories=no,menubar=no, scrollbars=yes,width=700,height=500');
		return;
	}
			
    path = path+newLink+mis_attributes;

    if (path.indexOf("promo-popup") != -1) {
        popupwin = window.open(path,'popup');
        popupwin.focus;
    }
    else {
        location.href = path;
    }
	return;
}

function applyStyle(priceStg, styleArray) {			
		
	var output = '' ;	
	splitStg = priceStg.split('<br>') ;
	
	for ( var i = 0; i <splitStg.length; i++ ) {	
		output += '<tr><td class="'
		output += styleArray[i] ;
		output += '">' ;		
		
		if (!doHomePageTest()) {			
			if (splitStg[i].toUpperCase().indexOf("WAS") > -1) {				
				output += splitStg[i].substring(0, splitStg[i].indexOf("&pound;")) ;
				output += '<s>' ;
				output += splitStg[i].substring(splitStg[i].indexOf("&pound;")) ;		
				output += '</s>' ;				
			} else {
				output += splitStg[i] ;
			}
			
		} else {			
			output += splitStg[i] ;			
		}
		
		output += '</td></tr>' ;							
	}		

	return output ;
}