
var contactWindow;
var joinWindow;
var avail_width = screen.availWidth;
var avail_height = screen.availHeight;
var contacts = new Array(
    "<p><b>Mark Wolff</b><br>Senior Vice President&#150;Communications<br>800-356-9655 x6764<br>Cell ph: 202-262-3712<br>Fax: 202-638-7716<br>Email: <a href='mailto:mwolff@cuna.coop'>mwolff@cuna.coop</a></p>",
    "<p><b>Pat Keefe</b><br>Vice President, Communications &amp; Media Outreach<br>800-356-9655 x6765<br>Cell ph: 301-728-4300<br>Fax: 202-638-7716<br>Email: <a href='mailto:pkeefe@cuna.coop'>pkeefe@cuna.coop</a></p>",
    "<p><b>Jennifer Porter Gore</b><br>Manager, Public &amp; Congressional Affairs<br>800-356-9655 x6766<br>Cell ph: 202-297-8177<br>Fax: 202-638-7716<br>Email: <a href='mailto:jgore@cuna.coop'>jgore@cuna.coop</a></p>",
    "<p><b>Katye Long</b><br>Public Relations Specialist<br>800-356-9655 x4038<br>Fax: 608-231-4253<br>Email: <a href='mailto:klong@cuna.coop'>klong@cuna.coop</a></p>"
    );

function openContactWindow(i) {
   var xPos = avail_width - 335;
   var yPos = avail_height - 165;
   if (! contactWindow || contactWindow.closed)
   {
      contactWindow = window.open("", "profile", "HEIGHT=150,WIDTH=270,MENUBAR=0,SCROLLBARS=0,STATUS=0,SCREENX=" + xPos + ",SCREENY=" + yPos + ",LEFT=" + xPos + ",TOP=" + yPos);
//	contactWindow = window.open("", "profile", "HEIGHT=150,WIDTH=270,MENUBAR=0,SCROLLBARS=0,STATUS=0");
     if (! contactWindow.opener)
     {
	contactWindow.opener = window;
     }
   }
   var bgnshell = "<html><head><title>Contact information</title></head>\n<body bgcolor='#eeeeee' onclick='self.close()'><font size=2>\n";
   contactWindow.document.write(bgnshell);
   contactWindow.document.write(contacts[i]);
   var endshell = "<center>(click to close)</center>\n</body></html>";
   contactWindow.document.write(endshell);
   contactWindow.document.close();
   contactWindow.focus();
   return true;
}

function joinlist() {
  if (joinWindow && !joinWindow.closed)
  joinWindow.close();
  joinWindow = window.open('join_frm.htm','join_window','HEIGHT=350,WIDTH=410,MENUBAR=0,TITLEBAR=0,SCROLLBARS=0,STATUS=0,SCREENY=90,TOP=90,RESIZABLE');
  if(!joinWindow.opener)
  joinWindow.opener = window;
}

var topicWindow;
var avail_width = screen.availWidth;
var nonnum = /([^0-9])/;

function showtopic() {
  if (arguments.length == 0)
	throw new Error("Error: Function showTopic called with no arguments");
  var arg = arguments[0].toString();
  var is_url = arg.match(nonnum);
	alert("ARG = " + arg + "\nIS URL = " + is_url);
  if (is_url==null)
	var hash = "hot_topics.html#topic" + arg;
  else
	var hash = arg;
	alert("HASH = " + hash);
  if (topicWindow && !topicWindow.closed) {
	topicWindow.location.replace(hash);
	topicWindow.focus();
  } else {
	var xpos = avail_width-450;
	topicWindow = window.open(hash,"thisTopic","HEIGHT=550,WIDTH=425,MENUBAR=0,TITLEBAR=0,SCROLLBARS=1,STATUS=0,SCREENX=" + xpos + ",SCREENY=220,LEFT=" + xpos + ",TOP=220,RESIZABLE");
	if (! topicWindow.opener) {
	  topicWindow.opener = self;
	}
  }
}

