function AllowNoDups()
{
   var cookie_ls = document.cookie;
   if (cookie_ls.indexOf(document.location) > -1) 
   {
      alert("You've already submitted your answers. Thank you for your interest!  ");
      return false;
   }
   else
   	{
      document.cookie = window.location.href + " from " + document.referrer + "; path=/; expires=Thu, 23-Aug-2012 00:00:01 GMT;";
      return true;
   };
   };

function showPopup(url,height,width) { 
newwindow=window.open(url,'name','height='+height+',width='+width+',top=20,left=150,resizable'); 
if (window.focus) {newwindow.focus()} 
} 

function OpenInNewWindow(url){
        newwindow=window.open(url); 
		if (window.focus) {newwindow.focus()} 
   }

function contDetail(n, lid){
	if (window.small){
		small.location.href = '/default.aspx?lid=' + lid + '&uid=' + n;
		small.focus();
	} else {
		window.open('/default.aspx?lid=' + lid + '&uid=' + n, 'small', 'height=400px,width=365px,scrollbars=yes,status=no,toolbar=no');
	}
}
function departInfo(n, lid){
	if (window.small){
		small.location.href= '/default.aspx?lid=' + lid + '&did=' + n;
		small.focus();
	} else {
		window.open('/default.aspx?lid=' + lid + '&did=' + n, 'small', 'height=400px,width=365px,scrollbars=yes,status=no,toolbar=no');
	}
}
function openActivity(n, lid){
	if (window.small){
		small.location.href= '/default.aspx?lid=' + lid + '&aid=' + n;
		small.focus();
	} else {
		window.open('/default.aspx?lid=' + lid + '&aid=' + n, 'small', 'height=450px,width=400px,scrollbars=yes,status=no,toolbar=no');
	}
}
function inParent(ur){
	window.opener.location.href = ur;
	window.close();
}
function sptLoc(n, lid){
	if (window.small){
		small.location.href= '/default.aspx?lid=' + lid + '&lcid=' + n;
		small.focus();
	} else {
		window.open('/default.aspx?lid=' + lid + '&lcid=' + n, 'small', 'height=400px,width=365px,scrollbars=yes,status=no,toolbar=no');
	}
}


/* DEPRECIATED */
function sptEvent(n, lid){
	if (window.small){
		small.location.href= '/default.aspx?lid=' + lid + '&seid=' + n;
		small.focus();
	} else {
		window.open('/default.aspx?lid=' + lid + '&seid=' + n, 'small', 'height=400px,width=365px,scrollbars=yes,status=no,toolbar=no');
	}
}
function openSport(n, lid){
	window.opener.location.href = '/default.aspx?lid=' + lid + '&tid=' + n;
	window.close();
}