<commit_before>// $Id$
var feature_no_cookie = 'n';

function browser() {
    var b = navigator.appName;
    if (b == "Netscape") { this.b = "ns"; }
	else { this.b = b; }
    this.version = navigator.appVersion;
    this.v = parseInt(this.version, 10);
    this.ns = (this.b=="ns" && this.v>=5);
    this.op = (navigator.userAgent.indexOf('Opera')>-1);
    this.safari = (navigator.userAgent.indexOf('Safari')>-1);
    this.op7 = (navigator.userAgent.indexOf('Opera')>-1 && this.v>=7);
    this.ie56 = (this.version.indexOf('MSIE 5')>-1||this.version.indexOf('MSIE 6')>-1);
/* ie567 added by Enmore */
	this.ie567 = (this.version.indexOf('MSIE 5')>-1||this.version.indexOf('MSIE 6')>-1||this.version.indexOf('MSIE 7')>-1);
    this.iewin = (this.ie56 && navigator.userAgent.indexOf('Windows')>-1);
/* iewin7 added by Enmore */	
	this.iewin7 = (this.ie567 && navigator.userAgent.indexOf('Windows')>-1);
    this.iemac = (this.ie56 && navigator.userAgent.indexOf('Mac')>-1);
    this.moz = (navigator.userAgent.indexOf('Mozilla')>-1);
    this.moz13 = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.3')>-1);
    this.oldmoz = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.4')>-1 || navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.5')>-1 || navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.6')>-1);
    this.ns6 = (navigator.userAgent.indexOf('Netscape6')>-1);
    this.docom = (this.ie56||this.ns||this.iewin||this.op||this.iemac||this.safari||this.moz||this.oldmoz||this.ns6);
}

function getElementById(id) {
    if (document.all) {
  return document.getElementById(id);
    }
    for (i=0;i<document.forms.length;i++) {
  if (document.forms[i].elements[id]) {return document.forms[i].elements[id]; }
    }
}

/* toggle CSS (tableless) layout columns */
function toggleCols(id,zeromargin,maincol) {
  var showit = 'show_' + escape(id);
  if (!zeromargin) { zeromargin = ''; }
  if (!id) { id = ''; }
  if (!maincol) { maincol = 'col1'; }
  if (document.getElementById(id).style.display == "none") {
    document.getElementById(id).style.display = "block";
    if (zeromargin == 'left') {
      document.getElementById(maincol).style.marginLeft = '';
      setSessionVar(showit,'y');
    } else {
      document.getElementById(maincol).style.marginRight = '';
      setSessionVar(showit,'y');
    }
  } else {
    document.getElementById(id).style.display = "none";
    if (zeromargin == 'left') {
      document.getElementById(maincol).style.marginLeft = '0';
      setSessionVar(showit,'n');
    } else {
      document.getElementById(maincol).style.marginRight = '0';
      setSessionVar(showit,'n');
    }
  }
}

function toggle_dynamic_var(name) {
  name1 = 'dyn_'+name+'_display';
  name2 = 'dyn_'+name+'_edit';
  if(document.getElementById(name1).style.display == "none") {
    document.getElementById(name2).style.display = "none";
    document.getElementById(name1).style.display = "inline";
  } else {
    document.getElementById(name1).style.display = "none";
    document.getElementById(name2).style.display = "inline";

  }

}

