function open_win(theURL,winName,features) { 
   
  var mainWin = self;
		if( window.winName == null )      // If the window has never been opened
			winName=window.open(theURL, winName, features);
		else {
		if( window.winName.closed )    // If the window was open but has been closed
			winName=window.open(theURL,  winName, features);
		else                              // The window is already open
			winName.location.href = theURL;
		}
		winName.opener = mainWin;
		winName.focus();
  
}

function SwapImage(name,state) {
  eval("document." +name+ ".src='images/" +state+ ".jpg'");
}