
function detectar_existente(obj)
{
    return (typeof obj !="undefined");
}

function pop_img(img_path, popwidth, popheight, title, descripcion_img)
{
    
    var int_windowLeft = (screen.width - popwidth) / 2;
    var int_windowTop = (screen.height - popheight) / 2;
    
    var winattributes='width='+popwidth+',height='+popheight+',resizable=yes,left='+int_windowLeft+',top='+int_windowTop;
    if (typeof pop_ventana=="undefined" || pop_ventana.closed)
        pop_ventana=window.open("","",winattributes);
    else
    {
        pop_ventana.resizeTo(popwidth, popheight+30);
    }

    pop_ventana.document.open();
    pop_ventana.document.write('<html><head><title>'+title+'</title><link href="Uploads/Css/content.css" rel="stylesheet" type="text/css" /></style><head><body><img src="' + img_path + '" style="margin-bottom: 0.5em"><br><table bgcolor="#e0e8e9" cellpadding="10" width="100%" border="0" class="PictureCaptionPopUp"><tr><td>' + descripcion_img + '</td></tr></table></body></html>')
    
    pop_ventana.document.close();
    pop_ventana.focus();
}

function pop_window(url, name, width, height)
{
	var top = (screen.height - height) / 2;
	var left = (screen.width - width) / 2;
	var wnd = window.open(url, name, 'all=no,scrollbars=yes,'+'width='+width+',height='+height+',top='+top+',left='+left);
}