// JavaScript Document
function insertContact (theName, linkText){
	
	var theDomain = ('alcentra' + '.' + 'com');
	
	theAddress = (theName + '&#064' + theDomain);
	if(linkText=='me'){
		linkText = theAddress;
	}
	document.write('<a href="mailto:' + theAddress +'">' + linkText + '<\/a>');
	//document.write(theAddress);
}
function popupwindow(URL){
	var w=440;
	var h=420;
	leftPos = 0;
	topPos = 0;
	popup = window.open(URL,'popup','height='+h+',width='+w+',menubar=0,scrollbars=no,resizable=0, status=0,titlebar=0,toolbar=0,left='+leftPos+',top='+topPos+'');
	popup.focus();
}
function toggle_display(elementID, base_classname, link_elem) {
	// base_classname defaults to an empty string
	if (typeof(base_classname) == "undefined") base_classname = "";
	
	// link_elem defaults to null
	if (typeof(link_elem) == "undefined") link_elem = null;
	
	var to_toggle = document.getElementById(elementID);
	
	if(to_toggle != null)
	{
		if(to_toggle.className == "hidden")
		{
			// Clear class name
			to_toggle.className = base_classname;
			
			// Change the link content
			if(link_elem != null) {
				link_elem.innerHTML = "(hide)";
			}
		}
		else
		{
			// Set class name to hidden
			if(base_classname == "") {
				to_toggle.className = "hidden";
			} else {
				to_toggle.className = "hidden " + base_classname;
			}
			
			// Change the link content
			if(link_elem != null) {
				link_elem.innerHTML = "(show)";
			}
		}
	}
}

function roll(img_name, img_src)
 {
   document[img_name].src = img_src;
 }
