var remote = null;

function pledge_Form()
{
	var tempvar;
	tempvar=window.open("pledge_form.shtml","PledgeForm","toolbar=no,location=no,directories=no,menubar=no,width=400,height=475,resizable=yes,scrollbars=yes,status=no,copyhistory=no");
	tempvar.focus();
}

function rs(n,u,w,h)
{
	remote = window.open(u, n, 'width='+w+',height='+h+',resizable=yes,scrollbars=yes,toolbar=no,location=no,directories=no,menubar=no,status=no,copyhistory=no');
	
	if (remote != null)
	{
		if (remote.opener == null)
		{
			remote.opener = self;
			window.name = 'myRoot';
			remote.location.href = u;
		}
		else
		{
			//eval('window.'+n+'.focus();');
		
			remote.focus();
		}
	}
	
	
}

function openPrintRel1()
{
	var tempvar;
	tempvar=window.open("release.html","ReleaseForm","toolbar=no,location=no,directories=no,menubar=no,width=700,height=475,resizable=yes,scrollbars=auto,status=no,copyhistory=no");
	tempvar.focus();
}

function openPrintRel()
{
	var tempvar;
	tempvar=window.open("PrintForm.html?releaseSelect.html&docs/Release_Forms.pdf","ReleaseForm","toolbar=no,location=no,directories=no,menubar=no,width=700,height=475,resizable=yes,scrollbars=auto,status=no,copyhistory=no");
	tempvar.focus();
}

function openPrintApp1()
{
	var tempvar;
	tempvar=window.open("app-print.html","Application","toolbar=no,location=no,directories=no,menubar=no,width=650,height=475,resizable=yes,scrollbars=auto,status=no,copyhistory=no");
	tempvar.focus();
}

function openPrintApp()
{
	var tempvar;
	tempvar=window.open("PrintForm.html?AppSelect.html&docs/Application.pdf","Application","toolbar=no,location=no,directories=no,menubar=no,width=650,height=475,resizable=yes,scrollbars=auto,status=no,copyhistory=no");
	tempvar.focus();
}

function emailForm()
{
	app.action = '/SCRIPT/script/mcicform.asp';
	app.submit();
	return false;
}

function printForm()
{
	app.action = '/SCRIPT/script/faxform.asp';
	app.recipient.value = '';
	app.submit();
	return false;
}

function openEbill()
{
	var tempvar;
	tempvar=window.open("ebill.html","English","toolbar=no,location=no,directories=no,menubar=no,width=400,height=400,resizable=no,scrollbars=yes,status=no,copyhistory=no");
	tempvar.focus();
}

function openSbill()
{
	var tempvar;
	tempvar=window.open("sbill.html","Spanish","toolbar=no,location=no,directories=no,menubar=no,width=400,height=400,resizable=no,scrollbars=yes,status=no,copyhistory=no");
	tempvar.focus();
}

function disclaimer()
{
	var tempvar;
	tempvar=window.open("/health_info/disclaimer.shtml","disclaimer1","toolbar=no,location=no,directories=no,menubar=no,width=400,height=400,resizable=yes,scrollbars=yes,status=no,copyhistory=no");
	tempvar.focus();
}

function privacy()
{
	var tempvar;
	tempvar=window.open("/health_info/disclaimer.shtml#Privacy","privacy1","toolbar=no,location=no,directories=no,menubar=no,width=400,height=400,resizable=yes,scrollbars=yes,status=no,copyhistory=no");
	tempvar.focus();
}

function goback()
{
	//window.history.go(-1);
	window.history.back();
}

function goto(url)
{
	var lastlocation=''
	if (parent.frames)
	{
		var passed = parent.location.search ? unescape(parent.location.search.substring(1)) + '&' : '';
		passed = passed.substring(passed.indexOf('&')+1);
		passed = passed.substring(passed.indexOf('&')+1);
		
		lastlocation = passed ? passed.substring(0,passed.indexOf('&')) : '';
	}
	
	if (lastlocation=='')
	{
		if ((parent)&&(parent.document!=self)&&(parent.document.referrer!='')&&(parent.document.referrer!=null))
		{
			lastlocation = parent.document.referrer;
		}
		else
		{
			lastlocation = document.referrer;
		}
	}
	
	
		
	if ((goto.arguments.length==goto.length)&&((url!='')&&(url!=null)))
	{
		if ((document.images)&&(url.toUpperCase().indexOf('/health_info'.toUpperCase()) > -1))
		{
			if (parent.frames)
			{
				var url2=url+'?'+escape(parent.frames[0].location.href)+'&&'+escape(lastlocation);
				location.replace(url2);
				//location.href = url2;
			}
			else
			{
				location.replace(url+'?&&'+escape(lastlocation));
			}
		}
		else
		{
			location.href = url+'?&&'+escape(lastlocation);
		}
	}
	else if ((parent)&&(parent.document!=self)&&(parent.document.referrer!='')&&(parent.document.referrer!=null))
	{
		parent.location.href = parent.document.referrer;
	}
	else if ((lastlocation)&&(lastlocation!=''))
	{
		parent.location.href = lastlocation;
	}
	else
	{
		history.back();
	}
}
