
/*****
function imgview(imgsrc,imgwidth,imgheight,slt)
{
	return false;

}
*****/

function imgview(imgsrc,imgwidth,imgheight,slt)
{
	ppscr = true;
	if( slt == "0" )
	{
		ap_openwin("http://www.exblog.jp/blog_logo.asp?slt=" + slt + "&imgsrc=" + imgsrc, "imgpopup", imgwidth, imgheight, 1, true, false, false);
	}
	else
	{
		if ( imgwidth > 700 ){
			ppscr = true;
			imgwidth = 700;
		}
		if ( imgheight > 500 ){
			ppscr = true;
			imgheight = 500;
		}
		if ( ppscr == true )
			imgwidth = imgwidth + 18;
		ap_openwin("http://www.exblog.jp/blog_logo.asp?slt=" + slt + "&imgsrc=" + imgsrc, "imgpopup", imgwidth, imgheight, 1, true, ppscr, false);
	}
}

function ap_openwin( winurl, winnm, winw, winh, adjust, resizable, scrollable, status ) 
{
	var param = ap_getwinparam( winw, winh, adjust, resizable, scrollable, status );
	newwin = window.open( winurl, winnm, param );
	return( newwin );
}

function ap_getwinparam( winw, winh, adjust, resizable, scrollable, status ) 
{
    var left, top;
    switch( adjust ) {
	case 1: //top left aligned
		left = top = 0;
		break;
	case 2: //top right aligned
		left = window.screen.availWidth - winw;
		top = 0;
		break;
	case 3: //centered
		left = (window.screen.availWidth - winw) / 2;
		top = (window.screen.availHeight - winh) / 2;
		break;
	case 4: //bottom left aligned
		left = 0;
		top = window.screen.availHeight - winh;
		break;
	case 5: //bottom right aligned
		left = window.screen.availWidth - winw - 8;
		top = window.screen.availHeight - winh;
		break;
    }
    var option = "";
    if( adjust > 0 ) option = "left=" + left + ",top=" + top;
    option = option + ",width=" + winw + ",height=" + winh;
    if( (!resizable) || (resizable == false) ) 
        option += ",resizable=no";
    else 
        option += ",resizable=yes";
    if( (!scrollable) || (scrollable == false) ) 
        option += ",scrollbars=no";
    else
        option += ",scrollbars=yes";
    if( (!status) || (status == false) ) 
        option += ",status=no";
    else
        option += ",status=yes";
    param = "toolbar=no," + option + ",directories=no,menubar=no";
    return( param );
}

