// **** PMG CONFIGURATION **** //
// **** PMG CONFIGURATION **** //
// **** PMG CONFIGURATION **** //

var gProps = {};
gProps.app = {};
gProps.app.folder = null;
//gProps.app.title = "t_website";
var gButtons = {};

var gDebug = {};
gDebug.tools = (location.host == "localhost" || (location.host.indexOf("sklink") != -1))? true : false; // turn on the debug tools? //
//gDebug.tools = false;
gDebug.showErrors = false;
gDebug.code = "68696685717978"; // debugon //
gDebug.keyboard = false; // turn on number keys //
//gDebug.title = "HCP";
gDebug.colors = {};
gDebug.colors.bgcolor = "#FBAF16";
gDebug.colors.background = false;
gDebug.colors.elements = {div:"red",p:"aqua",span:"lime",h1:"orange",h2:"pink",table:"black"};

var gCookie = {};
gCookie.props = {};
gCookie.props.cookie = "ME";
gCookie.props.path = "/";
gCookie.props.domain = false;
gCookie.props.secure = false;
gCookie.props.constant = true;
gCookie.props.days = 365;

// init globals //
gProps.qs = {}
// Check the Query String //
if(location.search){
	var qs = location.search.split("?")[1].split("&");
	if(qs.length){
		for(var x = 0; x<qs.length; x++){
			var i = qs[x].split("=");
			// Force all properties to uppercase //
			gProps.qs[i[0].toUpperCase()] = unescape(i[1]);	
		}
	}
}

gProps.page = unescape(location.href).split('?')[0].split("/").pop();
gProps.tracking_source = location.pathname + location.search;
// allows any link containing id "track_link" to be tracked //
gProps.global_tracking = true;
gProps.show_loading = false;
gProps.cookie = {};
var lCookie = cookie_read(gCookie.props);
if(lCookie){
	var lCookie = lCookie.split("~");
	for(var x = 0; x<lCookie.length; x++){
		var v = lCookie[x].split("=");
		if(v.length == 2){
			gProps.cookie[v[0]] = v[1];
		}
	}
}

gProps.cookie_net = {};
var lCookie = unescape(document.cookie);
if(lCookie.indexOf(";") != -1){
	var lCookie = lCookie.split(";");
	if(lCookie.length){
		for(var x = 0; x<lCookie.length; x++){
			var v = lCookie[x].split("=");
			if(v.length == 2){
				v[0] = v[0].replace(/^\s*/, ""); // strip whitespace from front //
				gProps.cookie_net[v[0]] = v[1];
			}else{
				//alert(lCookie[x])
			}
		}
	}
	// set a boolean for child //
	var lChild = false;
	if(gProps.cookie_net.FLASH){
		lChild = (gProps.cookie_net.FLASH.indexOf("8") != -1) || (gProps.cookie_net.FLASH.indexOf("9") != -1);
	}else{
		gProps.cookie_net.FLASH = "1,2,3,4,5,6,7";
	}
	
	gProps.cookie_net.p_child = lChild;
	
}

gProps.language = "en";
gProps.section = null; // initialize to null //

gProps.library = {};
var lHref = unescape(location.href).split("/");
gProps.library.category = lHref[lHref.length-2];

// TEXT SIZE //
gProps.textSize = {};
gProps.textSize.enabled = true;
gProps.textSize.initial_size = 100;
gProps.textSize.increment = 6;
gProps.textSize.maximum = 118;
gProps.textSize.minimum = 100;
gProps.textSize.visibility = ["planner_mp.aspx","planner.aspx"]; // this allows the page to control it's own visibility //

// JAVASCRIPT COLORS //
gProps.colors = {};
gProps.colors.faq = {color:"#008ad1",rollover:"#541c72",selected:"#541c72"};

// IE ENABLED //
gProps.IE = {}
gProps.IE.disableIE6 = false;
gProps.IE.browser_message = true;

// PRINTING //
gProps.print = {};
gProps.print.enabled = false;

// FLASH REQUIREMENTS //
gProps.flash = deconcept.SWFObjectUtil.getPlayerVersion();
gProps.flash.use_flash = true;
gProps.flash.available = gProps.flash.versionIsValid({major:9});
gProps.flash.flex = gProps.flash.versionIsValid({major:9});
gProps.flash.image = "160x41_Get_Flash_Player";
gProps.flash.getLink = "http://www.adobe.com/go/getflashplayer";
gProps.flash.message = "Adobe&reg; Flash&reg; is required to view this content."
gProps.flash.version_number = gProps.flash.major + "." + gProps.flash.minor + "." + gProps.flash.rev;

