function ZweiFrames(URI1,F1,URI2,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.location.href = URI1;
  Frame2.location.href = URI2;
}
function ZweiFramesBack(F1,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.history.back();
  if (!window.opera) window.setTimeout("Frame2.history.back()",10);
}
function ZweiFramesForward(F1,F2) {
  Frame1=eval("parent."+F1);
  Frame2=eval("parent."+F2);
  Frame1.history.forward();
  if (!window.opera) window.setTimeout("Frame2.history.forward()",10);
}

function gonext(lastItem) {
  frame = parent.location.pathname;
  WebCT = frame.indexOf("indexWebCTintro.htm"); 
  Frame1 = eval("parent."+"lowerLeft");
  Frame1_URL = (Frame1.location.href);
  PositionOfLastSlash = Frame1_URL.lastIndexOf("/");
  myPath = Frame1_URL.substring(-1,PositionOfLastSlash + 1);
  myName = Frame1_URL.substring(PositionOfLastSlash + 1,Frame1_URL.length);
  // Figure out the actual number;
  ArrayOfMyName = myName.split("_");
  Chapter = ArrayOfMyName[0];
  Section = ArrayOfMyName[1];
  NextSection = (parseInt(Section) + 1);

  if (NextSection <= lastItem)
  {
  	URl1 = myPath + Chapter + "_" + NextSection + "_lowerLeft.htm";
  	URL2 = myPath + Chapter + "_" + NextSection + "_lowerRight.htm";
  	F1 = "lowerLeft";
  	F2 = "lowerRight";
  	ZweiFrames(URl1,F1,URL2,F2);
	}
   else
    {
	 if (WebCT!=-1)
       {
         EndMover();
       }
       else
	   {
	     top.window.location="../2_main/index.htm";
       }
   }
	   
	if (NextSection == lastItem) 
	{
	  if (WebCT!=-1)
        {
         EndMover();
        }
	}
}
 // Check if it runs on WebCT
 // if so, replace arrow on last frame of the section with explanatory text
  
 
 function EndMover() {
  var MoverFrame
  MoverFrame = eval("parent."+"bottomFrame");
  MoverFrame.location.href = "../../navigation/LastScreen.htm";
}

function EinFrame(URI1,F1) {
  Frame1=eval("parent."+F1);
  Frame1.location.href = URI1;
}
