function openwindow(elink)
{
	window.open(elink,"enrollment","menubar=1,resizable=1,scrollbars=1,width=800,height=600,toolbar=1");
}


function product_back(CMSClientStatus)
{
	switch (document.getElementById('CMSClient').value)
	{
		case "group":
			window.location = '../../index.asp?GroupID=' + document.getElementById('GroupID').value;
			break;
		case "broker":
			window.location = '../../../broker/index.asp?GroupID=' + document.getElementById('GroupID').value;
			break;
		case "decision":
			window.location = '../../../decision/index.asp?GroupID=' + document.getElementById('GroupID').value;
			break;
		case "cova":
			window.location = '../../../custom/cova/index.asp?GroupID=' + document.getElementById('GroupID').value;
			break;
		default:
			window.location = '../../index.asp?GroupID=' + document.getElementById('GroupID').value;
			break;
	}
}


function product_client_back()
{
	window.opener = self;
	window.close();
}


function claim_back()
{
	window.location = '../index.asp?GroupID=' + document.getElementById('GroupID').value;
}

function view_colonial_forms()
{
	window.open('http://www.coloniallife.com/ServiceForms.aspx', 'blank', 'scrollbars=yes,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no');
}

function info_back()
{
	window.location = 'index.asp?GroupID=' + document.getElementById('GroupID').value;
}

function view_rates()
{	
	if (window.confirm('have you reviewed the brochure?') == true)
	{
		window.location = 'product_rate.asp?GroupProductID=' + document.getElementById('GroupProductID').value;
	}
}

function rate_back()
{
	window.location = 'product.asp?GroupProductID=' + document.getElementById('GroupProductID').value;
}

function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	{
		document.cookie = name+"="+value+expires+"; path=/";
	}
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return 		c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}
