var undefined;

// WebTV switch - this app does not use "windows" per se
var webTV = navigator.appName.indexOf( "WebTV" );

// util.js - written by: Mr G
//

// showPix
//
function showPix( pixUrl, width, height, scrollBars ) {
    var w = 450;    // initial width  - PICTURE
    var h = 400;    // initial height - PICTURE
	var ttl = "showPix";

	if ( pixUrl == "vtot.cgi" ) {
		ttl = "Votes";
	}

    // custom sizes
    if ( width != undefined ) {
        w = width;
    }
    if ( height != undefined ) {
        h = height;
    }

    // compute new left/top position based on width/height and screen size
    var l = ( screen.availWidth  / 2 )-( w / 2 );
    var t = ( screen.availHeight / 2 )-( h / 2 );

    // create initial window options
    if ( scrollBars == true ) {
        var opts = "scrollbars=yes,toolbar=no,menubar=no,status=no,width=" + w + ",height=" + h + ",left=" + l + ",top=" + t;
    }
    else {
        var opts = "scrollbars=no,toolbar=no,menubar=no,status=no,width=" + w + ",height=" + h + ",left=" + l + ",top=" + t;
    }

    if ( webTV == -1 )
        window.open( "/hawaii/"+pixUrl, ttl, opts );
    else
        location = pixUrl;  // change location instead

    // return value desired for "ONCLICK" event
    return false;
}

