function addtofav(){
	var url = 'http://thissite.com';
	var title = 'this site';
	var chr='CTRL-D';
	var agt=navigator.userAgent.toLowerCase();
	if(agt.indexOf("opera")!= -1) chr = 'CTRL-T';
	if (window.external)
	document.write('<a href="'+url+'" rel="favorite">Add '+title+' to Favorites<\/a>');
	else
	document.write('Press '+chr+' to Bookmark '+title);
}
function favorites(){
	if (document.all){
		var url = 'http://fthq.com/galleries/';
		var title = 'FTHQ Galleries';
		window.external.addfavorite(url,title)
		return false;
	}
}
function initialize(){
	var x = document.getElementsByTagName('a');
	for (var i=0;i<x.length;i++){
		if (x[i].getAttribute('rel') == 'external'){
			x[i].onmouseover = function(){return ShowIt(this.getAttribute('link'))}
			x[i].onfocus = function(){return ShowIt(this.getAttribute('link'))}
			x[i].onmouseout = DoIt;
			x[i].target="_blank";
		}else if (x[i].getAttribute('rel') == 'favorite'){
			x[i].onclick = function(){return favorites()}
		}
	}
}
window.onload = initialize;
function DoIt(){
  window.status = '';
  return true;
}
function ShowIt(show){
	if(show){
		window.status = show;
  	return true;
	}
}
