function getDocMetrics(wnd){
    if (!wnd) {
        wnd = window;
    }
    //opera Netscape 6 Netscape 4x Mozilla 
    if (wnd.innerWidth || wnd.innerHeight){ 
        docwidth = wnd.innerWidth; 
        docheight = wnd.innerHeight; 
    } 
    //IE Mozilla 
    if (wnd.document.body.clientWidth || wnd.document.body.clientHeight){ 
        docwidth = wnd.document.body.clientWidth; 
        docheight = wnd.document.body.clientHeight; 
    } 
    
    
    return Array(docwidth, docheight);
}

function openOnFullScreen(url){
    wnd = open(url);
    wnd.moveTo(0,0);
    wnd.resizeTo(screen.width, screen.height);
    wnd.focus();
    return;
}

function openLiteWindow(url, width, height){
    if (!width && !height) {
        width = 100;
        height = 100;
    }
    return window.open(url, '','width='+ width +',height='+ height +', location=no,toolbar=no,menubar=no,status=no,resizable=yes');
}

function el(elementName){
    return document.getElementById(elementName);
}



function round(arg, precision){
    f = Math.pow(10, precision);
    res = arg * f;
    res = Math.round(res);
    return res/f;
}

function xchgDispalyElement(element){
    if (element.style.display == 'none' || element.style.display == '') {
        element.style.display = 'block'; 
    } else {
        element.style.display = 'none'; 
    }

}


