
/***********************************************
* Compiled JavaScipts
* CSA286
* L. Scott Adams
***********************************************/

var flashlinks=new Array()

function changelinkcolor(){
for (i=0; i< flashlinks.length; i++){
	
var flashtype=document.getElementById? 
flashlinks[i].getAttribute("flashtype")*1 : flashlinks[i].flashtype*1

var flashcolor=document.getElementById? 
flashlinks[i].getAttribute("flashcolor") : flashlinks[i].flashcolor
	
if (flashtype==0){
if (flashlinks[i].style.color!=flashcolor)
flashlinks[i].style.color=flashcolor
else
flashlinks[i].style.color=''
}
else if (flashtype==1){
if (flashlinks[i].style.backgroundColor!=flashcolor)
flashlinks[i].style.backgroundColor=flashcolor
else
flashlinks[i].style.backgroundColor=''
}
}
}
function init(){
var i=0
if (document.all){
while (eval("document.all.flashlink"+i)!=null){
flashlinks[i]= eval("document.all.flashlink"+i)
i++
} 
}
else if (document.getElementById){
while (document.getElementById("flashlink"+i)!=null){
flashlinks[i]= document.getElementById("flashlink"+i)
i++
}
}
setInterval("changelinkcolor()", 1000)
}
if (window.addEventListener)
window.addEventListener("load", init, false)
else if (window.attachEvent)
window.attachEvent("onload", init)
else if (document.all)

window.onload=init


function checkEnter(e,form){ //e is event object passed from function invocation
var characterCode //literal character code will be stored in this variable

if(e && e.which){ //if which property of event object is supported (NN4)
e = e
characterCode = e.which //character code is contained in NN4's which property
}
else{
e = event
characterCode = e.keyCode //character code is contained in IE's keyCode property
}

if(characterCode == 13){ //if generated character code is equal to ascii 13 (if enter key)
submitentry(form) //submit the form
return false
}
else{
return true
}

}


function submitentry(form)
{
//Commented out to prevent login failure
/*	password = document.password1.password2.value.toLowerCase()
	username = document.password1.username2.value.toLowerCase()

	new_ajax_query_get(url_base + "/login.php?ajax=1&user=" + username + "&pass=" + password, ajax_login);*/

if (form == undefined)
{
	form = document.password1;
}

password = form.password2.value.toLowerCase()
username = form.username2.value.toLowerCase()
passcode = 1
usercode = 1

for(i = 0; i < password.length; i++) 
{
	passcode *= password.charCodeAt(i);
}

for(x = 0; x < username.length; x++) 
{
	usercode *= username.charCodeAt(x);
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==12700287600&&passcode==1327521401856)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=url_base + "/login.php?user=" + username + "&pass=" + password;
}
else
{
alert("Invalid Username and/or Password");
}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function show(id)
{
	var div = document.getElementById(id);

	if (div.style.display != 'none')
	{
		div.style.display = 'none';
	}
	else
	{
		div.style.display = 'block';
	}
}