var gPaths = {};
gPaths.base = (gProps.app.folder)? unescape(location.href).split(gProps.app.folder)[0] : "/";
gPaths.common = gPaths.base + "common/";
gPaths.debug = gPaths.base + "debug/";
gPaths.app = gPaths.base + ((gProps.app.folder)? gProps.app.folder + "/" : "")
gPaths.css = gPaths.app + 'css/';
gPaths.js = gPaths.app + 'js/';
gPaths.html = gPaths.app + 'html/';
gPaths.media = gPaths.app + 'media/';
gPaths.audio = gPaths.media + 'audio/';
gPaths.images = gPaths.media + 'images/';
gPaths.images_mp = gPaths.images + 'nutrition/';
gPaths.xml = gPaths.media + 'xml/';
gPaths.flash = gPaths.media + 'flash/';
gPaths.video = "http://pmg.vo.llnwd.net/o37/merck/merckengage/en/media/video/";
gPaths.pdf = gPaths.media + 'pdf/';
// HCP //
gPaths.hcp = {};
gPaths.hcp.base = gPaths.base + "hcp/";
gPaths.hcp.media = gPaths.hcp.base + "media/";
gPaths.hcp.images = gPaths.hcp.media + "images/";
gPaths.hcp.pdf = gPaths.hcp.media + "pdf/";
gPaths.hcp.flash = gPaths.hcp.media + "flash/";
gPaths.hcp.audio = gPaths.hcp.media + "audio/";
gPaths.hcp.video = "http://pmg.vo.llnwd.net/o37/merck/merckengage/en/media/video/";

// CONDITION LIBRARY //
var gVideos = {};
gVideos.allergies = {video:"allergies"};
gVideos.asthma = {video:"asthma"};
gVideos.cholesterol = {video:"cholesterol"};
gVideos.diabetes = {video:"diabetes"};
gVideos.hbp = {video:"hbp"};
gVideos.migraine = {video:"migraine"};
gVideos.obesity = {video:false};
gVideos.child_allergy = {video:false};
gVideos.child_asthma = {video:false};
gVideos.cinv = {video:false};
gVideos.osteo = {video:false};

var gBrowser = {};
gBrowser.supported = false;
gBrowser.support_png = true;
gBrowser.browsers = ["Opera","Netscape","Chrome","Safari","Flock","Firefox"];

// Init the panels //
var gPanels = {};

// gLightBox was added for N.C. //
var gLightBox = {};
gLightBox.props = {};

// This is used in the Daily Planner e-mails //
var gEmailProps = {};
gEmailProps.to = {enable:true};
gEmailProps.emailaddress = {enable:true};
gEmailProps.greeting = {enable:true};
gEmailProps.txtMessage = {enable:true};

// This is used to load the images and panel content //
gProps.article = {};
gProps.article.image = true;
//gProps.article.callout = "activity_callout";
gProps.article.callout = null;
//gProps.article.bottom = "diabetes";
gProps.article.bottom = null;
gProps.article.titles = {copd:"COPD"};

// Leaving MerckEngage Links //
gProps.leaving_merck = {};
gProps.leaving_merck.text = 'You are now leaving MerckEngage.com.\n\nMerck & Co., Inc., does not review or control the content of any non-Merck site. Merck & Co., Inc., does not endorse and is not responsible for the accuracy, content, practices, or standards of any non-Merck sources.\n\nClick the cancel button to return to MerckEngage.com.\n\t\n';
gProps.leaving_merck_help_finder = {};
gProps.leaving_merck_help_finder.text = 'You are now leaving MerckEngage.com.\n\nYour search results will be provided on google.com.\n\nMerck & Co., Inc., does not review or control the content of any non-Merck site.\n\nMerck & Co., Inc., does not endorse and is not responsible for the accuracy, content, practices, or standards of any non-Merck sources, including these search results.\n\nClick Cancel to return to MerckEngage.com.\n\t\n';

// State restrictions //
gProps.state_restrictions = {};
gProps.state_restrictions.ME = {from:true,to:true};
gProps.state_restrictions.DC = {from:false,to:true};
gProps.state_restrictions.MA = {from:false,to:true};
gProps.state_restrictions.RI = {from:false,to:true};

// Opinion Labs //
gProps.opinion_labs = {};
gProps.opinion_labs.enabled = false;
gProps.opinion_labs.content = "default";
gProps.opinion_labs.visitor = true;

// GoFar //
gProps.gofar = {};
gProps.gofar.pages = [];
gProps.gofar.pages.push("/resources.aspx");
gProps.gofar.pages.push("/01_plan/index.aspx");
gProps.gofar.pages.push("/01_plan/condition.aspx");
gProps.gofar.pages.push("/01_plan/nutrition/index.aspx");
gProps.gofar.pages.push("/01_plan/activity/index.aspx");
gProps.gofar.pages.push("/02_library/index.aspx");
gProps.gofar.pages.push("/06_exchange/index.aspx");
gProps.gofar.pages.push("/05_care/index.aspx");
gProps.gofar.pages.push("/nutrition/index.aspx");
gProps.gofar.pages.push("/activity/index.aspx");
gProps.gofar.articles = [96,110,122,140,165,188,203,42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,226,227,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76];
// Nutrition Articles //
//gProps.gofar.articles = [42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,226,227];
// Activity Articles //
//gProps.gofar.articles = [62,63,64,65,66,67,68,69,70,71,72,73,74,75,76]
gProps.gofar.enabled = (location.host == "localhost" || (location.host.indexOf("sklink") != -1))? false : true; // enable gofar //

