function client (jsLoginType, jsLoginReturnURL, jsLoginSearchString) {
	showBox();
	var gdMessageDiv = document.getElementById('gdMessage');
	var thisInlineDiv = document.getElementById('gdInline');
	var thisInlineFrame = document.getElementById('gdInlineFrame');
	jsLoginReturnURL = escape(jsLoginReturnURL);
	jsLoginFrameURL = "index.cfm?fuseaction=clientLogin&loginType=" + jsLoginType + "&loginReturnURL=" + jsLoginReturnURL + "&loginSearchString=" + jsLoginSearchString;
	//gdMessageDiv.style.display = "none";
	thisInlineDiv.style.display = "block";
	thisInlineDiv.style.width = "580px";
	thisInlineDiv.style.width = "580px";
	thisInlineDiv.style.height = "306px";
	thisInlineFrame.style.height = "306px";
	thisInlineFrame.src = jsLoginFrameURL;
	}		
	
function clientCreate (jsLoginType, jsLoginReturnURL, jsLoginSearchString) {
	showBox();
	var gdMessageDiv = document.getElementById('gdMessage');
	var thisInlineDiv = document.getElementById('gdInline');
	var thisInlineFrame = document.getElementById('gdInlineFrame');
	jsLoginReturnURL = escape(jsLoginReturnURL);
	jsLoginFrameURL = "index.cfm?fuseaction=clientCreate&loginType=" + jsLoginType + "&loginReturnURL=" + jsLoginReturnURL + "&loginSearchString=" + jsLoginSearchString;
	//gdMessageDiv.style.display = "none";
	thisInlineDiv.style.display = "block";
	thisInlineDiv.style.width = "580px";
	thisInlineDiv.style.width = "580px";
	thisInlineDiv.style.height = "306px";
	thisInlineFrame.style.height = "306px";
	thisInlineFrame.src = jsLoginFrameURL;
	}	
	
function clientCreateComplete () {
	var gdMessageDiv = document.getElementById('gdMessage');
	var thisInlineDiv = document.getElementById('gdInline');
	var thisInlineFrame = document.getElementById('gdInlineFrame');
	thisInlineDiv.style.width = "580px";
	thisInlineDiv.style.width = "580px";
	thisInlineDiv.style.height = "306px";
	thisInlineFrame.style.height = "306px";
	hideBox();	}	

function showBox(){
	scroll(0,0);
	
	var grabHeight = self.screen.height;
	//alert(my_height);
	//alert(grabHeight);
	
	var adjustHeight = ( grabHeight + 300 ); 
	
	//alert(adjustHeight);
	
	var thisOverlay = document.getElementById('gdOverlay');
	thisOverlay.style.height = grabHeight + 'px';
	
	
	$('gdOverlay').show();
	center('gdInline');
	return false;
}
	
function hideBox(){
	$('gdOverlay').hide();
	$('gdInline').hide();
	return false;
}
	
function center(element){
	try{
		element = $(element);
	}
	catch(e){
		return;
	}
	
	var my_width = 0;
	var my_height = 0;
	
	if ( typeof( window.innerWidth ) == 'number' ){
		my_width = window.innerWidth;
		my_height = window.innerHeight;
	}else if
		( document.documentElement &&
		( document.documentElement.clientWidth ||
		  document.documentElement.clientHeight ) ){
		my_width = document.documentElement.clientWidth;
		my_height = document.documentElement.clientHeight;
	}
	else if
		( document.body &&
		( document.body.clientWidth || document.body.clientHeight ) ){
		my_width = document.body.clientWidth;
		my_height = document.body.clientHeight;
	}
	
	element.style.position = 'absolute';
	element.style.zIndex = 1002;
	
	var scrollY = 0;
	
	if ( document.documentElement && document.documentElement.scrollTop ){
		scrollY = document.documentElement.scrollTop;
	}else if ( document.body && document.body.scrollTop ){
		scrollY = document.body.scrollTop;
	}else if ( window.pageYOffset ){
		scrollY = window.pageYOffset;
	}else if ( window.scrollY ){
		scrollY = window.scrollY;
	}
	
	var elementDimensions = Element.getDimensions(element);
	
	var setX = ( my_width - elementDimensions.width ) / 2;
	var setY = ( my_height - elementDimensions.height ) / 3 + scrollY;
	
	setX = ( setX < 0 ) ? 0 : setX;
	setY = ( setY < 0 ) ? 0 : setY;
	
	element.style.left = setX + "px";
	element.style.top = "100px";
	
	element.style.display = 'block';

} 