
var displayTooltip = true;
var displayPopup = true;

var eventResultPopup = function(msghdr, msg, varWidth, eventClass) {
	
	msg = '<p>'+msg+'</p>';
	
	var body = stickyWinHTML(msghdr, msg, {width: varWidth, extraClass : eventClass});
	
	return new StickyWin({
		/*modalOptions: {
			modalStyle: {
				zIndex: 11000
			}
		},*/
		zIndex: 110001,
		content: body,
		position: 'center' //center, corner
	});
};


function addStickyWin (title, text, relativeto, varWidth, type) {
	
	var body = stickyWinHTML(title, text, {width: varWidth, extraClass : type});
	
	new StickyWin({
		  content: body,
		  relativeTo: $(relativeto),
		  position: 'center',
		  allowMultiple: false,
		  useIframeShim: false
	});
}

function addStickyWinForm (title, text, relativeto, varWidth, type, button, addclose, formID) {
	var body = stickyWinHTML(title, 
							 text, 
							{width: varWidth, 
							 extraClass : type, 
							 putcloseform: addclose,
							 buttons: [
							 	{ 
								text: button.text,
								properties: {'class' : button.cssclass},
								onClick: function()	{$$('.popupButton').hide(); $(formID).submit(); }
								}
							]	
						});
						
	new StickyWin({
		  content: body,
		  relativeTo: $(relativeto),
		  allowMultiple: false,
		  position: 'center',

		  useIframeShim: false
	});
}

function addStickyWinFormC (title, text, varWidth, type, button, addclose, formID) {
	
	
	
	var body = stickyWinHTML(title, 
							 text, 
							{width: varWidth, 
							 extraClass : type, 
							 putcloseform: addclose,
							 buttons: [
							 	{ 
								text: button.text,
								properties: {'class' : ''},
								onClick: function()	{$$('.popupButton').hide(); $(formID).submit(); }
								}
							]	
						});
						
	new StickyWin({
			content: body,
			zIndex: 110001,
			position: 'center',
			allowMultiple: false,
		  	useIframeShim: false
	});
}

window.addEvent('domready', function(){

	if ( typeof(popupInfo) != 'undefined') {
		eventResultPopup (popupInfo[0], popupInfo[1], popupInfo[2], popupInfo[3]);
	}	
	
	var toolTips = new Tips($$('.toolTip'), {
		maxTitleChars: 100
	
	
		
		});
}); 
	




	
 