// AddThis //
gProps.addthis = {};
gProps.addthis.enabled = false;
gProps.addthis.override = false;
gProps.addthis.graphic = "this is not working";
gProps.addthis.pathnames = [];
gProps.addthis.pathnames.push({path:"/"});
gProps.addthis.pathnames.push({path:"/landing_page.aspx"});
gProps.addthis.pathnames.push({path:"/01_plan/"});
gProps.addthis.pathnames.push({path:"/01_plan/index.aspx"});
gProps.addthis.pathnames.push({path:"/02_library/"});
gProps.addthis.pathnames.push({path:"/02_library/index.aspx"});
gProps.addthis.pathnames.push({path:"/06_exchange/"});
gProps.addthis.pathnames.push({path:"/06_exchange/index.aspx"});
gProps.addthis.pathnames.push({path:"/05_care/"});
gProps.addthis.pathnames.push({path:"/05_care/index.aspx"});
gProps.addthis.pathnames.push({path:"/rxforhealth/"});
gProps.addthis.pathnames.push({path:"/rxforhealth/index.aspx"});

// Sign Up Callout - these pages hide it //
gProps.green_callout = [];
gProps.green_callout.push("landing_page.aspx");
gProps.green_callout.push("MyProfile.aspx");
gProps.green_callout.push("login.aspx");
gProps.green_callout.push("sitemap.aspx");
gProps.green_callout.push("contact.aspx");
gProps.green_callout.push("resources.aspx");
gProps.green_callout.push("faq.aspx");
gProps.green_callout.push("20111q.aspx");
gProps.green_callout.push("WelcomeCaregiver.aspx");
gProps.green_callout.push("c_error.aspx");
gProps.green_callout.push("EnrollmentThanks.aspx");
gProps.green_callout.push("noconsent.aspx");
gProps.green_callout.push("search.aspx");
gProps.green_callout.push("googlesearch.aspx");
gProps.green_callout.push("adherence.aspx");
gProps.green_callout.push("migraine_experience.aspx");
gProps.green_callout.push("ms_transition.aspx");

// Mega drop down exclusions //
gProps.megadd = [];
gProps.megadd.push("signup.aspx");
gProps.megadd.push("signupop.aspx");
gProps.megadd.push("signupcg.aspx");

// Hero Spot data //
gProps.hero_spot = {};
gProps.hero_spot.xml = "20120201.xml";
gProps.hero_spot.assets = gPaths.flash + "hero_spot/media/images/";

// Co-Branding Properties //
gProps.co_branding = {};
gProps.co_branding.me = {};
gProps.co_branding.me.enabled = true;
gProps.co_branding.me.disclaimer = "The content below is from MerckEngage.com. All content is owned or licensed by Merck & Co., Inc."

// Wellness Councel of the Midlands //
gProps.co_branding.wcm = {};
gProps.co_branding.wcm.me_disclaimer = true;

// Carousel properties //
gProps.carousel = {};

// User Type //
gUsers = {};
gUsers.login = gProps.cookie_net.ID || "0";
gUsers.getType = function(){
	gUsers.type = gProps.cookie_net.UT || "V";
	gUsers.pRM = (gProps.cookie_net.RM == "True" || gProps.cookie_net.RM == "true")? true : false;
	gUsers.pFN = gProps.cookie_net.FN || false;
	if(gUsers.type.toUpperCase().indexOf("V") != -1){
		gProps.opinion_labs.custom_var = "null|http://visitor.www.merckengage.com";
	}else{
		gProps.opinion_labs.custom_var = gProps.cookie_net.ID;
		gProps.opinion_labs.visitor = false;
	}
}

gUsers.visitor = function(){
	var lVisitor = true;
	if(gUsers.type.toUpperCase().indexOf("V") == -1){
		lVisitor = false;
	}
	return lVisitor;
}

gUsers.authenticated = function(){
	var lAuthenticated = false;
	if((gUsers.login != "0") && (gUsers.type != "V")){
		lAuthenticated = true;
	}
	return lAuthenticated;
}

gUsers.initHCP = function(){
	gUsers.hcp = {};
	// This special check is needed to extract the HCP //
	gUsers.hcp.hcpEncryptStr = cookie_read({cookie:'hcpEncryptStr'});
	gUsers.hcp.CPM_ID = cookie_read({cookie:'CPM_ID'});
	gUsers.hcp.EMAIL_ID = cookie_read({cookie:'EMAIL_ID'});
	gUsers.hcp.HCP_ID = cookie_read({cookie:'HCP_ID'});
	//alert(gUsers.hcp.HCP_ID)
	if(gUsers.hcp.HCP_ID){
		//gProps.opinion_labs.enabled = true;
		gProps.opinion_labs.custom_var = "hcp_" + gUsers.hcp.HCP_ID;
		gProps.opinion_labs.visitor = false;
	}
}

gUsers.getType();
gUsers.initHCP();

