function favorites(){
	var url = document.location.href;
	var title = document.title;
	var chr = 'CTRL-D';
	var agt = navigator.userAgent.toLowerCase();
	if(agt.indexOf("opera") != -1)
		chr = 'CTRL-T';
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
  	window.external.AddFavorite(url,title);
  else if (navigator.appName == "Netscape")
    window.sidebar.addPanel(title,url,"");
  else
    alert("Press "+chr+" to Bookmark This Page!");
	return false;
}
function DoIt(){
	window.status = '';
	return true;
}
function ShowIt(show){
	if(show){
		window.status = show;
  	return true;
	}else
  	return false;
}
function initialize(){
	if (document.body.getAttribute('pageid') == '1')
		document.getElementById('related1').style.display = 'block';
	if (document.body.getAttribute('pageid') == '2')
		document.getElementById('related2').style.display = 'block';
	if (document.body.getAttribute('pageid') == '3')
		document.getElementById('related3').style.display = 'block';
	if (document.body.getAttribute('pageid') == '4')
		document.getElementById('related4').style.display = 'block';
	if (document.body.getAttribute('pageid') == '5')
		document.getElementById('related5').style.display = 'block';
	if (document.body.getAttribute('pageid') == '6')
		document.getElementById('related6').style.display = 'block';
	if (document.body.getAttribute('pageid') == '7')
		document.getElementById('related7').style.display = 'block';
	var x = document.getElementsByTagName('a');
	for (var i = 0; i < x.length; i++){
		if (x[i].getAttribute('rel') == 'favorite')
			x[i].onclick = function(){return favorites()}
		if (x[i].getAttribute('rel') == 'external')
			x[i].target="_blank";
	}
}
window.onload = initialize;


