// open the send to a freind window
var  sendfriendWindow
function sendfriend(){
		if (sendfriendWindow && !sendfriendWindow.closed){		  // Checks to see if a window is already open
			sendfriendWindow.close();
			sendfriendWindow =  window.open('http://www.driveabus.ca/sendfriend/eng/index.php?referURL='+self.location.href,'','width=500,height=360,scrollbars=1,noresize');
		}else{
			sendfriendWindow =  window.open('http://www.driveabus.ca/sendfriend/eng/index.php?referURL='+self.location.href,'','width=500,height=360,scrollbars=1,noresize');
		}
}	

// open any window with content
var  openWindow;								// open Window variable set
function newWindow(winUrl,winName,winOptions){   // function to open the window called from flash script
		if (openWindow && !openWindow.closed){		  // Checks to see if a window is already open
			openWindow.close();						  // if it is close the window 
			openWindow = window.open(winUrl,winName,winOptions); // Open a new window with the new project in it
		} else{
			openWindow = window.open(winUrl,winName,winOptions); // Otherwise just open the project in a new window.
		}
}
