function popupwindow(fileloc, winname, winheight, winwidth, winscroll, winmenu, wintool, winlocation, winsize, winstatus, winfull, toppos, leftpos) {

  if(!winheight) {winheight=450}

  if(!winwidth) {winwidth=400}

  if(!winscroll) {winscroll=0}

  if(!winmenu) {winmenu=0}

  if(!wintool) {wintool=0}

  if(!winlocation) {winlocation=0}

  if(!winsize) {winsize=0}

  if(!winstatus) {winstatus=0}

  if(!winfull) {winfull=0}

  if(!toppos) {toppos=50}

  if(!leftpos) {leftpos=60}

//variables format = filename, window name, window width, window height

//true (1) or false (0) values = scrollbars, menubar, toolbar, url box, resizable, status bar, fullscreen

//sample href="#" onclick="popupwindow('popups/filename.htm', 'windowname', '380', '450', 1, 0, 0, 0, 0, 0, 0, 50, 60)"

    windowbits = "height=" + winheight + ",width=" + winwidth + ",scrollbars=" + winscroll + ",menubar=" + winmenu + ",toolbar=" + wintool + ",location=" + winlocation + ",resizable=" + winsize + ",status=" + winstatus + ",fullscreen=" + winfull + ",top=" + toppos + ",left=" + leftpos + ",channelmode=0,dependent=0,directories=0"

    var newwindow = window.open(fileloc,winname,windowbits)

    newwindow.focus()

}

function popupwindow2(fileloc, winname, winheight, winwidth, winscroll, winmenu, wintool, winlocation, winsize, winstatus, winfull, toppos, leftpos) {

  if(!winheight) {winheight=450}

  if(!winwidth) {winwidth=400}

  if(!winscroll) {winscroll=0}

  if(!winmenu) {winmenu=0}

  if(!wintool) {wintool=0}

  if(!winlocation) {winlocation=0}

  if(!winsize) {winsize=0}

  if(!winstatus) {winstatus=0}

  if(!winfull) {winfull=0}

  if(!toppos) {toppos=50}

  if(!leftpos) {leftpos=60}

//variables format = filename, window name, window width, window height

//true (1) or false (0) values = scrollbars, menubar, toolbar, url box, resizable, status bar, fullscreen

//sample href="#" onclick="popupwindow('popups/filename.htm', 'windowname', '380', '450', 1, 0, 0, 0, 0, 0, 0, 50, 60)"

    windowbits = "height=" + winheight + ",width=" + winwidth + ",scrollbars=" + winscroll + ",menubar=" + winmenu + ",toolbar=" + wintool + ",location=" + winlocation + ",resizable=" + winsize + ",status=" + winstatus + ",fullscreen=" + winfull + ",top=" + toppos + ",left=" + leftpos + ",channelmode=0,dependent=0,directories=0"

    var newwindow = window.open(fileloc,winname,windowbits)

}


