// JavaScript Document
// Window code modified from Eric King & from the JavaScript DHTML Cookbook
// Featured on Dynamic Drive script library (http://www.dynamicdrive.com

//Main VR windows
var mainVR;
function makeWindowVR(URL){
if (!mainVR || mainVR.closed) {
	if(document.all && navigator.platform.toLowerCase().indexOf('mac')!=-1) {
		var w = 700;
		var h = 525
		LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
		mainVR=window.open(URL,"name",settings);
} else {
	var width = 700;
    var height = 525;
    var left = parseInt((screen.availWidth/2) - (width/2));
    var top = parseInt((screen.availHeight/2) - (height/2));
    var settings = "width=" + width + ",height=" + height + ",status=yes,resizable=no,toolbar=no,menubar=no,left=" +left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
 mainVR = window.open(URL, "name", settings);
}
} else {
mainVR.focus()
}
}

// Photo Gallery pop-up window
var photos;
function makePopWindow(url) {
photos = window.open(url, 'myWin2', 'width=536,height=400,scrollbars=no,resizable=no,status=no,toolbar=no, menubar=no');
photos.focus()
}



//Video Pop-up window
var videos;
function makeVids(url) {

if (!videos || videos.closed) {

videos = window.open(url, 'myWin3', 'width=320,height=176,scrollbars=no,resizable=no,status=no,toolbar=no, menubar=no');
videos.focus()
} else {
videos.focus()
}
}

