function setvar(name, value)
 {document.cookie = name + "=" + escape(value); expires="Wdy, 08-Nov-01 10:10:10 GMT"; path="/";
 }

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 = './images/nav"+picnum+"l.gif'");
eval ("nav"+picnum+"h.src = './images/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);
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";


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)
 {
 if ((code != 'nonext') && (code != 'noprev'))
  {
  document.form1.action = "cme_test.asp?op=qna&page="+code;
  document.form1.submit();
  }
 else warnem(code);
 }

function evalnav(code)
 {
 document.form1.action = "cme_eval.asp?op=eval&question="+code;
 document.form1.submit();
 }

function toolbarnav(file,op,question)
 {
 document.toolbar1.action = file+"?op="+op+"&question="+question;
 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()
 {
 if (getvar('locallogin') == 'yes')
  {
  setvar('locallogin','reset');
  location.href="http://www.uscap.org";
  }
 else
  {
  location.href="http://www.uscap.org/?offsite.htm?http://www.pathologyportal.org/scproposal/mainmenu.asp";
  }
 }

