var i=0;
var t='0';
var course='0';
var count=0;
var dd='0';
var ch='0';
var ftype='';
var lang='';
var userid='0';
var usertype='0';
var courseid='0';
var user='0';

var count2=0;

if(GetCookie('count'))count=GetCookie('count');
if(GetCookie('count2'))count2=GetCookie('count2');
if(i>99)document.write("\n first cookie="+document.cookie+" count="+count+" count2="+count2);
count2++;
SetCookie('count2',count2);

if(count<1){
if(GetCookie('lang'))lang=GetCookie('lang');
if(GetCookie('user'))user=GetCookie('user');
if(GetCookie('userid'))userid=GetCookie('userid');
if(GetCookie('usertype'))usertype=GetCookie('usertype');
if(GetCookie('dd'))dd=GetCookie('dd');
if(GetCookie('ch'))ch=GetCookie('ch');
if(GetCookie('t'))t=GetCookie('t');
if(GetCookie('ftype'))ftype=GetCookie('ftype');
if(GetCookie('Course'))course=GetCookie('Course');
if(GetCookie('courseid'))courseid=GetCookie('courseid');
document.write('<iframe id="RSIFrame" name="RSIFrame" style="width:0px; height:0px; border: 0px" src="blank.html"></iframe> ');

if(userid=='0')alert(' Cookies must be allowed to see this page.');

document.write(' <FORM NAME="f2" METHOD="POST" ACTION="http://www.peoi.org/cgi-bin/log" ENCTYPE="x-www-form-urlencoded" TARGET="RSIFrame">');


  document.write('<INPUT TYPE="hidden"  NAME="userid" VALUE="'+userid+'">');  
  document.write('<INPUT TYPE="hidden"  NAME="usertype" VALUE="'+usertype+'">'); 
  document.write('<INPUT TYPE="hidden"  NAME="languageid" VALUE="1">');     
  document.write('<INPUT TYPE="hidden"  NAME="courseid" VALUE="'+courseid+'">'); 
  document.write('<INPUT TYPE="hidden"  NAME="dd" VALUE="'+dd+'">');    
  document.write('<INPUT TYPE="hidden"  NAME="ch" VALUE="'+ch+'">');    
  document.write('<INPUT TYPE="hidden"  NAME="chapter" VALUE="'+t+'">');      
  document.write('<INPUT TYPE="hidden"  NAME="ssect" VALUE="'+ftype+'">');    
  
  if(ftype.length<4)
  document.write('<INPUT TYPE="hidden"  NAME="subsect" VALUE="'+ch+t+ftype+'">');    
else 
 document.write('<INPUT TYPE="hidden"  NAME="subsect" VALUE="'+ftype+'">');     

  document.write('<INPUT TYPE="hidden"  NAME="course" VALUE="'+course+'">');  


f2.submit();

document.write('</FORM>');

}

if(i>99)document.write('\n <BR>language='+lang+'<BR> user='+userid+'<BR> Second cookie='+document.cookie);

