function contact(address)
{
location.href = "mailto:"+address;
}
function getCookie(name){
var cookieFound = false;
var start = 0;
var end = 0;
var cookieString = document.cookie;
var cookieValue;
var i = 0;
//scan the Cookie for the name
while (i <= cookieString.length){
start = i;
end = start + name.length;
if(cookieString.substring(start, end) == name){
cookieFound = true;
break;
}
i++;
}
//is name found/
if(cookieFound){
start = end+1;
end = document.cookie.indexOf(";",start);
if(end < start)
end = document.cookie.length;
cookieValue = document.cookie.substring(start, end);
start = 0;
end = cookieValue.indexOf(" ", start);
if(end < start)
end = cookieValue.length;
return cookieValue.substring(start, end);
}
return "";
}
function initFields(){
document.logon.userid.value = getCookie("IMail_UserId");
document.logon.passwd.value = getCookie("IMail_password");
}
function deleteCookie(name, path, domain){
if(getCookie(name)){
document.cookie = name+ "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain: "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
// for Classics
function Set_Cookie(name,value,expires,domain,path,secure) {
document.cookie = name + "=" +escape(value) +
( (expires) ? ";expires=" + expires.toGMTString() : "") +
( (path) ? ";path=" + path : "") +
( (domain) ? ";domain=" + domain : "") +
( (secure) ? ";secure" : "");
}
expires = new Date();
expires.setTime(expires.getTime() + (365 * 24 * 60 * 60 * 1000));
function formSubmit()
{
deleteCookie("IMail_UserId", "/", null);
deleteCookie("IMail_password", "/", null);
deleteCookie("IMail_UserKey", "/", null);
}
function setCookie(name, value, expires, path, domain, secure)
{
document.cookie = name + "=" + escape(value) +
((expires) ? "; expires=" + expires.toGMTString() : "") +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
((secure) ? "; secure" : "");
}
function getCookie(name)
{
var dc = document.cookie;
var prefix = name + "=";
var begin = dc.indexOf("; " + prefix);
if (begin == -1)
{
begin = dc.indexOf(prefix);
if (begin != 0) return null;
}
else
{
begin += 2;
}
var end = document.cookie.indexOf(";", begin);
if (end == -1)
{
end = dc.length;
}
return unescape(dc.substring(begin + prefix.length, end));
}
function deleteCookie(name, path, domain)
{
if (getCookie(name)){
document.cookie = name + "=" +
((path) ? "; path=" + path : "") +
((domain) ? "; domain=" + domain : "") +
"; expires=Thu, 01-Jan-70 00:00:01 GMT";
}
}
function mOvr(src,clrOver) {
if (!src.contains(event.fromElement)) {
src.bgColor = clrOver;
}
}
function mOut(src,clrIn) {
if (!src.contains(event.toElement)) {
src.bgColor = clrIn;
}
}
function mClk(src) {
if(event.srcElement.tagName=='TR'){
src.children.tags('A')[0].click();
}
}
function overLine(src, clrOver) {
if (!src.contains(event.fromElement)) {
src.bgColor = clrOver;
}
}
function outLine(src,clrIn) {
if (!src.contains(event.toElement)) {
src.bgColor = clrIn;
}
}
function memu_draw(menu){
menuItem = [['folders', document.all('folders_tab'), document.all.folders_img],
['options', document.all('options_tab'), document.all.options_img],
['admin', document.all('admin_tab'), document.all.admin_img]];
for (i = 0; i < menuItem.length; i++) {
if (menuItem[i][0] == menu){
ob_tab = menuItem[i][1];
ob_img = menuItem[i][2];
if (ob_tab.style.display == "none"){
ob_tab.style.display = "";
ob_img.src = "ico/Tminus.gif";
setCookie('imail_menu_'+menu, 1, 0, '', '', '');
}
else{
ob_tab.style.display = "none";
ob_img.src = "ico/Tplus.gif";
setCookie('imail_menu_'+menu, 0, 0, '', '', '');
}
return;
}
}
}
var issort = false;
function sort(scellIndex,trow,IsNumber){
issort=!issort;
var row = document.all.sortTable.rows,tbody = document.all.sortTable;
var N,M;
if (row.length < 2){return null}
// row[trow-1].cells[scellIndex].innerHTML = ''+row[trow-1].cells[scellIndex].innerText+''+((issort)?'
':'
');
for (var i=trow;iM))tbody.moveRow(j,i);
}
}
}