function register(coursetype, coursestate, tabc, corporate) {
	var varstring = "";
	if (coursetype != null) {
		varstring += "coursetype=" + coursetype;
		varstring += "&";
	}
	if (coursestate != null) {
		varstring += "coursestate=" + coursestate;
		varstring += "&";
	}
	if (tabc != null) {
		varstring += "tabc=1&";
	}
	if (corporate != null) {
		varstring += "corporate=1&";
	}
	varstring = "&" + varstring;
	if (varstring.charAt(varstring.length-1)=='&') {
		varstring = varstring.substring(0,varstring.length-1);
	}
	redirect_url = bridgeurl + "login/checkbrowser.aspx?caller=" + callerid + varstring;
	if (callerid != "") {
		regTestPopUp(redirect_url, 'Registration', 500, 500);
	} else {
		//window.location.reload();
		alert('Warning: Application variables are not being set!');
	}
	return; 
}
function login() {
	if (callerid != "") {
		regTestPopUp(bridgeurl + 'login/login.aspx?caller=' + callerid, 'Login', 500,500);
	} else {
		//window.location.reload();
		alert('Warning: Application variables are not being set!');
	}
}

function openWindow(filename, title, w, h) {
	newWind = window.open(filename, title, 'width=' + w + ',height=' + h + ',screenX=50,screenY=50,toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=auto,resizable=no');
	newWind.opener = self;
	if (title == "Maintenance") {
		this.focus();
	}
}
function regTestPopUp(filename, title, w, h) {
	newWind = window.open(filename, title, 'width=' + w + ',height=' + h + ',left=0,top=0,toolbar=no,status=yes,location=no,menubar=no,directories=no,scrollbars=yes,resizable=yes');
	newWind.opener = self;
}
function openmapi(prefix, domain) {
      window.location.href = 'mai' + 'lto:' + prefix + '@' + domain + '.' + 'com';
}
