
//Esta funcion se utiliza para resorlver un problema de redimension en ie6
function resize() 
{
    document.getElementById("global").style.width = (document.body.clientWidth < 1024 ? "850px" : "85%")
    try 
    {
        var w;
        if (document.body.clientWidth < 1024) { w = 570 }
        else { w = (parseInt((document.body.clientWidth * 85) / 100) - 280) }
        document.getElementById("apt_secc").style.width = w + "px"
    } 
        catch (e) { }
    }
/*
function resize() {
    document.getElementById("global").style.width = (document.body.clientWidth < 1024 ? "850px" : "85%")

    try {
        var w;
        if (document.body.clientWidth < 1024) { w = 570 }
        else { w = (parseInt((document.body.clientWidth * 85) / 100) - 280) }
        document.getElementById("apt_secc").style.width = w + "px"

    } catch (e) { }
}

function Sombrear(targetElement, shadowColor, shadowOffset) {
    if (typeof (targetElement) != 'object') {
        targetElement = document.getElementById(targetElement);
    }
    var value = targetElement.firstChild.nodeValue;
    targetElement.style.position = 'relative';
    targetElement.style.zIndex = 1;

    var newEl = document.createElement('span');
    newEl.appendChild(document.createTextNode(value));
    newEl.className = 'shadowed';
    newEl.style.color = shadowColor;
    newEl.style.position = 'absolute';
    newEl.style.left = shadowOffset + 'px';
    newEl.style.top = shadowOffset + 'px';
    newEl.style.zIndex = -1;

    targetElement.appendChild(newEl);
}*/
function fComHash()
{
    document.write("<input type=\"hidden\" name=\"comHash\" value=\"" + Math.floor(Math.random()*1000) + "\">");
    return true;
}

String.prototype.formatMoney = function(c, d, t){
    var n = this, n = n.toString().replace(/(\.)(\d{3})/g, "$2").replace(',', '.'),
    c = isNaN(c = Math.abs(c)) ? 2 : c, d = d == undefined ? "," : d, t = t == undefined ? "." : t, s = n < 0 ? "-" : "",
    i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0;
    return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t)
    + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : "");
};

function CopyCode(elemName){var obj=document.getElementById(elemName);window.clipboardData.setData("Text",obj.innerText)}
