function one() {

document.automated = 0;
document.automated_time = 120000;

document.current_page = -1;
document.page_turn_direction = 0;
document.current_index_id = '';
document.article_name = new Array(25);
document.index_id = new Array(25);
document.info = new Array(25);
document.html_file = new Array(25);
document.background = new Array(25);
document.sprite = new Array(50);
document.sprite_name = new Array(51);
document.sprite_name[50] = 'control_panel';
document.sprite_fade = new Array(51);
document.sprite_fade[50] = 0;
document.sprite_o = new Array(51);
document.sprite_panx = new Array(50);
document.sprite_pany = new Array(50);
document.preload_images = new Array(50);
document.sprite_anim = new Array(50);
document.last_text_field = '';
document.loaded_images = 0;
document.loaded = 0;
document.total_sprites = -1;
document.total_images = 1;
document.temp1 = ''; 
document.temp2 = '';
document.temp3 = '';
document.temp4 = '';
document.temp5 = '';
document.current_issue = -1;
document.issue_name = new Array;
document.issue_date = new Array;
document.issue_dir = new Array;
document.magazine_article = new Array;
document.magazine_article_html = new Array;
document.magazine_article_keywords = new Array;
document.dharma_arts = 'http://www.dharmaarts.ca';
document.dharma_developments = 'http://www.dharmadevelopments.com';
document.mag_images = '../magazine_images/';
document.browser_total_images = 0;
document.browser_images = 0;
document.EDIT_current_sprite = 0;
document.EDIT_special_flag = '';
document.seebg_list = '';

document.mousex = 0;
document.mousey = 0;

if (index_redirect()) {
get_browser_info();
document.total_issues = magazine_data(-1,-1);
document.skip_to = determine_info();
document.total_pages = issue_data(-1);
if (document.EDIT) EDIT_mode();
if ((document.current_page == -1) || (document.current_issue == -1)) { goto_URL(document.dharma_arts,'_self'); } else { document.overflow_active = create_page(); }
if (document.skip_to == 's') { goto_URL(document.html_file[0]+'?f'+document.index_id[0],'_self'); }
if (document.skip_to == 'e') { goto_URL(document.html_file[document.total_pages]+'?b'+document.index_id[document.total_pages],'_self'); }
}
}

function two() {

control_panel_sort(1);
create_all_sprites();
preload_all_images();
open_page(10);
if (document.EDIT) {
  EDIT_sprites();  
  EDIT_write_sprites();
  write_EDIT('<br>Last text field: '+document.last_text_field);
  write_EDIT('<br><br>'+convertHTML(document.temp5));
}
document.write('</div></div>');
}

<!-- --------------------------------- -->
function PRESETS(preset, str_data) {

if (preset == 'footnote') { return 'x:10; y:10; w:200; h:30; bg:#881C02; padding:20; color:#FFFFFF; hidden:; div:'+get_value(str_data,'div')+';'+str_data; }
if (preset == 'footnote_go') { return 'img:link.gif; inherit:; div:'+get_value(str_data,'div')+';'+str_data; }
if (preset == 'footnote_go2') { return 'img:link2.gif; inherit:; div:'+get_value(str_data,'div')+';'+str_data; }
if ((preset == 'continue') || (preset == 'continue_white')) { return 'continue_white:; inherit:;'; }
if (preset == 'continue_grey') { return 'continue_grey:; inherit:;'; }
if (preset == 'continue_black') { return 'continue_black:; inherit:;'; }
if ((preset == 'end') || (preset == 'end_white')) { return 'end_white:; inherit:;'; }
if (preset == 'end_grey') { return 'end_grey:; inherit:;'; }
if (preset == 'end_black') { return 'end_black:; inherit:;'; }
if (preset == 'browser') { document.browser_total_images++; return 'z:98; x:52; y:5; w:700; h:510; bg:browser.gif; hidden:; div:browser_'+document.browser_total_images+';'+str_data; }
if (preset == 'credit') { return 'size:10; line:11; inherit:;'+str_data; }
if (preset == 'seebg_tl') { return 'x:5; y:5; img:icon_camera.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seebg_tr') { return 'x:780; y:5; img:icon_camera.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seebg_bl') { return 'x:65; y:500; img:icon_camera.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seebg_br') { return 'x:720; y:500; img:icon_camera.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seetxt_tl') { return 'x:5; y:5; img:icon_pencil.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seetxt_tr') { return 'x:780; y:5; img:icon_pencil.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seetxt_bl') { return 'x:65; y:500; img:icon_pencil.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seetxt_br') { return 'x:720; y:500; img:icon_pencil.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seeinfo_tl') { return 'x:5; y:5; img:icon_info.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seeinfo_tr') { return 'x:780; y:5; img:icon_info.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seeinfo_bl') { return 'x:65; y:500; img:icon_info.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seeinfo_br') { return 'x:720; y:500; img:icon_info.gif; w:20; h:15;'+str_data+document.seebg_list; }
if (preset == 'seebg') { return ''+str_data+document.seebg_list; }
return str_data;
}

<!-- --------------------------------- -->
function sprite(str) {

document.total_sprites++;

document.sprite[document.total_sprites] = str;
}

<!-- --------------------------------- -->
function more(str) {

document.sprite[document.total_sprites] = document.sprite[document.total_sprites]+'***'+str;
}

