// "only 1 open at a time" popup function //
function openPop(url,width,height,addloptions){
	var xspot=Math.round((scrnwidth/2)-(width/2));
	var yspot=Math.round((scrnheight/2)-(height/2)-30);
	features = "height="+height+",width="+width+",top="+yspot+",screenY="+yspot+",left="+xspot+",screenX="+xspot;
	if (addloptions && addloptions!="") { features += ","+addloptions; }
	if (!popupWin || popupWin.closed){
		popupWin = window.open(url, '', features);
	}
	else {
		window.popupWin.close();
		popupWin = window.open(url, '', features);
	}
}


// Opens pop-up to specific window size //
var popUp;
function openPopUp(url, wd, ht) {
	var features = "resizable,width=" + wd + ",height=" + ht;
	if (!popUp || popUp.closed) {
		popUp = window.open(url, "", features);
	} else {
		popUp.close();
		popUp = window.open(url, "", features);
	}
}

// Builds random, complete image tag for home page
var imgqty=3;  // Set this to QTY of available images. Image filenames are zero-indexed (1st one is 0).
var rndm=Math.round(Math.random() * (imgqty-1));
var imgstr='<img src="images/home_' + rndm + '.jpg" width="765" height="200" border="0" alt="Panic Room">';

