function openWin(url,w,h,pos,attr,name)
{
	var a_attr = new Array ('scrollbars','menubar','toolbar','location','status','titlebar','hotkeys');
	if( !attr ) attr = '10000100';
	if( !w ) w = 600;
	if( !h ) h = 400;
	var params = 'width='+w+',height='+h;
	for( var i=0; i<a_attr.length; i++ ) params += ','+a_attr[i]+'='+attr.charAt(i);
	if( (parseInt(navigator.appVersion) >= 4 ) && pos=='center' ) { x = (screen.width - w) / 2; y = (screen.height - h) / 2; }
	else if ( pos=='default' ) x=y=false;
	else if ( pos ) { var a_pos = pos.split(','); x = a_pos[0]; y = a_pos[1]; }
	if( x<0 ) x=0;
	if( y<0 ) y=0;
	if( x && y ) params += ',xposition='+x+',left='+x+',yposition='+y+',top='+y;
	if( !name ) name = "newWin";
	var newWin = window.open( url, name, params );
}

function ViewOrama(a) { openWin('vieworama.php?id='+a,1008,611,'center'); }
