/*
Copyright

Ecuador, February - March 2008

This file is part of dtsEjb project.

dtsEjb project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

dtsEjb project is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with dtsEjb project.  If not, see <http://www.gnu.org/licenses/>.
*/

function esIE() {
	if (document.all) {
		return true;
	}
	return false;
}

function getWindowWidth() {
	return document.body.clientWidth;
}

function getWindowHeight() {
	return document.body.clientHeight;
}

function openRutaPrintPopup() {
	var rutaPrintWindow = window.open ("/dts/app/hojaRutaPrint.jsf","rutaPrintWindow","menubar=0,scrollbars=1,resizable=0,status=0,width="+getWindowWidth()+",height="+getWindowHeight());
	rutaPrintWindow.focus();
}

function openNotificacionesPrintPopup() {
	var notificacionesPrintWindow = window.open ("/dts/app/copiasNotificacionPrint.jsf","copiasPrintWindow","menubar=0,scrollbars=1,resizable=0,status=0,width="+getWindowWidth()+",height="+getWindowHeight());
	notificacionesPrintWindow.focus();
}


function openAlPublicoNotificacionesPrintPopup() {
	var notificacionesPrintWindow = window.open ("/dts/copiasNotificacionAlPublicoPrint.jsf","copiasPrintWindow","menubar=0,scrollbars=1,resizable=0,status=0,width="+getWindowWidth()+",height="+getWindowHeight());
	notificacionesPrintWindow.focus();
}


function disableControls (formName,idList) {
	var ids = idList.split(",");
	for (i=0; i<ids.length;i++) {
		var controlId = ids[i];
		var control = document.getElementById(formName + ":" + controlId);
		if (control) {
			control.disabled = true;
		}
	}
}