<!-- --------------------------------- -->
function create_sprite(str_data,z) {

div_name = get_value(str_data,'div');
if (div_name == 0) { div_name = 'sprite_'+z; }
sprite = document.getElementById(div_name);
if (sprite == undefined) { 
  document.write('<div id="'+div_name+'"></div>'); sprite = document.getElementById(div_name); 
} else { 
  if (document.overflow_active) sprite.style.overflow = 'auto';
  document.last_text_field = div_name;
}
document.sprite_name[z] = div_name;
document.sprite_fade[z] = 0;
document.sprite_panx[z] = -1;
document.sprite_pany[z] = -1;
document.sprite_anim[z] = '';
sprite.style.fontSize = '12px';
sprite.style.fontWeight = 'normal';
sprite.style.lineHeight = '15px';
sprite.style.color = '#FFFFFF';
sprite.style.zIndex = z+3;
sprite.style.visibility = 'visible';
str_div_button = '';
str_div_button_active = '';
flag = 0;
clip_x1 = 0;
clip_y1 = 0;
clip_x2 = 805;
clip_y2 = 522;

while (str_data.length > 1) {
  key = trim(str_data.substring(0,str_data.indexOf(":")));
  value = trim(str_data.substring((str_data.indexOf(":")+1),str_data.indexOf(";")));
  str_data = str_data.substr((str_data.indexOf(";")+1));

  if (key == "x") { sprite.style.left = value; flag = 1; }
  if (key == "y") { sprite.style.top = value; flag = 1; }
  if (key == "xx") { sprite.style.left = parseInt(sprite.style.left) + parseInt(value); }
  if (key == "yy") { sprite.style.top = parseInt(sprite.style.top) + parseInt(value); }
  if (key == "w") { sprite.style.width = value; flag = 1; }
  if (key == "h") { sprite.style.height = value; flag = 1; }
  if (key == "z") { sprite.style.zIndex = value; }
  if (key == "click") { 
    time_flag = 0;
    sprite.style.cursor = 'pointer'; 
    if (val_at(value,2) == 'xy') { str_temp = "document.getElementById('"+val_at(value,1)+"').style.left = '"+val_at(value,3)+"'; document.getElementById('"+val_at(value,1)+"').style.top = '"+val_at(value,4)+"'; if (document.getElementById('"+val_at(value,1)+"_button')) { document.getElementById('"+val_at(value,1)+"_button').style.left = '"+val_at(value,3)+"'; document.getElementById('"+val_at(value,1)+"_button').style.top = '"+val_at(value,4)+"'; }  "; }
    if (val_at(value,2) == 'fout') { time_flag = 1; str_temp = "fade_out(get_sprite_number(%27"+val_at(value,1)+"%27), 100, "+val_at(value,3)+");"; }
    if (val_at(value,2) == 'fin') { time_flag = 1; str_temp = "fade_in(get_sprite_number(%27"+val_at(value,1)+"%27), 0, "+val_at(value,3)+");"; }
    if (val_at(value,2) == 'img') { 
      time_flag = 1;
        if (val_at(value,3).indexOf("/") == -1) { temp_str = document.mag_images+val_at(value,3); } else { temp_str = val_at(value,3); }
        str_temp = "document.getElementById(%27"+val_at(value,1)+"_img%27).src = %27"+temp_str+"%27;";
    }
    if (val_at(value,2) == 'text') { 
      time_flag = 1;
        str_temp = "document.getElementById(%27"+val_at(value,1)+"%27).innerHTML = document.getElementById(%27"+val_at(value,3)+"%27).innerHTML;";
    }
    if (val_at(value,2) == 'wipel') { time_flag = 1; str_temp = set_wipe(val_at(value,1), val_at(value,3), "l", 0); }
    if (val_at(value,2) == 'wiper') { time_flag = 1; str_temp = set_wipe(val_at(value,1), val_at(value,3), "r", 0); }
    if (val_at(value,2) == 'wiped') { time_flag = 1; str_temp = set_wipe(val_at(value,1), val_at(value,3), "d", 0); }
    if (val_at(value,2) == 'wipeu') { time_flag = 1; str_temp = set_wipe(val_at(value,1), val_at(value,3), "u", 0); }
    if (val_at(value,1) == 'browser') { time_flag = 1; if (val_at(value,2) != '') { str_temp = set_wipe('browser_'+val_at(value,2), "50", "d", 0); } else { document.browser_images++; str_temp = set_wipe('browser_'+document.browser_images, "50", "d", 0); } }
    if (val_at(value,2) == 'switch') str_temp = "if (document.getElementById('"+val_at(value,1)+"').style.visibility == 'hidden') { fade_in(get_sprite_number('"+val_at(value,1)+"'), 0, "+val_at(value,3)+"); } else { fade_out(get_sprite_number('"+val_at(value,1)+"'), 100, "+val_at(value,3)+"); }";
    if (val_at(value,1) == 'nextpage') str_temp = "goto_page('next');";
    if (val_at(value,1) == 'prevpage') str_temp = "goto_page('prev');";
    if (val_at(value,1) == 'page') str_temp = "goto_page('"+val_at(value,2)+"');";
    if (val_at(value,1) == 'url') str_temp = "goto_URL('http://"+val_at(value,2)+"','_blank')";
    if (val_at(value,1) == 'email') str_temp = "goto_URL('mailto:"+mail(val_at(value,2),val_at(value,3),val_at(value,4))+"','_self')";
    if ((val_at(value,2) == 'scroll') && (!(val_at(value,6)))) str_temp = "scroll('"+val_at(value,1)+"',parseInt(document.getElementById('"+val_at(value,1)+"').style.left),parseInt(document.getElementById('"+val_at(value,1)+"').style.top),"+val_at(value,3)+","+val_at(value,4)+",0,0,"+val_at(value,5)+","+val_at(value,5)+","+clip_x1+","+clip_y1+","+clip_x2+","+clip_y2+",1,0,0);";
    if ((val_at(value,2) == 'scroll') && (val_at(value,6))) str_temp = "scroll('"+val_at(value,1)+"',parseInt(document.getElementById('"+val_at(value,1)+"').style.left),parseInt(document.getElementById('"+val_at(value,1)+"').style.top),"+val_at(value,3)+","+val_at(value,4)+",0,0,"+val_at(value,5)+","+val_at(value,6)+","+clip_x1+","+clip_y1+","+clip_x2+","+clip_y2+",1,0,0);";
    if (val_at(value,2) == 'scrollswitch') {
      x_temp = parseInt(document.getElementById(val_at(value,1)).style.left);
      y_temp = parseInt(document.getElementById(val_at(value,1)).style.top);
      str_temp = "if ((parseInt(document.getElementById('"+val_at(value,1)+"').style.left) == "+x_temp+") && (parseInt(document.getElementById('"+val_at(value,1)+"').style.top) == "+y_temp+")) { scroll('"+val_at(value,1)+"',parseInt(document.getElementById('"+val_at(value,1)+"').style.left),parseInt(document.getElementById('"+val_at(value,1)+"').style.top),"+val_at(value,3)+","+val_at(value,4)+",0,0,"+val_at(value,5)+","+val_at(value,5)+","+clip_x1+","+clip_y1+","+clip_x2+","+clip_y2+",0,0,0); } else { scroll('"+val_at(value,1)+"',parseInt(document.getElementById('"+val_at(value,1)+"').style.left),parseInt(document.getElementById('"+val_at(value,1)+"').style.top),"+(-val_at(value,3))+","+(-val_at(value,4))+",0,0,"+val_at(value,5)+","+val_at(value,5)+","+clip_x1+","+clip_y1+","+clip_x2+","+clip_y2+",1,0,0); }";
    }
    if (val_at(value,2) == 'panx') {
      temp_array = document.getElementById(val_at(value,1)).style.clip.split(" ");
      str_temp = "pan_x('"+val_at(value,1)+"',"+val_at(value,3)+","+val_at(value,4)+","+(parseInt(temp_array[3])+parseInt(document.getElementById(val_at(value,1)).style.left))+","+(parseInt(temp_array[0].substr(temp_array[0].indexOf('(')+1))+parseInt(document.getElementById(val_at(value,1)).style.top))+","+(parseInt(temp_array[1])+parseInt(document.getElementById(val_at(value,1)).style.left))+","+(parseInt(temp_array[2])+parseInt(document.getElementById(val_at(value,1)).style.top))+")";
    }

	    if ((val_at(value,4)) && (time_flag == 1)) {
	      str_temp = "setTimeout(unescape('"+str_temp+"'),"+val_at(value,4)+");";
	    }
	    if (!(val_at(value,4)) && (time_flag == 1)) {
	      str_temp = unescape(str_temp);
	    }
	    if (str_div_button.indexOf('onClick') != -1) {
	      str_temp2 = str_div_button.substring(0,str_div_button.indexOf('onClick="')+9);
	      str_temp3 = str_div_button.substr(str_div_button.indexOf('onClick="')+9);
	      str_div_button = str_temp2+str_temp+str_temp3;
	    } else {
	      str_div_button = str_div_button+'onClick="'+str_temp+'"';
	    }
  }
  if (key == "over") { 
    sprite.style.cursor = 'pointer'; 
    if (val_at(value,2) == 'fout') str_temp = "fade_out("+get_sprite_number(val_at(value,1))+", 100, "+val_at(value,3)+");";
    if (val_at(value,2) == 'fin') str_temp = "fade_in("+get_sprite_number(val_at(value,1))+", 0, "+val_at(value,3)+");";
    if (val_at(value,2) == 'switch') str_temp = "if (get_opacity(document.getElementById('"+val_at(value,1)+"')) == 0) { fade_in("+get_sprite_number(val_at(value,1))+", 0, "+val_at(value,3)+"); } else { fade_out("+get_sprite_number(val_at(value,1))+", 100, "+val_at(value,3)+"); }";
    if (str_div_button.indexOf('onMouseOver') != -1) {
      str_temp2 = str_div_button.substring(0,str_div_button.indexOf('onMouseOver="')+13);
      str_temp3 = str_div_button.substr(str_div_button.indexOf('onMouseOver="')+13);
      str_div_button = str_temp2+str_temp+str_temp3;
    } else {
      str_div_button = str_div_button+'onMouseOver="'+str_temp+'"';
    }
  }
  if (key == "out") { 
    if (val_at(value,2) == 'fout') str_temp = "fade_out("+get_sprite_number(val_at(value,1))+", 100, "+val_at(value,3)+");";
    if (val_at(value,2) == 'fin') str_temp = "fade_in("+get_sprite_number(val_at(value,1))+", 0, "+val_at(value,3)+");";
    if (str_div_button.indexOf('onMouseOut') != -1) {
      str_temp2 = str_div_button.substring(0,str_div_button.indexOf('onMouseOut="')+12);
      str_temp3 = str_div_button.substr(str_div_button.indexOf('onMouseOut="')+12);
      str_div_button = str_temp2+str_temp+str_temp3;
    } else {
      str_div_button = str_div_button+'onMouseOut="'+str_temp+'"';
    }
  }
  if (key == "img") { 
    if (value.indexOf("/") == -1) { value = document.mag_images+value; }
    sprite.innerHTML = sprite.innerHTML+'<img id="'+div_name+'_img" src="'+value+'">'
    document.total_images++;
    document.preload_images[document.total_images] = value;
  }
  if (key == "browser") {
    if (val_at(value,4)) temp_str = val_at(value,4);
    str_temp = '<div style="position:absolute; background-color: #FFFFFF; left:2px; top:9px; height:450px; width:696px; text-align:center; visibility: inherit; border: 0px none #000000; overflow:auto;"><img src="'+val_at(value,1)+'" style="margin-top:'+temp_str+'px;"></div>';
    str_temp = str_temp+'<div style="position:absolute; background-color: #FFFFFF; left:2px; top:470px; height:38px; width:696px; text-align:center; visibility: inherit; border: 0px none #000000;"><h6>'+document.getElementById(val_at(value,2)).innerHTML+'</h6></div>';
    str_temp = str_temp+unescape('<div style="position:absolute; background-color: #FFFFFF; left:2px; top:459px; height:49px; width:50px; visibility: inherit; border: 0px none #000000;"><img src="'+document.mag_images+'arrow_left.gif" style="cursor:pointer;" onClick="')+unescape('document.getElementById(%27'+div_name+'%27).style.visibility = %27hidden%27; set_opacity(document.getElementById(browser_number(%27'+div_name+'%27, -1)),100); document.getElementById(browser_number(%27'+div_name+'%27, -1)).style.visibility = %27visible%27;"></div>');
    str_temp = str_temp+unescape('<div style="position:absolute; background-color: #FFFFFF; left:648px; top:459px; height:49px; width:50px; visibility: inherit; border: 0px none #000000;"><img src="'+document.mag_images+'arrow_right.gif" style="cursor:pointer;" onClick="')+unescape('document.getElementById(%27'+div_name+'%27).style.visibility = %27hidden%27; set_opacity(document.getElementById(browser_number(%27'+div_name+'%27, 1)),100); document.getElementById(browser_number(%27'+div_name+'%27, 1)).style.visibility = %27visible%27;"></div>');
    str_temp = str_temp+unescape('<div style="position:absolute; background-color: #FFFFFF; left:520px; top:471px; height:25px; width:65px; visibility: inherit; border: 0px none #000000;"><img src="'+document.mag_images+'close.gif" style="cursor:pointer;" onClick="'+set_wipe(div_name, "-50", "u",0)+'"></div>');
    if ((val_at(value,3)) && (val_at(value,3).indexOf('.mp3') != -1)) str_temp = str_temp+unescape('<div style="position:absolute; background-color: #FFFFFF; left:120px; top:438px; height:63px; width:45px; visibility: inherit; border: 0px none #000000;"><a href="'+val_at(value,3)+'" target="_blank"><img src="'+document.mag_images+'headphones.gif" style="cursor:pointer;"></a></div>');
    sprite.style.zIndex = "200";
    sprite.innerHTML = sprite.innerHTML+str_temp;
  }
  if (key == "bg") { 
    if (value.indexOf("#") != -1) { 
      sprite.style.backgroundColor = value; 
    } else { 
      if (value.indexOf("/") == -1) { value = document.mag_images+value; }
      sprite.style.backgroundImage = 'URL('+value+')';
      document.total_images++;
      document.preload_images[document.total_images] = value;
    }
  }
  if (key == "fin") { 
    if (str_div_button_active) {
      str_div_button_active = '_active_fin';
      temp_str = "document.getElementById('"+div_name+"_button"+str_div_button_active+"').style.visibility = 'visible';";
      timeout_when_opened(temp_str, val_at(value,2));
    } else {
      temp_str = "fade_in("+get_sprite_number(div_name)+", 0,"+val_at(value,1)+")";
      timeout_when_opened(temp_str, val_at(value,2));
    }
  }
  if (key == "fout") {
    set_opacity(sprite,100);
    temp_str = "fade_out("+get_sprite_number(div_name)+", 100,"+val_at(value,1)+")";
    timeout_when_opened(temp_str, val_at(value,2));
  }
  if (key == "fb") { 
      temp_str = "fade_bounce("+get_sprite_number(div_name)+", "+val_at(value,1)+",0,0)";
      timeout_when_opened(temp_str, val_at(value,2));
  }
  if (key == "fwave") { 
      temp_str = "fade_bounce("+get_sprite_number(div_name)+", "+val_at(value,1)+","+val_at(value,2)+","+val_at(value,3)+")";
      timeout_when_opened(temp_str, val_at(value,4));
  }
  if (key == "animate") { 
      document.sprite_anim[get_sprite_number(div_name)] = val_at(value,1);
      if (val_at(value,2) != 0) {
        temp_str = "animate("+get_sprite_number(div_name)+", "+val_at(value,2)+", '"+val_at(value,3)+"')";
        timeout_when_opened(temp_str, val_at(value,4));
      }
  }
  if (key == "color") { 
    sprite.style.color = value;
  }
  if (key == "text") { 
    sprite.innerHTML = sprite.innerHTML+value;
  }
  if (key == "size") { 
    sprite.style.fontSize = value+'px';
  }
  if (key == "line") { 
    sprite.style.lineHeight = value+'px';
  }
  if (key == "align") { 
    sprite.style.textAlign = value;
  }
  if (key == "padding") { 
    sprite.style.padding = value;
  }
  if (key == "hidden") { 
    sprite.style.visibility = 'hidden';
  }
  if (key == "inherit") { 
    sprite.style.visibility = 'inherit';
  }
  if (key == "active") { 
    str_div_button_active = '_active';
  }
  if (key == "noscroll") { 
    sprite.style.overflow = 'hidden';
  }
  if ((key == "continue_white") && (document.last_text_field != '')) { 
    if (val_at(value,1) == '') { temp_str = document.last_text_field; } else { temp_str = val_at(value,1); }
    str_temp = "next";
    if (val_at(value,2) != '') { str_temp = val_at(value,2); }
    insert_before_paragraph(temp_str, unescape('&nbsp;<span onClick="goto_page(%27'+str_temp+'%27)" style="cursor:pointer"><img src="'+document.mag_images+'continue.gif"></span>'));
  }
  if ((key == "continue_black") && (document.last_text_field != '')) { 
    if (val_at(value,1) == '') { temp_str = document.last_text_field; } else { temp_str = val_at(value,1); }
    str_temp = "next";
    if (val_at(value,2) != '') { str_temp = val_at(value,2); }
    insert_before_paragraph(temp_str, unescape('&nbsp;<span onClick="goto_page(%27'+str_temp+'%27)" style="cursor:pointer"><img src="'+document.mag_images+'continue3.gif"></span>'));
  }
  if ((key == "continue_grey") && (document.last_text_field != '')) { 
    if (val_at(value,1) == '') { temp_str = document.last_text_field; } else { temp_str = val_at(value,1); }
    str_temp = "next";
    if (val_at(value,2) != '') { str_temp = val_at(value,2); }
    insert_before_paragraph(temp_str, unescape('&nbsp;<span onClick="goto_page(%27'+str_temp+'%27)" style="cursor:pointer"><img src="'+document.mag_images+'continue2.gif"></span>'));
  }
  if ((key == "end_white") && (document.last_text_field != '')) { 
    if (val_at(value,1) == '') { temp_str = document.last_text_field; } else { temp_str = val_at(value,1); }
    insert_before_paragraph(temp_str, unescape('&nbsp;<img src="'+document.mag_images+'end.gif">'));
  }
  if ((key == "end_black") && (document.last_text_field != '')) { 
    if (val_at(value,1) == '') { temp_str = document.last_text_field; } else { temp_str = val_at(value,1); }
    insert_before_paragraph(temp_str, unescape('&nbsp;<img src="'+document.mag_images+'end3.gif">'));
  }
  if ((key == "end_grey") && (document.last_text_field != '')) { 
    if (val_at(value,1) == '') { temp_str = document.last_text_field; } else { temp_str = val_at(value,1); }
    insert_before_paragraph(temp_str, unescape('&nbsp;<img src="'+document.mag_images+'end2.gif">'));
  }
  if (key == "wipel") { 
    temp_str = unescape(set_wipe(div_name, val_at(value,1), "l", 0));
    timeout_when_opened(temp_str, val_at(value,2));
  }
  if (key == "wiper") { 
    temp_str = unescape(set_wipe(div_name, val_at(value,1), "r", 0));
    timeout_when_opened(temp_str, val_at(value,2));
  }
  if (key == "wipeu") { 
    temp_str = unescape(set_wipe(div_name, val_at(value,1), "u", 0));
    timeout_when_opened(temp_str, val_at(value,2));
  }
  if (key == "wiped") { 
    temp_str = unescape(set_wipe(div_name, val_at(value,1), "d", 0));
    timeout_when_opened(temp_str, val_at(value,2));
  }
  if (key == "typewiper") { 
    temp_str = unescape(set_wipe(div_name, val_at(value,1), "r", val_at(value,2)));
    timeout_when_opened(temp_str, val_at(value,3));
  }
  if (key == "typewiped") { 
    temp_str = unescape(set_wipe(div_name, val_at(value,1), "d", val_at(value,2)));
    timeout_when_opened(temp_str, val_at(value,3));
  }
  if (key == "scroll") { 
    if (!val_at(value,5)) { temp_str = "scroll('"+div_name+"',parseInt(document.getElementById('"+div_name+"').style.left),parseInt(document.getElementById('"+div_name+"').style.top),"+val_at(value,1)+","+val_at(value,2)+",0,0,"+val_at(value,3)+","+val_at(value,3)+","+clip_x1+","+clip_y1+","+clip_x2+","+clip_y2+",0,0,0)"; timeout_when_opened(temp_str, val_at(value,4));}
    if (val_at(value,5)) { temp_str = "scroll('"+div_name+"',parseInt(document.getElementById('"+div_name+"').style.left),parseInt(document.getElementById('"+div_name+"').style.top),"+val_at(value,1)+","+val_at(value,2)+",0,0,"+val_at(value,3)+","+val_at(value,4)+","+clip_x1+","+clip_y1+","+clip_x2+","+clip_y2+",0,0,0)"; timeout_when_opened(temp_str, val_at(value,5));}
  }
  if (key == "clip") { 
    clip_x1 = val_at(value,1);
    clip_y1 = val_at(value,2);
    clip_x2 = val_at(value,3);
    clip_y2 = val_at(value,4);
    clip(div_name,val_at(value,1),val_at(value,2),val_at(value,3),val_at(value,4));
  }
  if (key == "pan_button") { 
    document.sprite_panx[z] = val_at(value,1);
    document.sprite_pany[z] = val_at(value,2);
    sprite.style.left = parseInt(document.getElementById(val_at(value,3)).style.left)+parseInt(document.sprite_panx[z]);
    sprite.style.top = parseInt(document.getElementById(val_at(value,3)).style.top)+parseInt(document.sprite_pany[z]);
    temp_array = document.getElementById(val_at(value,3)).style.clip.split(" ");
    clip(div_name,(parseInt(temp_array[3])+parseInt(document.getElementById(val_at(value,3)).style.left)),(parseInt(temp_array[0].substr(temp_array[0].indexOf('(')+1))+parseInt(document.getElementById(val_at(value,3)).style.top)),(parseInt(temp_array[1])+parseInt(document.getElementById(val_at(value,3)).style.left)),(parseInt(temp_array[2])+parseInt(document.getElementById(val_at(value,3)).style.top)));
  }
  if (key == "seebg") { 
    document.seebg_list = document.seebg_list + 'click:'+div_name+':switch:100;';
  }
}

if ((!flag)  && (str_div_button != '')) { sprite.innerHTML = '<span '+str_div_button+'>'+sprite.innerHTML+'</span>'; }
if ((flag) && (str_div_button != '')) { 
  document.write('<div id="'+div_name+'_button'+str_div_button_active+'" style="z-index:'+(100+parseInt(sprite.style.zIndex))+';  left:'+sprite.style.left+'; top:'+sprite.style.top+'; width:'+sprite.style.width+'; height:'+sprite.style.height+'; visibility:visible; cursor:pointer;"><img src="'+document.mag_images+'button.gif" width="'+sprite.style.width+'" height="'+sprite.style.height+'" '+str_div_button+'></div>');
  clip(div_name+'_button'+str_div_button_active,0,0,805,522);
  if ((str_div_button_active == '') || (str_div_button_active == '_active_fin')) if (document.getElementById(div_name).style.visibility == 'hidden') document.getElementById(div_name+'_button'+str_div_button_active).style.visibility = 'hidden';
}

}