// **** PANELS CONFIGURATION **** //
// **** PANELS CONFIGURATION **** //
// **** PANELS CONFIGURATION **** //

// **** LOGIN PANELS **** //
gPanels.login_panel = {};
gPanels.login_panel.panel = 'login_panel';
gPanels.login_panel.immobilize = true;
gPanels.login_panel.dragable = false;
gPanels.login_panel.width = 500;
gPanels.login_panel.cssStyle = "blue";
gPanels.login_panel.clearForms = true;
gPanels.login_panel.tracking = true;
//gPanels.login_panel.top = 125;

gPanels.login_new_panel = {};
gPanels.login_new_panel.panel = 'login_new_panel';
gPanels.login_new_panel.immobilize = true;
gPanels.login_new_panel.dragable = false;
gPanels.login_new_panel.width = 500;
gPanels.login_new_panel.cssStyle = "blue";
gPanels.login_new_panel.clearForms = true;
//gPanels.login_new_panel.top = 125;

gPanels.login_benefits = {};
gPanels.login_benefits.panel = 'login_benefits';
gPanels.login_benefits.immobilize = true;
gPanels.login_benefits.dragable = false;
gPanels.login_benefits.width = 600;
gPanels.login_benefits.cssStyle = "blue";
gPanels.login_benefits.tracking = true;
//gPanels.login_benefits.top = 125;

gPanels.sign_up = {};
gPanels.sign_up.panel = 'sign_up';
gPanels.sign_up.immobilize = true;
gPanels.sign_up.dragable = false;
gPanels.sign_up.width = 750;
gPanels.sign_up.cssStyle = "blue";
gPanels.sign_up.clearForms = true;
gPanels.sign_up.tracking = true;
gPanels.sign_up.accessKey = "Button_Signup_Submit";
//gPanels.sign_up.top = 125;

//Not eligible to sign up (Maine state restrictions)
gPanels.not_eligible = {};
gPanels.not_eligible.panel = 'not_eligible';
gPanels.not_eligible.immobilize = true;
gPanels.not_eligible.dragable = false;
gPanels.not_eligible.width = 600;
gPanels.not_eligible.cssStyle = "blue";
//gPanels.not_eligible.top = 125;

gPanels.what_kit = {};
gPanels.what_kit.panel = 'what_kit';
gPanels.what_kit.immobilize = true;
gPanels.what_kit.dragable = false;
gPanels.what_kit.width = 625;
gPanels.what_kit.cssStyle = "blue";
gPanels.what_kit.tracking = true;
//gPanels.what_kit.top = 125;

gPanels.no_kit = {};
gPanels.no_kit.panel = 'no_kit';
gPanels.no_kit.immobilize = true;
gPanels.no_kit.dragable = false;
gPanels.no_kit.width = 600;
gPanels.no_kit.cssStyle = "blue";
//gPanels.no_kit.top = 125;
	
gPanels.login_forgot = {};
gPanels.login_forgot.panel = "login_forgot";
gPanels.login_forgot.immobilize = true;
gPanels.login_forgot.dragable = false;
gPanels.login_forgot.cssStyle = "blue";
gPanels.login_forgot.width = 500;
gPanels.login_forgot.clearForms = true;
//gPanels.login_forgot.top = 125;

gPanels.already_registered = {};
gPanels.already_registered.panel = "already_registered";
gPanels.already_registered.immobilize = true;
gPanels.already_registered.dragable = false;
gPanels.already_registered.cssStyle = "blue";
gPanels.already_registered.width = 500;
//gPanels.already_registered.accessKey = "login_alerts_id_Login_phone_hcc_id_Button2_phone_Yes";
//gPanels.already_registered.top = 125;

gPanels.already_registered_enroll = {};
gPanels.already_registered_enroll.panel = "already_registered_enroll";
gPanels.already_registered_enroll.immobilize = true;
gPanels.already_registered_enroll.dragable = false;
gPanels.already_registered_enroll.cssStyle = "blue";
gPanels.already_registered_enroll.width = 600;
//gPanels.already_registered_enroll.top = 125;

// SSK 20110825 - RV - link to HCP //
gPanels.connect_hcp_learn_more = {};
gPanels.connect_hcp_learn_more.panel = 'connect_hcp_learn_more';
gPanels.connect_hcp_learn_more.immobilize = true;
gPanels.connect_hcp_learn_more.dragable = false;
gPanels.connect_hcp_learn_more.width = 500;
gPanels.connect_hcp_learn_more.cssStyle = "blue";
gPanels.connect_hcp_learn_more.clearForms = true;
//gPanels.connect_hcp_learn_more.buttons = [{id:"close",label:"Close",className:"orangeButton"}];
//gPanels.connect_hcp_learn_more.button_loc = "left";
gPanels.connect_hcp_learn_more.db = true;

