var player = '';

//open and start the audio player
//function listenpopUp(url) {
//window.open(url,'','scrollbars,resizable,width=320px,height=120px,left=50px,top=50px,toolbar=no');
//}
function listenpopUp() {
	player=window.open('listen.php','', 'toolbar=0,scrollbars=0,resizable=1,height=220,width=320'); 
	if (!player.opener) player.opener = self;
	
}

function moreInfoLink(url){
	try {
		//window.opener.document.title = window.opener.document.title;
		//return "Parent Window is Open!";
		var re = /www.grcmc.org\/radio\//i
		opener_url = window.opener.location;

		if(opener_url){
			//if the user is still in the local resonance structure
			if(re.test(opener_url)){
				//change the opener page location
				//alert('still in lr');
				window.opener.location.replace(url);
			} else {
				//alert('not in lr');
				window.opener.open(url);
			}
			window.opener.focus();
			
		} else {
			alert('out of domain');
		}
	}
	catch(e) {
		window.open(url)
	 }
}

function moreInfoLinkO(url){

	if(!window.opener){
		window.open(url);
	} else {
		var opener_url = ''
		try{
			opener_url = window.opener.location;
		} catch(err) {
			opener_url = '';
		}
		var re = /www.grcmc.org\/radio\//i

		if(opener_url){
			//if the user is still in the local resonance structure
			if(re.test(opener_url)){
				//change the opener page location
				//alert('still in lr');
				window.opener.location.replace(url);
			} else {
				//alert('not in lr');
				window.opener.open(url);
			}
			window.opener.focus();
			
		} else {
			alert('out of domain');
		}
	}
}