<!-- --------------------------------- -->
function create_all_sprites() {

i = 0;

while (i <= document.total_sprites) {
  str = document.sprite[i];
  str_data = str.substr((str.indexOf(";")+1));
  preset = str.substring(0,(str.indexOf(";")));

  str_data = PRESETS(preset,str_data);

  create_sprite(str_data,i);
  i++;
}

if (document.automated == 1) { 
  if (document.current_page < document.total_pages) {
    automated_timer("goto_page(%27next%27);");
  } else if (document.current_issue < document.total_issues) {
    automated_timer("goto_page(%27nextissue%27);");
  } else if (document.current_issue == document.total_issues) {
    automated_timer("goto_page(%27/2008_fall%27);");
  }
}
}

<!-- --------------------------------- -->
function automated_timer(f) {
  timeout_when_opened("if (document.automated == 1) {"+unescape(f)+"} else { document.automated = 1; automated_timer('"+f+"');}", document.automated_time);
}

<!-- --------------------------------- -->
function set_wipe(div_name, speed, direction, delay) {

temp_str = "document.getElementById(%27"+div_name+"%27).style.visibility = %27visible%27;";
if (speed.charAt(0) == "-") {
  if (direction == "l") temp_str = temp_str + "wipe_xl(%27"+div_name+"%27, parseInt(document.getElementById(%27"+div_name+"%27).style.width),"+parseInt(speed)+","+delay+");";
  if (direction == "r") temp_str = temp_str + "wipe_xr(%27"+div_name+"%27, 0,"+(-parseInt(speed))+","+delay+");";
  if (direction == "u") temp_str = temp_str + "wipe_yu(%27"+div_name+"%27, parseInt(document.getElementById(%27"+div_name+"%27).style.height),"+parseInt(speed)+","+delay+");";
  if (direction == "d") temp_str = temp_str + "wipe_yd(%27"+div_name+"%27, 0,"+(-parseInt(speed))+","+delay+");";
} else {
  document.getElementById(div_name).style.visibility = 'hidden';
  if (direction == "l") temp_str = temp_str + "wipe_xr(%27"+div_name+"%27, parseInt(document.getElementById(%27"+div_name+"%27).style.width),"+(-parseInt(speed))+","+delay+");";
  if (direction == "r") temp_str = temp_str + "wipe_xl(%27"+div_name+"%27, 0,"+(parseInt(speed))+","+delay+");";
  if (direction == "u") temp_str = temp_str + "wipe_yd(%27"+div_name+"%27, parseInt(document.getElementById(%27"+div_name+"%27).style.height),"+(-parseInt(speed))+","+delay+");";
  if (direction == "d") temp_str = temp_str + "wipe_yu(%27"+div_name+"%27, 0,"+(parseInt(speed))+","+delay+");";
}
return temp_str;
}

<!-- --------------------------------- -->
function insert_before_paragraph(div_name, str) {

if (document.getElementById(div_name).innerHTML.toUpperCase().lastIndexOf('</P>') != -1) {
  document.getElementById(div_name).innerHTML = document.getElementById(div_name).innerHTML.substring(0,document.getElementById(div_name).innerHTML.toUpperCase().lastIndexOf('</P>'))+str+document.getElementById(div_name).innerHTML.substr(document.getElementById(div_name).innerHTML.toUpperCase().lastIndexOf('</P>'));
} else {
  document.getElementById(div_name).innerHTML = document.getElementById(div_name).innerHTML+str;
}
}

<!-- --------------------------------- -->
function replace_value(key, new_val, str) {

if (str.indexOf(key) == -1) return str;
pre_string = str.substring(0,str.indexOf(key)+key.length);
temp_string = str.substr(str.indexOf(key)+key.length);
post_string = temp_string.substr(temp_string.indexOf(";"));

return pre_string+new_val+post_string;
}

<!-- --------------------------------- -->
function browser_number(str, direction) {

n = parseInt(str.substr(8));
n = n + direction;
if (n == 0) n = document.browser_total_images;
if (n > document.browser_total_images) n = 1;
return ('browser_'+n);
}

<!-- --------------------------------- -->
function val_at(value, index) {

if ((value.indexOf(":") == -1) && (index > 1)) return '';
if (value.indexOf(":") == -1) return value;
if (index == 1) return value.substring(0,value.indexOf(":"));
return val_at(value.substr(value.indexOf(":")+1), (index-1));
}

<!-- --------------------------------- -->
function trim(value) {

if (value.indexOf(" ") == 0) return trim(value.substr(1));
if (value.indexOf("*") == 0) return trim(value.substr(1));
return value;
}

