Subversion Repositories SmartDukaan

Rev

Rev 14849 | Rev 14858 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14849 Rev 14851
Line 440... Line 440...
440
        if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
440
        if (c.indexOf(name) == 0) return c.substring(name.length, c.length);
441
    }
441
    }
442
    return "";
442
    return "";
443
}
443
}
444
function showpopup(id,count,interval){
444
function showpopup(id,count,interval){
445
	var cname = 'notif-count-'+id;
445
	var cname = 'notif-count-'+me+'-'+id;
446
	var cookieval = getCookie(cname);
446
	var cookieval = getCookie(cname);
447
	var cname = 'notif-lastshown-'+id;
447
	var cname = 'notif-lastshown-'+me+'-'+id;
448
	var lastshown = getCookie(cname);
448
	var lastshown = getCookie(cname);
449
	if(cookieval==''){		
449
	if(cookieval==''){		
450
		incrementPopupCount(id,0);
450
		incrementPopupCount(id,0);
451
		setLastShown(id);
451
		setLastShown(id);
452
		return true;
452
		return true;
Line 465... Line 465...
465
			}
465
			}
466
		}
466
		}
467
	}
467
	}
468
}
468
}
469
function setLastShown(id){
469
function setLastShown(id){
470
	var cname = 'notif-lastshown-'+id;
470
	var cname = 'notif-lastshown-'+me+'-'+id;
471
	var d = new Date();
471
	var d = new Date();
472
	setCookie(cname, d.getTime(), 365);
472
	setCookie(cname, d.getTime(), 365);
473
}
473
}
474
function incrementPopupCount(id,currentCount) {
474
function incrementPopupCount(id,currentCount) {
475
	var cname = 'notif-count-'+id;
475
	var cname = 'notif-count-'+me+'-'+id;
476
	setCookie(cname, parseInt(currentCount)+1, 365);
476
	setCookie(cname, parseInt(currentCount)+1, 365);
477
}
477
}
478
478