﻿// JavaScript Document

function pwi($target)
{
	var pw=prompt("Please enter your password to view this file:")
	var pwe = dc("ÀLÑbò{ÜwÚh");
	//var pwe = "tower";
	
	pw = pw.toLowerCase();
	
	if(pw == pwe)
	{
		window.open ($target);
	} else {
		alert("Password incorrect.");
	}
}

function dc($text) {
	output = new String;
	Temp = new Array();
	Temp2 = new Array();
	TextSize = $text.length;
	
	for (i = 0; i < TextSize; i++) 
	{
		Temp[i] = $text.charCodeAt(i);
		Temp2[i] = $text.charCodeAt(i + 1);
	}
	
	for (i = 0; i < TextSize; i = i+2) 
	{
		output += String.fromCharCode(Temp[i] - Temp2[i]);
	}
	
	return output;
}