var callToActions = new Object();

/*
CONFIGURE: The call to actions here.
*/
callToActions.JoinEssureEvent = new CallToActionClass('/popups/JoinEssureEvent.aspx', 375, 650);
callToActions.HearAboutUs = new CallToActionClass('/popups/HearAboutUs.aspx', 300, 440);
callToActions.TellEssureStory = new CallToActionClass('/popups/TellEssureStory.aspx', 320, 400);
callToActions.AskEssureWomen = new CallToActionClass('/popups/AskEssureWomen.aspx', 375, 420);
callToActions.ListenToLiveChat = new CallToActionClass('/popups/ListenToLiveChat.aspx', 320, 355);
callToActions.ConsumerRegistration = new CallToActionClass('/Conceptus.Consumer/QuickRegistration.aspx', 900, 800, 'yes','yes');

/*
	Pops open the corresponding Call to Action
*/
function callToAction(name)
{
	var call = callToActions[name];
	if(call != null)
	{
		call.openWindow();
	}	
}

/* 
Constructor for a CallToAction object.
*/
function CallToActionClass(url, width, height, scrollbars, resizable)
{
	this.Url = url;
	this.Width = width;
	this.Height = height;
	this.Scrollbars = scrollbars
	this.Resizable = resizable
}

CallToActionClass.prototype.openWindow = function()
{
	//use timestamped window name so the popup window isn't reused in other popup links
	var d = new Date();
	windowName = 'CallToAction'+d.getTime(); 
	if(this.Resizable == '')
	   this.Resizable = 'no'
	   
	if(this.Scrollbars == '')
	   this.Scrollbars = 'no'

    window.open(this.Url, windowName, 'toolbar=no,directories=no,menubar=no,status=no,height=' + this.Height + ',width=' + this.Width + ',scrollbars=' + this.Scrollbars + ',resizable=' + this.Resizable);
	    
//    if(this.Scrollbars != '')
//        window.open(this.Url, windowName, 'toolbar=no,directories=no,menubar=no,resizable=no,status=no,height=' + this.Height + ',width=' + this.Width + ',scrollbars=' + this.Scrollbars);
//    else
//	    window.open(this.Url, windowName, 'toolbar=no,directories=no,menubar=no,resizable=no,status=no,height=' + this.Height + ',width=' + this.Width);
}