/*
	numerology.inc
	file for ftn that opens up new windows in the numerology report section
	email, sample info, journal, etc.
	be sure tht new_window.js has already been included...
*/

	// added for numerology section 01-18-02
	function tip( section ) {
		var file = "/numerology/tip.php#" + section;
		newWindow( file, 300, 300, 0, 0, 'NumerologyTips', 'yes', 'yes' );
	}
	
	function chartinfo( id ){
		var file = "/numerology/popup.php?file=longdesc&chartId="+id;
		newWindow( file, 450, 380, 0, 0, 'ChartInfo', 'yes', 'yes' );
	}	

	function sample( type ) {
		var file = "/numerology/images/samples/" + type + "1.gif";
		newWindow( file, 500, 400, 0, 0, 'ScreenShot', 'yes', 'yes' );
	}
	
	function sample_info( chartId ){
		var file = "/numerology/popup.php?file=longdesc&chartId="+chartId;
		/*
			var file = "/numerology/popup.php?file=";

			if( chartId == 2 || chartId == 4 )
				file += "hd-full-info";
			else
				if( chartId == 5 || chartId == 7 )
					file += "personality-full-info";
		*/
		newWindow( file, 400, 400, 0, 0, 'MoreInfo', 'yes', 'yes' );
	}

	function confirm_delete(){
		var message = "You have chosen to delete this Report. This action cannot be undone.  Do you wish to continue?";
		if(confirm(message)){
			return true;
		}
		else{
			return false;
		}
	}	

function newSmWindow( file, w, h, t, l, winName ){
  if( !t ) var t = 10;
  if( !l ) var l = 10;
  if( !w ) var w = 350;
  if( !h ) var h = 300;
  if( !winName ) var winName = "newWindow";
  
  newWin = window.open( file, winName, 'scrollbars=1,resizable=1,top='+ t +',left='+ l +',height='+ h +',width='+ w);
  newWin.focus();
  if (newWin.opener == null) newWin.opener = self;
}