/*
 *------------------------------------------------------------------
 * appsui.js --  Applications User Interface Utilities
 *
 * Copyright (c) 2003, 2004 by cisco Systems, Inc.
 * All rights reserved.
 *------------------------------------------------------------------
 */

function openChildWindow( appuri, windowname ) {
 
	var appwindow = window.open( appuri , windowname, "toolbar=yes,status=yes,top=10,left=10,outerWidth=790,outerHeight=500,width=790,height=500,resizable=yes");
	appwindow.focus();
}

function closeWindow() {

	top.window.close();
}

function openPopup( popupuri, windowname ) {

	var popup = window.open( popupuri , windowname, "toolbar=no,status=no,top=100,left=200,width=300,height=190,resizable=no");
	popup.focus();
}


function openWindow(appuri, windowname) {
    var appwindow = window.open( appuri , windowname);
    appwindow.focus();
}

function showError(errorMsg, prefix) {
	if(prefix) {
		prefix += ':\n\n';
	}
	else {
		prefix = 'Error:\n\n';
	}
	var dispStr = prefix + errorMsg;
	alert(dispStr);
}

function showWarning(warningMsg, prefix) {
	if(prefix) {
		prefix += ':\n\n';
	}
	else {
		prefix = 'Warning:\n\n';
	}
	var dispStr = prefix + warningMsg;
	alert(dispStr);
}

function getConfirmation(dispStr, prefix) {
	if(prefix) {
		prefix += ':\n\n';
	}
	else {
		prefix = 'Attention:\n\n';
	}
	msg = prefix + dispStr;
	return confirm(msg);
}
