// SuperPop v1.5 . demogorgon@deepart.org . http://www.deepart.org

	function sPop(link, name, wdth, hght) { // Usage: <a href="javascript:sPop('http://www.theurl.com/webpage.html','unique_window_name',width_in_pixels,height_in_pixels);">Example Link</a>
	var border = 1;				// 0 to remove browser window elements, else for "standard pop-up"
	var popBehind = 0;			// 0 for no pop-behind, else to send pop-up behind browser window
	var slide = 0;				// 0 for no slide, else to have pop-up slide open (only if border = 0)
	var s_lngth = 10;			// Slide speed - lower value is faster, higher value is slower
	var s_wdth = 1;
	var swdth = 0;
	var shght = 0;
	var wwdth = 0;
	var whght = 0;
	var scrll = 1;
	var frmScrll = 'no';
	var hpos = 0;
	var vpos = 0;
	var windowName = (name == "popup_window") ? name : "popupwin";
	if (navigator.appName == 'Microsoft Internet Explorer') {
		hpos=Math.ceil((screen.width-wdth)/2);
		vpos=Math.ceil((screen.height-hght)/2);
		swdth=screen.width-8;
		shght=screen.height-47;
		wwdth=wdth;
		whght=hght;
			if (whght >= shght) {
				whght=shght;
				wwdth=wwdth+13;
				vpos=0;
				scrll=1;
				frmScrll='yes';
			}
			if (wwdth >= swdth) {
				wwdth=swdth;
				hpos=0;
				scrll=1;
				frmScrll='yes';
			}
 		if (border == 0) {
			var strFrameset = "<html><head><title>" + name + "</title></head><frameset rows='*,0' framespacing=0 border=0 frameborder=0><frame name='top' src='" + link + "' scrolling=" + frmScrll + "><frame name='bottom' src='' scrolling='no'></frameset></html>";
			superPop = window.open (link, windowName, "fullscreen, toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scrll + ",resizable=0,left=" + hpos + ",top=" + vpos + ",width=" + wwdth + ",height=" + whght);
			superPop.document.open();
			superPop.document.write(strFrameset);
			superPop.document.close();
			superPop.moveTo(hpos,vpos);			
			if (slide == 0) {
				superPop.resizeTo(wwdth,whght);
			} else {
				var s_lngth = Math.ceil(wwdth/s_lngth);
				if (s_wdth == 0) {
					s_wdth = 1;
				}
				if (s_lngth >= wwdth) {
					s_lngth = wwdth;
				}
				while (s_wdth <= wwdth) {
				superPop.resizeTo(s_wdth,whght);
				s_wdth += s_lngth;
				}
				superPop.resizeTo(wwdth,whght);
			}
			if (popBehind == 0) {
			} else {
				window.focus();
			}
		} else {
			window.open (link, windowName, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scrll + ",resizable=0,left=" + hpos + ",top=" + vpos + ",width=" + wwdth + ",height=" + whght);
			if (popBehind == 0) {
			} else {
				window.focus();
			}
		}
	}
	else if (navigator.appName == 'Netscape') {
		hpos=Math.ceil((screen.width-wdth)/2);
		vpos=Math.ceil((screen.height-hght)/2);
		swdth=screen.width;
		shght=screen.height;
		wwdth=wdth+6;
		whght=hght+26;
			if (whght >= shght) {
				whght=shght;
				vpos=0;
				wwdth=wwdth+14;
				scrll=1;
				frmScrll='yes';
			}
			if (wwdth >= swdth) {
				wwdth=swdth;
				hpos=0;
				scrll=1;
				frmScrll='yes';
			}
 		if (border == 0) {
			var strFrameset = "<html><head><title>" + name + "</title></head><frameset rows='*,0' framespacing=0 border=0 frameborder=0><frame name='top' src='" + link + "' scrolling=" + frmScrll + "><frame name='bottom' src='' scrolling='no'></frameset></html>";
			superPop = window.open (link, windowName, "fullscreen,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scrll + ",resizable=0,screenX=" + hpos + ",screenY=" + vpos + ",outerWidth=" + wwdth + ",outerHeight=" + whght);
			superPop.document.open();
			superPop.document.write(strFrameset);
			superPop.document.close();
			superPop.moveTo(hpos,vpos);			
			if (slide == 0) {
				superPop.resizeTo(wwdth,whght);
			} else {
				var s_lngth = Math.ceil(wwdth/s_lngth);
				if (s_wdth == 0) {
					s_wdth = 1;
				}
				if (s_lngth >= wwdth) {
					s_lngth = wwdth;
				}
				while (s_wdth <= wwdth) {
				superPop.resizeTo(s_wdth,whght);
				s_wdth += s_lngth;
				}
				superPop.resizeTo(wwdth,whght);
			}
			if (popBehind == 0) {
			} else {
				window.focus();
			}
		} else {
			window.open (link, windowName, "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + scrll + ",resizable=0,screenX=" + hpos + ",screenY=" + vpos + ",outerWidth=" + wwdth + ",outerHeight=" + whght);
			if (popBehind == 0) {
			} else {
				window.focus();
			}
		}
	} else {
		document.write("<html><body><div align=center><h1 style='font-family:Arial, Helvetica, sans-serif'>And you aren't using a fourth generation or better browser... why?</h1></div></body></html>");
	}
}

function closeWindow() {			// <a href="javascript:closeWindow();">Close Window</a>
	if (navigator.appName == 'Microsoft Internet Explorer') {
		top.window.close();
	}
	else if (navigator.appName == 'Netscape') {
		top.window.close();
	} else {
		window.close();
	}
}
