var am_color_text,am_color_title,am_color_border,am_color_background,am_color_price,am_color_link,am_stmo,am_overwrite,am_keywords,am_width,am_height,am_template,am_refurl,am_initialhint,clearedInitialhint,am_ref,am_subid,am_rotation,am_rotation_fx,am_xcat,am_tsr,am_rotation_timeout,am_rotation_scroll_direction,am_rotation_scroll_speed,allowDiff=40;function append(varN,parN){if(varN!=null){code+='&'+parN.valueOf()+'='+varN.valueOf()}}function h2d(hexVal){return parseInt(hexVal,16)}function d2h(d){return d.toString(16)}function valcol(col){return(col+'2468ac').replace(/#/,"").substr(0,6)}function isSim(col1,col2){col2=valcol(col2);var ct=0;for(var i=0;i<=2;i++){ct+=1;var comp1=h2d(col1.substr(i*2,2));var comp2=h2d(col2.substr(i*2,2));if((comp1<=comp2-allowDiff)||(comp1>=comp2+allowDiff)){ct-=1}}if(ct>=2){return true}else{return false}}function invert(col){col=valcol(col);var ret='';for(var i=0;i<=2;i++){ret+=(d2h(255-(h2d(col.substr(i*2,2))))+'00').substr(0,2)}if(isSim(am_color_background,ret)){ret='ff0000'};return ret}switch(am_template){case"1":case"16":am_width='728';am_height='90';break;case"2":case"17":am_width='728';am_height='90';break;case"3":case"18":am_width='728';am_height='90';break;case"4":case"19":am_width='468';am_height='60';break;case"5":case"20":am_width='468';am_height='60';break;case"6":case"21":am_width='468';am_height='60';break;case"7":case"22":am_width='120';am_height='600';break;case"8":case"23":am_width='120';am_height='600';break;case"9":case"24":am_width='160';am_height='600';break;case"10":case"25":am_width='160';am_height='600';break;case"11":case"26":am_width='300';am_height='250';break;case"12":case"27":am_width='300';am_height='250';break;case"13":case"28":am_width='125';am_height='125';break;case"14":case"29":am_width='125';am_height='125';break;case"15":case"30":am_width='234';am_height='60';break;default:am_template="4";am_width='468';am_height='60';break}var code='';code+='<iframe width='+am_width+' height='+am_height+' src="http://banners.webmasterplan.com/view.asp?site=4018&ref='+am_referrer+'&type=html&hnb='+am_template+'&showjs=0&template='+am_template;if(am_color_background==null){am_color_background='FFFFFF'}else{valcol(am_color_background)}if(isSim(am_color_background,am_color_text)){am_color_text=invert(am_color_text)}if(isSim(am_color_background,am_color_title)){am_color_title=invert(am_color_title)}if(isSim(am_color_background,am_color_price)){am_color_price=invert(am_color_price)}if(isSim(am_color_background,am_color_link)){am_color_link=invert(am_color_link)}append(am_rotation,'rotation');append(am_rotation_fx,'rfx');append(am_rotation_timeout,'rt');append(am_rotation_scroll_direction,'sd');append(am_rotation_scroll_speed,'sp');append(am_color_text,'textcolor');append(am_color_title,'titlecolor');append(am_color_border,'bordercolor');append(am_color_background,'backgroundcolor');append(am_color_price,'pricecolor');append(am_color_link,'linkcolor');append(am_overwrite,'overwrite');append(am_stmo,'stmo');append(am_keywords,'keywords');append(am_subid,'subid');append(am_xcat,'xcat');if(am_ref!=null){append(am_ref,'referrer')}else{append(escape(document.referrer),'referrer')}if(am_initialhint!=null){append(am_initialhint,'initialhint')}else{clearedInitialhint=escape(document.title.replace(/(<([^>]+)>)/ig,"").toLowerCase());clearedInitialhint=clearedInitialhint.replace(/%FC/g,"ue").replace(/%F6/g,"oe").replace(/%E4/g,"ae").replace(/%DF/g,"ss").replace(/%26/g,"");append(clearedInitialhint,'initialhint')}if(am_refurl!=null){append(am_refurl,'refurl')}else{append(escape(document.location.href),'refurl')}if(am_tsr!=null){append(am_tsr,'tsr')}else{append('02','tsr')}code+='" marginheight="0" marginwidth="0" frameborder="0" scrolling="no"></iframe>';document.write(code);am_color_text=null;am_color_title=null;am_color_border=null;am_color_background=null;am_color_price=null;am_color_link=null;am_stmo=null;am_overwrite=null;am_keywords=null;am_width=null;am_height=null;am_template=null;am_xcat=null;am_tsr=null;am_refurl=null;am_initialhint=null;am_ref=null;am_subid=null;am_rotation=null;am_rotation_fx=null;am_rotation_timeout=null;am_rotation_scroll_direction=null;am_rotation_scroll_speed=null;