
function LoadHelp()
{
var width=500;
var height=250;
var left=(screen.width - width - 25);
var top=(screen.height - height - 45);

window.open('/help/default.htm', '_help', 'status=no,toolbar=no,location=no,menu=no,resizable=yes,scrollbars=yes,left=' + left + ',top=' + top + ',height=' + height + ',width=' + width);
}

function DrawLogo()
{

  document.write ('<a href="javascript:var x=LoadLink();');
  document.write ('" alt="Click here for information about ClassCampus" title="Click here for &#013;information &#013;about ClassCampus">');
  document.write ('<img border="0" src="../default/themes/images/ccpower.gif" width="120" height="34">');
  document.write ('</a>');
      
}

function LoadLink()
{
var ShowTutorInfo=false;
var ShowStudentInfo=false;

  //search for the tutor cookie
  if (window.document.cookie.length != 0)
  {
    //Find the position of the tutor cookie
    var Index = window.document.cookie.indexOf('LJInstID');	
	
    //If an index entry exists
    if(Index != -1)
      ShowTutorInfo = true;

    //search for the student cookie
    else
    {
      Index = window.document.cookie.indexOf('LJStuCode');
      if(Index != -1)
        ShowStudentInfo = true;
    }
  }

  //if neither option set then check to see whether the student home page is loaded
  if((!ShowStudentInfo) && (!ShowTutorInfo))
  {
    if (window.parent.frames['eSite'])
    {
      var OpenLocation = window.parent.frames['eSite'].location.href;
      if((OpenLocation.indexOf('s_home.htm') != -1) || (OpenLocation.indexOf('s_courses.asp') != -1))
        ShowStudentInfo = true;
    } 
  }
  
  if (ShowTutorInfo)
    sLink="http://www.ljgroup.com/classcampus/tutor/default.html"
  else if (ShowStudentInfo)
    sLink="http://www.ljgroup.com/classcampus/student/default.html"
  else
    sLink="http://www.ljgroup.com/classcampus/";
  
  window.open(sLink,'_blank');
      
}