// SSK 20110825 - additional login - connect with HCP //
gPanels.login_connect_hcp = {};
gPanels.login_connect_hcp.panel = 'login_connect_hcp';
gPanels.login_connect_hcp.immobilize = true;
gPanels.login_connect_hcp.dragable = false;
gPanels.login_connect_hcp.width = 350;
gPanels.login_connect_hcp.cssStyle = "blue";
gPanels.login_connect_hcp.clearForms = true;

// SSK 20110829 - already connected to an HCP //
gPanels.already_connected_hcp = {};
gPanels.already_connected_hcp.panel = 'already_connected_hcp';
gPanels.already_connected_hcp.immobilize = true;
gPanels.already_connected_hcp.dragable = false;
gPanels.already_connected_hcp.width = 450;
gPanels.already_connected_hcp.cssStyle = "blue";
gPanels.already_connected_hcp.db = true;

// SSK 20110829 - Caregiver cannot have an HCP //
gPanels.caregiver_cannot_have_hcp = {};
gPanels.caregiver_cannot_have_hcp.panel = 'caregiver_cannot_have_hcp';
gPanels.caregiver_cannot_have_hcp.immobilize = true;
gPanels.caregiver_cannot_have_hcp.dragable = false;
gPanels.caregiver_cannot_have_hcp.width = 450;
gPanels.caregiver_cannot_have_hcp.cssStyle = "blue";
gPanels.caregiver_cannot_have_hcp.db = true;

// SSK 20110907 - RV HCP Search Added //
gPanels.connect_hcp = {};
gPanels.connect_hcp.panel = 'connect_hcp';
gPanels.connect_hcp.immobilize = true;
gPanels.connect_hcp.dragable = false;
gPanels.connect_hcp.width = 700;
gPanels.connect_hcp.iFrameLoc = "/common/HCPSearch/hcp_search.aspx";
gPanels.connect_hcp.cssStyle = "blue";
gPanels.connect_hcp.tracking = true;

gPanels.ccr = {};
gPanels.ccr.panel = 'ccr';
gPanels.ccr.immobilize = true;
gPanels.ccr.dragable = true;
gPanels.ccr.width = 400;
gPanels.ccr.cssStyle = "blue";

// Meal Planner Preferences //
gPanels.meal_preferences = {};
gPanels.meal_preferences.panel = 'meal_preferences';
gPanels.meal_preferences.immobilize = true;
gPanels.meal_preferences.dragable = false;
gPanels.meal_preferences.width = 850;
gPanels.meal_preferences.cssStyle = "blue";

// Meal Planner Preferences //
gPanels.activity_preferences = {};
gPanels.activity_preferences.panel = 'activity_preferences';
gPanels.activity_preferences.immobilize = true;
gPanels.activity_preferences.dragable = false;
gPanels.activity_preferences.width = 850;
gPanels.activity_preferences.cssStyle = "blue";
gPanels.activity_preferences.load_once = true;

// Add Articles //
gPanels.articles_add = {};
gPanels.articles_add.panel = 'articles_add';
gPanels.articles_add.immobilize = true;
gPanels.articles_add.dragable = false;
gPanels.articles_add.width = 900;
gPanels.articles_add.cssStyle = "blue";

// Coach Calls Sample //
gPanels.coach_calls = {};
gPanels.coach_calls.panel = "coach_calls";
gPanels.coach_calls.immobilize = true;
gPanels.coach_calls.dragable = false;
gPanels.coach_calls.width = 850;
gPanels.coach_calls.cssStyle = "blue";
gPanels.coach_calls.script = function(){ closeAV_Panel("flash_mp3_id") };

// this is the activity points view //
gPanels.points_info = {};
gPanels.points_info.panel = "points_info";
gPanels.points_info.immobilize = true;
gPanels.points_info.dragable = false;
gPanels.points_info.width = 600;
gPanels.points_info.cssStyle = "blue";

/* PM - added additional panels for HCP not found */
gPanels.select_hcp = {};
gPanels.select_hcp.panel = 'select_hcp';
gPanels.select_hcp.immobilize = true;
gPanels.select_hcp.dragable = false;
gPanels.select_hcp.width = 725;
gPanels.select_hcp.cssStyle = "blue";

gPanels.select_hcp_confirmed = {};
gPanels.select_hcp_confirmed.panel = 'select_hcp_confirmed';
gPanels.select_hcp_confirmed.immobilize = true;
gPanels.select_hcp_confirmed.dragable = false;
gPanels.select_hcp_confirmed.width = 725;
gPanels.select_hcp_confirmed.cssStyle = "blue";
gPanels.select_hcp_confirmed.db = true;
gPanels.select_hcp_confirmed.buttons = [{id:"continue",label:"Continue",className:"greenButton"}];
gPanels.select_hcp_confirmed.button_loc = "right";

gPanels.hcp_invalid_link = {};
gPanels.hcp_invalid_link.panel = 'hcp_invalid_link';
gPanels.hcp_invalid_link.immobilize = true;
gPanels.hcp_invalid_link.dragable = false;
gPanels.hcp_invalid_link.width = 725;
gPanels.hcp_invalid_link.cssStyle = "blue";
gPanels.hcp_invalid_link.db = true;
gPanels.hcp_invalid_link.buttons = [{id:"continue",label:"Continue",className:"greenButton"}];
gPanels.hcp_invalid_link.button_loc = "right";

