var updateField;

function popupper(theurl,winname,features) {
  
  if (!features) {
	features = "scrollbars=1,resizable=no,height=300, width=300";
  }
		
  msgWindow = window.open(theurl,winname,features);
  if(msgWindow != null && msgWindow.opener != null) msgWindow.opener=window;
  msgWindow.focus();
  
  return msgWindow;
}


function filemanpopupper(theurl,winname,features, fieldName)
{
	msgWindow = popupper(theurl, winname, features);
	
	setUpdateField(fieldName);
	
	return msgWindow;
	
	//msgWindow.document.fieldName = fieldName;
	
	// browser.fieldName = fieldName;
	
	// alert(browser.fieldName);
	
}


function setUpdateField(fieldName)
{
	updateField = fieldName;
	
}



function updateFieldsValue(fieldValue)
{
	theElement = this.document.getElementById(updateField);
	theElement.value = fieldValue;
	// alert(fieldValue);
}



function confirmator(confirmText, onTrueForwardTo)
{
	input_box=confirm(confirmText);
	if (input_box==true)
	{ 
		top.document.location = onTrueForwardTo;
	}
}


