');
document.write('SUNY SICAS Center');
document.write('');
document.write('');
document.write('');
document.write('');
document.write('');
var userpwdFocus = false;
var hasRecovery = false
function hadFocus(set)
{
if (set) userpwdFocus = true;
return userpwdFocus;
}
function getCookie(name)
{
var search = name + "="
if (document.cookie.length > 0)
{
// if there are any cookies
offset = document.cookie.indexOf(search)
if (offset != -1)
{ // if cookie exists
offset += search.length // set index of beginning of value
end = document.cookie.indexOf(";", offset) // set index of end of cookie value
if (end == -1)
end = document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}
}
function clearCache()
{
var name="usid"
var value="chocolate-chip-cookies"
cookie= name + "=" + value + "; path=/; domain=.oneonta.edu; expires=" + (new Date(0)).toGMTString();
if (getCookie (name) != value) document.cookie = cookie;
doCancel();
}
function doCancel()
{
document.userid.user.value='';
document.cplogin.user.value='';
document.cplogin.pass.value='';
}
function OpenWin(w)
{
var unDefined;
if (w == "help")
{
stats='resizable=yes,toolbar=no,location=no,directories=no,status=yes,menubar=no,'
stats += 'scrollbars=yes,width=650,height=475';
helpWindow = window.open ("http://vm-sicaslinux3.oneonta.edu/site/loginhelp.html","helpWindow",stats)
setTimeout ("helpWindow.focus ()", 500);
}
}
function xferFocus()
{
document.cplogin.pass.focus();
}
function login()
{
setQueryAsCookie();
document.cplogin.user.value=document.userid.user.value;
document.cplogin.submit();
}
function setQueryAsCookie()
{
var query = document.location.search;
if (query.length > 1) {
document.cookie = "query=" + encodeURIComponent(query) + "; path=/; domain=.oneonta.edu;"
} else {
// kill any previous query cookie setup
document.cookie = "query=; path=/; domain=.oneonta.edu; expires=" + (new Date(0)).toGMTString();
}
}
var interval = 7; // delay between rotating images (in seconds)
var random_display = 1; // 0 = no, 1 = yes
interval *= 1000;
var image_index = 0;
image_list = new Array();
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/1.jpg");
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/2.jpg");
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/3.jpg");
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/4.jpg");
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/5.jpg");
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/6.jpg");
image_list[image_index++] = new imageItem("http://sicas.oneonta.edu/images/rotate/7.jpg");
var number_of_image = image_list.length;
function imageItem(image_location) {
this.image_item = new Image();
this.image_item.src = image_location;
}
function get_ImageItemLocation(imageObj) {
return(imageObj.image_item.src)
}
function generate(x, y) {
var range = y - x + 1;
return Math.floor(Math.random() * range) + x;
}
function getNextImage() {
if (random_display) {
image_index = generate(0, number_of_image-1);
}
else {
image_index = (image_index+1) % number_of_image;
}
var new_image = get_ImageItemLocation(image_list[image_index]);
return(new_image);
}
function rotateImage(place) {
var new_image = getNextImage();
document[place].src = new_image;
var recur_call = "rotateImage('"+place+"')";
setTimeout(recur_call, interval);
}
document.write('');
document.write('');
document.write('