<!-- --------------------------------- -->
function convertHTML(value) {

if (value == '') return '';
if (value.charAt(0) == '<') return '['+convertHTML(value.substr(1));
if (value.charAt(0) == '>') return ']'+convertHTML(value.substr(1));
return value.charAt(0)+convertHTML(value.substr(1));
}

<!-- --------------------------------- -->
function trim_slashes(value) {

if (value.indexOf("/") != -1) return trim(value.substr(1));
return value;
}


<!-- --------------------------------- -->
function get_sprite_number(div_name) {

sprite_number = -1;

for (index=0; index <= document.total_sprites; index++) { if (div_name == document.sprite_name[index]) sprite_number = index; }
return sprite_number;
}

<!-- --------------------------------- -->
function get_value(str, key) {

if (str.indexOf(key) != -1) {
  a = str.substr((str.indexOf(key)+1));
  return a.substring(a.indexOf(":")+1,a.indexOf(";"));
}
return 0;
}

<!-- --------------------------------- -->
function disable_all_buttons() {

document.getElementById('disabler').style.visibility = 'visible';
}

<!-- --------------------------------- -->
function enable_all_buttons() {

document.getElementById('disabler').style.visibility = 'hidden';
}

<!-- --------------------------------- -->
function control_panel_sort(type) {

for (i=1; i<6; i++) document.getElementById('control_panel_b'+i).style.backgroundImage="url("+document.mag_images+"control_panel_"+i+".gif)";
document.getElementById('control_panel_b'+type).style.backgroundImage="url("+document.mag_images+"control_panel_"+type+"h.gif)";
document.getElementById('control_panel_content').innerHTML = '';
document.getElementById('control_panel_content').style.color = '#881c02';
content_text = '';

if (type == 1) {
  content_text = content_text + '<table cellpadding="0" cellspacing="0" border="0" style="margin-top:10px"><tr><td><h5>';
  article_index=0;
  issue_index=-1;
  while ((document.magazine_article[article_index]) && (issue_index <= document.total_issues)) {
    if ((document.magazine_article_html[article_index].indexOf('index.html') == -1) &&
        (document.magazine_article_html[article_index].indexOf('credits.html') == -1)) {
      content_text = content_text + unescape('<span onClick="goto_page(%27'+document.magazine_article_html[article_index]+'%27)" onMouseOver="this.style.textDecoration=%27underline%27" onMouseOut="this.style.textDecoration=%27none%27" style="cursor:pointer;">');
      content_text = content_text + unescape(document.magazine_article[article_index]);
      content_text = content_text + '</span><br>';
    }
    if (document.magazine_article_html[article_index].indexOf('index.html') != -1) {
      issue_index++;
      if (issue_index <= document.total_issues) {
        content_text = content_text + '</h5></td><td style="color:#881c02" valign="top"><h5>';
        if (document.current_issue == issue_index) content_text = content_text + '<img src="'+document.mag_images+'control_panel_here.gif" style="margin-left:45px;">';
        content_text = content_text + '<img width="1" height="38" src="'+document.mag_images+'button.gif"><br>';
        content_text = content_text + unescape('<span onClick="goto_page(%27'+document.magazine_article_html[article_index]+'%27)" onMouseOver="this.style.textDecoration=%27underline%27" onMouseOut="this.style.textDecoration=%27none%27" style="cursor:pointer;">');
        content_text = content_text + '<img src="'+document.mag_images+'/issues/issue_'+(document.total_issues-issue_index+1)+'.gif" style="margin-bottom:10px; margin-right:20px;"><br><u>';
        content_text = content_text + unescape(document.issue_name[issue_index])+'&nbsp;&nbsp;&nbsp;'+unescape(document.issue_date[issue_index]);
        content_text = content_text + '</span></u><br>';
      }
    }
    article_index++;
  }
  content_text = content_text + '</h5></td></tr></table>';
}

if (type == 2) {
  topic = new Array;
  article_index=0;
  topic_index=0;
  issue_index=-1;
  while (document.magazine_article[article_index]) {
    if (document.magazine_article_html[article_index].indexOf('index.html') != -1) issue_index++;
    if (document.magazine_article_keywords[article_index]) {
      temp_str = document.magazine_article_keywords[article_index];
      while (temp_str.indexOf(';') != -1) {
        topic[topic_index] = temp_str.substring(0,temp_str.indexOf(';'));
        topic[topic_index] = topic[topic_index] + ':'+article_index;
        topic[topic_index] = topic[topic_index] + ':'+issue_index+';';
        topic_index++;
        temp_str = temp_str.substr(temp_str.indexOf(';')+1);
      }
      topic[topic_index] = temp_str;
      topic[topic_index] = topic[topic_index] + ':'+article_index;
      topic[topic_index] = topic[topic_index] + ':'+issue_index+';';
      topic_index++;
    }
    article_index++;
  }

  topic.sort();
  temp_str = '';

  content_text = content_text + '<table cellpadding="0" cellspacing="0" border="0" style="margin-top:10px; margin-left:10px;"><tr><td width="145"><h6 style="margin-bottom:10px;"><u>Topic</u></h6></td><td width="190"><h6><u>Article</u></h6></td><td width="110"><h6><u>Issue</u></h6></td></tr>';
  for (index=0; index<topic_index; index++) {
    content_text = content_text + '<tr><td width="175"><h5>';
    if (temp_str != unescape(topic[index].substring(0,topic[index].indexOf(':')))) content_text = content_text + unescape(topic[index].substring(0,topic[index].indexOf(':')));
    content_text = content_text + '</h5></span></td>';
    content_text = content_text + '<td width="250"><h5>'
    content_text = content_text + unescape('<span onClick="goto_page(%27'+document.magazine_article_html[parseInt(val_at(topic[index], 2))]+'%27)" onMouseOver="this.style.textDecoration=%27underline%27" onMouseOut="this.style.textDecoration=%27none%27" style="cursor:pointer;">');
    content_text = content_text + unescape(document.magazine_article[parseInt(val_at(topic[index], 2))])+'</h5></span></td>';
    content_text = content_text + '<td width="150"><h5>'
    content_text = content_text + unescape('<span onClick="goto_page(%27'+document.issue_dir[parseInt(val_at(topic[index], 3))]+'%27)" onMouseOver="this.style.textDecoration=%27underline%27" onMouseOut="this.style.textDecoration=%27none%27" style="cursor:pointer;">');
    content_text = content_text + document.issue_name[parseInt(val_at(topic[index], 3))]+'&nbsp;&nbsp;'+document.issue_date[parseInt(val_at(topic[index], 3))]+'</h5></span></td>';
    content_text = content_text + '</tr>';
    temp_str = unescape(topic[index].substring(0,topic[index].indexOf(':')));
  }
  content_text = content_text + '</table>';
}

document.getElementById('control_panel_content').innerHTML = content_text;
document.getElementById('control_panel_content').scrollLeft = ((document.current_issue-2)*150);
}




<!-- --------------------------------- -->
function getMouseX(e){
posx=0;
var ev=(!e)?window.event:e;//IE:Moz
if (ev.pageX){//Moz
  posx=ev.pageX+window.pageXOffset;
}
else if(ev.clientX){//IE
  if(document.documentElement){ //IE 6+ strict mode
    posx = ev.clientX + document.documentElement.scrollLeft;
  }
  else if(document.body){ //Other IE
    posx = ev.clientX + document.body.scrollLeft;
  }
}

return posx;
}

function getMouseY(e){
posy=0;
var ev=(!e)?window.event:e;//IE:Moz
if (ev.pageX){//Moz
posy=ev.pageY+window.pageYOffset;
}
else if(ev.clientX){//IE

if(document.documentElement){//IE 6+ strict mode
posy = ev.clientY + document.documentElement.scrollTop;
}
else if(document.body){//Other IE
posy = ev.clientY + document.body.scrollTop;
}
}

return posy;
}

function track(e) {
  if ((document.mousex != getMouseX(e)) || (document.mousey != getMouseY(e))) { 
     document.automated = 0;
     document.automated_time = 120000;
     document.mousex != getMouseX(e);
     document.mousey != getMouseY(e);
  }
}

