var hopfeed_ad_type = (hopfeed_ad_type==null)? 'text_desc': hopfeed_ad_type;
var hopfeed_space = (hopfeed_space==null)? '0': hopfeed_space;
//var hopfeed_search = (hopfeed_search==null)? 'in_title':hopfeed_search;
var show_cloak_link = (show_cloak_link==null)? 'N':show_cloak_link;
var site_path1 = "http://www.wordbankads.com/wpserver/ads/";
//var length_string = hopfeed_width.length -1;
ctxt_ad_partner_default     = 'empty_partner';
ctxt_ad_frameborder = 0;
ctxt_ad_title_default       = '"Ads by Wordbank!"';
var hopfeed_height_frame = parseInt(hopfeed_height);
var hopfeed_path = (hopfeed_path == null ? null : hopfeed_path);
var hopfeed_env = (hopfeed_env == null || hopfeed_env == '') ? 'prod' : hopfeed_env;

if(hopfeed_env != "dev")
{

	if(hopfeed_affiliate != null && hopfeed_affiliate != '' && hopfeed_affiliate != 'null')
	{
		hopfeed_path = hopfeed_path.replace("://www","://" + hopfeed_affiliate);
	}
}
/*****End Extras**********/
var hopfeed_path = (hopfeed_path == null ? null : hopfeed_path);
var hopfeed_affiliate_tid = (hopfeed_affiliate_tid==null)? '': hopfeed_affiliate_tid;
var hopfeed_affiliate = (hopfeed_affiliate == null ? null : hopfeed_affiliate);
var hopfeed_font = (hopfeed_font==null)? 'Verdana, Arial, Helvetica, Sans Serif': hopfeed_font;
var hopfeed_font_size = (hopfeed_font_size==null)? '8pt': hopfeed_font_size;
var hopfeed_keyword = (hopfeed_keyword==null)? '' : hopfeed_keyword;
var hopfeed_link_font_hover_color = (hopfeed_link_font_hover_color==null)? '#3300FF': hopfeed_link_font_hover_color;
var hopfeed_width = (hopfeed_width==null)? '100': hopfeed_width;
var hopfeed_height = (hopfeed_height==null)? '300': hopfeed_height;
//var hopfeed_height = (hopfeed_rows * 29) + 30;
//var hopfeed_height = (hopfeed_rows * 78) + 30;
//var hopfeed_height = (parseInt(hopfeed_font_size) + parseInt(16)) * parseInt(3) * parseInt(hopfeed_rows);
//var hopfeed_height = (parseInt(hopfeed_font_size) + parseInt(18)) * parseInt(30);
var hopfeed_rows = (hopfeed_rows==null)? '5': hopfeed_rows;
var hopfeed_cols = (hopfeed_cols==null)? '1': hopfeed_cols;
var hopfeed_fill_slots = (hopfeed_fill_slots==null)? '': hopfeed_fill_slots;
var hopfeed_footer_text = (hopfeed_footer_text==null)? '': hopfeed_footer_text;
var hopfeed_header_text = (hopfeed_header_text==null)? '': hopfeed_header_text;
var hopfeed_align = (hopfeed_align==null)? 'left': hopfeed_align;
var hopfeed_cellpadding = (hopfeed_cellpadding==null)? 5: hopfeed_cellpadding;
var hopfeed_background_color = (hopfeed_background_color==null)? '#FFFFFF': hopfeed_background_color;
var hopfeed_font_color = (hopfeed_font_color==null)? '#000000': hopfeed_font_color;
var hopfeed_link_font_color = (hopfeed_link_font_color==null)? '#3300FF': hopfeed_link_font_color;
/**********Tabbed Ad Box ADDITIONAL*********/
var hopfeed_border_color = (hopfeed_border_color==null)? '000000': hopfeed_border_color;
var hopfeed_transparent_border = (hopfeed_transparent_border==null)? 'N': hopfeed_transparent_border;
var hopfeed_transparent_background = (hopfeed_transparent_background==null)? 'N': hopfeed_transparent_background;
var hopfeed_bullet = (hopfeed_bullet == null)? 'Y': hopfeed_bullet;
if(window.location.hostname == '192.168.10.2')
{
	var server_path = 'http://192.168.10.2/wpserver_new/ads/';
}
else
{
	var server_path = 'http://wordbankads.com/wpserver/ads/';
}
var hopfeed_width_exact = hopfeed_width + '%';
var site_path_plugin = (site_path_plugin==null)? 'http://www.wordbankads.com': site_path_plugin;
var dt= new Date();
var src = server_path + 'display_hopfeedads_widget.php?spath=' + escape(site_path_plugin.replace(/\+/g,'%2b')) + '&hbgcolor=' + escape(hopfeed_background_color) + '&hpath=' + escape(hopfeed_path.replace(/\+/g,'%2b')) +'&hafftid=' + hopfeed_affiliate_tid + (hopfeed_affiliate == null ? '' : '&haff='+hopfeed_affiliate) + '&hfont=' + escape(hopfeed_font.replace(/\+/g,'%2b')) + '&hfontsize=' + hopfeed_font_size + '&hhover=' + escape(hopfeed_link_font_hover_color) + '&hrows=' + hopfeed_rows + '&hcols=' + hopfeed_cols + '&hfill=' + hopfeed_fill_slots + '&align=' + hopfeed_align + '&hlinkfontcolor=' + hopfeed_link_font_color + '&hheight=' + hopfeed_height + '&hadtype=' + hopfeed_ad_type + '&hfontcolor=' + escape(hopfeed_font_color) + '&hcloak=' + show_cloak_link + '&htrans=' + hopfeed_transparent_background + '&hbull=' + hopfeed_bullet + '&foo='+dt.getTime() + '&hkeyword=' + hopfeed_keyword;
if(hopfeed_transparent_border == 'Y' && hopfeed_transparent_background == 'Y')
{
	var output = '<ifr' + 'ame' + ' title=' + ctxt_ad_title_default + ' style="z-index:3; position:relative; border:0px solid #' + hopfeed_border_color + '; background-color:transparent; float:none; padding: ' + hopfeed_space + 'px; margin: 0px; overflow: hidden; width: ' + hopfeed_width_exact + ';" src="' + src + '" height="'+ (hopfeed_height) + '" width="'+ (hopfeed_width_exact) +'" frameborder=' + ctxt_ad_frameborder + ' hspace=0 vspace=0 marginwidth=0 marginheight=0 allowtransparency="true" name="my_iframe"  scrolling="no"></iframe>';
}
else if(hopfeed_transparent_border == 'Y' && hopfeed_transparent_background == 'N')
{
	var output = '<ifr' + 'ame' + ' title=' + ctxt_ad_title_default + ' style="border:0px solid #' + hopfeed_border_color + '; background-color:#' + hopfeed_background_color + '; float:none; padding: ' + hopfeed_space + 'px; margin: 0px; overflow: hidden; width: ' + hopfeed_width_exact + ';" src="' + src + '" height="'+ (hopfeed_height) + '" width="'+ (hopfeed_width_exact) +'" frameborder=' + ctxt_ad_frameborder + ' hspace=0 vspace=0 marginwidth=0 marginheight=0 allowtransparency="true" name="my_iframe"  scrolling="no"></iframe>';
}
else if(hopfeed_transparent_border == 'N' && hopfeed_transparent_background == 'Y')
{
	var output = '<ifr' + 'ame' + ' title=' + ctxt_ad_title_default + ' style="z-index:3; position:relative; border:1px solid #' + hopfeed_border_color + '; background-color:transparent; float:none; padding: ' + hopfeed_space + 'px; margin: 0px; overflow: hidden; width: ' + hopfeed_width_exact + ';" src="' + src + '" height="'+ (hopfeed_height) + '" width="'+ (hopfeed_width_exact) +'" frameborder=' + ctxt_ad_frameborder + ' hspace=0 vspace=0 marginwidth=0 marginheight=0 allowtransparency="true" name="my_iframe"  scrolling="no"></iframe>';
}
else
{
	var output = '<ifr' + 'ame' + ' title=' + ctxt_ad_title_default + ' style="border:1px solid #' + hopfeed_border_color + '; background-color:#' + hopfeed_background_color + '; float:none; padding: ' + hopfeed_space + 'px; margin: 0px; overflow: hidden; width: ' + hopfeed_width_exact + ';" src="' + src + '" height="'+ (hopfeed_height) + '" width="'+ (hopfeed_width_exact) +'" frameborder=' + ctxt_ad_frameborder + ' hspace=0 vspace=0 marginwidth=0 marginheight=0 allowtransparency="true" name="my_iframe"  scrolling="no"></iframe>';
}
document.writeln(output);