FTD scripts
I got this from http://www.florists.ftd.com/javascript.jscript?website_id=&source=
I don't know what they mean, but it smells really fishy. FTD should explain this to us.
I got this from http://www.florists.ftd.com/javascript.jscript?website_id=&source=
I don't know what they mean, but it smells really fishy. FTD should explain this to us.
/* some commented stuff here; is it okay? */
var url_args = new Array();
allargs = document.URL.split("?");
if(allargs[1]) {
arg_pairs = allargs[1].split("&");
for(var x = 0; x < arg_pairs.length; x++){
tmp=arg_pairs[x].split("=");
eval("url_args[\""+tmp[0]+"\"]=\""+tmp[1]+"\";");
}
}
function geturlarg (value) {
if (url_val = url_args[value]) {
return url_val;
}
}
function getcookie(cookiename) {
var cookiestring=""+document.cookie;
var index1=cookiestring.indexOf(cookiename+"=");
if (index1==-1 || cookiename=="") return "";
var index2=cookiestring.indexOf(';',index1);
if (index2==-1) index2=cookiestring.length;
return unescape(cookiestring.substring(index1+cookiename.length+1,index2));
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = '/';
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function trackcampaignhit (webtrends_campaign_tracking_id) {
// Webtrends campaign is activated by arg rather than url param
url_campaign_id = geturlarg('campaign_tracking_id');
cookie_campaign_id = getcookie('campaign_tracking_id');
if (webtrends_campaign_tracking_id || (url_campaign_id) && (url_campaign_id != cookie_campaign_id)) {
document.write('<img src="/cgis/campaign_tracking.cgi?website_id=&source=&vh=&campaign_id=' + url_campaign_id + '&WT_id=' + webtrends_campaign_tracking_id + '" height=0 width=0>');
}
}
function setreferralidcookie () {
referral_id = geturlarg('referralid');
if (referral_id) {
SetCookie("referral_id",referral_id);
}
}
function setquixtarcookie() {
quixtar_id = geturlarg('eID');
if (quixtar_id) {
SetCookie("quixtarid",quixtar_id);
}
}
function writehiddenform(value) {
var ret_val = getcookie(value);
if (ret_val) {
document.write('<input type="hidden" name="' + value + '" value="' + ret_val + '">');
}
}