/*
	List of actions:

	Add
	Remove


	List of all relationship types:

	4345	ADS SG FACULTY ADVISOR
	4349	ADS SG COORDINATOR
	4351	ADS SG CONTACT PERSON
	4353	ADS SG DP COORDINATOR
	4355	ADS SG LEGISLATIVE COORDINATOR
	4357	ADS SG CORE MEMBER
	4359	ADS SG MEMBER
*/

function roleChange(action,reltype)
{
	// Check for all required values in querystring
	c_str = document.URL.match(/c=[a-zA-Z0-9]*/);
	b_str = document.URL.match(/b=[a-zA-Z0-9]*/);
	sid_str = document.URL.match(/sid=[a-zA-Z0-9]*/);

	// Escape case if any of required values are missing
	// May want to check against valid values for action and reltype in future
	if (!c_str || !b_str || !sid_str || !action || !reltype)
		return;

	// Build new target URL
	newURL = '/site/apps/kb/cs/contactdisplay.asp?';
	newURL += c_str;
	newURL += '&' + b_str;
	newURL += '&' + sid_str;

	newURL += '&Operation=' + action;
	newURL += '&relationshiptype=' + reltype;

	// DEBUG
	// alert(newURL);

	document.location.href = newURL;
}