/*
 * Baynote Observer for fncimag.com
 * Last updated: 1/23/09
 */
function bn_isNotEmpty(name) {
	return (name != null) && (name != "");
}

function bn_showObserver() {
		
	/* 1. set customer id */
	bn_customerId = "vign_foxnews";
	/* 2. set customer code */
	bn_code = "imag";
	var bn_locHref = window.location.href;
	if (bn_locHref.indexOf("https://") == 0) {
		baynote_tag.server = "https://" + bn_customerId + "-" + bn_code + ".baynote.net";
	} else {
		baynote_tag.server = "http://" + bn_customerId + "-" + bn_code + ".baynote.net";
	}
	baynote_tag.customerId = bn_customerId;
	baynote_tag.code = bn_code;
	baynote_tag.type = "baynoteObserver";
	/* 3. set customer domain (optional) */
	baynote_globals.cookieDomain = "fncimag.com";
	baynote_tag.show();
}

if(typeof story != "undefined"){
	if( bn_isNotEmpty(story.title) ){
	         
		if (typeof(baynote_tag)!="undefined") {
			
			if( bn_isNotEmpty(story.title) ){
				baynote_tag.title = story.title;
			}
			
			if( bn_isNotEmpty(story.publishDate) ){
				baynote_tag.docAttrs.publishDate = story.publishDate;
			}
	        
	        
			//not using subject anymore...
			//baynote_tag.docAttrs.subject = story.subject;
			
			bn_showObserver();
		}    
	}
}