<!-- --------------------------------- -->
function create_page() {

document.write('<div id="disabler" style="position:absolute; width:805px; height:599px; z-index:201; top:0; left:50%; margin-left:-402px; visibility: visible; border: 0px none #000000;"></div>');
document.write('<div id="mask" style="position:absolute; width:805px; height:521px; z-index:200; top:21; left:50%; margin-left:-402px; visibility: visible; background-color: #FFFFFF; border: 0px none #000000; text-align:center; "></div>');
document.write('<div id="page" style="position:absolute; width:805px; height:615px; z-index:2; top:0; left:50%; margin-left:-402px; visibility: visible; background-color: #FFFFFF; border: 0px none #000000; padding: 0px; overflow:hidden;" onMouseMove="track(event)";>');
document.write('<div id="line1" style="position:absolute; width:805px; height:1px; z-index:201; top:20; left:50%; margin-left:-402px; visibility: visible;><table cellpadding="0" cellspacing="0"><img src="'+document.mag_images+'line.gif"></div>');
document.write('<div id="line2" style="position:absolute; width:805px; height:1px; z-index:201; top:542; left:50%; margin-left:-402px; visibility: visible;><table cellpadding="0" cellspacing="0"><img src="'+document.mag_images+'line.gif"></div>');


document.write(unescape('<div id="control_panel" style="position:absolute; width:785px; height:350px; z-index:199; top: 100px; left: 10px; visibility: hidden; background-color: #FFFFFF; background-Image:URL('+document.mag_images+'control_panel.gif); border: 0px none #000000;">'));
  document.write(unescape('<div style="position:absolute; width:65px; height:25px; top: 1px; left: 710px; visibility: inherit; background-Image:URL('+document.mag_images+'close.gif); border: 0px none #000000; cursor: pointer;" onClick="'+set_wipe('control_panel', '-50', 'u', 0)+'"></div>'));
  document.write(unescape('<div id="control_panel_b1" style="position:absolute; width:115px; height:24px; top: 61px; left: 43px; visibility: inherit; background-Image:URL('+document.mag_images+'control_panel_1.gif); border: 0px none #000000; cursor: pointer;" onClick="control_panel_sort(1);"></div>'));
  document.write(unescape('<div id="control_panel_b2" style="position:absolute; width:115px; height:24px; top: 91px; left: 43px; visibility: inherit; background-Image:URL('+document.mag_images+'control_panel_2.gif); border: 0px none #000000; cursor: pointer;" onClick="control_panel_sort(2);"></div>'));
  document.write(unescape('<div id="control_panel_b3" style="position:absolute; width:115px; height:24px; top: 121px; left: 43px; visibility: hidden; background-Image:URL('+document.mag_images+'control_panel_3.gif); border: 0px none #000000; cursor: pointer;" onClick="control_panel_sort(3);"></div>'));
  document.write(unescape('<div id="control_panel_b4" style="position:absolute; width:115px; height:24px; top: 151px; left: 43px; visibility: hidden; background-Image:URL('+document.mag_images+'control_panel_4.gif); border: 0px none #000000; cursor: pointer;" onClick="control_panel_sort(4);"></div>'));
  document.write(unescape('<div id="control_panel_b5" style="position:absolute; width:115px; height:24px; top: 181px; left: 43px; visibility: hidden; background-Image:URL('+document.mag_images+'control_panel_5.gif); border: 0px none #000000; cursor: pointer;" onClick="control_panel_sort(5);"></div>'));
  document.write(unescape('<div id="control_panel_content" style="position:absolute; width:615px; height:311px; top: 31px; left: 164px; visibility: inherit; border: 0px none #000000; overflow:hidden;"></div>'));
document.write('</div>');


document.write('<div id="header" style="position:absolute; width:805px; top:0; left:50%; margin-left:-402px; visibility: visible; background-color: #FFFFFF; border: 0px none #000000; padding: 0px;">');
document.write(unescape('<table cellpadding="0" cellspacing="0" border="0" width="805"><tr><td width="200" style="text-align:left; vertical-align:middle;"><span id="scrollcheck" onClick="goto_URL(%27'+document.dharma_arts+'%27,%27_self%27);" style="cursor: pointer; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 11px; font-weight: bold; color: #881B00; padding: 0px; margin: 0px;">Dharma Arts</span></td><td width="405" style="text-align:center; vertical-align:middle;"><span onClick="if (document.getElementById(%27control_panel%27).style.visibility == %27hidden%27) {'+set_wipe('control_panel','50','d', 0)+' document.getElementById(%27control_panel_content%27).style.overflow = %27auto%27; } else { document.getElementById(%27control_panel_content%27).style.overflow = %27hidden%27; '+set_wipe('control_panel', '-50', 'u', 0)+'}" style="cursor: pointer; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 11px; font-weight: bold; color: #881B00; padding: 0px; margin: 0px;">Archives</span></td><td width="200" style="text-align:right; vertical-align:middle;"><img src="'+document.mag_images+'DD_flame.gif" width="16" height="18" style="vertical-align:middle;"><span onClick="goto_URL(%27'+document.dharma_developments+'%27,%27_blank%27);" style="cursor: pointer; font-family: Arial, Helvetica, sans-serif; font-size: 11px; line-height: 11px; font-weight: bold; color: #881B00; padding: 0px; margin: 0px;">Dharma Developments</span></td></tr></table>'));
document.write('</div>');

if (!document.EDIT) {

if ((document.browserType == "Firefox")) { //(document.browserType == "MSIE") || ...  onLoad="fixPNG(this)"
  if (document.current_page < document.total_pages) {
    document.write(unescape('<div id="next_page" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 748; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27next%27)"><img src="'+document.mag_images+'page_right.png" width="57" height="107" style="cursor: pointer;" ></span></div>'));
  } else if (document.current_issue < document.total_issues) {
    document.write(unescape('<div id="next_issue" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 748; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27nextissue%27)"><img src="'+document.mag_images+'page_right.png" width="57" height="107" style="cursor: pointer;" ></span></div>'));
  }
  if (document.current_page > 0) {
    document.write(unescape('<div id="prev_page" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 0; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27prev%27)"><img src="'+document.mag_images+'page_left.png" width="57" height="107" style="cursor: pointer;" ></span></div>'));
  } else if ((document.current_issue > 0) && (document.current_issue <= document.total_issues)) {
    document.write(unescape('<div id="prev_issue" style="position:absolute; width:57px; height:107px; z-index:99; top: 436px; left: 0; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27previssue%27)"><img src="'+document.mag_images+'page_left.png" width="57" height="107" style="cursor: pointer;" ></span></div>'));
  }
} else {
  if (document.current_page < document.total_pages) {
    document.write(unescape('<div id="next_page" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 748; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27next%27)"><img src="'+document.mag_images+'next_page.gif" width="57" height="107" style="cursor: pointer;"></span></div>'));
  } else if (document.current_issue < document.total_issues) {
    document.write(unescape('<div id="next_issue" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 748; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27nextissue%27)"><img src="'+document.mag_images+'next_page.gif" width="57" height="107" style="cursor: pointer;"></span></div>'));
  }
  if (document.current_page > 0) {
    document.write(unescape('<div id="prev_page" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 0; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27prev%27)"><img src="'+document.mag_images+'prev_page.gif" width="57" height="107" style="cursor: pointer;"></span></div>'));
  } else if ((document.current_issue > 0) && (document.current_issue <= document.total_issues)) {
    document.write(unescape('<div id="prev_issue" style="position:absolute; width:57px; height:107px; z-index:199; top: 436px; left: 0; visibility: visible; border: 0px none #000000;"><span onClick="goto_page(%27previssue%27)"><img src="'+document.mag_images+'prev_page.gif" width="57" height="107" style="cursor: pointer;"></span></div>'));
  }
}

document.write(unescape('<div id="index" style="position:absolute; width:805px; height:45px; z-index:1; top: 548px; left: 0; visibility: visible; background-color: #FFFFFF; border: 0px none #000000;" onMouseOut="document.getElementById(%27article_name_text%27).innerHTML = unescape(document.article_name[document.current_page]);">'));
document.write('<h6 style="text-align:center; margin-top:0px; margin-bottom:2px;">'+document.issue_name[document.current_issue]+'&nbsp;&nbsp;'+document.issue_date[document.current_issue]+'</h6>');
document.write('<table cellpadding="0" cellspacing="0" border="0" align="center"><tr>');
continues = 0;
for (index=0; index <= document.total_pages; index++) {  
  document.write('<td height="27" valign="top"><img ');
  last = (index == document.total_pages);
  next = 0;
  suffix = '';
  str = 'style="margin-top:3px; cursor: pointer;" ';
  if ((!last) && (document.html_file[index] == document.html_file[index+1])) { next = 1; }
  if (last) { 
    if (continues) suffix = suffix + '2.gif';
    if (!continues) suffix = suffix + '1.gif';
  } else {
    if ((continues) && (next)) suffix = suffix + '2.gif';
    if ((continues) && (!next)) suffix = suffix + '2.gif';
    if ((!continues) && (next)) suffix = suffix + '1.gif';
    if ((!continues) && (!next)) suffix = suffix + '1.gif';
  }
  if (index == document.current_page) { 
    suffix = "_h"+suffix; 
    str = str + 'id="index_button_'+index+'" ';
    str = str + unescape('onMouseOver="document.getElementById(%27article_name_text%27).innerHTML = unescape(%27')+document.article_name[index]+unescape('%27);" ');
  } else { 
    str = str + 'id="index_button_'+index+'" ';
    str = str + unescape('onMouseOver="document.getElementById(%27index_button_'+index+'%27).src=%27'+document.mag_images+'mini_page_s'+suffix+'%27; document.getElementById(%27article_name_text%27).innerHTML = unescape(%27')+document.article_name[index]+unescape('%27);" ');
    str = str + unescape('onMouseOut="document.getElementById(%27index_button_'+index+'%27).src=%27'+document.mag_images+'mini_page'+suffix+'%27;" ');
    str = str + unescape('onClick="goto_page(%27'+index+'%27);" ');
  }
  str = str + 'src="'+document.mag_images+'mini_page'+suffix+'" ';
  document.write(str);
  document.write('></td>');
  if (!next) { 
  document.write('<td width="5"></td>');
  }
  continues = next;
}
document.write('</tr></table>');
document.write('<h6 id="article_name_text" style="text-align:center; margin-top:2px;">'+unescape(document.article_name[document.current_page])+'</h6>');
document.write('</div>');

}

document.write('<div id="content" style="position:absolute; width:805px; height:524px; z-index:2; top: 20px; left: 0; visibility: visible; background-color: #FFFFFF; border: 0px none #000000;">');
document.write('<div id="bg" style="position:absolute; width:805px; height:523px; top: 0px; left: 0; visibility: visible; background-image: url('+document.background[document.current_page]+'); border: 0px none #000000;"></div>');

return (document.getElementById('scrollcheck').offsetHeight > 14);
}

<!-- --------------------------------- -->
function complete_data(n) {

str = unescape(window.location);
index = 0;
article = -1;

if (document.info[n]) { document.temp3 = document.info[n]; } else { document.info[n] = document.temp3; if (document.current_page == -1) document.EDIT_special_flag = document.EDIT_special_flag + "d"; }
if (document.html_file[n]) { document.temp4 = document.html_file[n]; } else { document.html_file[n] = document.temp4; if (document.current_page == -1) document.EDIT_special_flag = document.EDIT_special_flag + "h"; }
if (!document.index_id[n]) { document.index_id[n] = ''; if (document.current_page == -1) document.EDIT_special_flag = document.EDIT_special_flag + "i"; }
while (document.magazine_article[index]) { if (document.magazine_article_html[index].indexOf((document.issue_dir[document.current_issue]+document.html_file[n])) != -1) article = index; index++; }
if (article != -1) document.article_name[n] = document.magazine_article[article];
if ((str.indexOf(document.html_file[n]) != -1) && ((document.current_index_id == document.index_id[n]) || (((document.current_index_id == '') || (document.current_index_id == '0')) && (document.current_page == -1)))) { document.current_page = n; document.current_index_id = document.index_id[n]; return 1;}

if (document.current_page == -1) document.EDIT_special_flag = '';
return 0;
}

<!-- --------------------------------- -->
function set_opacity(i,n) {

css3 = false;
moz = false;
ie = false;

if (!(typeof(i.style.opacity) == "undefined")) css3 = true; 
if (!(typeof(i.style.MozOpacity) == "undefined")) moz = true; 
if (!(typeof(i.filters) == "undefined")) if (!(typeof(i.filters.alpha) == "undefined")) if (!(typeof(i.filters.alpha.opacity) == "undefined")) ie = true;
if (css3 && !ie) i.style.opacity = n/100;
if (moz) i.style.MozOpacity = n/100;
if (ie) i.filters.alpha.opacity = n;
}

<!-- --------------------------------- -->
function get_opacity(i) {

css3 = false;
moz = false;
ie = false;

if (!(typeof(i.style.opacity) == "undefined")) css3 = true; 
if (!(typeof(i.style.MozOpacity) == "undefined")) moz = true; 
if (!(typeof(i.filters) == "undefined")) if (!(typeof(i.filters.alpha) == "undefined")) if (!(typeof(i.filters.alpha.opacity) == "undefined")) ie = true;
if (css3 && !ie) return (i.style.opacity*100);
if (moz) return (i.style.MozOpacity*100);
if (ie) return (i.filters.alpha.opacity);
}

<!-- --------------------------------- -->
function fade(n) {

if ((document.sprite_fade[n] != 0) && (document.loaded != 0)) {

sprite = document.getElementById(document.sprite_name[n]);
document.sprite_o[n] = document.sprite_o[n] + document.sprite_fade[n];
if ((document.sprite_o[n] >= 0) && (document.sprite_o[n] <= 100)) { 
  set_opacity(sprite,document.sprite_o[n]);
  setTimeout("fade("+n+")", 35);
} else if (document.sprite_o[n] < 0) { 
  document.sprite_o[n] = 0;
  set_opacity(sprite,document.sprite_o[n]);
  if (n != 50) sprite.style.visibility = 'hidden';
  if (document.getElementById(document.sprite_name[n]+'_button')) document.getElementById(document.sprite_name[n]+'_button').style.visibility = 'hidden';
  document.sprite_fade[n] = 0;
} else {
  document.sprite_o[n] = 100;
  set_opacity(sprite,document.sprite_o[n]);
  document.sprite_fade[n] = 0;
}
}
}

