
var cLINKS = [];
cLINKS["HOME"]="home.html";
cLINKS["DOCTORS"]="doctors.html";
cLINKS["SERVICES"]="services.html";
cLINKS["FORMS"]="patientForms.html";

function NewWindow(mypage, myname, w, h, scroll) 
{

	h = screen.height * (h/100);
	w = screen.width * (w/100);
	
    var winl = (screen.width - w) / 2; 
    var wint = (screen.height - h) / 2; 
    winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable' 
    win = window.open(mypage, myname, winprops) 
    if (parseInt(navigator.appVersion) >= 4) 
	{ 
		win.window.focus();
	}
	
	return win;
} 
function goLink(strPage, oTarget)
{
	strPage = strPage.toUpperCase();
	alert(strPage + " -- " + cLINKS[strPage]);
	oTarget.src = cLINKS[strPage];
}

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);
}
