function openWindow(URL, name, args){
	var w;
	w= window.open(URL, name, args);
	w.opener= self;
	w.focus();
}

function openDialog(URL, name, width, height, left, top, sb){
	var wndNuevaVentana= null;
	
	ssb='no'
	if (sb==1) ssb='yes'
	

	args= "width=" + width + ", height=" + height + ", resizable=yes, scrollbars=" + ssb + ", status=no, left=" + left + ", top=" + top;

	openWindow(URL, name, args);
}

function openVBP_Old(URL, name, width, height){
	var wndNuevaVentana= null;
	var w;
	args= "width=" + width + ", height=" + height + ", resizable=yes, scrollbars=yes, status=no, left=0, top=0, 'modal'";
	w= window.open(URL, name, args);
	w.opener.close();
	w.focus();
}

function closeDialog(_window, refresh){
	_window.close();
	if(_window.opener){
		if(!_window.opener.closed){
			_window.opener.focus();
			if(refresh){
				_window.opener.document.location.reload();
			}
		}
	}
}

function loadSuppliers(_window, sDestiny){
	 _window.location.href=sDestiny;
}

function replaceTextBoxes(_control, textOut, textIn) {
	if(_control.value == textOut) _control.value = textIn;
}

function CloseArticleScanner() {
	window.opener.document.location.reload();
}