// this is the recipe view //
/* PM - Remove from planner.js */
gPanels.recipe_view = {};
gPanels.recipe_view.panel = "recipe_view";
gPanels.recipe_view.immobilize = true;
gPanels.recipe_view.dragable = false;
gPanels.recipe_view.cssStyle = "blue";
gPanels.recipe_view.width = 900;
gPanels.recipe_view.tracking = true;
gPanels.recipe_view.script = function(){
	if(!this.saveUrl){
		var lFrame = document.getElementById("iframe_recipe_view")
		lFrame.src = "/common/popup.html";
		this.saveUrl = false;
	}
}
gPanels.custom_recipe_view= {};
gPanels.custom_recipe_view.panel = "custom_recipe_view";
gPanels.custom_recipe_view.immobilize = true;
gPanels.custom_recipe_view.dragable = false;
gPanels.custom_recipe_view.cssStyle = "blue";
gPanels.custom_recipe_view.width = 800;
gPanels.custom_recipe_view.script = function(){var lFrame = document.getElementById("iframe_recipe_view_copy"); lFrame.src = "/common/popup.html";};

gPanels.create_meal_copy = {};
gPanels.create_meal_copy.panel = "create_meal_copy";
gPanels.create_meal_copy.immobilize = true;
gPanels.create_meal_copy.dragable = false;
gPanels.create_meal_copy.cssStyle = "blue";
gPanels.create_meal_copy.width = 450;

gPanels.create_meal_edit = {};
gPanels.create_meal_edit.panel = "create_meal_edit";
gPanels.create_meal_edit.immobilize = true;
gPanels.create_meal_edit.dragable = false;
gPanels.create_meal_edit.cssStyle = "blue";
gPanels.create_meal_edit.width = 450;

// SSK 20091028 - moved from nav_global_hcc.ascx //
gPanels.CGAlreadyInvited = {};
gPanels.CGAlreadyInvited.panel = 'CGAlreadyInvited';
gPanels.CGAlreadyInvited.immobilize = true;
gPanels.CGAlreadyInvited.dragable = false;
gPanels.CGAlreadyInvited.width = 610;
gPanels.CGAlreadyInvited.cssStyle = "blue";
//gPanels.CGAlreadyInvited.db = true;

// SSK 20091030 - loading panel //
gPanels.loading_panel = {};
gPanels.loading_panel.panel = 'loading_panel';
gPanels.loading_panel.immobilize = true;
gPanels.loading_panel.dragable = false;
gPanels.loading_panel.width = 150;
gPanels.loading_panel.cssStyle = "blue";
//gPanels.loading_panel.db = true;
gPanels.loading_panel.buttons = [];

gPanels.saving_panel = {};
gPanels.saving_panel.panel = 'saving_panel';
gPanels.saving_panel.immobilize = true;
gPanels.saving_panel.dragable = false;
gPanels.saving_panel.width = 150;
gPanels.saving_panel.cssStyle = "blue";
//gPanels.saving_panel.db = true;
gPanels.saving_panel.buttons = [];

// SSK 20091113 - Database lightbox Example //
gPanels.hrr_ky_consent = {};
gPanels.hrr_ky_consent.panel = "hrr_ky_consent";
gPanels.hrr_ky_consent.immobilize = true;
gPanels.hrr_ky_consent.dragable = false;
gPanels.hrr_ky_consent.cssStyle = "blue";
gPanels.hrr_ky_consent.width = 800;
gPanels.hrr_ky_consent.db = true;
gPanels.hrr_ky_consent.buttons = [{id:"back",label:"Back"},{id:"continue",label:"Continue",className:"greenButton",action:'testFunction'}];

// SSK 20091110 - Healthy Planning //
gPanels.hcc_plan_food = {};
gPanels.hcc_plan_food.panel = 'hcc_plan_food';
gPanels.hcc_plan_food.immobilize = true;
gPanels.hcc_plan_food.dragable = false;
gPanels.hcc_plan_food.width = 850;
gPanels.hcc_plan_food.top = 125;
gPanels.hcc_plan_food.tracking = true;
gPanels.hcc_plan_food.cssStyle = "blue";

gPanels.hcc_plan_activity = {};
gPanels.hcc_plan_activity.panel = 'hcc_plan_activity';
gPanels.hcc_plan_activity.immobilize = true;
gPanels.hcc_plan_activity.dragable = false;
gPanels.hcc_plan_activity.width = 850;
gPanels.hcc_plan_activity.top = 125;
gPanels.hcc_plan_activity.tracking = true;
gPanels.hcc_plan_activity.cssStyle = "blue";

gPanels.hcc_plan_weight = {};
gPanels.hcc_plan_weight.panel = 'hcc_plan_weight';
gPanels.hcc_plan_weight.immobilize = true;
gPanels.hcc_plan_weight.dragable = false;
gPanels.hcc_plan_weight.width = 850;
gPanels.hcc_plan_weight.top = 125;
gPanels.hcc_plan_weight.tracking = true;
gPanels.hcc_plan_weight.cssStyle = "blue";

