//  pass the url  and  optionally a width, height, and window name
function spawnWindow(url,name,w,h){
	if(w == undefined) w = 320;
	if(h == undefined) h = 240;
	if(name == undefined) name = "popWindow";
	var newWindow = window.open(url,name,"toolbar=0,scrollbars=1,resizable=1,width="+w+",height="+h+"\"");
	newWindow.focus();				
 }
 
 function ifExists(val, htmlOut, other){
	if (typeof other=='undefined') other = "";
	
	if (val.length && val != "false" && val !="/images/spacer.gif"){
	document.write (htmlOut);
	}else{
		if(other.length)
		{
			document.write (other);
		}
	}
}

// SPAM PROTECTED MAIL TO LINK
//
//	usage	makeMailTo('fanmail', 'alisonkrauss.com?subject=Fan Mail', 'Send Fan Mail to AKUS!');		
//   name = first part of email domain = part after @  linkText = text to show for mail to link          
function makeMailTo(name, domain, linkText){

	if(name == undefined || domain == undefined)return false;
	if (linkText == undefined) linkText = name+'@'+domain;
	document.write('<a href="mailto:'+name+'@'+domain+'">'+linkText+'</a>');
}
						  