function findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function launchwindow (u){
	window.open(u);
}
function launchmedia (u){
	window.open(u,'media','scrollbars=no,menubar=no,height=100px,width=300px,resizable=no,menubar=no,toolbar=no,location=no,status=no');
}
function launchnews (i){
	launchwindow('pages/printnews.php?id='+i);
}
function openLegal() {
	var openLegal=window.open('/pages/legal.html','ow1','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); 
}
function openPrivacy() {
	var openPrivacy=window.open('/pages/privacy.html','ow1','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); 
}
function openMap() {
	self.name = "Parent_Window";
	var openMap=window.open('/pages/map.php','ow1','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); 
}
function openLogin() {
	var openLogin=window.open('http://www.afsa12.org/siteadmin/index.php','ow2','scrollbars=yes,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); 
}
function openExtras() {
	var openExtras=window.open('/pages/extras.php','ow1','scrollbars=yes,menubar=no,height=600,width=800,resizable=yes,toolbar=yes,location=no,status=no'); 
}
function openMailAdmin(to, toemail) {
	var openMailAdmin=window.open('/pages/mailer.php?to='+to+'&toemail='+toemail,'ow1','scrollbars=no,menubar=no,height=600,width=800,resizable=yes,toolbar=no,location=no,status=no'); 
}
function vcardSubmit() {
	if (! window.focus)return true;
	vcardpop=window.open('', 'vcp', 'height=2,width=2');
	findObj('vcard').action='/includes/vcard.php';
	findObj('vcard').target='vcp';
	self.setTimeout('popclose()', 5000);
	return true;
}
function popclose(){
	vcardpop.close()
}