function popup(url, width, height, name)
{
        if (!name)
        {
                name = '_popup';
        }

        window.open(url.replace(/&amp;/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
        return false;
}

/**
* Find a member
*/
function find_username(url)
{
        popup(url, 760, 570, '_usersearch');
        return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/

function marklist(id, name, state)
{
        var parent = document.getElementById(id);
        if (!parent)
        {
                eval('parent = document.' + id);
        }

        if (!parent)
        {
                return;
        }

        var rb = parent.getElementsByTagName('input');

        for (var r = 0; r < rb.length; r++)
        {
                if (rb[r].name.substr(0, name.length) == name)
                {
                        rb[r].checked = state;
                }
        }
}

function selectCode(a)
{
        // Get ID of code block
        var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];

        // Not IE
        if (window.getSelection)
        {
                var s = window.getSelection();
                // Safari
                if (s.setBaseAndExtent)
                {
                        s.setBaseAndExtent(e, 0, e, e.innerText.length - 1);
                }
                // Firefox and Opera
                else
                {
                        var r = document.createRange();
                        r.selectNodeContents(e);
                        s.removeAllRanges();
                        s.addRange(r);
                }
        }
        // Some older browsers
        else if (document.getSelection)
        {
                var s = document.getSelection();
                var r = document.createRange();
                r.selectNodeContents(e);
                s.removeAllRanges();
                s.addRange(r);
        }
        // IE
        else if (document.selection)
        {
                var r = document.body.createTextRange();
                r.moveToElementText(e);
                r.select();
        }
}

window.onload = resizeimg;
function resizeimg()
{
   if (document.getElementsByTagName)
   {
      for (i=0; i<document.getElementsByTagName('img').length; i++)
      {
         im = document.getElementsByTagName('img')[i];
         if (im.width > 950 && im.src != "http://www.skitalk-24.de/styles/fisubice2/imageset/site_logo.gif" && im.src != "http://www.skitalk-24.de/styles/fisubice2/imageset/site_logo_halloween.gif" && im.src != "http://www.skitalk-24.de/styles/fisubice2/imageset/site_logo_snow.gif" && im.src != "http://www.skitalk-24.de/styles/fisubice2/imageset/site_logo_sun.gif")
         {
            im.style.width = '950px';
            /*eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=400,height=400,scrollbars=1,resizable=1'); pop.focus();\")");
            eval("pop" + String(i) + " = new Function(\"pop = window.open('" + im.src + " ','fullscale','width=" + im.width + ",height=" + im.height + ",scrollbars=1,resizable=1'); pop.focus();\")");
            eval("im.onclick = pop" + String(i) + ";");
            if (document.all) im.style.cursor = 'hand';
            if (!document.all) im.style.cursor = 'pointer';*/
            //im.title = 'Click Here To See Image Full Size ';
         }
      }
   }
}