function createExternals(win_name) {
	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')) {
			if (anchor.getAttribute('rel') == 'external') {
				anchor.target = win_name;
			} else if (anchor.getAttribute('rel') == 'frame') {
				anchor.target = '_top';
			}
		}
	}
}

window.onload = function(e) {
	createExternals('_extlink');
}

// POPUP WINDOW OBJECT
function popup(URL, w, h, scr, name, adj) {
	var adj = (adj) ? adj : '0';
	
	if(adj != '0'){
		var w = screen.width - 100;
		var h = screen.height - 100;
	}
	else{
		var w = (w) ? w : '620';
		var h = (h) ? h : '500';
	}
	var tmp = (scr) ? (scr == 0) ? 'no' : 'yes' : 'yes';
	var name = (name) ? name : 'winObj';

	winProps = 'height=' + h + ',width=' + w + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + 
tmp + ',resizable=yes';
	winObj = window.open(URL,name,winProps);
	winObj.focus();
}
// end POPUP WINDOW OBJECT