// JavaScript

// Pop up warnings
function warn_pop(type,arg) {
	if (pop){ pop.close(); }
	
	if ( type == "mail" ){ addr = arg; url = "/email.html?" + addr; }
	if ( type == "link" ){ lnk = arg; url = "/link.html?" + lnk; }
	if ( type == "form" ){ form_name = arg; url = "/form.html?" + form_name; }
	if ( type == "inv" ){ url = "/investment.html"; }
	
	var w = 1024; var h = 768;					// pop up window width and height
	var offset = 100; 							// set verticle offset of window ( positive numbers move window up )	
	var x = (screen.availWidth / 2) - (w/2);	// centers the pop up
	var y = (screen.availHeight / 2) - (h/2) - offset;
	var pop = window.open( url ,'win','menubar,scrollbars,width='+w+',height='+h+',screenX='+x+',screenY='+y+',left='+x+',top='+y+'');
	pop.focus();
}
