if(typeof(String.ucFirst) == "undefined") {
	String.prototype.ucFirst = function() {
	    return this.charAt(0).toUpperCase() + this.slice(1);
	}
}

// used in toolbar showCompany Recommend sent
function scStatic_recommend_form_sent() {
	scSet('prop4','Recommend form sent');
	scSet('prop9','Recommend form');
	scSet('eVar3','Recommend form');
	scSet('prop11','communications');
	scSet('events','event3');
	scPushResult();
}

function scStatic_recommend_form() {
	scSet('prop4','Recommend form');
	scSet('prop9','Recommend form');
	scSet('eVar3','Recommend form');
	scSet('prop11','communications');
	scSet('events','event3');
	scPushResult();
}

function scStatic_recommend_form_all() {
	scSet('prop4','Recommend form all');
	scSet('prop9','Recommend form all');
	scSet('eVar3','Recommend form all');
	scSet('prop11','communications');
	scSet('events','event3');
	scPushResult();
}

function scStatic_recommend_form_all_sent() {
	scSet('prop4','Recommend form all sent');
	scSet('prop9','Recommend form all');
	scSet('eVar3','Recommend form all');
	scSet('prop11','communications');
	scSet('events','event3');
	scPushResult();
}

/*
 * EventPlanner
 */
function scStatic_eventplanner_print_all() {
  scSet('prop2' ,'all Exhibitor related Page Views');
	scSet('prop4' ,'Trade Show Planner_print');
	scSet('prop9' ,'Trade Show Planner_print');
	scSet('eVar3' ,'Trade Show Planner_print');
	scSet('prop11','myfair');
	scSet('events','event3');
	scPushResult();
}

function scStatic_eventplanner_add_items_from_search() {
	  //scSet('pageName' ,'Search Results');
	  scSet('prop3', '');
	  scSet('prop4' ,'');
	  scSet('prop5', '');
	  scSet('prop6', '');
	  scSet('prop7', '');
	  scSet('prop8', '');
	  scSet('prop10', '');
	  
	  scSet('prop11', 'communications');
	  scSet('channel', 'search results');
	  
	  scPushResult();
	}

function scStatic_eventplanner_add_item(p7, p8, p10) {
  if(typeof(p7)  != "undefined") p7  = decodeURIComponent((p7  + '').replace(/\+/g, '%20'));
  if(typeof(p8)  != "undefined") p8  = decodeURIComponent((p8  + '').replace(/\+/g, '%20'));
  if(typeof(p10) != "undefined") p10 = decodeURIComponent((p10 + '').replace(/\+/g, '%20'));
	
  scSet('pageName' ,'all Exhibitor related Page Views');
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'Trade Show Planner_add to Planner');
  scSet('prop9' ,'Trade Show Planner_add to Planner');
  scSet('prop5', '');
  scSet('channel', "myfair");
  scSet('eVar3' ,'Trade Show Planner_add to Planner');
  scSet('prop11','communications');
  scSet('events','event3');
  
  scSet("prop7", (typeof(p7) != "undefined") ? p7 : "");
  scSet("prop8", (typeof(p8) != "undefined") ? p8 : "");
  scSet("prop10", (typeof(p10) != "undefined") ? p10 : "");
  
  scPushResult();
}

function scStatic_eventplanner_delete_item(p7, p8, p10) {
  if(typeof(p7)  != "undefined") p7  = decodeURIComponent((p7  + '').replace(/\+/g, '%20'));
  if(typeof(p8)  != "undefined") p8  = decodeURIComponent((p8  + '').replace(/\+/g, '%20'));
  if(typeof(p10) != "undefined") p10 = decodeURIComponent((p10 + '').replace(/\+/g, '%20'));
	  
  scSet('pageName' ,'all Exhibitor related Page Views');
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'Trade Show Planner_remove from Planner');
  scSet('prop9' ,'Trade Show Planner_remove from Planner');
  scSet('prop5', '');
  scSet('channel', "myfair");
  scSet('eVar3' ,'Trade Show Planner_remove from Planner');
  scSet('prop11','communications');
  scSet('events','event3');
  
  scSet("prop7", (typeof(p7) != "undefined") ? p7 : "");
  scSet("prop8", (typeof(p8) != "undefined") ? p8 : "");
  scSet("prop10", (typeof(p10) != "undefined") ? p10 : "");  
  
  scPushResult();
} 

function scStatic_eventplanner_save_note(p7, p8, p10) {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'Trade Show Planner_add note');
  scSet('prop9' ,'Trade Show Planner_add note');
  scSet('eVar3' ,'Trade Show Planner_add note');

  scSet("prop7", (typeof(p7) != "undefined") ? p7 : "");
  scSet("prop8", (typeof(p8) != "undefined") ? p8 : "");
  scSet("prop10", (typeof(p10) != "undefined") ? p10 : "");
  
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

function scStatic_eventplanner_cancel_note() {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'Trade Show Planner_cancel note');
  scSet('prop9' ,'Trade Show Planner_cancel note');
  scSet('eVar3' ,'Trade Show Planner_cancel note');
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

