﻿// JavaScript Document


    function navOn(id1, id2) {
        var lightcolor = '#ffffff';
        var midcolor = '#DEF1FE';
        var darkcolor = '#33A6B9';
        var darkestcolor = '#2B71AF';
        elmnt = document.getElementById(id1);
        elmnt.style.backgroundColor = darkestcolor;
        elmnt = document.getElementById(id2);
        elmnt.style.backgroundColor = lightcolor;
        elmnt.style.borderColor = darkestcolor;
        elmnt.style.color = darkestcolor;
    }


    function navOut(id1, id2) {
        var lightcolor = '#ffffff';
        var midcolor = '#DEF1FE';
        var darkcolor = '#33A6B9';
        var darkestcolor = '#2B71AF';
        elmnt = document.getElementById(id1);
        elmnt.style.backgroundColor = darkcolor;
        elmnt = document.getElementById(id2);
        elmnt.style.backgroundColor = midcolor;
        elmnt.style.borderColor = midcolor;
        elmnt.style.color = darkcolor;
    }



// Open Page

function go(page) {
    window.location.href = page;
}


// Open New Window set size

function privWin(page, name, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(page, name, winprops)
if (parseInt(navigator.appVersion) >= 4) {win.window.focus();}
}



//Hide status bar msg 

function hidestatus(){
window.status='  C a r e t e c h  U K  L t d  '
return true
}

if (document.layers)
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT)

document.onmouseover=hidestatus
document.onmouseout=hidestatus





// displays date in form Wednesday, December 12th


//<!-- Begin

function displaydate() {

d = new Array(
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
);
m = new Array(
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
);

today = new Date();
day = today.getDate();
year = today.getYear();

if (year < 2000)
year = year + 1900;

end = "th";
if (day==1 || day==21 || day==31) end="st";
if (day==2 || day==22) end="nd";
if (day==3 || day==23) end="rd";
day+=end;

document.write(d[today.getDay()]+" "+day+" ");
document.write(m[today.getMonth()]);
document.write("</center>");

}

// End -->




// highlight all text in field fn

// Begin

function highlight(field){
  field.focus();
  field.select();
}

// End -->





//Disable right mouse click Script

var message="Function Disabled";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->




//<!-- Original:  Lefteris Haritou --> 
//<!-- Web Site:  lef@writeme.com> www.geocities.com/~lef -->

//<!-- This script and many more are available free online at -->
//<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var base= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9","A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z","a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z")
var pass=""
var z=23;
var y=28;
var f= new Array();
var K= new Array();
for (x=0; x<10; x++){
f[x]=x<<9
f[x]+=23
}
for (x=10; x<36; x++){
y=y<<1
v= Math.sqrt(y)
v = parseInt(v,16)
v+=5
f[x]=v
y++
}
for (x=36; x<62; x++){
z=z<<1
v= Math.sqrt(z)
v = parseInt(v,16)
v+=74
f[x]=v
z++
}
var iCounter = 3 //How many retries
function inc(){
iCounter--
if (iCounter > 0)
{
if (confirm("\nPassword is incorrect.\n\n\nRetry?"))
Check()
else
alert('Password incorrect.');
// history.go(-1);

// You may use this element istead if you want.
// location.href='denied.htm' //Cancel htm file

}
else
alert('You have used three attepts.  Access is denied.\n\nContact your manager if you feel this is an error.\n');
// location.href='denied.htm' // 3 times incorrect htm file

// You may use this element istead if you want.
// history.go(-1);


}
function Check(){
pass = prompt("Enter your password.","")
if(pass==null || pass==""){
    //history.go(-1)
}
else{
var lpass=(pass.length)+1
for (l=1; l<lpass; l++){
K[l]=pass.charAt(l)
}
var code=0;
for (y=1; y<lpass; y++){
for(x=0; x<62; x++){
if (K[y]==base[x]){
code+=f[x]
code*=y
      }
   }
}

if (code==258588) 		// code==[your access code]

gotoit()
else
inc()
   }
}
function gotoit(){
location.href=pass+".htm";
}
// End -->

