function setFocus(id) {
	try {
		document.getElementById(id).focus();
	} catch (e) {
		// no focus
	}
}

function sTBFocus(el) {
	if (el.value == el.defaultValue)
		el.value = '';
}
function sTBBlur(el) {
	if (el.value.length == 0)
		el.value = el.defaultValue;
}

/*******************************/
/* See also: stylesheet.js */
/* add a stylesheet switcher (not permanent) */
function setActiveStyleSheet(title) {
   var i, a, main;
   var returnVar = true;
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       a.disabled = true;
       if(a.getAttribute("title") == title){
	   		a.disabled = false;
			returnVar = false;
		}
     }
   }
   return returnVar;
}
function getStyleSheets() {
   var i, a, main;
   var returnVar = [];
   for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
     if(a.getAttribute("rel").indexOf("style") != -1
        && a.getAttribute("title")) {
       returnVar.push(a);
     }
   }
   
   return returnVar;
}

/*******************************/
/* See also: print.js */
function printThis(){
	var x = setActiveStyleSheet('Printer-friendly'); 
	if (window.print) 
		window.print(); 
	return x;
}