var confirmMsg  = 'Do you really';

function confirmLink(theLink, theSqlQuery)
{
    if (confirmMsg == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMsg + '\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '';
    }

    return is_confirmed;
}
var confirmMje  = 'Enseguida Ud.';

function confirmPost(theLink, theSqlQuery)
{
    if (confirmMje == '' || typeof(window.opera) != 'undefined') {
        return true;
    }

    var is_confirmed = confirm(confirmMje + ':\n' + theSqlQuery);
    if (is_confirmed) {
        theLink.href += '';
    }

    return is_confirmed;
}

function abrirURL(URL, ancho, alto){
  der=(screen.width-ancho)/2;
  arriba=(screen.height-alto)/2;
  string="toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+der+",top="+arriba+"";
  fin=window.open(URL,"",string);
}
function openURL(URL, ancho, alto){
  der=(screen.width-ancho)/2;
  arriba=(screen.height-alto)/2;
  string="toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width="+ancho+",height="+alto+",left="+der+",top="+arriba+"";
  fin=window.open(URL,"",string);
}
var wm_openPopup=null;

function wm_hidePopup() {
if (wm_openPopup!=null) {wm_openPopup.style.display="none";wm_openPopup=null;}
document.onclick=null;
}

function wm_toggleDiv(objname) {var obj=document.all(objname); if (obj.style.display=="none") obj.style.display="block"; else obj.style.display="none";}

function wm_showPopup(objname) {
var obj=document.all(objname);
if (obj==null) return;
if (wm_openPopup!=null) {
	if (wm_openPopup==obj) {wm_hidePopup();return;}
	wm_hidePopup();
	}
wm_openPopup=obj; obj.style.display="block"; event.cancelBubble=true; document.onclick=wm_hidePopup;
}

function wm_loadScript(url) {document.all("JSHIDDEN").src=url;}


function close_window() {
    window.close();
}
