function colorCalendarEvent(div, pos, color) {
	switch (pos) {
		case 'over':
			bg = "#E8F2FF";
			txt = "black";
			opacity = 100;
			break;
		case 'out':
		default:
			bg = color;
			txt = "#555555";
			opacity = 85;
			break;
	}
	
	div.style.background = bg;
	div.style.color = txt;
	div.style.filter = "alpha(opacity=" + opacity + ")";
}

function loadCampaignEvent(page_id, template_id) {
	url = "http://" + window.location.host + "/?page=" + page_id + "&template=" + template_id;
	
	popup = window.open(url, '_blank', '', true);
}

//New function added for Effective Dating Module
function loadCampaignEventNew(page_id, template_id, event_id) {
	url = "http://" + window.location.host + "/?page=" + page_id + "&template=" + template_id+ "&event=" + event_id;
	
	popup = window.open(url, '_blank', '', true);
}


function loadPersonalEvent(page_id, template_id) {
	//alert("Personal Event");
	url = "http://" + window.location.host + "/?page=" + page_id + "&template=" + template_id+ "&type=personal";	
	popup = window.open(url, '_blank', '', true);
}

//New function added for Effective Dating Module
function loadPersonalEventNew(page_id, template_id, event_id) {
	//alert("Personal Event");
	url = "http://" + window.location.host + "/?page=" + page_id + "&template=" + template_id+ "&event=" + event_id+ "&type=personal";	
	popup = window.open(url, '_blank', '', true);
}


//New function added for Effective Dating Module

/*function loadPersonalEvent(event_id, template_id) {	
	loadPopup("personal_event_" + event_id, 'crm');
}*/

function changeMonthyCalendarDate() {
	var month = eval(doc + "month" + doc2);
	var year = eval(doc + "year" + doc2);
	var url = eval(doc + "page_url" + doc2);
	
	loc = url.value;
	loc += (url.value.indexOf('?') == -1) ? "?" : "&";
	loc += 'view_calendar_month=' + month.value + '&view_calendar_year=' + year.value;
	
	window.location.href = loc;
}

