function confirmLink(theLink, theText){
    // Confirmation is not required if the browser is Opera (crappy js implementation)
    if (typeof(window.opera) != 'undefined') {return true;}
    var is_confirmed = confirm(theText);
    if (is_confirmed) {theLink.href += '&is_js_confirmed=1';}
    return is_confirmed;
} // end of the 'confirmLink()' function

function printWindow() {
    Browser = parseInt(navigator.appVersion);
    if (Browser >= 4) window.print();
}

function setDisabled(id, disabled){
	if ( !document.getElementById || !document.getElementsByTagName) return;
	
	var nodesToDisable = {button :'', input :'', optgroup :'',	option :'', select :'', textarea :''};
	
	var node, nodes;
	var div = document.getElementById(id);
	if (!div) return;
	
	nodes = div.getElementsByTagName('*');
	if (!nodes) return;
	
	var i = nodes.length;
	while (i--){
		node = nodes[i];
		if ( node.nodeName	&& node.nodeName.toLowerCase() in nodesToDisable ){
			node.disabled = disabled;
		}
	}
}

self.name="wbg";