function chgArtType() {
	var articleType = document.getElementById('articletype').value;
	var typeProperties = articleTypes[articleType];

	propertyList = ['show_topline','y',
					'show_subtitle','y',
					'show_linkto','y',
					'show_lang','y',
					'show_author','y',
					'use_ratings','y',
					'heading_only','n',
					'show_image_caption','y',
					'show_pre_publ','y',
					'show_post_expire','y',
					'show_image','y'
					];

	var l = propertyList.length, property, value;
	for (var i=0; i<l; i++) {
		property = propertyList[i++];
		value = propertyList[i];<commit_msg>[FIX] Show expiry date if article type says so<commit_after>// $Id$
var feature_no_cookie = 'n';

function browser() {
    var b = navigator.appName;
    if (b == "Netscape") { this.b = "ns"; }
	else { this.b = b; }
    this.version = navigator.appVersion;
    this.v = parseInt(this.version, 10);
    this.ns = (this.b=="ns" && this.v>=5);
    this.op = (navigator.userAgent.indexOf('Opera')>-1);
    this.safari = (navigator.userAgent.indexOf('Safari')>-1);
    this.op7 = (navigator.userAgent.indexOf('Opera')>-1 && this.v>=7);
    this.ie56 = (this.version.indexOf('MSIE 5')>-1||this.version.indexOf('MSIE 6')>-1);
/* ie567 added by Enmore */
	this.ie567 = (this.version.indexOf('MSIE 5')>-1||this.version.indexOf('MSIE 6')>-1||this.version.indexOf('MSIE 7')>-1);
    this.iewin = (this.ie56 && navigator.userAgent.indexOf('Windows')>-1);
/* iewin7 added by Enmore */	
	this.iewin7 = (this.ie567 && navigator.userAgent.indexOf('Windows')>-1);
    this.iemac = (this.ie56 && navigator.userAgent.indexOf('Mac')>-1);
    this.moz = (navigator.userAgent.indexOf('Mozilla')>-1);
    this.moz13 = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.3')>-1);
    this.oldmoz = (navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.4')>-1 || navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.5')>-1 || navigator.userAgent.indexOf('Mozilla')>-1 && navigator.userAgent.indexOf('1.6')>-1);
    this.ns6 = (navigator.userAgent.indexOf('Netscape6')>-1);
    this.docom = (this.ie56||this.ns||this.iewin||this.op||this.iemac||this.safari||this.moz||this.oldmoz||this.ns6);
}

function getElementById(id) {
    if (document.all) {
  return document.getElementById(id);
    }
    for (i=0;i<document.forms.length;i++) {
  if (document.forms[i].elements[id]) {return document.forms[i].elements[id]; }
    }
}

/* toggle CSS (tableless) layout columns */
function toggleCols(id,zeromargin,maincol) {
  var showit = 'show_' + escape(id);
  if (!zeromargin) { zeromargin = ''; }
  if (!id) { id = ''; }
  if (!maincol) { maincol = 'col1'; }
  if (document.getElementById(id).style.display == "none") {
    document.getElementById(id).style.display = "block";
    if (zeromargin == 'left') {
      document.getElementById(maincol).style.marginLeft = '';
      setSessionVar(showit,'y');
    } else {
      document.getElementById(maincol).style.marginRight = '';
      setSessionVar(showit,'y');
    }
  } else {
    document.getElementById(id).style.display = "none";
    if (zeromargin == 'left') {
      document.getElementById(maincol).style.marginLeft = '0';
      setSessionVar(showit,'n');
    } else {
      document.getElementById(maincol).style.marginRight = '0';
      setSessionVar(showit,'n');
    }
  }
}

function toggle_dynamic_var(name) {
  name1 = 'dyn_'+name+'_display';
  name2 = 'dyn_'+name+'_edit';
  if(document.getElementById(name1).style.display == "none") {
    document.getElementById(name2).style.display = "none";
    document.getElementById(name1).style.display = "inline";
  } else {
    document.getElementById(name1).style.display = "none";
    document.getElementById(name2).style.display = "inline";

  }

}

function chgArtType() {
	var articleType = document.getElementById('articletype').value;
	var typeProperties = articleTypes[articleType];

	var propertyList = ['show_topline','y',
					'show_subtitle','y',
					'show_linkto','y',
					'show_lang','y',
					'show_author','y',
					'use_ratings','y',
					'heading_only','n',
					'show_image_caption','y',
					'show_pre_publ','y',
					'show_post_expire','y',
					'show_image','y',
					'show_expdate','y'
					];

	var l = propertyList.length, property, value;
	for (var i=0; i<l; i++) {
		property = propertyList[i++];
		value = propertyList[i];
{'fraction_non_alphanumeric': 0.19846113027328205, 'fraction_numerical': 0.019899177500663306, 'mean_word_length': 4.080188679245283, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3774474', 'n_tokens_mistral': 2848, 'n_tokens_neox': 2651, 'n_words': 379}