<!-- --------------------------------- -->
function bounce_fade(n,wait1,wait2) {

if ((document.sprite_fade[n] != 0) && (document.loaded != 0)) {
waittemp = 0;

sprite = document.getElementById(document.sprite_name[n]);
document.sprite_o[n] = document.sprite_o[n] + document.sprite_fade[n];
if ((document.sprite_o[n] >= 0) && (document.sprite_o[n] <= 100)) { 
  set_opacity(sprite,document.sprite_o[n]);
} else {
  if (document.sprite_o[n] < 0) {document.sprite_o[n] = 0; waittemp = wait1; }
  if (document.sprite_o[n] > 100) {document.sprite_o[n] = 100; waittemp = wait2; }
  set_opacity(sprite,document.sprite_o[n]);
  if (document.sprite_fade[n] != -100) document.sprite_fade[n] = -document.sprite_fade[n];
}
if (document.sprite_fade[n] != -100) setTimeout("bounce_fade("+n+","+wait1+","+wait2+")", 35+waittemp);
}
}

<!-- --------------------------------- -->
function fade_in(sprite_number,t,delta) {

sprite = document.getElementById(document.sprite_name[sprite_number]);

if (document.sprite_fade[sprite_number] == 0) { 
  if (document.getElementById(document.sprite_name[sprite_number]+'_button')) document.getElementById(document.sprite_name[sprite_number]+'_button').style.visibility = 'visible';
  if (sprite.style.visibility == 'hidden') set_opacity(sprite, 0);
  sprite.style.visibility = 'visible';
  document.sprite_o[sprite_number] = get_opacity(sprite);
  document.sprite_fade[sprite_number] = delta; 
  setTimeout("fade("+sprite_number+");",40); 
}
document.sprite_fade[sprite_number] = delta;
}

<!-- --------------------------------- -->
function fade_out(sprite_number,t,delta) {

if (document.sprite_fade[sprite_number] == 0) { 
  document.sprite_o[sprite_number] = get_opacity(document.getElementById(document.sprite_name[sprite_number]));
  document.sprite_fade[sprite_number] = -delta; 
  setTimeout("fade("+sprite_number+");",40); 
}
document.sprite_fade[sprite_number] = -delta;
}

<!-- --------------------------------- -->
function fade_bounce(sprite_number,delta,wait1,wait2) {

sprite = document.getElementById(document.sprite_name[sprite_number]);

if (document.sprite_fade[sprite_number] == 0) { 
  if (document.getElementById(document.sprite_name[sprite_number]+'_button')) document.getElementById(document.sprite_name[sprite_number]+'_button').style.visibility = 'visible';
  if (sprite.style.visibility == 'hidden') set_opacity(sprite, 0);
  sprite.style.visibility = 'visible';
  document.sprite_o[sprite_number] = get_opacity(sprite);
  document.sprite_fade[sprite_number] = delta; 
  setTimeout("bounce_fade("+sprite_number+","+wait1+","+wait2+");",40); 
}
document.sprite_fade[sprite_number] = delta;
}

<!-- --------------------------------- -->
function animate(sprite_number,framerate,leader) {

sprite = document.getElementById(document.sprite_name[sprite_number]);
leadersprite = document.getElementById(leader);
  
  set_opacity(sprite, get_opacity(leadersprite));
  sprite.style.visibility = leadersprite.style.visibility;

  if (document.sprite_anim[sprite_number] != '') {
    setTimeout("animate("+get_sprite_number(document.sprite_anim[sprite_number])+","+framerate+",'"+leader+"'); document.getElementById(document.sprite_name["+sprite_number+"]).style.visibility = 'hidden';",framerate);
  }
}

<!-- --------------------------------- -->
function wipe_xr(name,n,delta,delay) {

if ((n >= 0) && (n <= parseInt(document.getElementById(name).style.width))) {
  document.getElementById(name).style.visibility = 'visible';
  set_opacity(document.getElementById(name),100);
  document.getElementById(name).style.clip = 'rect(auto auto auto '+n+')'; 
  n=n+delta;
  setTimeout("wipe_xr('"+name+"',"+n+","+delta+","+delay+")", 25+delay);
} else if (n < 0) {
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
} else {
  document.getElementById(name).style.visibility = 'hidden';
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
}
}

<!-- --------------------------------- -->
function wipe_xl(name,n,delta,delay) {

if ((n >= 0) && (n <= parseInt(document.getElementById(name).style.width))) {
  document.getElementById(name).style.visibility = 'visible';
  set_opacity(document.getElementById(name),100);
  document.getElementById(name).style.clip = 'rect(auto '+n+' auto auto)'; 
  n=n+delta;
  setTimeout("wipe_xl('"+name+"',"+n+","+delta+","+delay+")", 25+delay);
} else if (n < 0) {
  document.getElementById(name).style.visibility = 'hidden';
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
} else {
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
}
}

<!-- --------------------------------- -->
function wipe_yu(name,n,delta,delay) {

if ((n >= 0) && (n <= parseInt(document.getElementById(name).style.height))) {
  document.getElementById(name).style.visibility = 'visible';
  set_opacity(document.getElementById(name),100);
  document.getElementById(name).style.clip = 'rect(auto auto '+n+' auto)'; 
  n=n+delta;
  setTimeout("wipe_yu('"+name+"',"+n+","+delta+","+delay+")", 25+delay);
} else if (n < 0) {
  document.getElementById(name).style.visibility = 'hidden';
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
} else {
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
}
}

<!-- --------------------------------- -->
function wipe_yd(name,n,delta,delay) {

if ((n >= 0) && (n <= parseInt(document.getElementById(name).style.height))) {
  document.getElementById(name).style.visibility = 'visible';
  set_opacity(document.getElementById(name),100);
  document.getElementById(name).style.clip = 'rect('+n+' auto auto auto)'; 
  n=n+delta;
  setTimeout("wipe_yd('"+name+"',"+n+","+delta+","+delay+")", 25+delay);
} else if (n < 0) {
  document.getElementById(name).style.clip = 'rect(0 auto auto auto)'; 
} else {
  document.getElementById(name).style.visibility = 'hidden';
  document.getElementById(name).style.clip = 'rect(auto auto auto auto)'; 
}
}

// ----------------------------

function pos(n) {
if (n < 0) return -n;
return n;
}

<!-- --------------------------------- --> \\ if FLAG = 1, do not scroll if div is already scrolling
function scroll(name,x,y,delta_x,delta_y,nx,ny,max_x,max_y,framex1,framey1,framex2,framey2,flag,loopx,loopy) { 

sprite_n = get_sprite_number(name);

x = parseInt(document.getElementById(name).style.left);
y = parseInt(document.getElementById(name).style.top);
h = parseInt(document.getElementById(name).style.height);
w = parseInt(document.getElementById(name).style.width);
if ((document.sprite_fade[sprite_n] != 0) && (flag == 1)) return 0;
if (delta_x == 0) {nx = max_x;}
if (delta_y == 0) {ny = max_y;}
document.sprite_fade[sprite_n] = 1;
if ((nx < max_x) || (ny < max_y)) {
  n_limx = Math.round((max_x/4)*3);
  n_limy = Math.round((max_y/4)*3);
  if (nx > n_limx) {
    if (pos(delta_x > 1)) delta_x = Math.round((delta_x/((max_x-n_limx)/pos(delta_x)))*(((max_x-n_limx)/pos(delta_x))-1));
  }
  if (ny > n_limy) {
    if (pos(delta_y > 1)) delta_y = Math.round((delta_y/((max_y-n_limy)/pos(delta_y)))*(((max_y-n_limy)/pos(delta_y))-1));
  }
  x=x+delta_x;
  y=y+delta_y;
  if ((x >= 0) && (loopx != 0)) x = x-loopx; if ((x < -loopx) && (loopx != 0)) x = x+loopx;
  if ((y >= 0) && (loopy != 0)) y = y-loopy; if ((y < -loopy) && (loopy != 0)) x = y+loopy;
  document.getElementById(name).style.left = x;
  document.getElementById(name).style.top = y;

  clip(name,framex1,framey1,framex2,framey2);

  nx=nx+pos(delta_x); if ((nx+pos(delta_x)) > max_x) { delta_x = (max_x-nx)*(pos(delta_x)/delta_x); }
  ny=ny+pos(delta_y); if ((ny+pos(delta_y)) > max_y) { delta_y = (max_y-ny)*(pos(delta_y)/delta_y); }

  setTimeout("scroll('"+name+"',"+x+","+y+","+delta_x+","+delta_y+","+nx+","+ny+","+max_x+","+max_y+","+framex1+","+framey1+","+framex2+","+framey2+",0,"+loopx+","+loopy+")", 25);
} else {
  document.sprite_fade[sprite_n] = 0;
  if (document.getElementById(document.sprite_name[sprite_n]+'_button')) {
    document.getElementById(document.sprite_name[sprite_n]+'_button').style.left = x;
    document.getElementById(document.sprite_name[sprite_n]+'_button').style.top = y;
    clip(document.sprite_name[sprite_n]+'_button',framex1,framey1,framex2,framey2);
  }
  if ((loopx != 0) || (loopy != 0))   // For panning 
    for (i=0; i<=document.total_sprites; i++)
      if (document.sprite_panx[i] != -1) {

        if ((parseInt(document.sprite_panx[i]) < (w-loopx)) && (x < (-loopx+(w-loopx)))) {
          document.getElementById(document.sprite_name[i]).style.left = x+loopx+parseInt(document.sprite_panx[i]);
        } else {
          document.getElementById(document.sprite_name[i]).style.left = x+parseInt(document.sprite_panx[i]);
        }
        if ((parseInt(document.sprite_pany[i]) < (h-loopy)) && (y < (-loopy+(h-loopy)))) {
          document.getElementById(document.sprite_name[i]).style.top = y+loopy+parseInt(document.sprite_pany[i]);
        } else {
          document.getElementById(document.sprite_name[i]).style.top = y+parseInt(document.sprite_pany[i]);
        }
        clip(document.sprite_name[i],framex1,framey1,framex2,framey2);
        if (document.getElementById(document.sprite_name[i]+'_button')) {
          document.getElementById(document.sprite_name[i]+'_button').style.left = document.getElementById(document.sprite_name[i]).style.left;
          document.getElementById(document.sprite_name[i]+'_button').style.top = document.getElementById(document.sprite_name[i]).style.top;
          clip(document.sprite_name[i]+'_button',framex1,framey1,framex2,framey2);
        }
      }
}
}

