﻿

function SlideNewWindow(URL) {
    var wh = ""

    var wf = "";
    wf = wf + "width=500";
    wf = wf + ",height=260";
    wf = wf + ",resizable=no";
    wf = wf + ",scrollbars=no";
    wf = wf + ",menubar=no";
    wf = wf + ",toolbar=no";
    wf = wf + ",directories=no";
    wf = wf + ",location=no";
    wf = wf + ",status=no";

    if (navigator.appVersion.charAt(0) >= 4) {
        var sw = screen.width - 20;
        var sh = screen.height;
        var newwidth = 500;
        var newheight = 260;
        var positionleft = (sw - newwidth) / 2;
        var positiontop = ""
        positiontop = (sh - newheight) / 2.5;
    }

    //for (x = 1; x < 12; x = x + 1) { URL = URL.replace("&", "&amp;"); }
    newwindow = window.open("http://www.cnh.gob.mx/Outer.aspx?url=" + URL, "mywindow", wf);
    newwindow.focus()
    if (navigator.appVersion.charAt(0) >= 4) {
        for (width1 = 1; width1 < positionleft; width1 = width1 + 1)
            newwindow.moveTo(width1, positiontop)
    }
    return newwindow;
}

function setSize(width, height) {
    if (window.outerWidth) {
        window.outerWidth = width;
        window.outerHeight = height;
        window.scrollbars = 0;
        window.menubar = 0;
    }
    else if (window.resizeTo) {
        window.resizeTo(width, height);
        window.scrollbars = 0;
        window.menubar = 0;
    }
    else {
        alert("Not supported.");
    }
}

