function NewWindow(mypage,myname,w,h,scroll,pos){
var win=null;
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
}
function SmallWindow(wintype,width,height) {
t=screen.height/2-height;
w=screen.width/2-width;
SmallWin=window.open(wintype,"SmallWin","toolbar=no,directories=no,status=no,scrollbars=auto,menubar=no,width="+width+",height="+height+",top="+t+",left="+w+"");
SmallWin.window.focus()
}
function sendmsg(wintype) {
t=screen.height/2-150;
w=screen.width/2-200;
SmallWin=window.open(wintype,"sendmsg","toolbar=no,directories=no,status=no,scrollbars=auto,menubar=no,width=400,height=300,top="+t+",left="+w+"");
SmallWin.window.focus()
}

function addbookmark(bookmarktitle,bookmarkurl){
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function log_out(confirmation_message)
{
        var ht = document.getElementsByTagName("html")[0];
        ht.style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
        if (confirm(confirmation_message))
        {
                return true;
        }
        else
        {
                ht.style.filter = "";
                return false;
        }
}