
function imageWindow(url,title) {
    
    newWindow = window.open('www.islix.co.uk','Detail','width=720,height=560,toolbar=no');
    newWindow.focus();
    newWindow.document.writeln("<CENTER>");
    newWindow.document.writeln("<IMG src='" + url + "' alt='" + title + "'>");
    newWindow.document.writeln("<P></P>");
    newWindow.document.writeln("<FORM>");
    newWindow.document.writeln("<INPUT value='Close Window' onClick='javascript:window.close();' type='button'>");
    newWindow.document.writeln("</FORM>");
    newWindow.document.writeln("</CENTER>");
    newWindow.document.close();
    newWindow.focus;
}

function PageLastUpdated(){
    
    da = new Date(document.lastModified) 	// Create a Date Object set to the last modifed date
    db = da.toGMTString()                       // Convert to a String in "predictable format"
    dc = db.split(" ")                          // Split the string on spaces
    if ( eval( dc[3] ) < 1970 ) 
        dc[3] = eval( dc[3] ) +100              // Correct any date purporting to be before 1970
    db = dc[1] + " " + dc[2] + " " + dc[3]      // Ignore day of week and combine date, month and year
    document.write ( "Last Updated " + db ) 	// Display the result
}

function validateLogin(username, password){
    
    var loginOK = true;
    
    if (username == "") {
        window.alert("Username must be completed");
        username.focus();
        loginOK = false;
    }
    if (password == "") {
        window.alert("Password must be completed");
        password.focus();
        loginOK = false;
    }
    if ((username == "") && (password == "")) {
        window.alert("Both fields must be completed");
        username.focus();
        loginOK = false;
    }

    return loginOK;
}
