repad = function()
{
  if (document.styleSheets)
    {
      if (document.styleSheets[0].rules)
	{
	  for (i = 0; i < document.styleSheets[0].rules.length; i++)
	    {
	      var rule = document.styleSheets[0].rules[i];
	      if (rule.selectorText == '.rv')
		rule.style.margin = "0.0px 0.0px 0.0px -8px";
	      else if (rule.selectorText == '.rs')
		rule.style.margin = "0.0px 0.0px 0.0px -8px";
	      else if (rule.selectorText == 'B')
		rule.style.margin = "0.0px 0.0px 0.0px -8px";
	      else
		{
		  matches = rule.selectorText.match('\.\(.\)r[0-9]');
		  if (matches)
		    {
		      if (matches[1] == 's')
			rule.style.margin = "0.0px 0.0px 0.0px -6px";
		      else
			rule.style.margin = "0.0px 0.0px 0.0px -8px";
		    }
		}
	    }
	}
    }
}

if (window.attachEvent)
  {
    window.attachEvent("onload", repad);
  }
else if (navigator &&
	 navigator.userAgent &&
	 navigator.userAgent.match('Firefox'))
  {
    alert("Tibetan Machine Web renders incorrectly on Firefox.\nThe problem is subtle - it is mostly correct, but\nsome vowel signs are missing, so it will\nnot make sense when you read it.\nPlease use Internet Explorer or Safari to read Tibetan.\nWe apologize for the inconvenience.");
  }

// Local Variables: 
// c-file-style:"gnu"
// end:

