﻿// JScript File
// Imprimiendo Flashs

function ImprimirPublicidad2(ruta,ruta2,url,target,w,h){
    
    if (ruta=='activos/swfs/publicidad_consultas_de_tramites_en_linea'){
        document.write('<a href="http://www.e.cnr.gob.sv" target="_blank"><img src="activos/imagenes/publicidad/consultas_en_linea.jpg" border="0" /></a>');
    }
    
    else{
    
        // Version check based upon the values entered above in "Globals"
        var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
        // Check to see if the version meets the requirements for playback
        if (hasReqestedVersion) {
            // if we've detected an acceptable version
            // embed the Flash Content SWF when all tests are passed
            AC_FL_RunContent(
                        "src", ruta + '?r=' + Math.round(Math.random() * 99999),
                        "width", w,
                        "height", h,
                        "align", "middle",
                        "id", "detectionExample",
                        "quality", "high",
                        "bgcolor", "#FFFFFF",
                        "name", "detectionExample",
                        "allowScriptAccess","sameDomain",
                        "type", "application/x-shockwave-flash",
                        'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                        "pluginspage", "http://www.adobe.com/go/getflashplayer",
                        "wmode","transparent"
            );
        } else {  // flash is too old or we can't detect the plugin
            var alternateContent = '<div style="width:' + w + 'px; height:' + h + 'px; border: solid 0px #000000; color:#FFFFFF;">'
            + ''
            + '<a href="' + url + '" target="' + target + '"><img src="activos/imagenes/publicidad/' + ruta2 + '" border="0" /></a></div>';
            document.write(alternateContent);  // insert non-flash content
        }
     }
}

function ImprimirEncabezado(ruta,w,h){
    document.write('<a href="http://www.e.cnr.gob.sv" target="_blank"><img src="' + ruta + '" border="0" /></a>');    
    /*
    // Version check based upon the values entered above in "Globals"
    var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    // Check to see if the version meets the requirements for playback
    if (hasReqestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed
        AC_FL_RunContent(
                    "src", ruta + '?r=' + Math.round(Math.random() * 99999),
                    "width", w,
                    "height", h,
                    "align", "middle",
                    "id", "detectionExample",
                    "quality", "high",
                    "bgcolor", "#FFFFFF",
                    "name", "detectionExample",
                    "allowScriptAccess","sameDomain",
                    "type", "application/x-shockwave-flash",
                    'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                    "pluginspage", "http://www.adobe.com/go/getflashplayer",
                    "wmode","transparent"
        );
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = '<div style="width:' + w + 'px; height:' + h + 'px; border: solid 0px #000000; color:#FFFFFF;">'
        + ''
        + '<a href="http://www.e.cnr.gob.sv/" target="_blank"><img src="activos/imagenes/encabezado_alternativo.jpg" border="0" /></a></div>';
        document.write(alternateContent);  // insert non-flash content
    }*/
}

function ImprimirEncabezadoDependencias(ruta,w,h){
    // Version check based upon the values entered above in "Globals"
    var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    // Check to see if the version meets the requirements for playback
    if (hasReqestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed
        AC_FL_RunContent(
                    "src", ruta,
                    "width", w,
                    "height", h,
                    "align", "middle",
                    "id", "detectionExample",
                    "quality", "high",
                    "bgcolor", "#FFFFFF",
                    "name", "detectionExample",
                    "allowScriptAccess","sameDomain",
                    "type", "application/x-shockwave-flash",
                    'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                    "pluginspage", "http://www.adobe.com/go/getflashplayer",
                    "wmode","transparent"
        );
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = '<div style="width:' + w + 'px; height:' + h + 'px; border: solid 0px #000000; color:#FFFFFF;">'
        + ''
        + '<a href="http://www.e.cnr.gob.sv/" target="_blank"><img src="activos/imagenes/encabezado_alternativo_small.jpg" border="0" /></a></div>';
        document.write(alternateContent);  // insert non-flash content
    }
}

function ImprimirContenedorMultimedia(ruta,w,h){
    // Version check based upon the values entered above in "Globals"
    var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
    // Check to see if the version meets the requirements for playback
    if (hasReqestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed
        AC_FL_RunContent(
                    "src", ruta,
                    "width", w,
                    "height", h,
                    "align", "middle",
                    "id", "detectionExample",
                    "quality", "high",
                    "bgcolor", "#FFFFFF",
                    "name", "detectionExample",
                    "allowScriptAccess","sameDomain",
                    "type", "application/x-shockwave-flash",
                    'codebase', 'http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab',
                    "pluginspage", "http://www.adobe.com/go/getflashplayer",
                    "wmode","transparent"
        );
    } else {  // flash is too old or we can't detect the plugin
        var alternateContent = '<div style="width:' + w + 'px; height:' + h + 'px; border: solid 0px #000000; color:#FFFFFF;">'
        + ''
        + '<a href="http://www.adobe.com/go/getflash/" target="_blank"><img src="activos/imagenes/alternativo_de_video.jpg" border="0" /></a></div>';
        document.write(alternateContent);  // insert non-flash content
    }
}