<!-- --------------------------------- -->
function clip(name,framex1,framey1,framex2,framey2) {

if (framey1 == 0) framey1 = 1;
if (framey2 == 523) framey2 = 522;

clipx = parseInt(document.getElementById(name).style.left);
clipy = parseInt(document.getElementById(name).style.top);
cliph = parseInt(document.getElementById(name).style.height);
clipw = parseInt(document.getElementById(name).style.width);

if ((clipx+clipw>=framex1) && (clipx<=framex2) && (clipy+cliph>=framey1) && (clipy<=framey2)) {
  clipx1 = 0; if (clipx<framex1) clipx1 = (framex1-clipx);
  clipx2 = clipw; if (clipx+clipw>framex2) clipx2 = clipw-((clipx+clipw)-framex2);
  clipy1 = 0; if (clipy<framey1) clipy1 = (framey1-clipy);
  clipy2 = cliph; if (clipy+cliph>framey2) clipy2 = cliph-((clipy+cliph)-framey2);
  document.getElementById(name).style.clip = 'rect('+clipy1+' '+clipx2+' '+clipy2+' '+clipx1+')'; 
  document.getElementById(name).style.visibility = 'visible';
} else {
  document.getElementById(name).style.visibility = 'hidden';
}
}

<!-- --------------------------------- -->
function pan_x(name,loopx,direction,framex1,framey1,framex2,framey2) {
x = parseInt(document.getElementById(name).style.left);
y = parseInt(document.getElementById(name).style.top);
if (direction < 0) scroll(name,x,y,-25,0,0,0,pos(direction),pos(direction),framex1,framey1,framex2,framey2,1,loopx,0);
if (direction > 0) scroll(name,x,y,25,0,0,0,pos(direction),pos(direction),framex1,framey1,framex2,framey2,1,loopx,0);
}

<!-- --------------------------------- -->
function determine_info() {

str = unescape(window.location);

index=0;
while (document.issue_dir[index]) {
  a = str.indexOf(document.issue_dir[index]);
  if (a != -1) { 
    document.current_issue = index; 
  }
  index++;
}

a = str.indexOf("?")+1;
if (a != 0) {
  if ((str.substr(a, 1) == 'l') || (str.substr(a, 1) == 'b')) { document.page_turn_direction  = 1; }
  if ((str.substr(a, 1) == 'r') || (str.substr(a, 1) == 'f')) { document.page_turn_direction = 0; }
  if ((str.substr(a, 1) == 's') || (str.substr(a, 1) == 'e') || (str.substr(a, 1) == 'f') || (str.substr(a, 1) == 'b')) { return str.substr(a, 1); }
  if (str.substr(a+1,1)) { document.current_index_id  = str.substr(a+1, 1); }
}

if (str.substr(a+2, 1) == '1') { document.automated_time = 8000; }

return '';
}

<!-- --------------------------------- -->
function preload_all_images() {

i = 0;

document.write('<div id="preload" style="position:absolute; z-index:0; width:1px; height:1px; top:0; left:0; visibility: hidden; border: 0px none #000000;">');
document.write('<img src="'+document.background[document.current_page]+'" width"1" height="1" onLoad="preloaded();">');
while (i <= document.total_images) {
  document.write('<img src="'+document.preload_images[i]+'" width"1" height="1" onLoad="preloaded();">');
  i++;
}
document.write('</div>');
}

<!-- --------------------------------- -->
function preloaded() {

document.loaded_images++;
}

<!-- --------------------------------- -->
function page_loaded() {

if (document.loaded_images >= document.total_images) { return 1; } else { return 0; }
}

<!-- --------------------------------- -->
function open_page(n) {

delay_time = 30;
a = n*80;
if (a >= 800) { 
  document.getElementById('mask').style.clip = 'rect(auto auto auto auto)';
} else if (document.page_turn_direction) { 
  document.getElementById('mask').style.clip = 'rect(auto auto auto '+(804-a)+')'; 
} else { 
  document.getElementById('mask').style.clip = 'rect(auto '+a+' auto auto)'; 
}

if (page_loaded()) { 
  n--; 
} else { 
  temp_n = Math.round(document.loaded_images / document.total_images * 100);
  if (temp_n > 0) {   
    temp_str = '<h6 style="margin-top:250px">Loading<br>'+Math.round(document.loaded_images / document.total_images * 100)+'%</h6>';
  }
  document.getElementById('mask').innerHTML = temp_str;
  delay_time = 100; 
}

if (n >= 0) { 
  setTimeout("open_page("+n+")", delay_time); 
} else {
  document.getElementById('mask').style.clip = 'rect(0 0 0 0)';
  document.getElementById('mask').innerHTML = '';
  document.loaded = 1; 
  enable_all_buttons();
}
}

<!-- --------------------------------- -->
function close_page(n,new_location) {

a = n*80;
if (a >= 800) {
  document.getElementById('mask').style.clip = 'rect(auto auto auto auto)';
} else if (document.page_turn_direction) { 
  document.getElementById('mask').style.clip = 'rect(auto auto auto '+(804-a)+')'; 
} else { 
  document.getElementById('mask').style.clip = 'rect(auto '+a+' auto auto)'; 
}

n++; 

if (n <= 11) { 
  setTimeout("close_page("+n+",'"+new_location+"')", 30); 
} else {
  document.getElementById('mask').style.clip = 'rect(auto auto auto auto)';
  if (new_location != '') { window.location = new_location; }
}
}

<!-- --------------------------------- -->
function goto_page(n) {
if (n == 'next') { new_page = document.current_page+1; }
else if (n == 'prev') { new_page = document.current_page-1; }
else if ((n == 'nextissue') || (n == 'previssue') || (n == 'prev_issue')) { 
  if (n == 'nextissue') str2 = '..'+document.issue_dir[document.current_issue+1]+'index.html?s';  
  if (n == 'previssue') str2 = '..'+document.issue_dir[document.current_issue-1]+'index.html?e';
  if (n == 'prev_issue') str2 = '..'+document.issue_dir[document.current_issue-1]+'index.html?s';
  document.page_turn_direction = 0;
    if (n == 'nextissue') document.page_turn_direction = 1;
  document.loaded = 0;
  disable_all_buttons();
  document.getElementById('index').style.visibility = 'hidden';
  close_page(0,str2+'0');
  return 0;
} else if (n.indexOf('.html') != -1) {
  new_page = -1; 
  for (index=0; index<=document.total_pages; index++) { if ((n.indexOf(document.issue_dir[document.current_issue]+document.html_file[index]) != -1) && (new_page == -1)) new_page = index; }
  if (new_page == -1) { 				// IF ARTICLE IS NOT IN CURRENT ISSUE
    index=0;
    temp_flag=0;
    while (document.magazine_article[index]) {
      if (window.location.toString().indexOf(document.magazine_article_html[index]) != -1) { temp_flag = 1; }
      if (document.magazine_article_html[index].indexOf(n) != -1) {
        if (temp_flag) { 
          document.page_turn_direction = 1; 
          str2 = '..'+document.magazine_article_html[index]+'?r';
        } else { 
          document.page_turn_direction = 0; 
          str2 = '..'+document.magazine_article_html[index]+'?l';
        } 
        document.loaded = 0;
        disable_all_buttons();
        document.getElementById('index').style.visibility = 'hidden';
        close_page(0,str2+'0');
        return 0;  
      }
    index++; 
    }
  }
} else if (n.indexOf('/') == 0) {
  new_page = -1; 
  for (index=0; index<=document.total_issues; index++) { if (document.issue_dir[index].indexOf(n) != -1) new_page = index; }
  if (new_page == -1) { new_page = 0; }  //IF ISSUE DOES NOT EXIST...
  else {
    str2 = '..'+document.issue_dir[new_page]+'index.html?s';
    document.page_turn_direction = 0;
    if (new_page >= document.current_issue) document.page_turn_direction = 1;
    document.loaded = 0;
    disable_all_buttons();
    document.getElementById('index').style.visibility = 'hidden';
    close_page(0,str2+'0');
    return 0;  
  }
} else { 
  new_page = parseInt(n); 
}

if ((new_page >= 0) && (new_page <= document.total_pages)) {
  if (new_page >= document.current_page) { str1 = 'r'; document.page_turn_direction = 1; } else { str1 = 'l'; document.page_turn_direction = 0; }
  if (document.index_id[new_page] == '') document.index_id[new_page] = '0';
  str2 = document.html_file[new_page]+'?'+str1+document.index_id[new_page];
  if (document.automated == 1) { str2 = str2 + '1'; }
  document.loaded = 0;
  disable_all_buttons();
  close_page(0,str2);
}
}

<!-- --------------------------------- -->
function timeout_when_opened(str_function, delay) {

if (document.loaded) {
  setTimeout(str_function, delay); 
} else {
  setTimeout('timeout_when_opened("'+str_function+'", '+delay+');',100);
}
}

<!-- --------------------------------- -->
function fixPNG(myImage) {

       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
}

<!-- --------------------------------- -->
function get_browser_info() {

if (navigator.appVersion.indexOf("MSIE") != -1) { document.browserType = "MSIE"; }
else if (navigator.userAgent.indexOf("Firefox") != -1) { document.browserType = "Firefox"; }
else { document.browserType = "Other"; }
}

<!-- --------------------------------- -->
function index_redirect() {

str = unescape(window.location);
if (str.indexOf('.htm') == -1) {
  n = str.length;
  if (str.charAt(n-1) != '/') {str = str + '/';}
  str = str + 'index.html';
  window.open(str,'_self');
  return 0;
}
return 1;
}

<!-- --------------------------------- -->
function goto_URL(URL,n) {

window.open(URL,n);
}

<!-- --------------------------------- -->
function mail(str1, str2, str3) {

return email = str1 + String.fromCharCode(64) + str2 + '.' + str3;
}

<!-- --------------------------------- -->
function EDIT_mode() {

document.getElementsByTagName("body")[0].style.backgroundColor = "#FFDDDD";

document.write('<div id="EDIT_panel" style="position:absolute; width:210px; height: 600px; left:50%; margin-left:-622px; top:10px; visibility: visible; background-color: #000000; border: 0px none #000000;  overflow:auto;"></div>');
document.write('<div id="EDIT_panel2" style="position:absolute; width:210px; height: 600px; left:50%; margin-left:412px; top:10px; visibility: visible; background-color: #000000; border: 0px none #000000;  overflow:auto;"></div>');
}

<!-- --------------------------------- -->
function EDIT_move_cursor(n) {

document.getElementById('EDIT_cursor').style.left = document.getElementById(document.sprite_name[n]).style.left;
document.getElementById('EDIT_cursor').style.top = document.getElementById(document.sprite_name[n]).style.top;
document.getElementById('EDIT_cursor').style.width = document.getElementById(document.sprite_name[n]).style.width;
document.getElementById('EDIT_cursor').style.height = 2;
document.getElementById('EDIT_cursor').style.marginTop = 5;

document.getElementById('EDIT_cursor2').style.left = document.getElementById(document.sprite_name[n]).style.left;
document.getElementById('EDIT_cursor2').style.top = document.getElementById(document.sprite_name[n]).style.top;
document.getElementById('EDIT_cursor2').style.height = document.getElementById(document.sprite_name[n]).style.height;
document.getElementById('EDIT_cursor2').style.width = 2;
document.getElementById('EDIT_cursor2').style.marginLeft = 5;
}

<!-- --------------------------------- -->
function EDIT_move_sprite(evt) {

var e = (window.event) ? window.event : evt;
n = e.clientX-((document.body.offsetWidth-805)/2);
document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n;
n = e.clientY-20;
document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n;
EDIT_move_cursor(document.EDIT_current_sprite);
}

