window.name = "_blank";
self.name   = "_blank";

function snelmenu(targ,selObj,restore)
{
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
}

function myWindow(picture)
{

    var newwindow = window.open("","myWin","width=650,height=650,toolbar=0,status=0,menubar=0,scrollbars=0,resizable=0");

    with (newwindow)
    {
        var contents="<HTML><HEAD><TITLE>www.superpimp.nl</TITLE></HEAD> \
        <BODY BGCOLOR='#FFFFFF' TEXT='#99CC00' LEFTMARGIN=0 TOPMARGIN=0> \
        <table width='100%' height='100%'><tr><td align=center valign='top'> \
        <IMG SRC='" + picture +
                 "'onLoad='javascript:window.resizeTo(this.width+30,this.height+60);'> \
        </td></tr><tr><td align=center><a href='javascript:nix();' onclick='javascript:window.close();'>Sluiten</a></td></tr></table> \
        </BODY></HTML>";

        document.open("text/html");
        document.write(contents);
        document.close();
    }
}

function imgPopUp(img,w,h)
{
    l = parseInt((screen.width-w)/2)
    t = parseInt((screen.height-h)/2)
    attribs = 'width='+(w+20)+',height='+(h+20)+',left='+l+',top='+t
    open(img,'imgWin',attribs)
}


function midurl()
{
    var myString = unescape(window.location);
    if ( myString.indexOf("?") != -1 )
        midstring = "&";
    else
        midstring = "?";
    return midstring;
}

function timer(tout)
{
    if (tout>=1)
    {
        m = Math.floor(tout/60)
        s = tout%60
        if (m<10)
        {
            m = "0"+m
        }
        if (s<10)
        {
            s = "0"+s
        }
        if (m == 1)
        {
            text = m+" minuut";
        }
        else
        {
            if (m == 0)
            {
              text = s+" seconden";
            }
            else
            {
             text = m+" minuten";
            }
        }
        document.tel['teller'].value = text;

        if (tout<100)
        {
            if (tout==1)
            {
                alert("Uw sessie is verlopen!")
            }
            window.status = "SESSION TIMEOUT: "+m+":"+s;
        }
        tout--
        id=setTimeout("timer("+tout+")",1000)
    }


}
