
/*
 * A simple pop up window function for XHale Media.
 * @param	pUrl. String. This is the html page that will be displayed in the popup. Example: "http://www.xhalemedia/vr-tour/"
 * @param	pWindowName. String. Window's name.
 * @param	pWidth, pHeight. Integer. Size of the popup window.
 */
function openPopup( pUrl ) {
	var w = 640;
	var h = 480;
	var options = "location=0,status=0,scrollbars=0,resizable=1,width=" + w + ",height=" + h;
	try {
		myWindow = window.open(pUrl, 'vrWindow', options);
		myWindow.moveTo(100, 100);
		myWindow.focus();
	} catch ( e ) {
		// don't do anything with the excetion...
	}
} 

/*
 * Add the link to the external pop.js (this file) in the header of your page.
 * 
 * 		<!-- Popup Javascript -->
 * 		<script src="/pop.js" type="text/javascript"></script>
 */


/*
 * To use this, just embed it into a link <a> element on your page.
 * Here's an example:
 * 
 * 	<a href="http://www.xhalemedia/vr-tour/" onclick=" openPopup( 'http://www.xhalemedia/vr-tour/', 400, 180 ); return false;" >
 * 		<img src="/images/static-vr-image.jpg" alt="VR" />
 * 	</a>
 * 
 * The onclick handler calls our openPopup() function, passing in the parameters
 * that are used when opening the new window.
 * The 'return false;' after the function call stops the browser from following the
 * link in the <a> element (otherwise the main page would change too!)
 * 
 */



