function getMsibUri(){
	var msibPath = determineMsibEnvironment();
	$('rcRegLogin').src = msibPath+'flow?_flowId=rydercup-register-flow';
}

function determineMsibEnvironment() {
	var msib_location='';
	var location = window.location.host;
	
	if(location.indexOf('jcmswebdev.rydercup.com:99') >= 0) {	//dev
		msib_location = 'http://payp1dev1.turner.com:1080/pga-webdev/';
	} else if(location.indexOf('jcmsref.rydercup.com:99') >= 0) {	//ref
		msib_location = 'https://aud-ite.pga.com/services/pga/';
	} else {	//prod
		msib_location = 'https://secure.audience.pga.com/services/pga/';
	}
	return msib_location;
}

function determineRyderCupEnvironment() {
	var rcLocation = '';
	var location = window.location.host;
	
	if (location.indexOf('payp1dev1.turner.com:1080') >= 0) {	//dev
		rcLocation = 'http://jcmswebdev.rydercup.com:99/';
	} else if (location.indexOf('aud-ite.pga.com') >= 0) {	//ref
		rcLocation = 'http://jcmsref.rydercup.com:99/';
	} else {	//prod
		rcLocation = 'http://www.rydercup.com/';
	}
	return rcLocation;
}

