
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0, maxlimit);
else
cntfield.value = maxlimit - field.value.length;
}

    function CheckAll() {
        for (var i=0;i<document.prvmsg.elements.length;i++) {
            var e = document.prvmsg.elements[i];
            if ((e.name != 'allbox') && (e.type=='checkbox'))
            e.checked = document.prvmsg.allbox.checked;
        }
    }

    function CheckCheckAll() {
        var TotalBoxes = 0;
        var TotalOn = 0;
        for (var i=0;i<document.prvmsg.elements.length;i++) {
            var e = document.prvmsg.elements[i];
            if ((e.name != 'allbox') && (e.type=='checkbox')) {
                TotalBoxes++;
                if (e.checked) {
                    TotalOn++;
                }
            }
        }
        if (TotalBoxes==TotalOn) {
            document.prvmsg.allbox.checked=true;
        } else {
            document.prvmsg.allbox.checked=false;
        }
    }
    
    
    

var dialogArguments;
function getValue (field) {
 dialogArguments = field;
 open ('emoticons.php', 'popup', 
           'width=320,height=500,scrollbars=1'); 
}
function getValue1 (field) {
 dialogArguments = field;
 open ('boxsendx.php?do=pics', 'popup', 
           'width=700,height=500,scrollbars=1'); 
}

function getValue2 (field) {
 dialogArguments = field;
 open ('emotions.php', 'popup', 
           'width=700,height=500,scrollbars=1'); 
}


var dialogArguments;
function getValue3 (field) {
 dialogArguments = field;
 open ('backgrounds.php', 'popup', 
           'width=700,height=500,scrollbars=1'); 
}

var dialogArguments;
function getValue4 (field) {
 dialogArguments = field;
 open ('boxsendx.php?do=clubpics', 'popup', 
           'width=700,height=500,scrollbars=1'); 
}






function linkjax(h, a, n){
ajaxpage(h,a,document.getElementById('maintab').getElementsByTagName('li')[n].firstChild);
}






<!--
var win= null;
function NewWindow(mypage,myname,w,h,scroll){
var winl = (screen.width-w)/2;
var wint = (screen.height-h)/2;
var settings ='height='+h+',';
settings +='width='+w+',';
settings +='top='+wint+',';
settings +='left='+winl+',';
settings +='scrollbars='+scroll+',';
settings +='resizable=yes';
win=window.open(mypage,myname,settings);
if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

var win = null;
function NewWindow2(mypage,myname,w,h,scroll){
LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
settings =
'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+''
win = window.open(mypage,myname,settings)
}

function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
