function setvar(name, value, exp, path, domain, secure)
 {
 document.cookie = name + "=" + escape(value) +
 ((exp) ? "; expires=" + exp.toGMTString() : "") +
 ((path) ? "; path=" + path : "") +
 ((domain) ? "; domain=" + domain : "") +
 ((secure) ? "; secure" : "");
 }

function getvar(Name)
 {
 var search = Name+"=";
 if (document.cookie.length > 0)
  {
  offset = document.cookie.indexOf(search);
  if (offset != -1)
	{
	offset += search.length;
	end = document.cookie.indexOf(";", offset);
	if (end == -1) end = document.cookie.length;
	return unescape(document.cookie.substring(offset, end));
	}
  }
 }

function init(picnum, len, wid)
{
eval ("nav"+picnum+"l = new Image("+len+","+wid+")");
eval ("nav"+picnum+"h = new Image("+len+","+wid+")");
eval ("nav"+picnum+"w = new Image()");
eval ("nav"+picnum+"l.src = '/appimages/nav"+picnum+"l.gif'");
eval ("nav"+picnum+"h.src = '/appimages/nav"+picnum+"h.gif'");
return true;
}

x = init(1,78,21);
x = init(2,78,21);
x = init(3,96,21);
x = init(4,27,21);
x = init(5,80,21);
x = init(6,122,21);
x = init(7,37,21);
x = init(8,49,21);
x = init(9,94,21);
x = init(10,77,21);
x = init(101,134,20);
x = init(111,134,20);
x = init(804,134,20);
nav1hw = "Help on using USCAP Continuning Medical Education";
nav2hw = "Save all answered test results and close window";
nav3hw = "Close Window and return to Testing Facility";
nav4hw = "Exit facility and close window";
nav5hw = "Submit your completed test for scoring";
nav6hw = "Submit your evalutaion to USCAP";
nav7hw = "Print Report";
nav8hw = "Return to Administator Main Menu";
nav9hw = "Submit your Course Rating to USCAP";
nav10hw = "Return to CME/SAM Main Menu";
nav101hw = "Return to USCAP Homepage";
nav111hw = "Log Out";
nav804hw = "Log Out";


function rollover(place,imagename,stat)
 {
 document[place].src = eval(imagename+".src");
 if (stat == 'over')
  {window.status = eval(imagename + 'w');}
 else
  {window.status='Document: Done';}
 }

function backbutton()
 {
 if (navigator.appName == 'Netscape' && navigator.appVersion.substr(0,1) < '5')
  {
  back();
  }
 else
  {
  top.history.back();
  }
 }

function newroll(txt)
 {
 return overlib(txt);
 }

function newnav(code,event)
 {
 if ((code != 'nonext') && (code != 'noprev'))
  {
  document.form1.action = "cme_test.asp?op=qna&page="+code+"&"+event;
  document.form1.submit();
  }
 else warnem(code);
 }

function evalnav(code,event)
 {
 document.form1.action = "cme_eval.asp?op=eval&question="+code+"&"+event;
 document.form1.submit();
 }

function toolbarnav(file,op,question,event)
 {
 document.toolbar1.action = file+"?op="+op+"&question="+question+"&"+event;
 document.toolbar1.submit();
 }

function popone(loc,h,w,tname)
 {
 newWindow = window.open(loc,tname,'toolbar=no,screenX=1,screenY=1,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width='+w+',height='+h+'');
 }

function navexit()
 {
 location.href="/authentication/uscap_user_home.asp?op=noop";
 }

