
function closeall(id)
{
if(id!="oth"){document.getElementById("oth").className="off";document.getElementById("other").style.color="white";}
if(id!="cont"){document.getElementById("cont").className="off";document.getElementById("conts").style.color="white";}
if(id!="free"){document.getElementById("free").className="off";document.getElementById("games").style.color="white";}
}

function csschange(id, newClass,id2) {
closeall(id);
identity=document.getElementById(id);
if(identity.className!=newClass)
{identity.className=newClass;
identity=document.getElementById(id2);
identity.style.color="purple";}
else{
identity.className="off";
identity=document.getElementById(id2);
identity.style.color="white";
}
}

function Login(form) {
var username = form.username.value;
var password = form.password.value;
var ip ="172.16.157.26"
if (username && password ) {
var ftpsite = "ftp://" + username + ":" + password + "@" + ip+":1234";

popupnr(ftpsite, 'ftp')
}
else {
var gbSubmittedByEnter = new Boolean(false);
alert("Please enter your username and password");
   }
}
function popupnr(mylink, windowname)
{
var mywin, href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
mywin = window.open(href, windowname, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=625,height=318,left=163,top=203');
}

function ftp(mylink)
{
var ftpwin;
var href;
if(mylink=='dw')href="ftp://dave-webwizard:1234";
if(mylink=='dw2')href="ftp://guest:guest@dave-webwizard2:1234";
if(mylink=='dwf')href="ftp://films:films@dave-webwizard:1234";
ftpwin= window.open(href, 'ftp', 'toolbar=1,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=625,height=318,left=163,top=203')
}

var gbSubmitted = new Boolean(false);
var gbSubmittedByEnter = new Boolean(false);

function CaricaFoto(img){
var photwin;
photwin=window.open("photo.php?photo="+img,"photo","width=670, height=570, left=0,top=0,scrollbars=0,resizable=0");
}
function redirect(){
history.go(-1);
}
function goback(time){
timer = setTimeout('redirect()', time);
}

