<!--//
var ALIAS = "";
var PASSWORD = "";
var GROUPS = "";
var PRINT = "";
cookies = document.cookie.split("; ");
for(z=0;z<cookies.length;z++){
cookie = cookies[z].split("=");
if (cookie[0] == 'ALIAS'){ALIAS = cookie[1];}
if (cookie[0] == 'SESSION'){SESSION = cookie[1];}
if (cookie[0] == 'GROUPS'){GROUPS = cookie[1];}
if (cookie[0] == 'PRINT'){PRINT = cookie[1];}
}
function replaceChars(entry) {
out = "+"; // replace this
add = " "; // with this
temp = "" + entry; // temporary holder
while (temp.indexOf(out)>-1) {
pos= temp.indexOf(out);
temp = "" + (temp.substring(0, pos) + add + 
temp.substring((pos + out.length), temp.length));
}
return temp;
}
ALIAS = replaceChars(ALIAS);
GROUPS = replaceChars(GROUPS);


//////////////////////////////////////////////
domain = window.location.href.split("/")[2];
server_name = "."+domain.split(".")[domain.split(".").length-2]+"."+domain.split(".")[domain.split(".").length-1];
now=new Date();
now.setFullYear(now.getFullYear()+1);
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name+"="+escape(value)+((expires) ? "; expires=" + expires.toGMTString() : "")+((path) ? "; path=" + path : "")+((domain) ? "; domain=" + domain : "")+((secure) ? "; secure" : "");
document.cookie = curCookie;
}

var beginShift = "";var endShift = "";var isShift = "";var fileListLimit = 12;
function doShiftCheck(e,i) {
isShift = "no";
if (window.event.shiftKey){isShift = "yes";}
if (isShift == "yes"){
if((beginShift)&&(endShift)){endShift = "";beginShift = "";}
if (beginShift){endShift = i;}else{beginShift = i;}
if((beginShift)&&(endShift)){
toggleCheckAll();
if (document.forms['keys'].FILE[endShift-1].checked){
document.forms['keys'].FILE[endShift-1].checked = false;
}else{
document.forms['keys'].FILE[endShift-1].checked = true;
}
}
}
//setBGColors();
}///////////////////////
function setBGColors(){
var from = 1;
var to = document.forms['keys'].FILE.length;
for(x=from;x<=to;x++){
if (document.forms['keys'].FILE[x-1].checked){
window["myBG"+x+"A"].bgColor = 'AA0000';
}else{
//changeBG("myBG"+x+"A",'');
window["myBG"+x+"A"].bgColor = '';
}
}
}////////////////////////
function toggleCheckAll(){
if (endShift == 'all'){
beginShift = 0;
endShift = document.forms['keys'].FILE.length;
}
///document.forms['keys'].FILE.checked = true;
var from = beginShift;
var to = endShift;
//alert(from+"..."+to);
for(x=from;x<to;x++){
if (document.forms['keys'].FILE[x].checked){
document.forms['keys'].FILE[x].checked = false;
}else{
document.forms['keys'].FILE[x].checked = true;
}
}
}///////////////////////

function areaWordWrap(formnme,field,whobutton) { 

var who = whobutton;
var txtarea = document.getElementById(field); 
if (!txtarea){
txtarea = document.forms[formnme].elements[field];
}
wrap = txtarea.getAttribute('wrap'); 
(wrap.toLowerCase() == 'off')? 
txtarea.setAttribute('wrap', 'soft'): 
txtarea.setAttribute('wrap', 'off'); 
/*Fix display for mozilla*/ 
txtarea.style.display='none'; 
txtarea.style.display=''; 
wrap = txtarea.getAttribute('wrap'); 
if (wrap.toLowerCase() == "off"){
who.value = "w";
}else{
who.value = "W";
}
} 
function areaMinMax(formnme,field,whobutton) { 
var who = whobutton;
var txtarea = document.getElementById(field); 
if (!txtarea){
txtarea = document.forms[formnme].elements[field];
}
rows = txtarea.getAttribute('rows'); 
if (rows <= 2){
wrap = txtarea.getAttribute('wrap'); 
wrap = wrap.toLowerCase();
rwx = 0;
if (wrap == "soft"){
rw = txtarea.value.split("");
rwx = Math.floor(rw.length/55);
}else{
rw = txtarea.value.split("\n");
rwx = rw.length;
}
if (rwx < 2){rwx = 2;}
txtarea.setAttribute('rows', rwx+2);
document[field+'_SZE'].height = rwx*10;
who.value = "-";
/*Fix display for mozilla*/ 
txtarea.style.display='none'; 
txtarea.style.display=''; 
}else{
txtarea.setAttribute('rows', 2);
document[field+'_SZE'].height = 1;
who.value = "+";
}
}


//-->
