var dtmSrc = window.location.protocol + "//login.dotomi.com/ucm/UCMController?dtm_com=28&dtm_fid=101&dtm_cid=2223&dtm_cmagic=04048a&dtm_format=5";
var dtmTag = new Array();
/* custom fields SUBSTITUTE DYNAMIC VALUES ONLY IN THIS BLOCK */
dtmTag.cli_promo_id = $.trim(dtm_promo_id);
dtmTag.dtm_user_id = $.trim(dtm_customer_id);
dtmTag.dtmc_department = $.trim(dtm_department);
dtmTag.dtmc_category = $.trim(dtm_category);
dtmTag.dtmc_sub_category = $.trim(dtm_sub_category);
dtmTag.dtmc_brand = $.trim(dtm_brand);
dtmTag.dtmc_gender = $.trim(dtm_gender);
dtmTag.dtmc_team = $.trim(dtm_team);
dtmTag.dtmc_product_id = $.trim(dtm_sku);
dtmTag.dtmc_prod_img = $.trim(dtm_img_url);
dtmTag.dtmc_loc = $.trim(dtm_loc);
dtmTag.dtmc_cg = $.trim(dtm_cg);
dtmTag.dtmc_source = "";
dtmTag.dtmc_matchback_id = $.trim(dtm_matchback_id);
/* custom fields end */
dtmTag.dtmc_ref = document.referrer;
for (var item in dtmTag){
	if(typeof dtmTag[item] != "function" && typeof dtmTag[item] != "object")
		dtmSrc += "&" + item + "=" + escape(dtmTag[item]);
}   
setTimeout('timeOutDotomi()',4000);
//document.write('<div id="dtmdiv" style="display:none;"><iframe name="response_frame" src="' + dtmSrc + '"></iframe></div>');

$("#dtmdiv").remove();
$("body").prepend('<div id="dtmdiv" style="display:none;"><iframe id="response_frame" src="' + dtmSrc + '"></iframe></div>');
function timeOutDotomi() { document.getElementById("dtmdiv").innerHTML = "";}