function scStatic_eventplanner_recommend_sent(data, prop7) {
	// data is filled in form.html (recommend-portlet) with "{$_global.omniture.vars.eVar3}"
	scSet('prop4', data);
	scSet('prop9', data);
	scSet('prop5', "");
	
	if(data.substring(0,8) != "Attendee" && data.substring(0,5) != "Event")
		scSet('prop7', prop7);
	else
		scSet('prop7', '');
	
	scSet('eVar3', data);
	scSet('prop11','communications');
	scSet('events','event3');
	scPushResult();
}

function scStatic_eventplanner_recommend(data, prop7) {
	// data is filled in form.html (recommend-portlet) with "{$_global.omniture.vars.eVar3}"
	scSet('prop4', data);
	scSet('prop9', data);
	scSet('prop5', "");

	if(data.substring(0,8) != "Attendee" && data.substring(0,5) != "Event")
		scSet('prop7', prop7);
	else
		scSet('prop7', '');
	
	scSet('eVar3', data);
	scSet('prop11','communications');
	scSet('events','event3');
	scPushResult();
}

function scStatic_detail_contact(itemtype) {
	scSet('prop4', "Contact Exhibitor");
	scSet('prop9', "Contact Exhibitor");
	scSet('prop11', "communications");
	scSet('eVar3', "Contact Exhibitor");
	
	if(itemtype == "attendee" || itemtype == "event")
		scSet('prop7', '');
	
	scPushResult();	
}

/*
 * Myfair
 */

function scStatic_myfair_mymessageslist() {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'my Messages List');
  scSet('prop9' ,'my Messages List');
  scSet('eVar3' ,'my Messages List');
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

function scStatic_myfair_mymessageslist_inbox() {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'my Messages List Inbox');
  scSet('prop9' ,'my Messages List Inbox');
  scSet('eVar3' ,'my Messages List Inbox');
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

function scStatic_myfair_mymessageslist_write() {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'my Messages List Write');
  scSet('prop9' ,'my Messages List Write');
  scSet('eVar3' ,'my Messages List Write');
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

function scStatic_myfair_mymessageslist_sent() {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('prop4' ,'my Messages List Sent');
  scSet('prop9' ,'my Messages List Sent');
  scSet('eVar3' ,'my Messages List Sent');
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

function scStatic_eventplanner_add_searchresults() {
  scSet('prop2' ,'all Exhibitor related Page Views');
  scSet('eVar3' ,'Trade Show Planner_add_searchresults');
  scSet('prop4' ,'Trade Show Planner_add_searchresults');
  scSet('prop9' ,'Trade Show Planner_add_searchresults');
  scSet('prop11','myfair');
  scSet('events','event3');
  scPushResult();
}

/*
 * MISC 
 */

function scStatic_company_print() {
  scSet('prop4' ,'Company print');
  scSet('prop9' ,'exhibitor profile');
  scSet('prop11','profile');
  scSet('eVar3' ,'exhibitor profile');
  scPushResult();
}

function scStatic_hallplan_toggle(mode) {
    scSet('prop4','Hallplan');
    scSet('prop9','Hallplan');
    scSet('prop11','communications');
    scSet('eVar3','exhibitor profile');
    scPushResult();
}

function scStatic_zoom(type) 
{
	var eVar;
	switch(type) {
		case "company":
			eVar = "exhibitor profile";
			break;
		default:
			eVar = "product profile";
			break;
	}
	
	scSet('prop4', type + ' zoom');
	scSet('prop9', type + ' zoom');
	scSet('prop11','communications');
	scSet('eVar3', eVar);
	scSet('events', 'event3');
	
	scPushResult();	
}

function scStatic_filter_popup_loaded() {
	scSet('prop2','Filter by');
	scSet('prop4','Filter by');
	scSet('prop9','Filter by');
	scSet('prop11','communications');
	scSet('eVar3','Filter by');
	scSet('events','event3');
	scPushResult();
}

// Social Media Bookmark
function scStatic_socialmedia(s, type) {
	scSet('prop2','Social Media Bookmark');
	scSet('prop4','Social Media Bookmark');
	scSet('prop9','Social Media Bookmark');
	
	if(s == "EMail") {
		scSet('prop5', '');
		scSet('prop7', '');

		if(type != "product" && type != "person")
			scSet('pageName', 'all Exhibitor related Page Views');

		switch(type) {
			case "event":
			case "reference":
				scSet('eVar3', 'Social Media Bookmark');
				break;
			case "job":
				scSet('prop4', type.ucFirst() + ' recommend');
				scSet('prop9', type.ucFirst() + ' recommend');
				scSet('eVar3', type.ucFirst() + ' recommend');
				break;	
		}
	}
	
	scPushResult();
}

function scCategoriesExpandAll()
{
	scSet("prop2", "Categories_expand/collapse");
	scSet("prop4", "");
	scSet("prop7", "");
	scSet("prop8", "");
	scSet("prop9", "");
	scSet("prop10", "");
	scSet("prop11", "categories");
	scSet("channel", "further site areas");
	scPushResult();
}

function scCategoriesSort()
{
	scSet("prop2", "Categories_sort");
	scSet("prop4", "");
	scSet("prop7", "");
	scSet("prop8", "");
	scSet("prop9", "");
	scSet("prop10", "");
	scSet("prop11", "categories");
	scSet("channel", "further site areas");
	scPushResult();
}
