/* Copyright: Virgin net || Author: Laurent Muchacho */function specialOfferObj(name,category_id,channel){this.name=name;this.offer=new Array();this.category_id=category_id;this.channel=channelName;};specialOfferObj.prototype.add=function(o_desc,o_price,o_site,o_type){var itemL=this.offer.length;this.offer[itemL]=new Object();this.offer[itemL].name=this.name;this.offer[itemL].o_desc=o_desc;this.offer[itemL].o_price=o_price;this.offer[itemL].o_url='http://www.virgin.net/vnr/vnrframe.html?dest=';this.offer[itemL].o_site=o_site;this.offer[itemL].o_type=o_type;this.offer[itemL].getHref=get_special_offer_href;};function get_special_offer_href(status){var hrefClass=(status=='title')?'class="specialOffersText"':'class="specialOffersLink"';var str="";switch(this.o_type){case 'E':str+='<a href="'+this.o_site+'" target="_blank"';break;case 'V':str+='<a href="'+this.o_url+this.o_site+'"';break;case 'C':str+='<a href="'+this.o_site+'"';break;}var label=(status=='title')?this.o_desc:this.o_price;str+=hrefClass+'>'+label+'</a>';return str;};specialOfferObj.prototype.writeSpecialOffer=function(){var html='<div style="margin-bottom:10px;"><table cellpadding="0" cellspacing="0" border="0" width="125">'+'<tr><td>'+spacer('width="1"','height="1"')+'</td><td width="100%" bgcolor="'+mCol+'">'+spacer('width="1"','height="1"')+'</td><td>'+spacer('width="1"','height="1"')+'</td></tr>'+'<tr><td colspan="3" height="16" bgcolor="'+mCol+'" class="TxtBldFour" align="center" valign="top">Partner offers</td></tr>';for(var i=0;i<this.offer.length;i++){html+='<tr><td bgcolor="'+mCol+'">'+spacer('width="1"','height="1"')+'</td><td><p class="specialOfferMargin">&raquo;'+this.offer[i].getHref('title')+'<br>'+this.offer[i].getHref('')+'</p></td><td bgcolor="'+mCol+'">'+spacer('width="1"','height="1"')+'</td></tr>';}if(typeof moreOfferLink=='undefined'||moreOfferLink=='on'||moreOfferLink==''){html+='<tr><td colspan="3" height="16" bgcolor="'+mCol+'" class="TxtBldFour" align="right"><a href="http://gps.virgin.net/listingsFinder/offers?category_id='+this.category_id+'&channel='+this.channel+'&breadcrumb=false" class="TxtBldFour">More offers >></a> &nbsp;</td></tr>';}html+='<tr><td>'+spacer('width="1"','height="1"')+'</td><td width="100%" bgcolor="'+mCol+'">'+spacer('width="1"','height="1"')+'</td><td>'+spacer('width="1"','height="1"')+'</td></tr>'+'</table></div>'+writeCss('start')+writeCss('P.specialOfferMargin','MARGIN: 3px 5px 1px 5px')+writeCss('.specialOffersText, A.specialOffersText, A.specialOffersText:visited','font-family: verdana','font-size: 11px','color: '+mCol,'text-decoration: none','font-weight:normal')+writeCss('.specialOffersLink, A.specialOffersLink, A.specialOffersLink:visited','font-family: verdana','font-size: 12px','color: '+mCol,'text-decoration: none','font-weight:bold')+writeCss('A.specialOffersLink:hover, A.specialOffersText:hover','text-decoration: underline')+writeCss('end');if(this.offer.length>0){d.write(html);}}