gPanels.hcc_plan_screenings = {};
gPanels.hcc_plan_screenings.panel = 'hcc_plan_screenings';
gPanels.hcc_plan_screenings.immobilize = true;
gPanels.hcc_plan_screenings.dragable = false;
gPanels.hcc_plan_screenings.width = 850;
gPanels.hcc_plan_screenings.top = 125;
gPanels.hcc_plan_screenings.tracking = true;
gPanels.hcc_plan_screenings.cssStyle = "blue";

gPanels.ical_instructions = {};
gPanels.ical_instructions.panel = 'ical_instructions';
gPanels.ical_instructions.immobilize = true;
gPanels.ical_instructions.dragable = false;
gPanels.ical_instructions.width = 500;
gPanels.ical_instructions.cssStyle = "blue";

// SSK 20091112 Add Menu Tool //
gPanels.Edit_your_meal = {};
gPanels.Edit_your_meal.panel = 'Edit_your_meal';
gPanels.Edit_your_meal.immobilize = true;
gPanels.Edit_your_meal.dragable = false;
gPanels.Edit_your_meal.width = 500;
gPanels.Edit_your_meal.cssStyle = "blue";
gPanels.Edit_your_meal.db = true;
gPanels.Edit_your_meal.buttons = [{id:"cancel",label:"Cancel"},{id:"copy",label:"Copy",action:"addMeal_Copy"},{id:"continue",label:"Continue", action:"Edit_your_meal_continue", className:"greenButton"}];
//gPanels.Edit_your_meal.button_loc = "left";

gPanels.copy_add_meal = {};
gPanels.copy_add_meal.panel = 'copy_add_meal';
gPanels.copy_add_meal.immobilize = true;
gPanels.copy_add_meal.dragable = false;
gPanels.copy_add_meal.width = 510;
gPanels.copy_add_meal.cssStyle = "blue";
gPanels.copy_add_meal.db = true;
gPanels.copy_add_meal.buttons = [{id:"cancel",label:"Cancel"}, {id:"continue",label:"Continue", action:"Edit_your_meal_continue",className:"greenButton"}];
//gPanels.copy_add_meal.button_loc = "left";

// Activity Planner confirm overwrite //
gPanels.confirm_ap = {};
gPanels.confirm_ap.panel = 'confirm_ap';
gPanels.confirm_ap.immobilize = true;
gPanels.confirm_ap.dragable = false;
gPanels.confirm_ap.width = 400;
gPanels.confirm_ap.cssStyle = "blue";

// Meal Planner confirm overwrite //
gPanels.confirm_mp = {};
gPanels.confirm_mp.panel = 'confirm_mp';
gPanels.confirm_mp.immobilize = true;
gPanels.confirm_mp.dragable = false;
gPanels.confirm_mp.width = 400;
gPanels.confirm_mp.cssStyle = "blue";

gPanels.hipaa_consent = {};
gPanels.hipaa_consent.panel = 'hipaa_consent';
gPanels.hipaa_consent.immobilize = true;
gPanels.hipaa_consent.dragable = false;
gPanels.hipaa_consent.width = 800;
gPanels.hipaa_consent.cssStyle = "blue";
gPanels.hipaa_consent.showTop = true;

// E-Mail Recipe //
gPanels.email_recipe = {};
gPanels.email_recipe.panel = 'email_recipe';
gPanels.email_recipe.immobilize = true;
gPanels.email_recipe.dragable = false;
gPanels.email_recipe.width = 600;
gPanels.email_recipe.cssStyle = "blue";
//gPanels.email_recipe.clearForms = true;
gPanels.email_recipe.script = function(){
	if(this.p_form_fields){
		for(var x = 0; x<this.p_form_fields.length; x++){
			this.p_form_fields[x].showError();
		}
	}
}

gPanels.email_recipe_thankyou = {};
gPanels.email_recipe_thankyou.panel = 'email_recipe_thankyou';
gPanels.email_recipe_thankyou.immobilize = true;
gPanels.email_recipe_thankyou.dragable = false;
gPanels.email_recipe_thankyou.width = 400;
gPanels.email_recipe_thankyou.cssStyle = "blue";

// STATE RESTRICTIONS //
gPanels.state_restrictions = {};
gPanels.state_restrictions.panel = 'state_restrictions';
gPanels.state_restrictions.immobilize = true;
gPanels.state_restrictions.dragable = false;
gPanels.state_restrictions.width = 500;
gPanels.state_restrictions.cssStyle = "blue";
gPanels.state_restrictions.script = function(){
	// SSK - 20111019 - prevents multiple messaging //
	var lDivs = this.content.getElementsByTagName("div");
	if(lDivs.length){
		for(var x =0; x<lDivs.length; x++){
			var lClass = lDivs[x].className;
			if(lClass && lClass == "state_restriction"){
				lDivs[x].style.display = "none";
			}
		}
	}
}

