
// Start PopUp IFrame Window -- By Ron

function popfuction() {

var item = 'nuvilexvideo.html';

var IFWidth = 700;      // popup window width size
var IFHigh = 425;      // popup window height size
var myLEFTadj = 100;  // popup window ffset adjust > OK To Use Negtive Values
var myTOPadj = 60;

var myTestF = 1;
var show = 'visible';

function getObj(name) {  // Function To Get HTML Object And Style
if (document.getElementById) {
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all) {
this.obj = document.all[name];
this.style = document.all[name].style;
}
}

var x = new getObj('popup'); // Must Be The ID/NAME Of The Iframe

window.ScrollPopUp = function() { // Start of PopUp IFrame Scroll function

var MyInerWidth, MyInerHeight, d=document;  //  Start Of determine ViewPort Width And Height
if (typeof window.innerWidth!='undefined') {
MyInerWidth = window.innerWidth;
MyInerHeight = window.innerHeight;
} else {
if (d.documentElement &&
typeof d.documentElement.clientWidth!='undefined' &&
d.documentElement.clientWidth!=0) {
MyInerWidth = d.documentElement.clientWidth
MyInerHeight = d.documentElement.clientHeight
} else {
if (d.body &&
typeof d.body.clientWidth!='undefined') {
MyInerWidth = d.body.clientWidth
MyInerHeight = d.body.clientHeight
}
}
}

var MyScrollLft, MyScrollTop, d=document;  //  Start Of determine ViewPort ScrollWidth And ScrollHeight
if (d.documentElement &&
typeof d.documentElement.scrollLeft!='undefined' &&
d.documentElement.scrollLeft!=0) {
MyScrollLft = d.documentElement.scrollLeft
MyScrollTop = d.documentElement.scrollTop
} else {
if (d.body &&
typeof d.body.scrollLeft!='undefined') {
MyScrollLft = d.body.scrollLeft
MyScrollTop = d.body.scrollTop
}
}

var LeftEdg = (MyInerWidth - IFWidth) / 2;
var TopEdg = (MyInerHeight - IFHigh) / 2;
var IFLeft = LeftEdg + myLEFTadj;
var IFTop = TopEdg + myTOPadj;

if (myTestF == 1) {
frames[0].location.href = item;  // Note If More Than 1 IFrame Change Number To Target Frame
x.style.top = IFTop+'px';
x.style.left = IFLeft+'px';
x.style.width = IFWidth+'px';
x.style.height = IFHigh+'px';
x.style.visibility = show;
}

myTestF = 10;

x.style.top = IFTop + MyScrollTop+'px';
x.style.left = IFLeft + MyScrollLft+'px';

} // End of PopUp IFrame Scroll function

StopScroller = setInterval('ScrollPopUp()',1)

}
// End of PopUp IFrame Window function -- By Ron



// Start of Close PopUp IFrame Window function
function HideIFrame(){

var page = 'blank.html'

function getObj(name) {  // Function To Get HTML Object And Style
if (document.getElementById) {
this.obj = document.getElementById(name);
this.style = document.getElementById(name).style;
}
else if (document.all) {
this.obj = document.all[name];
this.style = document.all[name].style;
}
}

var y = new getObj('popup'); // Must Be The ID/NAME Of The Iframe

var hide = 'hidden';

var IFClose = 1;

//clearInterval(StopScroller);

y.style.visibility = hide;
y.style.width = IFClose+'px';
y.style.height = IFClose+'px';
frames[0].location.href = page;  // Note If More Than 1 IFrame Change Number To Target Frame
}

// End of Close PopUp IFrame Window function -- By Ron