/*check location & redirect if necessary*/
    var uri = document.location.href;
    var newUri = false;
    /* make sure we're at https: */
    if(/^http:/.test(uri)){
        uri = uri.replace(/^http/,'https');
        newUri = true;
    }
    /* make sure the 'www' is there */
    if(!/^https:\/\/www\./.test(uri)&&!/staging/.test(uri)){
        uri = uri.replace(/^https:\/\//,'https://www.');
        newUri = true;
    }
	
	if(!/www\.dcu\.org/.test(uri) && !/staging/.test(uri)) {
		uri = "https://www.dcu.org/";
		newUri = true;
	}
	
    /* redirect */
    if(newUri)document.location.replace(uri);


// open the Pop-up Login window
function popup_login (url, h, w, extras) {
// initilize variables
//	var props = "left=0,top=0,resizable=1,scrollbars=1,status=1,menubar=0,toolbar=0";
	var props = "toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1";
// append the list of properties to the default properties
	if ( extras != "" ) {
		props += ","+ extras;
	}
// require a height and width to be specified
	if ( w == "" || h == "" ) {
		return false;
	} else {
// open the Pop-up Login window
		popupLogin = window.open(url, "popupLogin", "width="+ w +",height="+ h +","+ props);
		
		
		
	}
}

