var args = new Object();

//var win=null;
function NewWindow_old(mypage,args,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
//settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";
settings = " dialogHeight:" + h + "px; dialogWidth:" + w + "px; dialogTop:" +  mytop + "px; dialogLeft:" + myleft + "px; dialogHied:yes; help:no;" +
		   " resizable:no; scroll:no; status:no;";
alert( 'new' );
window.winref=window.showModalDialog(mypage,args,settings );

//window.winref.focus();
}

function NewWindow(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";

window.open(mypage,myname,settings );

//window.winref.focus();
}

function NewWindowrpt(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";

window.winref=window.open(mypage,myname,settings );

//window.winref.focus();
}

function check_win_open(){
	if ( window.winref && !window.winref.closed ){
//		return true;
		window.winref.close();
		window.winref=null;
	} 
	return false;
} // check_win_open()

function NewWindowdoc(mypage,myname,w,h,pos,infocus){
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + mytop + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=no";

window.winref=window.open(mypage,myname,settings );

//window.winref.focus();
}

function get_args_old(){
	args.startm = startm;
	args.starty = starty;
	args.endm = endm;
	args.endy = endy;
	args.url = rel_url;
	args.rel_no = rel_no;
	args.from_sl = from_sl;
	args.to_sl = to_sl;
	args.blnRemove = blnRemove;
	args.blnAdd = blnAdd;
	args.blnChange = blnChange;
	args.cur_index = cur_index;
	args.rel_index = rel_index;
	args.rel_name = rel_name;
	args.hidIndex = frmData.hidIndex.value;
	args.hidRelEntities = hidRelEntities.value;
} // end get_args()
function get_args(){
} // end get_args()