// JavaScript Document
/*
Open Centered Popup Window Script-
© DHTML Shock (www.dhtmlshock.com)
To add more shock to your site, visit www.DHTML Shock.com
*/
function OpenBrWindow(theURL,winName,features,myWidth,myHeight,isCenter){//v3.0
if(window.screen)if(isCenter)if(isCenter=="true"){
var myLeft=(screen.width-myWidth)/2;
var myTop=(screen.height-myHeight-120)/2;
features+=(features!='')?',':'';
features+=',left='+myLeft+',top='+myTop;
}
window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}
function RefrescarCerrar()
{
window.opener.location.reload();
window.close()
}
function CerrarVentana()
{
window.close()
}
function RedireccionarCerrar(r_url)
{
window.opener.location=r_url;
window.close()
}

function toggleDisplay() {
var elements = Array.prototype.slice.call(arguments);
arrayEach(elements, function (arg) {
var element = ref(arg);
if (element) {
element.style.display = (element.style.display != "none" ? "none" : "");
}
});
}

function arrayEach(array, func) {
/* This could be optimized using tricks that don't rely on constantly checking the length.
470 Checking the length is slow because in many browsers, it requires a full iteration. */
for (var i = 0; i < array.length; i++) func(array[i]);
}

function ref(instance_or_id) {
return (typeof(instance_or_id) == "string") ? document.getElementById(instance_or_id) : instance_or_id;
}