// JavaScript Document
function clearText(thisForm)
{
	var text = thisForm.defaultValue;
	if(thisForm.value == text)
	{
		thisForm.value = '';
	}
}
function replaceText(thisForm)
{
	if(thisForm.value == '')
	{
		thisForm.value = thisForm.defaultValue;
	}
}
function showImage(thisImage,name)
{
	var link_img = thisImage.getAttribute('title');
	var imgLink = thisImage.getAttribute("src");
	var imgTag = document.getElementById('thumb');
	var titleTag = document.getElementById("title");
	titleTag.innerHTML = name;
	imgTag.setAttribute('src',imgLink);
	imgTag.setAttribute('src',link_img);
}


function bookmarksite(title,url)
{
	if (window.sidebar)
	{
		 // firefox
		window.sidebar.addPanel(title, url, "");
	}
	else if(window.opera && window.print)
	{
		// opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	} 
	else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

function showImage(thisTag)
{
	
	var img = thisTag.getAttribute("href");
	var photobucket = document.getElementById("photopage");
	photobucket.setAttribute("src",img);
	return false;
}

function popUp(url,invent_id) 
{    
 	window.open(url+'?inventor_id='+invent_id,'PostComment','height=520,width=600,left=500,top=100,scrollbars=yes')
	return false;
}

function viewComments(url)
{
	opener.location.href='http://www.african-americaninventors.org/'+url;
	self.close();
	return false;
}