<!-- --------------------------------- -->
function EDIT_resize_sprite(evt) {

var e = (window.event) ? window.event : evt;

if ((e.clientX-((document.body.offsetWidth-805)/2)) < parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left)) {
  n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left)-(e.clientX-((document.body.offsetWidth-805)/2))+parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width);
  document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width = n;
  n = e.clientX-((document.body.offsetWidth-805)/2);
  document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n;
} else {
  n = (e.clientX-((document.body.offsetWidth-805)/2))-parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left);
  document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width = n;
}
if ((e.clientY-20) < parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top)) {
  n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top)-(e.clientY-36)+parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height);
  document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height = n;
  n = e.clientY-20;
  document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n;
} else {
  n = (e.clientY-20)-parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top);
  document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height = n;
}
EDIT_move_cursor(document.EDIT_current_sprite);
}

<!-- --------------------------------- -->
function EDIT_write_code() {

str = '';
index = document.current_page;
  str = str+unescape('<br>n++;<br>');
  if (document.EDIT_special_flag.indexOf("h") == -1) str = str+unescape('document.html_file[n] = %27'+document.html_file[index]+'%27;<br>');
  if (document.EDIT_special_flag.indexOf("i") == -1) str = str+unescape('document.index_id[n] = %27'+document.index_id[index]+'%27;<br>');
  if (document.EDIT_special_flag.indexOf("d") == -1) str = str+unescape('document.info[n] = %27'+document.info[index]+'%27;<br>');
  str = str+unescape('document.background[n] = %27'+document.background[index]+'%27;<br>');
  str = str+unescape('if (complete_data(n)) {<br>');
  for (index2=0; index2 <= document.total_sprites; index2++) {
    str = str+unescape('&nbsp;&nbsp;sprite(%27');
    temp_str = document.sprite[index2];
    if (temp_str.indexOf("x:") != -1) if ((temp_str.charAt(temp_str.indexOf("x:")-1) == ' ') || (temp_str.charAt(temp_str.indexOf("x:")-1) == ';')) temp_str = replace_value('x:', parseInt(document.getElementById(document.sprite_name[index2]).style.left), temp_str);
    if (temp_str.indexOf("y:") != -1) if ((temp_str.charAt(temp_str.indexOf("y:")-1) == ' ') || (temp_str.charAt(temp_str.indexOf("y:")-1) == ';')) temp_str = replace_value('y:', parseInt(document.getElementById(document.sprite_name[index2]).style.top), temp_str);
    if (temp_str.indexOf("w:") != -1) if ((temp_str.charAt(temp_str.indexOf("w:")-1) == ' ') || (temp_str.charAt(temp_str.indexOf("w:")-1) == ';')) temp_str = replace_value('w:', parseInt(document.getElementById(document.sprite_name[index2]).style.width), temp_str);
    if (temp_str.indexOf("h:") != -1) if ((temp_str.charAt(temp_str.indexOf("h:")-1) == ' ') || (temp_str.charAt(temp_str.indexOf("h:")-1) == ';')) temp_str = replace_value('h:', parseInt(document.getElementById(document.sprite_name[index2]).style.height), temp_str);
    if (temp_str.indexOf("***") != -1) {
      temp_str1 = temp_str.substring(0,temp_str.indexOf("***"));
      temp_str2 = temp_str.substr(temp_str.indexOf("***")+3);
      str = str+temp_str1;
      str = str+unescape('%27);<br>');
      str = str+unescape('&nbsp;&nbsp;&nbsp;&nbsp;more(%27');
      str = str+temp_str2;
      str = str+unescape('%27);<br>');
    } else {
      str = str+temp_str;
      str = str+unescape('%27);<br>');
    }
  }
  str = str+unescape('}<br>');

document.getElementById('EDIT_text').innerHTML = str;
}

<!-- --------------------------------- -->
function EDIT_write_sprites() {

rewrite_EDIT('Sprite list:<br><br>');

for (index=0; index<=document.total_sprites; index++) {
if (document.EDIT_current_sprite == index) { write_EDIT('*&nbsp;'); } else { write_EDIT('&nbsp;&nbsp;'); }
write_EDIT(index+': '+document.sprite_name[index]+'<br>');
}
}

<!-- --------------------------------- -->
function EDIT_write_mag_code() {

last_str = '';
str = '<br>n++;//--------------------------------------------------------------<br>';
str = str+unescape('document.issue_name[n] = %27'+document.issue_name[document.current_issue]+'%27;<br>');
str = str+unescape('document.issue_date[n] = %27'+document.issue_date[document.current_issue]+'%27;<br>');
str = str+unescape('document.issue_dir[n] = %27'+document.issue_dir[document.current_issue]+'%27;<br>');
str = str+'<br>';

for (index=0; index<=document.total_pages; index++) {
  if (last_str != document.html_file[index]) {
    last_str = document.html_file[index];
    str = str + 'm++;<br>';
    str = str+unescape('document.magazine_article[m] = %27')+document.article_name[index]+unescape('%27;<br>');
    str = str+unescape('document.magazine_article_html[m] = %27')+document.issue_dir[document.current_issue]+document.html_file[index]+unescape('%27;<br>');
  }
}

document.getElementById('EDIT_text').innerHTML = str;
}

<!-- --------------------------------- -->
function EDIT_sprites() {

if (document.total_sprites >= 0) {
document.write(unescape('<div id="EDIT_button" style="position:absolute; width:805px; height:618px; z-index:202; top:0; left:50%; margin-left:-402px; visibility: hidden; border: 0px none #000000;"><img src="'+document.mag_images+'button.gif" width="805" height="618" onClick="document.getElementById(%27EDIT_button%27).style.visibility = %27hidden%27; EDIT_move_sprite(event);"></div>'));
document.write(unescape('<div id="EDIT_button2" style="position:absolute; width:805px; height:618px; z-index:202; top:0; left:50%; margin-left:-402px; visibility: hidden; border: 0px none #000000;"><img src="'+document.mag_images+'button.gif" width="805" height="618" onClick="document.getElementById(%27EDIT_button2%27).style.visibility = %27hidden%27; EDIT_resize_sprite(event);"></div>'));
document.write(unescape('<div id="EDIT_text" style="position:absolute; width:605px; height:418px; z-index:202; top:50; left:50%; margin-left:-302px; visibility: hidden; background-color: #000000; border: 0px none #000000; overflow:auto;"></div>'));
document.write('<div id="EDIT_cursor" style="position:absolute; z-index:199; visibility: visible; background-color: #00FFFF; border: 0px none #000000;"></div><div id="EDIT_cursor2" style="position:absolute; z-index:199; visibility: visible; background-color: #00FFFF; border: 0px none #000000;"></div>');
EDIT_move_cursor(document.EDIT_current_sprite);
str = '';

command = unescape('document.EDIT_current_sprite++; if (document.EDIT_current_sprite > document.total_sprites) document.EDIT_current_sprite = 0; EDIT_move_cursor(document.EDIT_current_sprite); EDIT_write_sprites();');
str = str + '<button style="width:150px; height:30px;" onClick="'+command+'">Change sprite</button><br>';

str = str + '<br>';

str = str + '<table cellpadding="0" cellspacing="0" border="0">';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n; EDIT_move_cursor(document.EDIT_current_sprite);');
command = command+unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<tr><td><button style="width:50px; height:50px;" onClick="'+command+'"></button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">U</button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n; EDIT_move_cursor(document.EDIT_current_sprite);');
command = command+unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'"></button></td></tr>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<tr><td><button style="width:50px; height:50px;" onClick="'+command+'">L</button></td>';
command = unescape('document.getElementById(%27EDIT_button%27).style.visibility = %27visible%27;');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">GOTO</button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">R</button></td></tr>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n; EDIT_move_cursor(document.EDIT_current_sprite);');
command = command+unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<tr><td><button style="width:50px; height:50px;" onClick="'+command+'"></button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">D</button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.left = n; EDIT_move_cursor(document.EDIT_current_sprite);');
command = command+unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.top = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'"></button></td></tr></table>';

str = str + '<br>';

str = str + '<table cellpadding="0" cellspacing="0" border="0">';
command = unescape('document.getElementById(%27EDIT_button2%27).style.visibility = %27visible%27;');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">SIZE</button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">W-</button></td>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">W+</button></td></tr>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height); n -= 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<tr><td><button style="width:50px; height:50px;" onClick="'+command+'">H-</button></td>';
str = str + '<td></td>';
str = str + '<td></td></tr>';
command = unescape('n = parseInt(document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height); n += 1; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height = n; EDIT_move_cursor(document.EDIT_current_sprite);');
str = str + '<tr><td><button style="width:50px; height:50px;" onClick="'+command+'">H+</button></td>';
str = str + '<td></td>';
command = unescape("if (document.getElementById(document.sprite_name[document.EDIT_current_sprite]+'_img')) { document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.width = document.getElementById(document.sprite_name[document.EDIT_current_sprite]+'_img').offsetWidth; document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.height = document.getElementById(document.sprite_name[document.EDIT_current_sprite]+'_img').offsetHeight; EDIT_move_cursor(document.EDIT_current_sprite);}");
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">FIT</button></td></tr></table>';

str = str + '<br>';

str = str + '<table cellpadding="0" cellspacing="0" border="0">';
command = unescape('document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.visibility = %27visible%27; set_opacity(document.getElementById(document.sprite_name[document.EDIT_current_sprite]),0);');
str = str + '<tr><td><button style="width:50px; height:50px;" onClick="'+command+'">0</button></td>';
command = unescape('document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.visibility = %27visible%27; set_opacity(document.getElementById(document.sprite_name[document.EDIT_current_sprite]),50);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">50</button></td>';
command = unescape('document.getElementById(document.sprite_name[document.EDIT_current_sprite]).style.visibility = %27visible%27; set_opacity(document.getElementById(document.sprite_name[document.EDIT_current_sprite]),100);');
str = str + '<td><button style="width:50px; height:50px;" onClick="'+command+'">100</button></td></tr>';
str = str + '</table>';

str = str + '<br>';

command = unescape('document.getElementById(%27EDIT_text%27).style.visibility = %27visible%27; EDIT_write_code();');
str = str + '<button style="width:150px; height:30px;" onClick="'+command+'">Code</button><br>';
command = unescape('document.getElementById(%27EDIT_text%27).style.visibility = %27visible%27; EDIT_write_mag_code();');
str = str + '<button style="width:150px; height:30px;" onClick="'+command+'">Mag Code</button><br>';
command = unescape('document.getElementById(%27EDIT_text%27).style.visibility = %27hidden%27;');
str = str + '<button style="width:150px; height:30px;" onClick="'+command+'">No Code</button><br>';

document.getElementById('EDIT_panel2').innerHTML = str;
}
}

<!-- --------------------------------- -->
function write_EDIT(str) {

if (document.EDIT) document.getElementById('EDIT_panel').innerHTML = document.getElementById('EDIT_panel').innerHTML+str;
}

<!-- --------------------------------- -->
function rewrite_EDIT(str) {

if (document.EDIT) document.getElementById('EDIT_panel').innerHTML = str;
}