/* 
 * Development by Sanmax Consultancy BVBA
 *
 * Warranty on source code, and templates, expires upon modifications, made by
 * either customer, or third party providers. Sanmax Consultancy can not be
 * held responsible for such modifications.
 *
 * Client assumes all responsibility for additional time and cost requirements
 * resulting from such modifications.
 */

//
String.prototype.trim = function() {
	a = this.replace(/^\s+/, '');
	return a.replace(/\s+$/, '');
};

//
function externalLinks() {
   if (!document.getElementsByTagName) return;
   var anchors = document.getElementsByTagName("a");
   for (var i=0; i<anchors.length; i++) {
      var anchor = anchors[i];
      if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
         anchor.target = "_blank";
   }
}

//
function highLightRow() {
	if (document.getElementById) {
		var tables = document.getElementsByTagName('table');
		for (var i=0;i<tables.length;i++) {
			if (tables[i].className == 'highlightTable') {
				var trs = tables[i].getElementsByTagName('tr');
				for (var j=0;j<trs.length;j++) {
					if (trs[j].parentNode.nodeName == 'TBODY') {
						var highlightClass = (j % 2 == 1) ? 'off' : 'on';
						
						trs[j].className = highlightClass;
						
						trs[j].onmouseover = function() {
							this.className = 'over';
							return false;
					}
					if (highlightClass == 'off') {
						trs[j].onmouseout = function() {
							this.className = 'off';
							return false;
						}
					}
					if (highlightClass == 'on') {
						trs[j].onmouseout = function() {
							this.className = 'on';
							return false;
						}}
					}
				}
			}
		}
	}
}