﻿var URLpage1 = 1;
var URLpath1 = "Home/Panel1/";
//var Fullpath = URLpath1 + URLpage1;
//alert(Fullpath);


function next1() {
    //alert(URLpage1);
    if (URLpage1 == 3) {
        URLpage1 = 1;
        //alert(URLpage1);
        Fullpath = URLpath1 + URLpage1;
        frames['panel1'].location.href = Fullpath;

    }
    else {
        URLpage1 = URLpage1 + 1;
        //alert(URLpage1);
        Fullpath = URLpath1 + URLpage1;
        frames['panel1'].location.href = Fullpath;
    }


}
function prev1() {

    if (URLpage1 == 1) {
        URLpage1 = 3;
        //alert(URLpage1);
        Fullpath = URLpath1 + URLpage1;
        frames['panel1'].location.href = Fullpath;
    }
    else {
        URLpage1 = URLpage1 - 1;
        //alert(URLpage1);
        Fullpath = URLpath1 + URLpage1;
        frames['panel1'].location.href = Fullpath;
    }


}


function showBox() {
    var width = document.documentElement.clientWidth + document.documentElement.scrollLeft;
    var iframeloc1 = "<iframe src=" + "'" + "Panel1/" + URLpage1 + "full" + "'" + "frameborder=" + "'" + "0" + "'" + "name=" + "'" + "panel1" + "'" + "width=" + "'" + "233" + "'" + "height=" + "'" + "149" + "'" + "></iframe>"
    //alert(iframeloc1);

    var layer = document.createElement('div');
    layer.style.zIndex = 2;
    layer.id = 'layer';
    layer.style.position = 'absolute';
    layer.style.top = '0px';
    layer.style.left = '0px';
    layer.style.height = document.documentElement.scrollHeight + 'px';
    layer.style.width = width + 'px';
    layer.style.backgroundColor = 'black';
    layer.style.opacity = '.6';
    layer.style.filter += ("progid:DXImageTransform.Microsoft.Alpha(opacity=60)");
    document.body.appendChild(layer);

    var div = document.createElement('div');
    div.style.zIndex = 3;
    div.id = 'box';
    div.style.position = (navigator.userAgent.indexOf('MSIE 6') > -1) ? 'absolute' : 'fixed';
    div.style.top = '233px';
    div.style.left = (width / 2) - (233 / 2) + 'px';
    div.style.height = '149px';
    div.style.width = '233px';
    div.style.backgroundColor = 'white';
    div.style.border = '0px solid silver';
    div.style.padding = '0px';
    document.body.appendChild(div);

    var p = document.createElement('p');
    p.innerHTML = iframeloc1;
    div.appendChild(p);

    var a = document.createElement('a');
    a.innerHTML = 'Close window';
    a.href = 'javascript:void(0)';
    a.onclick = function() {
        document.body.removeChild(document.getElementById('layer'));
        document.body.removeChild(document.getElementById('box'));
    };

    div.appendChild(a);
        }