// CALORIES BURNED //
gPanels.calories_burned = {};
gPanels.calories_burned.panel = 'calories_burned';
gPanels.calories_burned.immobilize = true;
gPanels.calories_burned.dragable = false;
gPanels.calories_burned.width = 900;
gPanels.calories_burned.cssStyle = "blue";
gPanels.calories_burned.iFrameSize = true;
gPanels.calories_burned.is_iframe = true;
gPanels.calories_burned.script = function(){
	this.pFrame.obj.src = this.pFrame.pDefaultSrc;
	// reload the Meal Planner & Activity Planner if Calorie Burned are changed //
	if(this.pReload && gUsers.login != "0"){
		if((gProps.page == "planner_mp.aspx") || (gProps.page == "planner.aspx")){
			location.reload();
			gLightBox.savingData();
		}
	}
}

// SSK 20101028 - HCP Sign up Fax form //
gPanels.fax_sign_up = {};
gPanels.fax_sign_up.panel = "fax_sign_up";
gPanels.fax_sign_up.immobilize = true;
gPanels.fax_sign_up.dragable = false;
gPanels.fax_sign_up.cssStyle = "blue";
gPanels.fax_sign_up.width = 600;
gPanels.fax_sign_up.db = true;
gPanels.fax_sign_up.buttons = [{id:"FAX_A",label:"Download form for adult patient",className:"greenButton",action:'PDF_globalLink(this)'},{id:"FAX_P",label:"Download form for parent",className:"greenButton",action:'PDF_globalLink(this)'}]
gPanels.fax_sign_up.button_loc = "center";

// /00_staff/HCPEditor.aspx //
gPanels.delete_hcp = {};
gPanels.delete_hcp.panel = "delete_hcp";
gPanels.delete_hcp.immobilize = true;
gPanels.delete_hcp.dragable = false;
gPanels.delete_hcp.cssStyle = "blue";
gPanels.delete_hcp.width = 395;

// SSK moved from hcp_search.js //
// MY PROFILE //
gPanels.cancel_caregiver = {};
gPanels.cancel_caregiver.panel = "cancel_caregiver";
gPanels.cancel_caregiver.immobilize = true;
gPanels.cancel_caregiver.dragable = false;
gPanels.cancel_caregiver.cssStyle = "blue";
gPanels.cancel_caregiver.width = 395;

gPanels.remove_caregiver = {};
gPanels.remove_caregiver.panel = "remove_caregiver";
gPanels.remove_caregiver.immobilize = true;
gPanels.remove_caregiver.dragable = false;
gPanels.remove_caregiver.cssStyle = "blue";
gPanels.remove_caregiver.width = 395;

gPanels.change_caregiver = {};
gPanels.change_caregiver.panel = "change_caregiver";
gPanels.change_caregiver.immobilize = true;
gPanels.change_caregiver.dragable = false;
gPanels.change_caregiver.cssStyle = "blue";
gPanels.change_caregiver.width = 395;
	
gPanels.optout_caregiver = {};
gPanels.optout_caregiver.panel = "optout_caregiver";
gPanels.optout_caregiver.immobilize = true;
gPanels.optout_caregiver.dragable = false;
gPanels.optout_caregiver.cssStyle = "blue";
gPanels.optout_caregiver.width = 450;

// SSK 20110106 - WebMD "about this video" //
gPanels.WebMD = {};
gPanels.WebMD.panel = 'WebMD';
gPanels.WebMD.immobilize = true;
gPanels.WebMD.dragable = false;
gPanels.WebMD.width = 610;
gPanels.WebMD.cssStyle = "blue";
gPanels.WebMD.db = true;

// SSK 20110506 - MerckSource re-directs //
gPanels.ms_general = {};
gPanels.ms_general.panel = 'ms_general';
gPanels.ms_general.immobilize = true;
gPanels.ms_general.dragable = false;
gPanels.ms_general.width = 795;
gPanels.ms_general.cssStyle = "blue";
gPanels.ms_general.buttons = [{id:"continue",label:"Continue",className:"greenButton",action:'gPanel.ms_general.closePanel()'}];
gPanels.ms_general.button_loc = "right";
gPanels.ms_general.db = true;

/* Custom Button functions */
function testFunction(){
	//alert("testFunction dude");
	gLightBox.init({div:'copy_add_meal'});
	
}
//Priti 20091113 Created for Add Recipe Tool- create_meal
function Edit_your_meal(){
	//alert("Edit_your_meal...");
	gLightBox.init({div:'copy_add_meal'});
	
}
//Priti 20091113 Created for Add Recipe Tool- create_meal
function Edit_your_meal_continue(){
    location.href = "/01_plan/nutrition/add_recipe_oa.aspx";
   // alert("Edit_your_meal...");
}
//Priti 20091113 Created for Add Recipe Tool- create_meal
function addMeal_Copy(){
	    //alert("addMeal_Copy");
	    gLightBox.init({div:'copy_add_meal'});
}

